diff --git a/panther.js b/panther.js index 9bd9a2a7fb1868d7eb11cd9fcc67f7254492dfa5..07f2e60f18074afc487ce893af46f59ceeab15a7 100644 --- a/panther.js +++ b/panther.js @@ -685,10 +685,10 @@ if (real && typeof conf.real[bendingType] !== 'undefined') { pushComponent(facility, i, -1, tang, direction, y); } - if (stl && typeof conf.stl[bendingType] !== 'undefined') { + else if (stl && typeof conf.stl[bendingType] !== 'undefined') { pushComponent(facility, i, -1, tang, direction, y); } - if (high && typeof conf.high[bendingType] !== 'undefined') { + else if (high && typeof conf.high[bendingType] !== 'undefined') { pushComponent(facility, i, -1, tang, direction, y); } else { @@ -844,14 +844,16 @@ } const tourSpeed = 10; // speed [m/s] const tourPeriod = initVar('tourPeriod', 20); - const alphaPerPeriod = 0.012; + const alphaPerPeriod = 0.008; const tourBackets = initVar('tourBackets', 15); const tourBacketSize = initVar('tourBacketSize', 0.1); const tourBacketsDistance = initVar('tourBacketsDistance', 1500); const tourHight = initVar('tourHight', 2000); + const tourTransverse = initVar('tourTransverse', 1.1); const backets = []; + const showBackets = initVar('showBackets', false); function tourCamera(x, y, z, ry) { - camera.position.set(x, y, z); + camera.position.set(x*tourTransverse, y, z*tourTransverse); camera.rotateY(ry); renderer.render(scene, camera); } @@ -878,7 +880,7 @@ const ex = lattice[facility].sections[ns].start.x; const ez = lattice[facility].sections[ns].start.z; const d = Math.sqrt((ex - bx)*(ex - bx) + (ez - bz)*(ez - bz)); - for (let backet=0; backet<tourBackets; backet++) { + if (showBackets) for (let backet=0; backet<tourBackets; backet++) { placeBacket(backet, facility, section, pos); } console.log(section, pos, alpha/Math.PI*180); @@ -902,7 +904,7 @@ function switchTour() { console.log(lattice); const facility = 'sr'; - if (backets.length==0) for (let pi=1; pi<=tourBackets; pi++) { + if (showBackets && backets.length==0) for (let pi=1; pi<=tourBackets; pi++) { const sphere = new THREE.Mesh(sphereGeometry,normalMaterial.clone()); const bx = lattice[facility].sections[0].start.x; const bz = lattice[facility].sections[0].start.z;