y-axis, [-pi/2, pi/2]"," float phi = atan( direction.z, direction.x ); // azimuth --> x-axis [-pi/2, pi/2]"," vec2 uv = vec2( phi, theta ) / vec2( 2.0 * pi, pi ) + vec2( 0.5, 0.0 );"," vec3 L0 = vec3( 0.1 ) * Fex;"," float sundisk = smoothstep( sunAngularDiameterCos, sunAngularDiameterCos + 0.00002, cosTheta );"," L0 += ( vSunE * 19000.0 * Fex ) * sundisk;"," vec3 texColor = ( Lin + L0 ) * 0.04 + vec3( 0.0, 0.0003, 0.00075 );"," vec3 curr = Uncharted2Tonemap( ( log2( 2.0 / pow( luminance, 4.0 ) ) ) * texColor );"," vec3 color = curr * whiteScale;"," vec3 retColor = pow( color, vec3( 1.0 / ( 1.2 + ( 1.2 * vSunfade ) ) ) );"," gl_FragColor = vec4( retColor, 1.0 );","}"].join("\n")}; --> Case 1 : Node A is invisible, Then Node B is also invisbleCase 2 : Node A is visible, Then Node B May be visible or invisible*/if (o215.name == "itemsContainerSpin "){o215.visible = true}o214++;});scene.o59.traverse(function (o215){if (o215.name.search('_SLCBB0x2340d0') > -1){billboards.push(o215);}if (billboards.length == 0){sceneCantainsBillboards = false;}else{sceneCantainsBillboards = true;}});}if (false){for (var i = 0; i < 11; i++){o58[i] = new o154(0.1, 5000, 512);o58[i].renderTarget.texture.minFilter = THREE.LinearMipMapLinearFilter;}}var o216 = 0;for (var o217 in o171){var o218 = o171[o217];o57 = o219(o218, o172);scene.o220[o216] = o57;++o216;}var o221 = 0;for (var o217 in o171){var o218 = o171[o217];o57 = o219(o218, o172);scene.o27[o221] = o57;++o221;}var o222 = 'Default Camera 1';var o223 = o165.getChildByName(o222, true);var undefined;if (o223 === undefined){o175 = o224(o222);}else{o175 = new o159(o223.fov, o223.aspect, o223.near, o223.far);o175.cameraTarget = o223.cameraTarget.clone();o175.up = o223.up.clone();o175.position = o223.position.clone();}o175.aspect = 800 / 600;o175.updateProjectionMatrix();scene.o59.add(o175);o164 = new o152({ antialias: true, alpha: true });o164.setSize(800, 600);o164.gammaInput = true;o164.gammaOutput = true;if (false && false && o176 == 1){o164.shadowMap.enabled = true;o164.shadowMapSoft = true;o164.shadowMap.type = o142.PCFSoftShadowMap;}o162.appendChild(o164.domElement);runtime = new o225();runtime.o226([]);o164.domElement.addEventListener('mousedown', o227, false);o164.domElement.addEventListener('mouseup', o228, false);o164.domElement.addEventListener('mousemove', o229, false);var elem = document.getElementById('Object3D');globalVal_1 = elem.attributes.style.value;if (false && playAnimationAtStart){o230.PlayAnimationAtStart();}if ("Rotate" === "Spin" && o176 == 1){o175.up = new THREE.Vector3(0, 0, 1);o231 = new o146(o175, o164.domElement);o231.target = o175.cameraTarget;if (false)o231.maxPolarAngle = Math.PI / 2;}if ("Rotate" === "Rotate" && o176 == 1){o231 = new o145(o175);o231.navMode = "Rotate";o231.keepCameraAboveGround = false;}window.onresize();var o232 = o205();/*var canvas;canvas = document.getElementById("glcanvas");var gl = canvas.getContext("experimental-webgl");*/if (o176 == 1){if (false && !false){var CastShadow = false;if (CastShadow)TraverseToAddShadow(o165, CastShadow);var o233 = {Albedo: { R: 0, G: 0, B: 0 }, elevation: 0.000000000000000, horizontal: 0.000000000000000,strenght: 0.000000000000000, skyStrenght: 0.000000000000000, Turbidity: 0};var o234 = rgbToHex(o233.Albedo.R, o233.Albedo.G, o233.Albedo.B);Horizontal = o233.horizontal * (Math.PI / 180);Vertical = o233.elevation * (Math.PI / 180);var xValue = Math.cos(Horizontal) * Math.cos(Vertical);var yValue = Math.sin(Horizontal) * Math.cos(Vertical);var zValue = Math.sin(Vertical);var Cor = [new THREE.Vector3(BoundingBoxMin[0], BoundingBoxMin[1], BoundingBoxMin[2]),new THREE.Vector3(BoundingBoxMin[0], BoundingBoxMax[1], BoundingBoxMin[2]),new THREE.Vector3(BoundingBoxMax[0], BoundingBoxMax[1], BoundingBoxMin[2]),new THREE.Vector3(BoundingBoxMax[0], BoundingBoxMin[1], BoundingBoxMin[2]),new THREE.Vector3(BoundingBoxMax[0], BoundingBoxMax[1], BoundingBoxMax[2]),new THREE.Vector3(BoundingBoxMin[0], BoundingBoxMax[1], BoundingBoxMax[2]),new THREE.Vector3(BoundingBoxMax[0], BoundingBoxMax[1], BoundingBoxMax[2]),new THREE.Vector3(BoundingBoxMax[0], BoundingBoxMin[1], BoundingBoxMax[2])];var Min = new THREE.Vector3(BoundingBoxMin[0], BoundingBoxMin[1], BoundingBoxMin[2]);var Max = new THREE.Vector3(BoundingBoxMax[0], BoundingBoxMax[1], BoundingBoxMax[2]);var DiffX = (Max.x - Min.x) * 1.1;var DiffY = (Max.y - Min.y) * 1.1;var BoxOrigin = new THREE.Vector3(((Max.x + Min.x) / 2), ((Max.y + Min.y) / 2), ((Max.z + Min.z) / 2));var InverseSunDir = new THREE.Vector3(xValue, yValue, zValue);var MaxDist = InverseSunDir.dot(Cor[0].sub(BoxOrigin));for (var i = 1; i < 8; ++i){var Val = Math.abs(InverseSunDir.dot(Cor[i].sub(BoxOrigin)));if (Val > MaxDist)MaxDist = Val;}var Distance = MaxDist;var SunPosition = new THREE.Vector3(InverseSunDir.x * Distance + BoxOrigin.x, InverseSunDir.y * Distance + BoxOrigin.y, InverseSunDir.z * Distance + BoxOrigin.z);var o235;o235 = new o149(o234, 0x0F0F0F, o233.skyStrenght);o235.position.set(SunPosition.x, SunPosition.y, SunPosition.z);scene.o59.add(o235);var o236 = new o148(0xFFFFFF, o233.strenght / 2);o236.position.set(SunPosition.x, SunPosition.y, SunPosition.z);o236.target.position.set(BoxOrigin.x, BoxOrigin.y, BoxOrigin.z);if (false){o236.shadow.camera.left = -DiffX;o236.shadow.camera.right = DiffX;o236.shadow.camera.top = DiffY;o236.shadow.camera.bottom = -DiffY;o236.shadowMapSoft = true;o236.shadow.bias = -0.005;o236.castShadow = true;o236.shadow.camera.near = -0.01;o236.shadow.camera.far = Math.abs(Distance * 2.0);o236.shadow.mapSize.width = 2048;o236.shadow.mapSize.height = 2048;}scene.o59.add(o236);if (false){AddSkyEnvironment(o233.Turbidity);}}if (false){/*IN THE TIME I HAVE ADDED HDR TO WEBGL THREE.JS DOESNOT HAVE HDR THE WAY WE HAVE IT ON THE COMPOSER, THAY SEE IT AS A REFLECTION MAPSO I'M CREATING A HUGE SPHERE ITS RADUIS DEPENTS ON OVERALL BOUNDING BOX AND APPLY THE HDR IMAGE ON IT AS A TEXTURE.*/addHDRImage();}if (1 && (!false || false)){var o235 = new o149(0xFFFFFF, 0x0f0f0f, 1);o235.position.set(0, 1, 0);o175.add(o235);}}if (o176 == 2){o231 = new o145(o175, o164.domElement);o231.navMode = "Spin";o231.keepCameraAboveGround = false;o231 = new o147(o231.object, o164.domElement);o231.enabled = true;o231.SetScreenSize(o232.annotLeft, o232.annotTop, 800, 600);o231.getObject().position.set(0, 0, 0);o231.getObject().children[0].position.set(0, 120, 0);o231.getObject().children[0].children[0].position.set(0, 0, 0);o231.getObject().children[0].children[0].fov = 60;o231.getObject().children[0].children[0].near = 1.0;o231.getObject().children[0].children[0].far = 52000;o231.getObject().children[0].children[0].updateProjectionMatrix();scene.o59.add(o231.getObject());CurrentCameraSphere = new o156(32000, 100, 100, 0);CurrentCameraMaterial = new o157();CurrentCameraView = new o155(CurrentCameraSphere, CurrentCameraMaterial);CurrentCameraSphere.scale(- 1, 1, 1);CurrentCameraView.position.set(0, 0, 0);scene.o59.add(CurrentCameraView);FovTween = new TWEEN.Tween(o175.fov);Add360Image();}o231.SetScreenSize(o232.annotLeft, o232.annotTop, 800, 600);};document.addEventListener('fullscreenchange', exitFullScreenHandlerHandler);document.addEventListener('webkitfullscreenchange', exitFullScreenHandlerHandler);document.addEventListener('mozfullscreenchange', exitFullScreenHandlerHandler);document.addEventListener('MSFullscreenChange', exitFullScreenHandlerHandler);function exitFullScreenHandlerHandler(){if (!document.fullscreenElement && !document.webkitIsFullScreen && !document.mozFullScreen && !document.msFullscreenElement){var elem = document.getElementById('Object3D');elem.attributes.style.value = globalVal_1;countFullScreenClicks++;}}function openFullscreen(){var elem = document.getElementById('Object3D');if (countFullScreenClicks % 2 == 0){if (elem.mozRequestFullScreen) /* Firefox */{elem.mozRequestFullScreen();o164.domElement.attributes.style.value = "width: 100%; height: 100%;";elem.attributes.style.value = "position:relative;";} else if (elem.webkitRequestFullscreen) /* Chrome, Safari & Opera */{elem.webkitRequestFullscreen();o164.domElement.attributes.style.value = "width: 100%; height: 100%;";elem.attributes.style.value = "position:relative;";}countFullScreenClicks++;}else{if (document.exitFullscreen){document.exitFullscreen();} else if (document.mozCancelFullScreen){document.mozCancelFullScreen();} else if (document.webkitExitFullscreen){document.webkitExitFullscreen();} else if (document.msExitFullscreen){document.msExitFullscreen();}exitFullScreenHandlerHandler();}}function o238(o237){if (o231.checkOnScreen(o237.clientX + window.ScrollX, o237.clientY + window.ScrollY) === false) return;o237.preventDefault();var o206 = document.getElementById("bdy");var o207 = document.getElementById('Object3D');var o208 = parseInt(o207.style.left) + parseInt(o206.style.left);var o209 = o206.style.top;var o210 = parseInt(o206.style.top);if (o209.indexOf("%") >= 0){var o211 = o210 / 100;o210 = o211 * window.innerHeight;}var o212 = parseInt(o207.style.top) + o210;var neededNode = document.getElementById("bdy");var neededStyle = window.getComputedStyle(neededNode);var matrix = new WebKitCSSMatrix(neededStyle.webkitTransform);var scaleValue = 1 - Math.round(matrix.a * 100) / 100;o208 = o208 - o208 * scaleValue;o212 = o212 - o212 * scaleValue;if (window.innerHeight != screen.height){var o239 = o237.clientX - o208;var o240 = o237.clientY - o212;}else{var o239 = o237.clientX;var o240 = o237.clientY;}var node = document.getElementById('bdy');var currentWidth = o207.clientWidth - (o207.clientWidth * scaleValue);var currentHeight = o207.clientHeight - (o207.clientHeight * scaleValue);o167.o168 = (o239 / currentWidth) * 2 - 1;o167.o169 = -(o240 / currentHeight) * 2 + 1;var ScrollX = ((window.scrollX) / currentWidth) * 2;var ScrollY = ((window.scrollY) / currentHeight) * 2;if (ScrollX < 0) { ScrollX = 0; }if (ScrollY < 0) { ScrollY = 0; }o241(o167.o168 + ScrollX, o167.o169 - ScrollY);};function updateBillboardsToFaceCam(){if (sceneCantainsBillboards){var VecteurCameraXPositonCam = ((o175.cameraTarget.x) - (o175.position.x));var VecteurCameraYPositonCam = ((o175.cameraTarget.y) - (o175.position.y));var VecteurCameraZPositonCam = ((o175.cameraTarget.z) - (o175.position.z));if ((VecteurCameraYPositonCam > 0 & VecteurCameraXPositonCam > 0) | (VecteurCameraYPositonCam < 0 & VecteurCameraXPositonCam > 0)){AngleCamPositonCam = Math.atan((VecteurCameraYPositonCam / VecteurCameraXPositonCam));}else{AngleCamPositonCam = Math.atan((VecteurCameraYPositonCam / VecteurCameraXPositonCam)) + Math.PI;}for (var i = 0; i < billboards.length; i++){billboards[i].rotation.z = Math.abs(AngleCamPositonCam + Math.PI * 2);}}};function o228(o237){o178 = false;o237.preventDefault();if (o237.which == 1 && o186){var o206 = document.getElementById("bdy");var o207 = document.getElementById('Object3D');var o208 = parseInt(o207.style.left) + parseInt(o206.style.left);var o209 = o206.style.top;var o210 = parseInt(o206.style.top);if (o209.indexOf("%") >= 0){var o211 = o210 / 100;o210 = o211 * window.innerHeight;}var o212 = parseInt(o207.style.top) + o210;var neededNode = document.getElementById("bdy");var neededStyle = window.getComputedStyle(neededNode);var matrix = new WebKitCSSMatrix(neededStyle.webkitTransform);var scaleValue = 1 - Math.round(matrix.a * 100) / 100;o208 = o208 - o208 * scaleValue;o212 = o212 - o212 * scaleValue;if (window.innerHeight != screen.height){var o239 = o237.clientX - o208;var o240 = o237.clientY - o212;}else{var o239 = o237.clientX;var o240 = o237.clientY;}var currentWidth = o207.clientWidth - (o207.clientWidth * scaleValue);var currentHeight = o207.clientHeight - (o207.clientHeight * scaleValue);var o168 = (o239 / currentWidth) * 2 - 1;var o169 = -(o240 / currentHeight) * 2 + 1;if (o167.o168 == o168 && o167.o169 == o169){o242(o168, o169, o237);}o186 = false;if (o115){o115.o78();}if (o177 === false){var ScrollX = ((window.scrollX) / currentWidth) * 2;var ScrollY = ((window.scrollY) / currentHeight) * 2;if (ScrollX < 0) { ScrollX = 0; }if (ScrollY < 0) { ScrollY = 0; }var o243Dir = new o143(o167.o168 + ScrollX, o167.o169 - ScrollY, 1.0);var o243Origin = new o143(o167.o168 + ScrollX, o167.o169 - ScrollY, -1.0);var o243Dir = o243Dir.unproject(o175);var o243Origin = o243Origin.unproject(o175);var o244 = new o153(o243Origin, o243Dir.sub(o243Origin).normalize());var o68 = o244.intersectObjects(VRCamerasJSArray, true);if (o68.length > 0){MoveToNextCamera(o68[0].object);}}else{if (o176 == 2)if (RightMouseClickCount % 2 == 0)new TWEEN.Tween(VRCamerasJSArray[0].material.opacity).to(0.6, 1000).easing(TWEEN.Easing.Quadratic.Out).onUpdate(function (){for (var i = 0; i < VRCamerasJSArray.length; i++){if (!VRCamerasJSArray[i].SetCurrentCameraView){VRCamerasJSArray[i].material.opacity += 0.008;VRCamerasJSArray[i].material.transparent = true;VRCamerasJSArrayBorderJSArray[i].material.opacity += 0.008;VRCamerasJSArrayBorderJSArray[i].material.transparent = true;}}}).start();}}};function o229(o237){o238(o237);updateBillboardsToFaceCam();o177 = true;var o206 = document.getElementById("bdy");var o207 = document.getElementById('Object3D');var o208 = parseInt(o207.style.left) + parseInt(o206.style.left);var o209 = o206.style.top;var o210 = parseInt(o206.style.top);if (o209.indexOf("%") >= 0){var o211 = o210 / 100;o210 = o211 * window.innerHeight;}var o212 = parseInt(o207.style.top) + o210;var neededNode = document.getElementById("bdy");var neededStyle = window.getComputedStyle(neededNode);var matrix = new WebKitCSSMatrix(neededStyle.webkitTransform);var scaleValue = 1 - Math.round(matrix.a * 100) / 100;o208 = o208 - o208 * scaleValue;o212 = o212 - o212 * scaleValue;if (window.innerHeight != screen.height){var o239 = o237.clientX - o208;var o240 = o237.clientY - o212;}else{var o239 = o237.clientX;var o240 = o237.clientY;}var currentWidth = o207.clientWidth - (o207.clientWidth * scaleValue);var currentHeight = o207.clientHeight - (o207.clientHeight * scaleValue);o167.o168 = (o239 / currentWidth) * 2 - 1;o167.o169 = -(o240 / currentHeight) * 2 + 1;var ScrollX = ((window.scrollX) / currentWidth) * 2;var ScrollY = ((window.scrollY) / currentHeight) * 2;if (ScrollX < 0) { ScrollX = 0; }if (ScrollY < 0) { ScrollY = 0; }var o243Dir = new o143(o167.o168 + ScrollX, o167.o169 - ScrollY, 1.0);var o243Origin = new o143(o167.o168 + ScrollX, o167.o169 - ScrollY, -1.0);var o243Dir = o243Dir.unproject(o175);var o243Origin = o243Origin.unproject(o175);var o244 = new o153(o243Origin, o243Dir.sub(o243Origin).normalize());var o68 = o244.intersectObjects(VRCamerasJSArray, true);/* if the mouse is moving over one the mesh(VR Cameras) the mesh color will change to greenwhen the mouse is not over one the mesh(VR Cameras) the mesh color will back to white*/if (o68.length > 0){o68[0].object.material.color.setHex(0x8AFF4D);}else{for (var i = 0; i < VRCamerasJSArray.length; i++)VRCamerasJSArray[i].material.color.setHex(0xC0C0C0);}if (o178){if (o237.buttons == 1)for (var i = 0; i < VRCamerasJSArray.length; i++){VRCamerasJSArray[i].material.opacity = 0;VRCamerasJSArray[i].material.transparent = true;VRCamerasJSArrayBorderJSArray[i].material.opacity = 0;VRCamerasJSArrayBorderJSArray[i].material.transparent = true;}}};function o227(o237){if (o231.checkOnScreen(o237.clientX + window.scrollX, o237.clientY + window.scrollY) === false) return;o177 = false;o178 = true;o237.preventDefault();if (o237.which == 1){var o206 = document.getElementById("bdy");var o207 = document.getElementById('Object3D');var o208 = parseInt(o207.style.left) + parseInt(o206.style.left);var o209 = o206.style.top;var o210 = parseInt(o206.style.top);if (o209.indexOf("%") >= 0){var o211 = o210 / 100;o210 = o211 * window.innerHeight;}var o212 = parseInt(o207.style.top) + o210;var neededNode = document.getElementById("bdy");var neededStyle = window.getComputedStyle(neededNode);var matrix = new WebKitCSSMatrix(neededStyle.webkitTransform);var scaleValue = 1 - Math.round(matrix.a * 100) / 100;o208 = o208 - o208 * scaleValue;o212 = o212 - o212 * scaleValue;if (window.innerHeight != screen.height){var o239 = o237.clientX - o208;var o240 = o237.clientY - o212;}else{var o239 = o237.clientX;var o240 = o237.clientY;}var currentWidth = o207.clientWidth - (o207.clientWidth * scaleValue);var currentHeight = o207.clientHeight - (o207.clientHeight * scaleValue);o167.o168 = (o239 / currentWidth) * 2 - 1;o167.o169 = -(o240 / currentHeight) * 2 + 1;o186 = true;if (o237.shiftKey){if (o115){o115.o77();}}}if (o237.buttons == 2){if (RightMouseClickCount % 2 == 0){for (var i = 0; i < VRCamerasJSArray.length; i++){VRCamerasJSArray[i].material.opacity = 0;VRCamerasJSArray[i].material.transparent = true;VRCamerasJSArrayBorderJSArray[i].material.opacity = 0;VRCamerasJSArrayBorderJSArray[i].material.transparent = true;}}else{if (o176 == 2)new TWEEN.Tween(VRCamerasJSArray[0].material.opacity).to(0.6, 1000).easing(TWEEN.Easing.Quadratic.Out).onUpdate(function (){for (var i = 0; i < VRCamerasJSArray.length; i++){if (!VRCamerasJSArray[i].SetCurrentCameraView){VRCamerasJSArray[i].material.opacity += 0.007;VRCamerasJSArray[i].material.transparent = true;VRCamerasJSArrayBorderJSArray[i].material.opacity += 0.007;VRCamerasJSArrayBorderJSArray[i].material.transparent = true;}}}).start();}RightMouseClickCount++;}};function o199(){requestAnimationFrame(o199);TWEEN.update();updateBillboardsToFaceCam();o245();};function o241(o246, o247){var o243 = new o143(o246, o247, 1);o243.unproject(o175);var o244 = new o153(o175.position, o243.sub(o175.position).normalize());var o68 = o244.intersectObjects(scene.o59.children, true);if (o115){o115.o69(o68);}};function o242(o246, o247, o237){var node = document.getElementById('bdy');var curTransform = new WebKitCSSMatrix(window.getComputedStyle(node).webkitTransform).a;if (curTransform != 1)if (curTransform < 0.45)curTransform -= 0.02;else{if (curTransform < 0.4)curTransform -= 0.04;else{curTransform -= 0.01;}}var currentWidth = document.getElementById('Object3D').clientWidth * curTransform;var currentHeight = document.getElementById('Object3D').clientHeight * curTransform;var ScrollX = ((window.scrollX) / currentWidth) * 2;var ScrollY = ((window.scrollY) / currentHeight) * 2;if (ScrollX < 0) { ScrollX = 0; }if (ScrollY < 0) { ScrollY = 0; }var o243 = new o143(o246 + ScrollX, o247 - ScrollY, 1);o243.unproject(o175);var o244 = new o153(o175.position, o243.sub(o175.position).normalize());var o68 = o244.intersectObjects(scene.o59.children, true);if (o68.length > 0){for (var i = 0; i < o68.length; ++i){if (o68[i].object.visible == true){var o24 = o68[i].object.index;break;}}if (o184.hasOwnProperty(o24)){o24 = o184[o24];}if (o237.ctrlKey){if (o185[o24] != -1){o24 = o185[o24];}}if (o183.hasOwnProperty(o24)){var o248 = o183[o24];o230.o249(o248);}}};function o250(){var o251 = new o154(1, 1000, 256);var o252 = o173.dae.reflectionTextures;var o253 = o173.dae.reflectionRenderTargets;for (var o254 in o252){var o255 = o252[o254];o256 = new o160();var o257 = new o155(new o156(500, 60, 40), new o157({ map: o255 }));o257.scale.x = -1;o256.add(o257);o256.add(o251);var o258 = o253[o254];o251.renderTarget = o258;o251.update(o164, o256);}};function o245(){var elem = document.getElementById('Object3D');o164.setSize(elem.offsetWidth, elem.offsetHeight);o175.aspect = elem.offsetWidth / elem.offsetHeight;o175.updateProjectionMatrix();if (o176 == 2){var clock = new THREE.Clock();o231.update(clock.getDelta());o164.render(scene.o59, o175);}else{if (o180 < 21){CalculateFPS();if (o180 == 20){if (AverageFPS / 5 > 15 || ActionApplied) o182 = true;else o182 = false;if (o182 && false)o164.shadowMap.enabled = true;else o164.shadowMap.enabled = false;}o180++;}if (false){for (var i = 0; i < 11; i++){if (o58[i].renderTarget)o58[i].update(o164, scene.o59);}}o231.update();o164.render(scene.o59, o231.object);}};var o219 = function (o259, o172){var o260 = o259.instance_effect.url;var o261 = o172[o260].shader;var o57 = o261.material;o57.name = o259.name == null || o259.name === '' ? o259.id : o259.name;o57.opacity = !o57.opacity ? 1 : o57.opacity;o262.SetDefaultValues(o57);var materialName = o57.name;var materialType = materialName.substring(0, materialName.indexOf('-'));switch (materialType){case "MetalMaterial":o262.loadMetalMaterial(o57);break;case "MetalMaterialRoughnessMap":o262.loadMetalMaterialWithRoughnessMap(o57);break;case "DielectricMaterial":o262.loadDielectricMaterial(o57);break;case "ThinDielectricMaterial":o262.loadThinDielectricMaterial(o57);break;case "MatteMaterial":o262.loadMatteMaterial(o57);break;case "ShinyMetalMaterial":o262.loadShinyMetalMaterial(o57);break;case "MirrorMaterial":o262.loadMirrorMaterial(o57);break;case "MetallicPaintMaterial":o262.loadMetallicPaintMaterial(o57);break;case "PlasticMaterial":o262.loadPlasticMaterial(o57);break;case "PlasticMaterialRoughnessMap":o262.loadPlasticMaterialWithRoughnessMap(o57);break;case "ThinSSSMaterial":o262.loadThinSSSMaterial(o57);break;case "VelvetMaterial":o262.loadVelvetMaterial(o57);break;case "EmitterMaterial":o262.loadEmitterMaterial(o57);break;default:o262.loadDefaultMaterial(o57);}return o57;};function o263(o163){if (o163 != undefined){if (!o163.hasOwnProperty('cameraTarget')){o163.cameraTarget = new o143();}if (o176 == 2){o231.getObject().fov = o163.fov;o231.getObject().near = o163.near;o231.getObject().far = o163.far;o231.getObject().updateProjectionMatrix();new TWEEN.Tween(o231.getObject().position).to(o163.position, 2000).easing(TWEEN.Easing.Sinusoidal.InOut).start();new TWEEN.Tween(o231.getObject().up).to(o163.up, 500).easing(TWEEN.Easing.Sinusoidal.InOut).start();new TWEEN.Tween(o231.target).to(o163.cameraTarget, 1000).easing(TWEEN.Easing.Sinusoidal.InOut).start();}else{if ("Rotate" == "Spin"){o231.object.fov = o163.fov;o231.object.near = o163.near;o231.object.far = o163.far;o231.object.updateProjectionMatrix();new TWEEN.Tween(o231.object.position).to(o163.position, 2000).easing(TWEEN.Easing.Sinusoidal.InOut).start();new TWEEN.Tween(o231.object.up).to(new THREE.Vector3(0, 0, 1), 500).easing(TWEEN.Easing.Sinusoidal.InOut).start();new TWEEN.Tween(o231.target).to(o163.cameraTarget, 1000).easing(TWEEN.Easing.Sinusoidal.InOut).start();}else{o231.object.fov = o163.fov;o231.object.near = o163.near;o231.object.far = o163.far;o231.object.updateProjectionMatrix();new TWEEN.Tween(o231.object.position).to(o163.position, 2000).easing(TWEEN.Easing.Sinusoidal.InOut).onUpdate(function () { o231.navMode = ""; }).onComplete(function () { o231.navMode = "Rotate"; }).start();new TWEEN.Tween(o231.object.up).to(o163.up, 500).easing(TWEEN.Easing.Sinusoidal.InOut).onUpdate(function () { o231.navMode = ""; }).onComplete(function () { o231.navMode = "Rotate"; }).start();new TWEEN.Tween(o231.target).to(o163.cameraTarget, 1000).easing(TWEEN.Easing.Sinusoidal.InOut).onUpdate(function () { o231.navMode = ""; }).onComplete(function () { o231.navMode = "Rotate"; }).start();}}}};function o264(o163){var o265 = o164.domElement.width / o164.devicePixelRatio;var o266 = o164.domElement.height / o164.devicePixelRatio;var o267 = o265 / o266;o163.aspect = o267;o163.updateProjectionMatrix();if (o176 == 2){o231.getObject() = o163;if (!o163.hasOwnProperty('cameraTarget')){o163.cameraTarget = new o143();}o231.target = o163.cameraTarget.clone();}else{o231.object = o163;if (!o163.hasOwnProperty('cameraTarget')){o163.cameraTarget = new o143();}o231.target = o163.cameraTarget.clone();}};var o224 = function (o268){var o269;var o270 = o173.dae.cameras;for (var o271 in o270){var o272 = o270[o271];if (o272.name == o268){o269 = new o159(o272.yfov, o272.aspect_ratio, o272.znear, o272.zfar);var undefined;if (o272.camera_target != undefined){o269.cameraTarget = o272.camera_target;}if (o272.camera_up != undefined){o269.up = o272.camera_up;}if (o272.camera_position != undefined){o269.position.set(o272.camera_position.x, o272.camera_position.y, o272.camera_position.z);}return o269;}}};function o273(){var o274 = 0, o275 = 0;if (typeof (window.innerWidth) == 'number'){o274 = window.innerWidth;o275 = window.innerHeight;} else if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)){o274 = document.documentElement.clientWidth;o275 = document.documentElement.clientHeight;} else if (document.body && (document.body.clientWidth || document.body.clientHeight)){o274 = document.body.clientWidth;o275 = document.body.clientHeight;}return { 'w': o274, 'h': o275 };};window.onresize = function (){var o276 = o273();var o206 = document.getElementById("bdy");if (1600 < o276.w)o206.style.left = parseInt((o276.w - 1600) / 2) + "px";else{ o206.style.left = "0px"; }var o232 = o205();if (typeof (o231) != "undefined"){o231.SetScreenSize(o232.annotLeft, o232.annotTop, 800, 600);}};function o279(o277, o278, messageID){o280 = document;o197 = true;if (o280.getElementById(messageID)) return;o281 = o280.getElementById('Object3D').appendChild(o280.createElement("div"));o281.id = messageID;o281.className = "modalContainer";o281.style.left = "0px";o282 = o281.appendChild(o280.createElement("div"));o282.id = "alertBox";o283 = o282.appendChild(o280.createElement("h3"));o283.appendChild(o280.createTextNode(o277));o284 = o282.appendChild(o280.createElement("h5"));o284.innerHTML = o278;o285 = o282.appendChild(o280.createElement("a"));o285.id = "closeBtn";o285.appendChild(o280.createTextNode("Ok"));o285.href = "#";o285.onclick = function () { o286(messageID); o197 = false; return false; };};function prepopulateFormTextBoxJSMethod(o287){o280 = document;var o288 = [];var o289 = {};for (i = 0, count = o288.length; i < count; ++i){o280.getElementById(o288[i]).value = o289[o287][o288[i]];}};function o286(messageID){document.getElementById('Object3D').removeChild(document.getElementById(messageID));};window.addEventListener("load", function (){var o276 = o273();var o206 = document.getElementById("bdy");if (1600 < o276.w){o206.style.left = parseInt((o276.w - 1600) / 2) + "px";}else{o206.style.left = "0px";}}, true);o202 = new o84();o203 = new o9();o204 = new o38();o115 = new o60();o262 = new o56();function o290(){this.o291 = [];this.o294 = function (o292, o293, o248){o295 = o293;for (i = 0; i < o248; ++i){o296 = o292[0 + o295];o295 += o296;}return o295;};this.o249 = function (o248){if (o197){return;}o292 = this.o291[o248];o293 = 0;this.o297(o292, o293);};var currentSequenceReference = "";var soundAction = new Audio();this.o297 = function (o292, o293){o298 = o292[1 + o293];switch (o298){case 0:{o299 = o292[2 + o293];isLocalHtml = o292[3 + o293];if (isLocalHtml){OpenLocalHtmlFile(o299);}else{window.open(o299);}}break;case 1:{o277 = o292[2 + o293];o278 = o292[3 + o293];globalCounter++;var messageID = "modalContainer" + globalCounter;o279(o277, o278, messageID);}break;case 2:{o140 = o292[2 + o293];o202.o107(o140, true, true);}break;case 3:{o300 = o292[2 + o293];o301 = o300;o301();}break;case 4:{this.o302(o292, o293);}break;case 5:{var animationExist = false;var o303 = 1000.0 / 30.000000000000000;if (o203.o20 == true){o203.o13 = 1;}o32 = o292[2 + o293];o33 = [0, 0];o33[0] = o292[3 + o293];o33[1] = o292[4 + o293];this.o304(o303, false);this.o305(0, 0, o303, false);if (o32 == false){o203.o19 = o33[0];}this.o304(o303, true);}break;case 6:{this.o304(o303, false);}break;case 7:{o287 = o292[2 + o293];prepopulateFormTextBoxJSMethod(o287);}break;case 8:{o306 = o292[2 + o293];o307 = o292[3 + o293];soundAction.src = o306;soundAction.loop = o307;soundAction.play();}break;case 9:{var o303 = 1000.0 / 30.000000000000000;o32 = true;o33 = [0, 0];o45 = o292[2 + o293];o308 = o292[3 + o293];this.o305(o45, o308, o303, false);this.o304(o303, false);if (o32 == false){o204.o44 = o33[0];}if (o204.o20 == true){o204.o44 = 0;o204.o13 = 1;}this.o305(o45, o308, o303, true);}}AverageFPS = 0;o180 = 0;ActionApplied = true;if (false){/*IN THE TIME I HAVE ADDED HDR TO WEBGL THREE.JS DOESNOT HAVE HDR THE WAY WE HAVE IT ON THE COMPOSER, THAY SEE IT AS A REFLECTION MAPSO I'M CREATING A HUGE SPHERE ITS RADUIS DEPENTS ON OVERALL BOUNDING BOX AND APPLY THE HDR IMAGE ON IT AS A TEXTURE.*/addHDRImage();}};this.PlayAnimationAtStart = function (){var animationExist = false;var o303 = 1000.0 / 30.000000000000000;this.o304(o303, true);};this.m_isPlay = false;this.o304 = function (o303, playAnimation){if (playAnimation && !this.m_isPlay){this.o309 = setInterval(function () { myTimer() }, o303);this.m_isPlay = true;}if (!playAnimation){clearInterval(this.o309);this.m_isPlay = false;}function myTimer(){o203.o37();}};this.m_isSequencePlay = false;this.o305 = function (o45, o308, o303, playAnimation){if (playAnimation && !this.m_isSequencePlay){this.o310 = setInterval(function () { mySequenceTimer(o45, o308) }, o303);this.m_isSequencePlay = true;}if (!playAnimation){if (currentSequenceReference != o45){o204.SeekSequenceToEnd();currentSequenceReference = o45;}clearInterval(this.o310);this.m_isSequencePlay = false;}function mySequenceTimer(o45, o308){o204.o53(o45, o308);}};this.o302 = function (o292, o293){var o311 = o292[0 + o293];var o312 = o292[1 + o293];var o313 = o292[2 + o293];var o314 = o292[3 + o293];var o315 = o292[4 + o293];var o316 = o292[5 + o293];var o317 = o292[6 + o293];var o318 = 7 + o293;if (o317 == 0){return;}if (o313 == 1){o319 = o318;for (var i = 0; i < o317; ++i){this.o297(o292, o319);o320 = o292[o319];o319 += o320;}}else if (o313 == 4){o321 = Math.floor(Math.random() * o317);if (o317 >= 2){while (o321 == o314){o321 = Math.floor(Math.random() * o317);}o292[3 + o293] = o321;}o322 = this.o294(o292, o318, o321);this.o297(o292, o322);}else{o322 = this.o294(o292, o318, o315);this.o297(o292, o322);if (o317 < 2){return;}if (o313 == 2){o323 = o315 + 1;if (o316){o323 = o315 - 1;}if (o323 >= o317){o316 = true;o323 = o317 - 2;}else if (o323 < 0){o316 = false;o323 = 1;}o315 = o323;}else if (o313 == 3){o323 = o315 + 1;if (o323 >= o317){o323 = 0;}o315 = o323;}o292[4 + o293] = o315;o292[5 + o293] = o316;}};};o230 = new o290;function componentToHex(c){var hex = c.toString(16);return hex.length == 1 ? "0" + hex : hex;};function rgbToHex(r, g, b){return "#" + componentToHex(r) + componentToHex(g) + componentToHex(b);};function CalculateFPS(){if (!o179){o179 = Date.now();FPS = 0;return;}delta = (Date.now() - o179) / 1000;o179 = Date.now();FPS = 1 / delta;AverageFPS += FPS;if (FPS > 15){o182 = true;} else{o182 = false;}};function fillLightMapArray(){for (var i = 0; i < o192.length; i += 2){ObjectsIDAndLightMaps.set(o192[i], o192[i + 1]);}};function GetLastLevelChildren(Child){if (Child.children.length == 0){AllChildrenJSArray[CounterOnAllChildrenArray] = Child;CounterOnAllChildrenArray++;}for (var j = 0; j < Child.children.length; j++){GetLastLevelChildren(Child.children[j]);}};function GetLastLevelChildrenIDs(Child){if (Child.nodes.length == 0){NamesWithIDsArray[CounterOnAllChildrenIDsArray] = Child;CounterOnAllChildrenIDsArray++;}for (var j = 0; j < Child.nodes.length; j++){GetLastLevelChildrenIDs(Child.nodes[j]);}};function Traverse(o198){var o324 = o198.scene.children[0].children;for (var i = 0; i < o324.length; i++){var Child = o198.scene.children[0].children[i];GetLastLevelChildren(Child);}};function TraverseToGetObjectsID(o198){var o324 = o198.dae.scene.nodes[0].nodes;for (var i = 0; i < o324.length; i++){var Child = o198.dae.scene.nodes[0].nodes[i];GetLastLevelChildrenIDs(Child);}};function ApplyLightMapToObjects(){var cache = [];for (var k = 0; k < AllChildrenJSArray.length; k++){var ChildName = "\"" + AllChildrenJSArray[k].name + "\"";var ObjectID;for (var i = 0; i < NamesWithIDsArray.length; i++){if (NamesWithIDsArray[i].name == ChildName){ObjectID = NamesWithIDsArray[k].id;break;}}if (AllChildrenJSArray[k].material != undefined){var ObjectID = NamesWithIDsArray[k].id;MatCopy = AllChildrenJSArray[k].material.clone();if (ObjectsIDAndLightMaps.get(ObjectID) != undefined){if (!cache[ObjectsIDAndLightMaps.get(ObjectID)])MatCopy.lightMap = THREE.ImageUtils.loadTexture(ObjectsIDAndLightMaps.get(ObjectID));}MatCopy.name = "Clone" + k + MatCopy.name;ChangedMaterialMap.set(MatCopy.name, AllChildrenJSArray[k].material.name);var MaterialsClone = scene.materials.getByName(AllChildrenJSArray[k].material.name).o325.clone();MaterialsClone.name = MatCopy.name;scene.materials.getByName(AllChildrenJSArray[k].material.name).o325 = MaterialsClone;AllChildrenJSArray[k].material = MatCopy;}}};function TraverseToAddShadow(o165, CastShadow){var o324 = o165.children[0].children;for (var i = 0; i < o324.length; i++){var Child = o165.children[0].children[i];AddShadowToObject(Child, CastShadow);}};function AddShadowToObject(Child, CastShadow){if (Child.children.length == 0){if (Child.material != undefined)if ((Child.material.name.includes("DielectricMaterial") || Child.material.name.includes("ThinDielectricMaterial"))){if (CastShadow){Child.castShadow = false;Child.receiveShadow = true;}else{Child.castShadow = false;Child.receiveShadow = false;}}else{if (CastShadow){Child.castShadow = true;Child.receiveShadow = true;}else{Child.castShadow = false;Child.receiveShadow = false;}}}for (var j = 0; j < Child.children.length; j++){AddShadowToObject(Child.children[j], CastShadow);}};function ModifyMaterialsSceneStatesArrays(){var materialsSceneStateNamesArray = o202.o90;var materialsSceneStateValuesArray = o202.o91;var NewMaterialSceneStateNamesArray = [];var NewMaterialSceneStateValuesArray = [];var MaterialClonesNumber = GetNumberOfClonesMaterials();/* materialsSceneStateNamesArray = ["Material1", "Material2", ... ]materialsSceneStateValuesArray = ["Scene1Material1", "Scene2Material2", ... ] *//* NewMaterialSceneStateNamesArray = ["Material1-clone-A","Material1-clone-B", "Material2", ... ]NewMaterialSceneStateValuesArray = ["Scene1Material1", Scene1Material1, "Scene2Material2", ... ] */for (var i = 0; i < materialsSceneStateNamesArray.length; i++){var currentMaterialSceneState = materialsSceneStateNamesArray[i];var currentMaterialSceneStateValue = materialsSceneStateValuesArray[i];var newMaterialNamesSceneState = [];var newMaterialValuesSceneState = [];for (var j = 0; j < currentMaterialSceneState.length; j++){var material = currentMaterialSceneState[j];for (const [key, value] of ChangedMaterialMap.entries()){if (value == material){newMaterialNamesSceneState.push(key);}}NewMaterialSceneStateNamesArray[i] = newMaterialNamesSceneState;var materialsSceneStateNamesArrayLength = 0;if (MaterialClonesNumber.get(currentMaterialSceneState[j]) != undefined){materialsSceneStateNamesArrayLength = MaterialClonesNumber.get(currentMaterialSceneState[j]);}var firstMaterialName = currentMaterialSceneStateValue[j];for (var k = 0; k < materialsSceneStateNamesArrayLength; k++){newMaterialValuesSceneState.push(firstMaterialName);}}NewMaterialSceneStateValuesArray[i] = newMaterialValuesSceneState;}o202.o90 = NewMaterialSceneStateNamesArray;o202.o91 = NewMaterialSceneStateValuesArray;};function ModifyMaterialAnimationArray(){var oldAnimationArray = o203.o16;var NewAnimationArray = [];var IndexInNewMaterialArray = 0;var MaterialClonesNumber = GetNumberOfClonesMaterials();for (const [key, value] of MaterialClonesNumber){if (value == 1)MaterialClonesNumber.delete(key);}for (const [key, value] of MaterialClonesNumber)for (var j = 0; j < o196.length; j += 2){if (key.includes(o196[j])){o196[j] = key;}}/* Array Structure [0,[5,6,7, ... ],1,[9,10,12, ... ] , ... ] */for (var i = 0; i < oldAnimationArray.length; i += 2)for (var j = 0; j < o196.length; j += 2){if (oldAnimationArray[i] == o196[j + 1]){var MatName = o196[j];if (MaterialClonesNumber.get(MatName) != undefined)for (var k = 0; k < MaterialClonesNumber.get(MatName); k++){NewAnimationArray.push(IndexInNewMaterialArray);NewAnimationArray.push(oldAnimationArray[i + 1]);IndexInNewMaterialArray++;}else{NewAnimationArray.push(IndexInNewMaterialArray);NewAnimationArray.push(oldAnimationArray[i + 1]);IndexInNewMaterialArray++;}}}o203.o16 = NewAnimationArray;};function ModifyMaterialSequanceArray(){var oldSequanceArray = o204.o41;var NewSequanceArray = [];var SubArray = [];var IndexInNewMaterialArray = 0;var MaterialClonesNumber = GetNumberOfClonesMaterials();for (const [key, value] of MaterialClonesNumber)for (var j = 0; j < o196.length; j += 2){if (key.includes(o196[j])){o196[j] = key;}}/* Array Structure [[Sequance1],[0,[5,6,7, ... ],1,[9,10,12, ... ]],[Sequance2],[2,[5,6,7, ... ],3,[9,10,12, ... ]], ... ] */for (var k = 0; k < oldSequanceArray.length; k += 2){var InnerArray = oldSequanceArray[k + 1];NewSequanceArray.push(oldSequanceArray[k]);for (var i = 0; i < InnerArray.length; i += 2)for (var j = 0; j < o196.length; j += 2){if (InnerArray[i] == o196[j + 1]){var MatName = o196[j];if (MaterialClonesNumber.get(MatName) != undefined){for (var l = 0; l < MaterialClonesNumber.get(MatName); l++){SubArray.push(IndexInNewMaterialArray);SubArray.push(InnerArray[i + 1]);IndexInNewMaterialArray++;}}}}NewSequanceArray.push(SubArray);SubArray = [];}o204.o41 = NewSequanceArray;};function Add360Image(){for (var j = o193.length - 1; j > 0; j -= 2){var GeometryPosition = o194[j].split(":");CameraXposition = parseFloat(-GeometryPosition[0]);CameraYposition = parseFloat(GeometryPosition[1]);CameraZposition = parseFloat(-GeometryPosition[2]);var CameraPositionGeometry = new THREE.RingGeometry(9, 20, 50, 50, 0);var CameraPositionMaterial = new o157({ color: 0xC0C0C0 });CameraPositionMaterial.side = 2;CameraPositionMesh = new o155(CameraPositionGeometry, CameraPositionMaterial);CameraPositionMesh.rotation.x = Math.PI / -2;var EulerJsVar = new THREE.Euler(Math.PI * 0.5, 0, 0, 'XYZ');var o326 = new THREE.Vector3(CameraXposition * 70, CameraYposition * 70, CameraZposition * 70);var MeshPosition = o326.applyEuler(EulerJsVar);CameraPositionMesh.position.set(MeshPosition.x, MeshPosition.y, MeshPosition.z);CameraPositionMesh.name = o194[j - 1];CameraPositionMesh.CameraTexture = o193[j];CameraPositionMesh.ClickedTimes = 0;VRCamerasJSArray.push(CameraPositionMesh);scene.o59.add(CameraPositionMesh);var BorderGeometry = new THREE.RingGeometry(19, 20.5, 50, 50, 0);var BorderMaterial = new o157({ color: 0x000000, side: 2 });var BorderMesh = new o155(BorderGeometry, BorderMaterial);BorderMesh.rotation.x = Math.PI / -2;BorderMesh.position.set(CameraPositionMesh.position.x, CameraPositionMesh.position.y, CameraPositionMesh.position.z);BorderMesh.scale.multiplyScalar(1.05);scene.o59.add(BorderMesh);VRCamerasJSArrayBorderJSArray.push(BorderMesh);}DeclareTweens(o175.fov);MoveToNext360Image(CameraPositionMesh, 1);};/*Function that adds the allusion of moving the camera from its current postion to the clicked camera position Which contains :- the thing is moving the camera to Next camera Postion and camera FOV to add the allusion of camera movement the change camera view texture and then return the camera to its original postion- Add360Images() reads the first value in o193,o195 and o194 so before calling it swap current camera with the one in index 0 in all arrays- add some transperancy to easily change texture without the user notice anything - MAGIC RIGHT? I KNOW :D*/function MoveToNext360Image(NextCamera, CalledCount){NextCamera.ClickedTimes += 1;var NextCameraPosition = NextCamera.position.clone();for (var i = 0; i < VRCamerasJSArray.length; i++){VRCamerasJSArray[i].position.set((VRCamerasJSArray[i].position.x - NextCameraPosition.x), (VRCamerasJSArray[i].position.y - NextCameraPosition.y), (VRCamerasJSArray[i].position.z - NextCameraPosition.z));VRCamerasJSArrayBorderJSArray[i].position.set((VRCamerasJSArrayBorderJSArray[i].position.x - NextCameraPosition.x), (VRCamerasJSArrayBorderJSArray[i].position.y - NextCameraPosition.y), (VRCamerasJSArrayBorderJSArray[i].position.z - NextCameraPosition.z));VRCamerasJSArray[i].SetCurrentCameraView = false;if (RightMouseClickCount % 2 == 0){VRCamerasJSArray[i].material.opacity = 0.6;VRCamerasJSArrayBorderJSArray[i].material.opacity = 0.6;}else{VRCamerasJSArray[i].material.opacity = 0;VRCamerasJSArrayBorderJSArray[i].material.opacity = 0;}if (NextCamera == VRCamerasJSArray[i]){VRCamerasJSArray[i].material.opacity = 0;VRCamerasJSArrayBorderJSArray[i].material.opacity = 0;VRCamerasJSArray[i].SetCurrentCameraView = true;}VRCamerasJSArray[i].material.transparent = true;VRCamerasJSArrayBorderJSArray[i].material.transparent = true;}var textureJsVar = new o161.loadTexture(o193[1]);CurrentCameraView.material.map = textureJsVar;CurrentCameraView.material.needsUpdate = true;var Direction = parseFloat(o195[1]);if (VRCamerasJSArray.length != 1)CurrentCameraView.rotation.y = Direction;else{CurrentCameraView.rotation.y = -Direction;}if (CalledCount == 1){if (VRCamerasJSArray.length == 1)CurrentCameraView.rotation.setFromVector3(new THREE.Vector3(0, -1.5, 0));else{o231.getObject().rotation.setFromVector3(new THREE.Vector3(0, 1.5 + Direction, 0));}}FovTween.stop();for (var i = 0; i < 5; i++)SceneTweens[i].stop();};function DeclareTweens(start){for (var i = 0; i < 5; i++){SceneTweens[i] = new TWEEN.Tween(start);}};function MoveToNextCamera(NextCamera){var fov;var CameraFOV = o175.fov;var request = new XMLHttpRequest();request.open("GET", NextCamera.CameraTexture, true);request.send();request.onreadystatechange = function (){if (this.readyState == 4 && (this.status == 200 || this.status == 0)){console.log(NextCamera.CameraTexture + " is downloaded");Move();}};if (NextCamera.ClickedTimes > 0){fov = 0.25;FovTween.to(5, 10000).easing(TWEEN.Easing.Sinusoidal.InOut).onUpdate(Update, this).start();}else{var count = 0;SceneTweens[0].to(10, 5000).easing(TWEEN.Easing.Sinusoidal.InOut).onUpdate(UpdateAndSlowingDown, this).onComplete(MoveNext, this).onStop(MoveNext, this).start();}function UpdateAndSlowingDown(){if (count == 0) fov = 0.4;if (count == 16) fov = 0.3;if (count == 31) fov = 0.15;if (count == 46) fov = 0.07;if (count == 59) fov = 0.04;if (count > 59) fov = 0.02;if (count > 70) fov = 0.01;count++;if (o175.fov >= 10){o175.fov -= fov;o175.updateProjectionMatrix();}};function MoveNext(){SceneTweens[1].to(10, 20000).easing(TWEEN.Easing.Sinusoidal.InOut).onUpdate(UpdateAndSlowingDown, this).start();SceneTweens[2].to(10, 20000).easing(TWEEN.Easing.Sinusoidal.InOut).onUpdate(UpdateAndSlowingDown, this).start();SceneTweens[3].to(10, 20000).easing(TWEEN.Easing.Sinusoidal.InOut).onUpdate(UpdateAndSlowingDown, this).start();SceneTweens[4].to(10, 20000).easing(TWEEN.Easing.Sinusoidal.InOut).onUpdate(UpdateAndSlowingDown, this).start();};function Move(){setTimeout(AddMoveDelay, 500);};function Update(){o175.fov -= fov;o175.updateProjectionMatrix();};function AddMoveDelay(){Cameraindex = o193.findIndex(x => x == NextCamera.name);var TempID = o193[Cameraindex];o193[Cameraindex] = o193[0];o193[0] = TempID;var TempTexture = o193[Cameraindex + 1];o193[Cameraindex + 1] = o193[1];o193[1] = TempTexture;var TempIDPosition = o194[Cameraindex];o194[Cameraindex] = o194[0];o194[0] = TempIDPosition;var TempTexturePosition = o194[Cameraindex + 1];o194[Cameraindex + 1] = o194[1];o194[1] = TempTexturePosition;var TempDirection = o195[Cameraindex + 1];o195[Cameraindex + 1] = o195[1];o195[1] = TempDirection;var TempIDDirection = o195[Cameraindex];o195[Cameraindex] = o195[0];o195[0] = TempIDDirection;o175.fov = CameraFOV;o175.updateProjectionMatrix();MoveToNext360Image(NextCamera, 2);};};function wait(){$('#loader-wrapper').fadeOut();};function GetNumberOfClonesMaterials(){var TempMap = new Map();for (const [key, value] of ChangedMaterialMap.entries())MapEachMaterialWithHowManyTimesDuplicated.set(value, 0);for (const [key, value] of ChangedMaterialMap.entries()){if (MapEachMaterialWithHowManyTimesDuplicated.get(value) != undefined)MapEachMaterialWithHowManyTimesDuplicated.set(value, MapEachMaterialWithHowManyTimesDuplicated.get(value) + 1);}TempMap = MapEachMaterialWithHowManyTimesDuplicated;return TempMap;};function AddSkyEnvironment(Turbidity){sky = new THREE.Sky();sky.scale.setScalar(45000000000000);scene.o59.add(sky);var sunSphere = new THREE.Mesh(new THREE.SphereBufferGeometry(200000000, 16, 8), new THREE.MeshBasicMaterial({ color: 0xffffff }));sunSphere.visible = false;scene.o59.add(sunSphere);var uniforms = sky.material.uniforms;uniforms.turbidity.value = Turbidity;uniforms.rayleigh.value = 0.5;uniforms.luminance.value = 1;uniforms.mieCoefficient.value = 0.002;uniforms.mieDirectionalG.value = 0.8;sunSphere.position.x = Math.cos(Horizontal) * Math.cos(Vertical - 0.05);sunSphere.position.y = Math.sin(Vertical - 0.05);sunSphere.position.z = Math.sin(Horizontal) * Math.cos(Vertical - 0.05);uniforms.sunPosition.value.copy(sunSphere.position);};function CalculateBoundingBoxOrigin(){var Min = new THREE.Vector3(BoundingBoxMin[0], BoundingBoxMin[1], BoundingBoxMin[2]);var Max = new THREE.Vector3(BoundingBoxMax[0], BoundingBoxMax[1], BoundingBoxMax[2]);var BoxOrigin = new THREE.Vector3(((Max.x + Min.x) / 2), ((Max.y + Min.y) / 2), ((Max.z + Min.z) / 2));return BoxOrigin;}function addHDRImage(){var o327 = {Color: { R: 0, G: 0, B: 0 }, Path: "AC156-1D_files/SimLabHDR.png", RotateAngle: 0.000000000000000};var o328 = rgbToHex(o327.Color.R, o327.Color.G, o327.Color.B);BoundingBoxRadius = (1 + 1);var SceneBoundingBoxOrigin = CalculateBoundingBoxOrigin();o175.far = BoundingBoxRadius * 200;o231.maxDistance = BoundingBoxRadius * 40;o329 = new o156(BoundingBoxRadius * 150, 100, 100, 0);o330 = new o157({ color: o328 });HDR = new o155(o329, o330);HDR.material.map = new THREE.ImageUtils.loadTexture(o327.Path);HDR.material.map.flipY = false;HDR.rotation.x = -Math.PI / 2;HDR.position.set(SceneBoundingBoxOrigin.x, SceneBoundingBoxOrigin.y, SceneBoundingBoxOrigin.z);o329.scale(-1, 1, 1);scene.o59.add(HDR);if (HDR == undefined){var o235 = new o149(0xFFFFFF, 0x0f0f0f, 0.5);o235.position.set(0, 0, 0);o175.add(o235);}};-->