var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(q,G,ba){q!=Array.prototype&&q!=Object.prototype&&(q[G]=ba.value)};$jscomp.getGlobal=function(q){return"undefined"!=typeof window&&window===q?q:"undefined"!=typeof global&&null!=global?global:q};$jscomp.global=$jscomp.getGlobal(this);$jscomp.SYMBOL_PREFIX="jscomp_symbol_"; $jscomp.initSymbol=function(){$jscomp.initSymbol=function(){};$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol)};$jscomp.Symbol=function(){var q=0;return function(G){return $jscomp.SYMBOL_PREFIX+(G||"")+q++}}(); $jscomp.initSymbolIterator=function(){$jscomp.initSymbol();var q=$jscomp.global.Symbol.iterator;q||(q=$jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator"));"function"!=typeof Array.prototype[q]&&$jscomp.defineProperty(Array.prototype,q,{configurable:!0,writable:!0,value:function(){return $jscomp.arrayIterator(this)}});$jscomp.initSymbolIterator=function(){}};$jscomp.arrayIterator=function(q){var G=0;return $jscomp.iteratorPrototype(function(){return Gq||1342177279>>=1)G+=G;return ka}},"es6","es3");$jscomp.checkEs6ConformanceViaProxy=function(){try{var q={},G=Object.create(new $jscomp.global.Proxy(q,{get:function(ba,ka,K){return ba==q&&"q"==ka&&K==G}}));return!0===G.q}catch(ba){return!1}}; $jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS=!1;$jscomp.ES6_CONFORMANCE=$jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS&&$jscomp.checkEs6ConformanceViaProxy(); $jscomp.polyfill("WeakMap",function(q){function G(){if(!q||!Object.seal)return!1;try{var x=Object.seal({}),p=Object.seal({}),G=new q([[x,2],[p,3]]);if(2!=G.get(x)||3!=G.get(p))return!1;G.delete(x);G.set(p,4);return!G.has(x)&&4==G.get(p)}catch(ra){return!1}}function ba(q){$jscomp.owns(q,K)||$jscomp.defineProperty(q,K,{value:{}})}function ka(q){var p=Object[q];p&&(Object[q]=function(q){ba(q);return p(q)})}if($jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS){if(q&&$jscomp.ES6_CONFORMANCE)return q}else if(G())return q; var K="$jscomp_hidden_"+Math.random();ka("freeze");ka("preventExtensions");ka("seal");var x=0,V=function(q){this.id_=(x+=Math.random()+1).toString();if(q){$jscomp.initSymbol();$jscomp.initSymbolIterator();q=$jscomp.makeIterator(q);for(var p;!(p=q.next()).done;)p=p.value,this.set(p[0],p[1])}};V.prototype.set=function(q,p){ba(q);if(!$jscomp.owns(q,K))throw Error("WeakMap key fail: "+q);q[K][this.id_]=p;return this};V.prototype.get=function(q){return $jscomp.owns(q,K)?q[K][this.id_]:void 0};V.prototype.has= function(q){return $jscomp.owns(q,K)&&$jscomp.owns(q[K],this.id_)};V.prototype.delete=function(q){return $jscomp.owns(q,K)&&$jscomp.owns(q[K],this.id_)?delete q[K][this.id_]:!1};return V},"es6","es3");$jscomp.polyfill("Math.sign",function(q){return q?q:function(q){q=Number(q);return 0===q||isNaN(q)?q:0h&&(h=f[a]);return h}function R(){Object.defineProperty(this,"id",{value:hk+=2});this.uuid=ja.generateUUID();this.name="";this.type="BufferGeometry";this.index=null;this.attributes={};this.morphAttributes={};this.groups=[];this.boundingSphere=this.boundingBox=null;this.drawRange={start:0,count:Infinity}}function ad(f,h,a,b,c,d){ca.call(this);this.type="BoxGeometry";this.parameters={width:f,height:h,depth:a,widthSegments:b,heightSegments:c, depthSegments:d};this.fromBufferGeometry(new $b(f,h,a,b,c,d));this.mergeVertices()}function $b(f,h,a,b,c,d){function e(a,b,c,d,e,f,h,wa,q,I,x){var t=f/q,u=h/I,v=f/2,y=h/2,A=wa/2;h=q+1;var Q=I+1,C=f=0,E,Ka,U=new p;for(Ka=0;Kal;l++){if(m=b[l])if(g=m[0],k=m[1]){n&&c.addAttribute("morphTarget"+l,n[g]);d&&c.addAttribute("morphNormal"+ l,d[g]);a[l]=k;continue}a[l]=0}e.getUniforms().setValue(f,"morphTargetInfluences",a)}}}function tk(f,h){var a={};return{update:function(b){var c=h.render.frame,d=b.geometry,e=f.get(b,d);a[e.id]!==c&&(d.isGeometry&&e.updateFromObject(b),f.update(e),a[e.id]=c);return e},dispose:function(){a={}}}}function ac(f,h,a,b,c,d,e,g,k,l){f=void 0!==f?f:[];ra.call(this,f,void 0!==h?h:301,a,b,c,d,e,g,k,l);this.flipY=!1}function uc(f,h,a){var b=f[0];if(0>=b||0/gm,function(f,a){f=pa[a];if(void 0===f)throw Error("Can not resolve #include <"+a+">");return hf(f)})}function eh(f){return f.replace(/#pragma unroll_loop[\s]+?for \( int i = (\d+); i < (\d+); i \+\+ \) \{([\s\S]+?)(?=\})\}/g,function(f,a,b,c){f="";for(a=parseInt(a);a 0 ) {\n\t\tfloat fogFactor = 0.0;\n\t\tif ( fogType == 1 ) {\n\t\t\tfogFactor = smoothstep( fogNear, fogFar, fogDepth );\n\t\t} else {\n\t\t\tconst float LOG2 = 1.442695;\n\t\t\tfogFactor = exp2( - fogDensity * fogDensity * fogDepth * fogDepth * LOG2 );\n\t\t\tfogFactor = 1.0 - clamp( fogFactor, 0.0, 1.0 );\n\t\t}\n\t\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n\t}\n}"].join("\n")); h.compileShader(va);h.compileShader(ia);h.attachShader(U,va);h.attachShader(U,ia);h.linkProgram(U);Aa=U;wa=h.getAttribLocation(Aa,"position");Q=h.getAttribLocation(Aa,"uv");d=h.getUniformLocation(Aa,"uvOffset");e=h.getUniformLocation(Aa,"uvScale");g=h.getUniformLocation(Aa,"rotation");k=h.getUniformLocation(Aa,"center");l=h.getUniformLocation(Aa,"scale");n=h.getUniformLocation(Aa,"color");m=h.getUniformLocation(Aa,"map");r=h.getUniformLocation(Aa,"opacity");w=h.getUniformLocation(Aa,"modelViewMatrix"); t=h.getUniformLocation(Aa,"projectionMatrix");u=h.getUniformLocation(Aa,"fogType");v=h.getUniformLocation(Aa,"fogDensity");q=h.getUniformLocation(Aa,"fogNear");A=h.getUniformLocation(Aa,"fogFar");C=h.getUniformLocation(Aa,"fogColor");h.getUniformLocation(Aa,"fogDepth");E=h.getUniformLocation(Aa,"alphaTest");U=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");U.width=8;U.height=8;va=U.getContext("2d");va.fillStyle="white";va.fillRect(0,0,8,8);D=new he(U)}a.useProgram(Aa);a.initAttributes(); a.enableAttribute(wa);a.enableAttribute(Q);a.disableUnusedAttributes();a.disable(h.CULL_FACE);a.enable(h.BLEND);h.bindBuffer(h.ARRAY_BUFFER,x);h.vertexAttribPointer(wa,2,h.FLOAT,!1,16,0);h.vertexAttribPointer(Q,2,h.FLOAT,!1,16,8);h.bindBuffer(h.ELEMENT_ARRAY_BUFFER,B);h.uniformMatrix4fv(t,!1,Ka.projectionMatrix.elements);a.activeTexture(h.TEXTURE0);h.uniform1i(m,0);va=U=0;(ia=y.fog)?(h.uniform3f(C,ia.color.r,ia.color.g,ia.color.b),ia.isFog?(h.uniform1f(q,ia.near),h.uniform1f(A,ia.far),h.uniform1i(u, 1),va=U=1):ia.isFogExp2&&(h.uniform1f(v,ia.density),h.uniform1i(u,2),va=U=2)):(h.uniform1i(u,0),va=U=0);ia=0;for(var ef=p.length;iab||a.height>b){if("data"in a){console.warn("THREE.WebGLRenderer: image in DataTexture is too big ("+a.width+"x"+a.height+").");return}b/=Math.max(a.width,a.height);var c=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");c.width=Math.floor(a.width* b);c.height=Math.floor(a.height*b);c.getContext("2d").drawImage(a,0,0,a.width,a.height,0,0,c.width,c.height);console.warn("THREE.WebGLRenderer: image is too big ("+a.width+"x"+a.height+"). Resized to "+c.width+"x"+c.height,a);return c}return a}function k(a){return ja.isPowerOfTwo(a.width)&&ja.isPowerOfTwo(a.height)}function l(a,b){return a.generateMipmaps&&b&&1003!==a.minFilter&&1006!==a.minFilter}function n(a,c,d,e){f.generateMipmap(a);b.get(c).__maxMipLevel=Math.log(Math.max(d,e))*Math.LOG2E}function m(a){return 1003=== a||1004===a||1005===a?f.NEAREST:f.LINEAR}function r(a){a=a.target;a.removeEventListener("dispose",r);a:{var c=b.get(a);if(a.image&&c.__image__webglTextureCube)f.deleteTexture(c.__image__webglTextureCube);else{if(void 0===c.__webglInit)break a;f.deleteTexture(c.__webglTexture)}b.remove(a)}a.isVideoTexture&&delete C[a.id];e.memory.textures--}function w(a){a=a.target;a.removeEventListener("dispose",w);var c=b.get(a),d=b.get(a.texture);if(a){void 0!==d.__webglTexture&&f.deleteTexture(d.__webglTexture); a.depthTexture&&a.depthTexture.dispose();if(a.isWebGLRenderTargetCube)for(d=0;6>d;d++)f.deleteFramebuffer(c.__webglFramebuffer[d]),c.__webglDepthbuffer&&f.deleteRenderbuffer(c.__webglDepthbuffer[d]);else f.deleteFramebuffer(c.__webglFramebuffer),c.__webglDepthbuffer&&f.deleteRenderbuffer(c.__webglDepthbuffer);b.remove(a.texture);b.remove(a)}e.memory.textures--}function t(h,m){var w=b.get(h);if(h.isVideoTexture){var t=h.id,v=e.render.frame;C[t]!==v&&(C[t]=v,h.update())}if(0p;p++)v[p]=m||t?t?h.image[p].image:h.image[p]:g(h.image[p],c.maxCubemapSize);var q=v[0],y=k(q),A=d.convert(h.format),C=d.convert(h.type);u(f.TEXTURE_CUBE_MAP, h,y);for(p=0;6>p;p++)if(m)for(var E,Q=v[p].mipmaps,wa=0,x=Q.length;war;r++)d.__webglFramebuffer[r]=f.createFramebuffer()}else d.__webglFramebuffer=f.createFramebuffer();if(h){a.bindTexture(f.TEXTURE_CUBE_MAP,g.__webglTexture);u(f.TEXTURE_CUBE_MAP,c.texture,m);for(r=0;6>r;r++)v(d.__webglFramebuffer[r],c,f.COLOR_ATTACHMENT0,f.TEXTURE_CUBE_MAP_POSITIVE_X+r);l(c.texture,m)&&n(f.TEXTURE_CUBE_MAP,c.texture, c.width,c.height);a.bindTexture(f.TEXTURE_CUBE_MAP,null)}else a.bindTexture(f.TEXTURE_2D,g.__webglTexture),u(f.TEXTURE_2D,c.texture,m),v(d.__webglFramebuffer,c,f.COLOR_ATTACHMENT0,f.TEXTURE_2D),l(c.texture,m)&&n(f.TEXTURE_2D,c.texture,c.width,c.height),a.bindTexture(f.TEXTURE_2D,null);if(c.depthBuffer){d=b.get(c);g=!0===c.isWebGLRenderTargetCube;if(c.depthTexture){if(g)throw Error("target.depthTexture not supported in Cube render targets");if(c&&c.isWebGLRenderTargetCube)throw Error("Depth Texture with cube render targets is not supported"); f.bindFramebuffer(f.FRAMEBUFFER,d.__webglFramebuffer);if(!c.depthTexture||!c.depthTexture.isDepthTexture)throw Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");b.get(c.depthTexture).__webglTexture&&c.depthTexture.image.width===c.width&&c.depthTexture.image.height===c.height||(c.depthTexture.image.width=c.width,c.depthTexture.image.height=c.height,c.depthTexture.needsUpdate=!0);t(c.depthTexture,0);d=b.get(c.depthTexture).__webglTexture;if(1026===c.depthTexture.format)f.framebufferTexture2D(f.FRAMEBUFFER, f.DEPTH_ATTACHMENT,f.TEXTURE_2D,d,0);else if(1027===c.depthTexture.format)f.framebufferTexture2D(f.FRAMEBUFFER,f.DEPTH_STENCIL_ATTACHMENT,f.TEXTURE_2D,d,0);else throw Error("Unknown depthTexture format");}else if(g)for(d.__webglDepthbuffer=[],g=0;6>g;g++)f.bindFramebuffer(f.FRAMEBUFFER,d.__webglFramebuffer[g]),d.__webglDepthbuffer[g]=f.createRenderbuffer(),p(d.__webglDepthbuffer[g],c);else f.bindFramebuffer(f.FRAMEBUFFER,d.__webglFramebuffer),d.__webglDepthbuffer=f.createRenderbuffer(),p(d.__webglDepthbuffer, c);f.bindFramebuffer(f.FRAMEBUFFER,null)}};this.updateRenderTargetMipmap=function(c){var d=c.texture,e=k(c);if(l(d,e)){e=c.isWebGLRenderTargetCube?f.TEXTURE_CUBE_MAP:f.TEXTURE_2D;var g=b.get(d).__webglTexture;a.bindTexture(e,g);n(e,d,c.width,c.height);a.bindTexture(e,null)}}}function nl(f,h){return{convert:function(a){if(1E3===a)return f.REPEAT;if(1001===a)return f.CLAMP_TO_EDGE;if(1002===a)return f.MIRRORED_REPEAT;if(1003===a)return f.NEAREST;if(1004===a)return f.NEAREST_MIPMAP_NEAREST;if(1005=== a)return f.NEAREST_MIPMAP_LINEAR;if(1006===a)return f.LINEAR;if(1007===a)return f.LINEAR_MIPMAP_NEAREST;if(1008===a)return f.LINEAR_MIPMAP_LINEAR;if(1009===a)return f.UNSIGNED_BYTE;if(1017===a)return f.UNSIGNED_SHORT_4_4_4_4;if(1018===a)return f.UNSIGNED_SHORT_5_5_5_1;if(1019===a)return f.UNSIGNED_SHORT_5_6_5;if(1010===a)return f.BYTE;if(1011===a)return f.SHORT;if(1012===a)return f.UNSIGNED_SHORT;if(1013===a)return f.INT;if(1014===a)return f.UNSIGNED_INT;if(1015===a)return f.FLOAT;if(1016===a){var b= h.get("OES_texture_half_float");if(null!==b)return b.HALF_FLOAT_OES}if(1021===a)return f.ALPHA;if(1022===a)return f.RGB;if(1023===a)return f.RGBA;if(1024===a)return f.LUMINANCE;if(1025===a)return f.LUMINANCE_ALPHA;if(1026===a)return f.DEPTH_COMPONENT;if(1027===a)return f.DEPTH_STENCIL;if(100===a)return f.FUNC_ADD;if(101===a)return f.FUNC_SUBTRACT;if(102===a)return f.FUNC_REVERSE_SUBTRACT;if(200===a)return f.ZERO;if(201===a)return f.ONE;if(202===a)return f.SRC_COLOR;if(203===a)return f.ONE_MINUS_SRC_COLOR; if(204===a)return f.SRC_ALPHA;if(205===a)return f.ONE_MINUS_SRC_ALPHA;if(206===a)return f.DST_ALPHA;if(207===a)return f.ONE_MINUS_DST_ALPHA;if(208===a)return f.DST_COLOR;if(209===a)return f.ONE_MINUS_DST_COLOR;if(210===a)return f.SRC_ALPHA_SATURATE;if(33776===a||33777===a||33778===a||33779===a)if(b=h.get("WEBGL_compressed_texture_s3tc"),null!==b){if(33776===a)return b.COMPRESSED_RGB_S3TC_DXT1_EXT;if(33777===a)return b.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(33778===a)return b.COMPRESSED_RGBA_S3TC_DXT3_EXT; if(33779===a)return b.COMPRESSED_RGBA_S3TC_DXT5_EXT}if(35840===a||35841===a||35842===a||35843===a)if(b=h.get("WEBGL_compressed_texture_pvrtc"),null!==b){if(35840===a)return b.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(35841===a)return b.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(35842===a)return b.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(35843===a)return b.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(36196===a&&(b=h.get("WEBGL_compressed_texture_etc1"),null!==b))return b.COMPRESSED_RGB_ETC1_WEBGL;if(37808===a||37809===a||37810=== a||37811===a||37812===a||37813===a||37814===a||37815===a||37816===a||37817===a||37818===a||37819===a||37820===a||37821===a)if(b=h.get("WEBGL_compressed_texture_astc"),null!==b)return a;if(103===a||104===a)if(b=h.get("EXT_blend_minmax"),null!==b){if(103===a)return b.MIN_EXT;if(104===a)return b.MAX_EXT}return 1020===a&&(b=h.get("WEBGL_depth_texture"),null!==b)?b.UNSIGNED_INT_24_8_WEBGL:0}}}function Ba(f,h,a,b){Ab.call(this);this.type="PerspectiveCamera";this.fov=void 0!==f?f:50;this.zoom=1;this.near= void 0!==a?a:.1;this.far=void 0!==b?b:2E3;this.focus=10;this.aspect=void 0!==h?h:1;this.view=null;this.filmGauge=35;this.filmOffset=0;this.updateProjectionMatrix()}function jf(f){Ba.call(this);this.cameras=f||[]}function gh(f){function h(){if(null!==b&&!0===b.isPresenting){var c=b.getEyeParameters("left"),d=c.renderWidth;c=c.renderHeight;u=f.getPixelRatio();t=f.getSize();f.setDrawingBufferSize(2*d,c,1)}else a.enabled&&f.setDrawingBufferSize(t.width,t.height,u)}var a=this,b=null,c=null,d=null,e=new V, g=new V;"undefined"!==typeof window&&"VRFrameData"in window&&(c=new window.VRFrameData,window.addEventListener("vrdisplaypresentchange",h,!1));var k=new V,l=new sa,n=new p,m=new Ba;m.bounds=new ya(0,0,.5,1);m.layers.enable(1);var r=new Ba;r.bounds=new ya(.5,0,.5,1);r.layers.enable(2);var w=new jf([m,r]);w.layers.enable(1);w.layers.enable(2);var t,u;this.enabled=!1;this.userHeight=1.6;this.getDevice=function(){return b};this.setDevice=function(a){void 0!==a&&(b=a)};this.setPoseTarget=function(a){void 0!== a&&(d=a)};this.getCamera=function(f){if(null===b)return f;b.depthNear=f.near;b.depthFar=f.far;b.getFrameData(c);var h=b.stageParameters;h?e.fromArray(h.sittingToStandingTransform):e.makeTranslation(0,a.userHeight,0);h=c.pose;var t=null!==d?d:f;t.matrix.copy(e);t.matrix.decompose(t.position,t.quaternion,t.scale);null!==h.orientation&&(l.fromArray(h.orientation),t.quaternion.multiply(l));null!==h.position&&(l.setFromRotationMatrix(e),n.fromArray(h.position),n.applyQuaternion(l),t.position.add(n));t.updateMatrixWorld(); if(!1===b.isPresenting)return f;m.near=f.near;r.near=f.near;m.far=f.far;r.far=f.far;w.matrixWorld.copy(f.matrixWorld);w.matrixWorldInverse.copy(f.matrixWorldInverse);m.matrixWorldInverse.fromArray(c.leftViewMatrix);r.matrixWorldInverse.fromArray(c.rightViewMatrix);g.getInverse(e);m.matrixWorldInverse.multiply(g);r.matrixWorldInverse.multiply(g);f=t.parent;null!==f&&(k.getInverse(f.matrixWorld),m.matrixWorldInverse.multiply(k),r.matrixWorldInverse.multiply(k));m.matrixWorld.getInverse(m.matrixWorldInverse); r.matrixWorld.getInverse(r.matrixWorldInverse);m.projectionMatrix.fromArray(c.leftProjectionMatrix);r.projectionMatrix.fromArray(c.rightProjectionMatrix);w.projectionMatrix.copy(m.projectionMatrix);f=b.getLayers();f.length&&(f=f[0],null!==f.leftBounds&&4===f.leftBounds.length&&m.bounds.fromArray(f.leftBounds),null!==f.rightBounds&&4===f.rightBounds.length&&r.bounds.fromArray(f.rightBounds));return w};this.getStandingMatrix=function(){return e};this.submitFrame=function(){null!==b&&!0===b.isPresenting&& b.submitFrame()};this.dispose=function(){"undefined"!==typeof window&&window.removeEventListener("vrdisplaypresentchange",h)}}function kf(f){function h(){Fa=new nk(M);Fa.get("WEBGL_depth_texture");Fa.get("OES_texture_float");Fa.get("OES_texture_float_linear");Fa.get("OES_texture_half_float");Fa.get("OES_texture_half_float_linear");Fa.get("OES_standard_derivatives");Fa.get("OES_element_index_uint");Fa.get("ANGLE_instanced_arrays");ua=new nl(M,Fa);da=new lk(M,Fa,f);na=new kl(M,Fa,ua);na.scissor(J.copy(ma).multiplyScalar(S)); na.viewport(G.copy(W).multiplyScalar(S));fa=new qk(M);ba=new $k;ha=new ml(M,Fa,na,ba,da,ua,fa);ka=new ek(M);la=new ok(M,ka,fa);pa=new tk(la,fa);za=new sk(M);oa=new Zk(z,Fa,da);sa=new dl;ra=new il;qa=new jk(z,na,la,Q);Ba=new kk(M,Fa,fa);Ca=new pk(M,Fa,fa);Da=new jl(z,M,na,ha,da);fa.programs=oa.programs;z.context=M;z.capabilities=da;z.extensions=Fa;z.properties=ba;z.renderLists=sa;z.state=na;z.info=fa}function a(a){a.preventDefault();console.log("THREE.WebGLRenderer: Context Lost.");H=!0}function b(){console.log("THREE.WebGLRenderer: Context Restored."); H=!1;h()}function c(a){a=a.target;a.removeEventListener("dispose",c);d(a);ba.remove(a)}function d(a){var b=ba.get(a).program;a.program=void 0;void 0!==b&&oa.releaseProgram(b)}function e(a,b,c){a.render(function(a){z.renderBufferImmediate(a,b,c)})}function g(){var a=xa.getDevice();a&&a.isPresenting?a.requestAnimationFrame(k):window.requestAnimationFrame(k)}function k(a){!1!==Ea&&(Ha(a),g())}function l(a,b,c){if(!1!==a.visible){if(a.layers.test(b.layers))if(a.isLight)F.pushLight(a),a.castShadow&&F.pushShadow(a); else if(a.isSprite)a.frustumCulled&&!X.intersectsSprite(a)||F.pushSprite(a);else if(a.isImmediateRenderObject)c&&ea.setFromMatrixPosition(a.matrixWorld).applyMatrix4(aa),D.push(a,null,a.material,ea.z,null);else if(a.isMesh||a.isLine||a.isPoints)if(a.isSkinnedMesh&&a.skeleton.update(),!a.frustumCulled||X.intersectsObject(a)){c&&ea.setFromMatrixPosition(a.matrixWorld).applyMatrix4(aa);var d=pa.update(a),e=a.material;if(Array.isArray(e))for(var g=d.groups,f=0,h=g.length;fa.matrixWorld.determinant();na.setMaterial(g,h);h=w(c,b.fog,g,a);ia="";e(a,h,g)}else z.renderBufferDirect(c,b.fog,d,g,a,f);a.onAfterRender(z,b,c,d,g,f);F=ra.get(b,U||c)}function r(a,b,e){var g=ba.get(a),f=F.state.lights;e=oa.getParameters(a,f.state,F.state.shadowsArray,b,Y.numPlanes, Y.numIntersection,e);var h=oa.getProgramCode(a,e),k=g.program,l=!0;if(void 0===k)a.addEventListener("dispose",c);else if(k.code!==h)d(a);else{if(g.lightsHash!==f.state.hash)ba.update(a,"lightsHash",f.state.hash);else if(void 0!==e.shaderID)return;l=!1}l&&(e.shaderID?(k=tc[e.shaderID],g.shader={name:a.type,uniforms:$a.clone(k.uniforms),vertexShader:k.vertexShader,fragmentShader:k.fragmentShader}):g.shader={name:a.type,uniforms:a.uniforms,vertexShader:a.vertexShader,fragmentShader:a.fragmentShader}, a.onBeforeCompile(g.shader,z),k=oa.acquireProgram(a,g.shader,e,h),g.program=k,a.program=k);e=k.getAttributes();if(a.morphTargets)for(h=a.numSupportedMorphTargets=0;he.matrixWorld.determinant();na.setMaterial(d,g);var h=w(a,b,d,e);a=c.id+"_"+h.id+"_"+(!0===d.wireframe);var k=!1;a!==ia&&(ia=a,k=!0);e.morphTargetInfluences&&(za.update(e,c,d,h),k=!0);g=c.index;var l=c.attributes.position;b=1;!0===d.wireframe&&(g=la.getWireframeAttribute(c),b=2);a=Ba;if(null!==g){var m=ka.get(g);a=Ca;a.setIndex(m)}if(k){if(c&&c.isInstancedBufferGeometry&&null===Fa.get("ANGLE_instanced_arrays"))console.error("THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays."); else{na.initAttributes();k=c.attributes;h=h.getAttributes();var n=d.defaultAttributeValues;for(E in h){var r=h[E];if(0<=r){var t=k[E];if(void 0!==t){var u=t.normalized,p=t.itemSize,v=ka.get(t);if(void 0!==v){var q=v.buffer,A=v.type;v=v.bytesPerElement;if(t.isInterleavedBufferAttribute){var y=t.data,C=y.stride;t=t.offset;y&&y.isInstancedInterleavedBuffer?(na.enableAttributeAndDivisor(r,y.meshPerAttribute),void 0===c.maxInstancedCount&&(c.maxInstancedCount=y.meshPerAttribute*y.count)):na.enableAttribute(r); M.bindBuffer(M.ARRAY_BUFFER,q);M.vertexAttribPointer(r,p,A,u,C*v,t*v)}else t.isInstancedBufferAttribute?(na.enableAttributeAndDivisor(r,t.meshPerAttribute),void 0===c.maxInstancedCount&&(c.maxInstancedCount=t.meshPerAttribute*t.count)):na.enableAttribute(r),M.bindBuffer(M.ARRAY_BUFFER,q),M.vertexAttribPointer(r,p,A,u,0,0)}}else if(void 0!==n&&(u=n[E],void 0!==u))switch(u.length){case 2:M.vertexAttrib2fv(r,u);break;case 3:M.vertexAttrib3fv(r,u);break;case 4:M.vertexAttrib4fv(r,u);break;default:M.vertexAttrib1fv(r, u)}}}na.disableUnusedAttributes()}null!==g&&M.bindBuffer(M.ELEMENT_ARRAY_BUFFER,m.buffer)}m=Infinity;null!==g?m=g.count:void 0!==l&&(m=l.count);g=c.drawRange.start*b;l=null!==f?f.start*b:0;var E=Math.max(g,l);f=Math.max(0,Math.min(m,g+c.drawRange.count*b,l+(null!==f?f.count*b:Infinity))-1-E+1);if(0!==f){if(e.isMesh)if(!0===d.wireframe)na.setLineWidth(d.wireframeLinewidth*(null===N?S:1)),a.setMode(M.LINES);else switch(e.drawMode){case 0:a.setMode(M.TRIANGLES);break;case 1:a.setMode(M.TRIANGLE_STRIP); break;case 2:a.setMode(M.TRIANGLE_FAN)}else e.isLine?(d=d.linewidth,void 0===d&&(d=1),na.setLineWidth(d*(null===N?S:1)),e.isLineSegments?a.setMode(M.LINES):e.isLineLoop?a.setMode(M.LINE_LOOP):a.setMode(M.LINE_STRIP)):e.isPoints&&a.setMode(M.POINTS);c&&c.isInstancedBufferGeometry?0=da.maxTextures&&console.warn("THREE.WebGLRenderer: Trying to use "+a+" texture units while this GPU supports only "+da.maxTextures);P+=1;return a};this.setTexture2D=function(){var a=!1; return function(b,c){b&&b.isWebGLRenderTarget&&(a||(console.warn("THREE.WebGLRenderer.setTexture2D: don't use render targets as textures. Use their .texture property instead."),a=!0),b=b.texture);ha.setTexture2D(b,c)}}();this.setTexture=function(){var a=!1;return function(b,c){a||(console.warn("THREE.WebGLRenderer: .setTexture is deprecated, use setTexture2D instead."),a=!0);ha.setTexture2D(b,c)}}();this.setTextureCube=function(){var a=!1;return function(b,c){b&&b.isWebGLRenderTargetCube&&(a||(console.warn("THREE.WebGLRenderer.setTextureCube: don't use cube render targets as textures. Use their .texture property instead."), a=!0),b=b.texture);b&&b.isCubeTexture||Array.isArray(b.image)&&6===b.image.length?ha.setTextureCube(b,c):ha.setTextureCubeDynamic(b,c)}}();this.getRenderTarget=function(){return N};this.setRenderTarget=function(a){(N=a)&&void 0===ba.get(a).__webglFramebuffer&&ha.setupRenderTarget(a);var b=null,c=!1;a?(b=ba.get(a).__webglFramebuffer,a.isWebGLRenderTargetCube&&(b=b[a.activeCubeFace],c=!0),G.copy(a.viewport),J.copy(a.scissor),O=a.scissorTest):(G.copy(W).multiplyScalar(S),J.copy(ma).multiplyScalar(S), O=Ia);La!==b&&(M.bindFramebuffer(M.FRAMEBUFFER,b),La=b);na.viewport(G);na.scissor(J);na.setScissorTest(O);c&&(c=ba.get(a.texture),M.framebufferTexture2D(M.FRAMEBUFFER,M.COLOR_ATTACHMENT0,M.TEXTURE_CUBE_MAP_POSITIVE_X+a.activeCubeFace,c.__webglTexture,a.activeMipMapLevel))};this.readRenderTargetPixels=function(a,b,c,d,e,f){if(a&&a.isWebGLRenderTarget){var g=ba.get(a).__webglFramebuffer;if(g){var h=!1;g!==La&&(M.bindFramebuffer(M.FRAMEBUFFER,g),h=!0);try{var k=a.texture,l=k.format,m=k.type;1023!==l&& ua.convert(l)!==M.getParameter(M.IMPLEMENTATION_COLOR_READ_FORMAT)?console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format."):1009===m||ua.convert(m)===M.getParameter(M.IMPLEMENTATION_COLOR_READ_TYPE)||1015===m&&(Fa.get("OES_texture_float")||Fa.get("WEBGL_color_buffer_float"))||1016===m&&Fa.get("EXT_color_buffer_half_float")?M.checkFramebufferStatus(M.FRAMEBUFFER)===M.FRAMEBUFFER_COMPLETE?0<=b&&b<=a.width-d&&0<=c&&c<=a.height-e&&M.readPixels(b, c,d,e,ua.convert(l),ua.convert(m),f):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete."):console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.")}finally{h&&M.bindFramebuffer(M.FRAMEBUFFER,La)}}}else console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.")};this.copyFramebufferToTexture=function(a,b,c){var d= b.image.width,e=b.image.height,f=ua.convert(b.format);this.setTexture2D(b,0);M.copyTexImage2D(M.TEXTURE_2D,c||0,f,a.x,a.y,d,e,0)};this.copyTextureToTexture=function(a,b,c,d){var e=b.image.width,f=b.image.height,g=ua.convert(c.format),h=ua.convert(c.type);b=b.isDataTexture?b.image.data:b.image;this.setTexture2D(c,0);M.texSubImage2D(M.TEXTURE_2D,d||0,a.x,a.y,e,f,g,h,b)}}function vc(f,h){this.name="";this.color=new S(f);this.density=void 0!==h?h:2.5E-4}function wc(f,h,a){this.name="";this.color=new S(f); this.near=void 0!==h?h:1;this.far=void 0!==a?a:1E3}function xc(){O.call(this);this.type="Scene";this.overrideMaterial=this.fog=this.background=null;this.autoUpdate=!0}function cc(f){da.call(this);this.type="SpriteMaterial";this.color=new S(16777215);this.map=null;this.rotation=0;this.lights=this.fog=!1;this.setValues(f)}function lf(f){O.call(this);this.type="Sprite";this.material=void 0!==f?f:new cc;this.center=new x(.5,.5)}function ie(){O.call(this);this.type="LOD";Object.defineProperties(this,{levels:{enumerable:!0, value:[]}})}function je(f,h){f=f||[];this.bones=f.slice(0);this.boneMatrices=new Float32Array(16*this.bones.length);if(void 0===h)this.calculateInverses();else if(this.bones.length===h.length)this.boneInverses=h.slice(0);else for(console.warn("THREE.Skeleton boneInverses is the wrong length."),this.boneInverses=[],f=0,h=this.bones.length;fa;a++){var m=n[g[a]];var r=n[g[(a+1)%3]];d[0]=Math.min(m,r);d[1]=Math.max(m,r);m=d[0]+","+d[1];void 0===e[m]&&(e[m]={index1:d[0],index2:d[1]})}}for(m in e)l= e[m],g=f.vertices[l.index1],h.push(g.x,g.y,g.z),g=f.vertices[l.index2],h.push(g.x,g.y,g.z)}else if(f&&f.isBufferGeometry)if(g=new p,null!==f.index){k=f.attributes.position;n=f.index;var w=f.groups;0===w.length&&(w=[{start:0,count:n.count,materialIndex:0}]);f=0;for(c=w.length;fa;a++)m=n.getX(l+a),r=n.getX(l+(a+1)%3),d[0]=Math.min(m,r),d[1]=Math.max(m,r),m=d[0]+","+d[1],void 0===e[m]&&(e[m]={index1:d[0],index2:d[1]});for(m in e)l=e[m], g.fromBufferAttribute(k,l.index1),h.push(g.x,g.y,g.z),g.fromBufferAttribute(k,l.index2),h.push(g.x,g.y,g.z)}else for(k=f.attributes.position,l=0,b=k.count/3;la;a++)e=3*l+a,g.fromBufferAttribute(k,e),h.push(g.x,g.y,g.z),e=3*l+(a+1)%3,g.fromBufferAttribute(k,e),h.push(g.x,g.y,g.z);this.addAttribute("position",new J(h,3))}function hd(f,h,a){ca.call(this);this.type="ParametricGeometry";this.parameters={func:f,slices:h,stacks:a};this.fromBufferGeometry(new yc(f,h,a));this.mergeVertices()} function yc(f,h,a){R.call(this);this.type="ParametricBufferGeometry";this.parameters={func:f,slices:h,stacks:a};var b=[],c=[],d=[],e=[],g=new p,k=new p,l=new p,n=new p,m=new p,r,w,t=h+1;for(r=0;r<=a;r++){var u=r/a;for(w=0;w<=h;w++){var v=w/h;f(v,u,k);c.push(k.x,k.y,k.z);0<=v-1E-5?(f(v-1E-5,u,l),n.subVectors(k,l)):(f(v+1E-5,u,l),n.subVectors(l,k));0<=u-1E-5?(f(v,u-1E-5,l),m.subVectors(k,l)):(f(v,u+1E-5,l),m.subVectors(l,k));g.crossVectors(n,m).normalize();d.push(g.x,g.y,g.z);e.push(v,u)}}for(r=0;r< a;r++)for(w=0;wd&&1===a.x&&(k[b]=a.x-1);0===c.x&&0===c.z&&(k[b]=d/2/Math.PI+.5)}R.call(this);this.type="PolyhedronBufferGeometry";this.parameters={vertices:f,indices:h,radius:a,detail:b};a=a||1;b=b||0;var g=[],k=[];(function(a){for(var b=new p,e=new p,f=new p,g=0;gf&&(.2>b&&(k[a+0]+=1),.2>c&&(k[a+2]+=1),.2>d&&(k[a+4]+=1))})(); this.addAttribute("position",new J(g,3));this.addAttribute("normal",new J(g.slice(),3));this.addAttribute("uv",new J(k,2));0===b?this.computeVertexNormals():this.normalizeNormals()}function jd(f,h){ca.call(this);this.type="TetrahedronGeometry";this.parameters={radius:f,detail:h};this.fromBufferGeometry(new zc(f,h));this.mergeVertices()}function zc(f,h){Wa.call(this,[1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],[2,1,0,0,3,2,1,3,0,2,3,1],f,h);this.type="TetrahedronBufferGeometry";this.parameters={radius:f,detail:h}} function kd(f,h){ca.call(this);this.type="OctahedronGeometry";this.parameters={radius:f,detail:h};this.fromBufferGeometry(new ec(f,h));this.mergeVertices()}function ec(f,h){Wa.call(this,[1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2],f,h);this.type="OctahedronBufferGeometry";this.parameters={radius:f,detail:h}}function ld(f,h){ca.call(this);this.type="IcosahedronGeometry";this.parameters={radius:f,detail:h};this.fromBufferGeometry(new Ac(f,h));this.mergeVertices()} function Ac(f,h){var a=(1+Math.sqrt(5))/2;Wa.call(this,[-1,a,0,1,a,0,-1,-a,0,1,-a,0,0,-1,a,0,1,a,0,-1,-a,0,1,-a,a,0,-1,a,0,1,-a,0,-1,-a,0,1],[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1],f,h);this.type="IcosahedronBufferGeometry";this.parameters={radius:f,detail:h}}function md(f,h){ca.call(this);this.type="DodecahedronGeometry";this.parameters={radius:f,detail:h};this.fromBufferGeometry(new Bc(f,h));this.mergeVertices()} function Bc(f,h){var a=(1+Math.sqrt(5))/2,b=1/a;Wa.call(this,[-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-b,-a,0,-b,a,0,b,-a,0,b,a,-b,-a,0,-b,a,0,b,-a,0,b,a,0,-a,0,-b,a,0,-b,-a,0,b,a,0,b],[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9],f,h);this.type="DodecahedronBufferGeometry"; this.parameters={radius:f,detail:h}}function nd(f,h,a,b,c,d){ca.call(this);this.type="TubeGeometry";this.parameters={path:f,tubularSegments:h,radius:a,radialSegments:b,closed:c};void 0!==d&&console.warn("THREE.TubeGeometry: taper has been removed.");f=new Cc(f,h,a,b,c);this.tangents=f.tangents;this.normals=f.normals;this.binormals=f.binormals;this.fromBufferGeometry(f);this.mergeVertices()}function Cc(f,h,a,b,c){function d(c){n=f.getPointAt(c/h,n);var d=e.normals[c];c=e.binormals[c];for(r=0;r<=b;r++){var l= r/b*Math.PI*2,m=Math.sin(l);l=-Math.cos(l);k.x=l*d.x+m*c.x;k.y=l*d.y+m*c.y;k.z=l*d.z+m*c.z;k.normalize();t.push(k.x,k.y,k.z);g.x=n.x+a*k.x;g.y=n.y+a*k.y;g.z=n.z+a*k.z;w.push(g.x,g.y,g.z)}}R.call(this);this.type="TubeBufferGeometry";this.parameters={path:f,tubularSegments:h,radius:a,radialSegments:b,closed:c};h=h||64;a=a||1;b=b||8;c=c||!1;var e=f.computeFrenetFrames(h,c);this.tangents=e.tangents;this.normals=e.normals;this.binormals=e.binormals;var g=new p,k=new p,l=new x,n=new p,m,r,w=[],t=[],u=[], v=[];for(m=0;m=h;c-=b)d=jh(c,f[c],f[c+1],d);d&&fc(d,d.next)&&(rd(d),d=d.next);return d} function sd(f,h){if(!f)return f;h||(h=f);do{var a=!1;if(f.steiner||!fc(f,f.next)&&0!==Ra(f.prev,f,f.next))f=f.next;else{rd(f);f=h=f.prev;if(f===f.next)break;a=!0}}while(a||f!==h);return h}function td(f,h,a,b,c,d,e){if(f){if(!e&&d){var g=f,k=g;do null===k.z&&(k.z=qf(k.x,k.y,b,c,d)),k.prevZ=k.prev,k=k.nextZ=k.next;while(k!==g);k.prevZ.nextZ=null;k.prevZ=null;g=k;var l,n,m,r,w=1;do{k=g;var t=g=null;for(n=0;k;){n++;var u=k;for(l=m=0;lm.x?n.x>w.x?n.x:w.x:m.x>w.x?m.x:w.x,C=n.y>m.y?n.y>w.y?n.y:w.y:m.y>w.y?m.y:w.y;l=qf(n.x=l;){if(p!==t.prev&&p!==t.next&&me(n.x,n.y,m.x,m.y,w.x,w.y,p.x,p.y)&&0<=Ra(p.prev,p,p.next)){t=!1;break a}p=p.prevZ}t=!0}}else a:if(t=f,n=t.prev,m=t,w=t.next,0<=Ra(n,m,w))t=!1;else{for(l=t.next.next;l!==t.prev;){if(me(n.x,n.y,m.x,m.y,w.x,w.y,l.x,l.y)&&0<=Ra(l.prev,l,l.next)){t=!1;break a}l=l.next}t=!0}if(t)h.push(k.i/a),h.push(f.i/a),h.push(u.i/a),rd(f),g=f=u.next;else if(f=u,f===g){if(!e)td(sd(f),h,a,b,c,d,1);else if(1=== e){e=h;g=a;k=f;do u=k.prev,t=k.next.next,!fc(u,t)&&kh(u,k,k.next,t)&&ud(u,t)&&ud(t,u)&&(e.push(u.i/g),e.push(k.i/g),e.push(t.i/g),rd(k),rd(k.next),k=f=t),k=k.next;while(k!==f);f=k;td(f,h,a,b,c,d,2)}else if(2===e)a:{e=f;do{for(g=e.next.next;g!==e.prev;){if(k=e.i!==g.i){k=e;u=g;if(t=k.next.i!==u.i&&k.prev.i!==u.i){b:{t=k;do{if(t.i!==k.i&&t.next.i!==k.i&&t.i!==u.i&&t.next.i!==u.i&&kh(t,t.next,k,u)){t=!0;break b}t=t.next}while(t!==k);t=!1}t=!t}if(t=t&&ud(k,u)&&ud(u,k)){t=k;n=!1;m=(k.x+u.x)/2;u=(k.y+u.y)/ 2;do t.y>u!==t.next.y>u&&t.next.y!==t.y&&m<(t.next.x-t.x)*(u-t.y)/(t.next.y-t.y)+t.x&&(n=!n),t=t.next;while(t!==k);t=n}k=t}if(k){f=lh(e,g);e=sd(e,e.next);f=sd(f,f.next);td(e,h,a,b,c,d);td(f,h,a,b,c,d);break a}g=g.next}e=e.next}while(e!==f)}break}}}}function pl(f,h){return f.x-h.x}function ql(f,h){var a=h,b=f.x,c=f.y,d=-Infinity;do{if(c<=a.y&&c>=a.next.y&&a.next.y!==a.y){var e=a.x+(c-a.y)*(a.next.x-a.x)/(a.next.y-a.y);if(e<=b&&e>d){d=e;if(e===b){if(c===a.y)return a;if(c===a.next.y)return a.next}var g= a.x=a.x&&a.x>=e&&b!==a.x&&me(cg.x)&&ud(a,f)&&(g=a,l=n)}a=a.next}return g}function qf(f,h,a,b,c){f=32767*(f-a)*c;h=32767*(h-b)*c;f=(f|f<<8)&16711935;f=(f|f<<4)&252645135;f=(f|f<<2)&858993459;h=(h|h<<8)&16711935;h=(h|h<<4)&252645135;h=(h|h<<2)&858993459;return(f|f<<1)&1431655765|((h| h<<1)&1431655765)<<1}function rl(f){var h=f,a=f;do h.xRa(f.prev,f,f.next)?0<=Ra(f,h, f.next)&&0<=Ra(f,f.prev,h):0>Ra(f,h,f.prev)||0>Ra(f,f.next,h)}function lh(f,h){var a=new rf(f.i,f.x,f.y),b=new rf(h.i,h.x,h.y),c=f.next,d=h.prev;f.next=h;h.prev=f;a.next=c;c.prev=a;b.next=a;a.prev=b;d.next=b;b.prev=d;return b}function jh(f,h,a,b){f=new rf(f,h,a);b?(f.next=b.next,f.prev=b,b.next.prev=f,b.next=f):(f.prev=f,f.next=f);return f}function rd(f){f.next.prev=f.prev;f.prev.next=f.next;f.prevZ&&(f.prevZ.nextZ=f.nextZ);f.nextZ&&(f.nextZ.prevZ=f.prevZ)}function rf(f,h,a){this.i=f;this.x=h;this.y= a;this.nextZ=this.prevZ=this.z=this.next=this.prev=null;this.steiner=!1}function mh(f){var h=f.length;2Number.EPSILON){var k=Math.sqrt(h),l=Math.sqrt(f*f+g*g);h=b.x-e/k;b=b.y+d/k;g=((c.x-g/l-h)*g-(c.y+f/l-b)*f)/(d*g-e*f);f=h+d*g-a.x;d=b+e*g-a.y;e=f*f+d*d;if(2>=e)return new x(f,d);e=Math.sqrt(e/2)}else a=!1,d>Number.EPSILON?f>Number.EPSILON&&(a=!0):d<-Number.EPSILON?f<-Number.EPSILON&&(a=!0):Math.sign(e)===Math.sign(g)&&(a=!0),a?(f=-e,e=Math.sqrt(h)):(f=d,d=e,e=Math.sqrt(h/2));return new x(f/e,d/ e)}function g(a,d){for(W=a.length;0<=--W;){var e=W;var f=W-1;0>f&&(f=a.length-1);var g,h=A+2*I;for(g=0;gn;n++){var m=l[d[n]];var r=l[d[(n+1)%3]];b[0]=Math.min(m,r);b[1]=Math.max(m,r);m=b[0]+","+b[1];void 0===c[m]?c[m]={index1:b[0],index2:b[1],face1:g,face2:void 0}:c[m].face2=g}for(m in c)if(b=c[m],void 0===b.face2||e[b.face1].normal.dot(e[b.face2].normal)<=h)d=f[b.index1],a.push(d.x,d.y,d.z),d=f[b.index2],a.push(d.x,d.y,d.z);this.addAttribute("position",new J(a,3))}function jc(f,h,a,b,c,d,e,g){ca.call(this);this.type="CylinderGeometry"; this.parameters={radiusTop:f,radiusBottom:h,height:a,radialSegments:b,heightSegments:c,openEnded:d,thetaStart:e,thetaLength:g};this.fromBufferGeometry(new Bb(f,h,a,b,c,d,e,g));this.mergeVertices()}function Bb(f,h,a,b,c,d,e,g){function k(a){var c,d=new x,k=new p,u=0,v=!0===a?f:h,A=!0===a?1:-1;var B=t;for(c=1;c<=b;c++)m.push(0,q*A,0),r.push(0,A,0),w.push(.5,.5),t++;var z=t;for(c=0;c<=b;c++){var F=c/b*g+e,D=Math.cos(F);F=Math.sin(F);k.x=v*F;k.y=q*A;k.z=v*D;m.push(k.x,k.y,k.z);r.push(0,A,0);d.x=.5*D+ .5;d.y=.5*F*A+.5;w.push(d.x,d.y);t++}for(c=0;cthis.duration&&this.resetDuration();this.optimize()}function Cf(f){this.manager= void 0!==f?f:db;this.textures={}}function rh(f){this.manager=void 0!==f?f:db}function Jd(){}function Df(f){"boolean"===typeof f&&(console.warn("THREE.JSONLoader: showStatus parameter has been removed from constructor."),f=void 0);this.manager=void 0!==f?f:db;this.withCredentials=!1}function sh(){this.type="ShapePath";this.color=new S;this.subPaths=[];this.currentPath=null}function Ef(f){this.type="Font";this.data=f}function th(f){this.manager=void 0!==f?f:db}function uh(f){this.manager=void 0!==f? f:db}function Kd(f,h,a){O.call(this);this.type="CubeCamera";var b=new Ba(90,1,f,h);b.up.set(0,-1,0);b.lookAt(new p(1,0,0));this.add(b);var c=new Ba(90,1,f,h);c.up.set(0,-1,0);c.lookAt(new p(-1,0,0));this.add(c);var d=new Ba(90,1,f,h);d.up.set(0,0,1);d.lookAt(new p(0,1,0));this.add(d);var e=new Ba(90,1,f,h);e.up.set(0,0,-1);e.lookAt(new p(0,-1,0));this.add(e);var g=new Ba(90,1,f,h);g.up.set(0,-1,0);g.lookAt(new p(0,0,1));this.add(g);var k=new Ba(90,1,f,h);k.up.set(0,-1,0);k.lookAt(new p(0,0,-1));this.add(k); this.renderTarget=new Yc(a,a,{format:1022,magFilter:1006,minFilter:1006});this.renderTarget.texture.name="CubeCamera";this.update=function(a,f){null===this.parent&&this.updateMatrixWorld();var h=this.renderTarget,l=h.texture.generateMipmaps;h.texture.generateMipmaps=!1;h.activeCubeFace=0;a.render(f,b,h);h.activeCubeFace=1;a.render(f,c,h);h.activeCubeFace=2;a.render(f,d,h);h.activeCubeFace=3;a.render(f,e,h);h.activeCubeFace=4;a.render(f,g,h);h.texture.generateMipmaps=l;h.activeCubeFace=5;a.render(f, k,h);a.setRenderTarget(null)};this.clear=function(a,b,c,d){for(var e=this.renderTarget,f=0;6>f;f++)e.activeCubeFace=f,a.setRenderTarget(e),a.clear(b,c,d);a.setRenderTarget(null)}}function vh(){O.call(this);this.type="AudioListener";this.context=wh.getContext();this.gain=this.context.createGain();this.gain.connect(this.context.destination);this.filter=null}function Ld(f){O.call(this);this.type="Audio";this.context=f.context;this.gain=this.context.createGain();this.gain.connect(f.getInput());this.autoplay= !1;this.buffer=null;this.loop=!1;this.offset=this.startTime=0;this.playbackRate=1;this.isPlaying=!1;this.hasPlaybackControl=!0;this.sourceType="empty";this.filters=[]}function xh(f){Ld.call(this,f);this.panner=this.context.createPanner();this.panner.connect(this.gain)}function yh(f,h){this.analyser=f.context.createAnalyser();this.analyser.fftSize=void 0!==h?h:2048;this.data=new Uint8Array(this.analyser.frequencyBinCount);f.getOutput().connect(this.analyser)}function zh(f,h,a){this.binding=f;this.valueSize= a;f=Float64Array;switch(h){case "quaternion":h=this._slerp;break;case "string":case "bool":f=Array;h=this._select;break;default:h=this._lerp}this.buffer=new f(4*a);this._mixBufferRegion=h;this.referenceCount=this.useCount=this.cumulativeWeight=0}function Ah(f,h,a){a=a||Ta.parseTrackName(h);this._targetGroup=f;this._bindings=f.subscribe_(h,a)}function Ta(f,h,a){this.path=h;this.parsedPath=a||Ta.parseTrackName(h);this.node=Ta.findNode(f,this.parsedPath.nodeName)||f;this.rootNode=f}function Bh(f,h,a){this._mixer= f;this._clip=h;this._localRoot=a||null;f=h.tracks;h=f.length;a=Array(h);for(var b={endingStart:2400,endingEnd:2400},c=0;c!==h;++c){var d=f[c].createInterpolant(null);a[c]=d;d.settings=b}this._interpolantSettings=b;this._interpolants=a;this._propertyBindings=Array(h);this._weightInterpolant=this._timeScaleInterpolant=this._byClipCacheIndex=this._cacheIndex=null;this.loop=2201;this._loopCount=-1;this._startTime=null;this.time=0;this._effectiveWeight=this.weight=this._effectiveTimeScale=this.timeScale= 1;this.repetitions=Infinity;this.paused=!1;this.enabled=!0;this.clampWhenFinished=!1;this.zeroSlopeAtEnd=this.zeroSlopeAtStart=!0}function Ff(f){this._root=f;this._initMemoryManager();this.time=this._accuIndex=0;this.timeScale=1}function B(f,h){"string"===typeof f&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),f=h);this.value=f}function Ch(){R.call(this);this.type="InstancedBufferGeometry";this.maxInstancedCount=void 0}function Dh(f,h,a,b){this.data=f;this.itemSize=h;this.offset= a;this.normalized=!0===b}function Md(f,h){this.array=f;this.stride=h;this.count=void 0!==f?f.length/h:0;this.dynamic=!1;this.updateRange={offset:0,count:-1};this.version=0}function Eh(f,h,a){Md.call(this,f,h);this.meshPerAttribute=a||1}function Fh(f,h,a){fa.call(this,f,h);this.meshPerAttribute=a||1}function Gh(f,h,a,b){this.ray=new sc(f,h);this.near=a||0;this.far=b||Infinity;this.params={Mesh:{},Line:{},LOD:{},Points:{threshold:1},Sprite:{}};Object.defineProperties(this.params,{PointCloud:{get:function(){console.warn("THREE.Raycaster: params.PointCloud has been renamed to params.Points."); return this.Points}}})}function Hh(f,h){return f.distance-h.distance}function Gf(f,h,a,b){if(!1!==f.visible&&(f.raycast(h,a),!0===b)){f=f.children;b=0;for(var c=f.length;ba;a++,b++){var c=a/32*Math.PI*2,d=b/32*Math.PI*2;h.push(Math.cos(c),Math.sin(c),1,Math.cos(d),Math.sin(d),1)}f.addAttribute("position",new J(h,3));h=new za({fog:!1});this.cone=new Ca(f,h);this.add(this.cone);this.update()}function Jh(f){var h=[];f&&f.isBone&&h.push(f);for(var a=0;aarguments.length?f:arguments[2],b;if(Ma(f)===a)return f[h];if(b=Ud.f(f,h))return oa(b,"value")?b.value:void 0!==b.get?b.get.call(a):void 0;if(Ga(b=Nf(f)))return Oh(b,h,a)}function Of(){for(var f=arguments.length,h=Array(f),a=0;ab?Al(b+c,0):Bl(b,c);if(f&&a!=a)for(;c>b;){if(a=h[b++],a!=a)return!0}else for(;c>b;b++)if((f||b in h)&&h[b]===a)return f||b||0;return!f&&-1}}(!1),Fl=Sf("IE_PROTO"),Th=function(f,h){f=xb(f);var a=0,b=[],c;for(c in f)c!=Fl&&oa(f,c)&&b.push(c);for(;h.length>a;)oa(f,c=h[a++])&&(~El(b,c)||b.push(c));return b},He="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "), Ie=Object.keys||function(f){return Th(f,He)},Gl=hb?Object.defineProperties:function(f,h){Ma(f);for(var a=Ie(h),b=a.length,c=0,d;b>c;)lb.f(f,d=a[c++],h[d]);return f},Uh=ea.document,Tf=Uh&&Uh.documentElement,Hl=Sf("IE_PROTO"),Uf=function(){},Je=function(){var f=Fe?Rc.createElement("iframe"):{},h=He.length;f.style.display="none";Tf.appendChild(f);f.src="javascript:";f=f.contentWindow.document;f.open();f.write("