|
@@ -114,227 +114,227 @@ l&&(l=b.clone(),c[p]=l),b=l);b.visible=f.visible;b.wireframe=f.wireframe;b.side=
|
|
d,e,k,m){if(!1!==c.visible){if(c.layers.test(d.layers)&&(c.isMesh||c.isLine||c.isPoints)&&(c.castShadow||c.receiveShadow&&3===m)&&(!c.frustumCulled||h.intersectsObject(c))){c.modelViewMatrix.multiplyMatrices(e.matrixWorldInverse,c.matrixWorld);var p=b.update(c),l=c.material;if(Array.isArray(l))for(var z=p.groups,u=0,q=z.length;u<q;u++){var r=z[u],t=l[r.materialIndex];t&&t.visible&&(t=f(c,p,t,k,e.near,e.far,m),a.renderBufferDirect(e,null,p,t,c,r))}else l.visible&&(t=f(c,p,l,k,e.near,e.far,m),a.renderBufferDirect(e,
|
|
d,e,k,m){if(!1!==c.visible){if(c.layers.test(d.layers)&&(c.isMesh||c.isLine||c.isPoints)&&(c.castShadow||c.receiveShadow&&3===m)&&(!c.frustumCulled||h.intersectsObject(c))){c.modelViewMatrix.multiplyMatrices(e.matrixWorldInverse,c.matrixWorld);var p=b.update(c),l=c.material;if(Array.isArray(l))for(var z=p.groups,u=0,q=z.length;u<q;u++){var r=z[u],t=l[r.materialIndex];t&&t.visible&&(t=f(c,p,t,k,e.near,e.far,m),a.renderBufferDirect(e,null,p,t,c,r))}else l.visible&&(t=f(c,p,l,k,e.near,e.far,m),a.renderBufferDirect(e,
|
|
null,p,t,c,null))}c=c.children;p=0;for(l=c.length;p<l;p++)g(c[p],d,e,k,m)}}var h=new Ec,k=new v,m=new v,z=new ca,p=[],l=[],r={},q={0:1,1:0,2:2},t=new Aa({defines:{SAMPLE_RATE:.25,HALF_SAMPLE_RATE:.125},uniforms:{shadow_pass:{value:null},resolution:{value:new v},radius:{value:4}},vertexShader:"void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",fragmentShader:"uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include <packing>\nvoid main() {\n float mean = 0.0;\n float squared_mean = 0.0;\n\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy ) / resolution ) );\n for ( float i = -1.0; i < 1.0 ; i += SAMPLE_RATE) {\n #ifdef HORIZONAL_PASS\n vec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( i, 0.0 ) * radius ) / resolution ) );\n mean += distribution.x;\n squared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n #else\n float depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, i ) * radius ) / resolution ) );\n mean += depth;\n squared_mean += depth * depth;\n #endif\n }\n mean = mean * HALF_SAMPLE_RATE;\n squared_mean = squared_mean * HALF_SAMPLE_RATE;\n float std_dev = sqrt( squared_mean - mean * mean );\n gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}"}),
|
|
null,p,t,c,null))}c=c.children;p=0;for(l=c.length;p<l;p++)g(c[p],d,e,k,m)}}var h=new Ec,k=new v,m=new v,z=new ca,p=[],l=[],r={},q={0:1,1:0,2:2},t=new Aa({defines:{SAMPLE_RATE:.25,HALF_SAMPLE_RATE:.125},uniforms:{shadow_pass:{value:null},resolution:{value:new v},radius:{value:4}},vertexShader:"void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",fragmentShader:"uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include <packing>\nvoid main() {\n float mean = 0.0;\n float squared_mean = 0.0;\n\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy ) / resolution ) );\n for ( float i = -1.0; i < 1.0 ; i += SAMPLE_RATE) {\n #ifdef HORIZONAL_PASS\n vec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( i, 0.0 ) * radius ) / resolution ) );\n mean += distribution.x;\n squared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n #else\n float depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, i ) * radius ) / resolution ) );\n mean += depth;\n squared_mean += depth * depth;\n #endif\n }\n mean = mean * HALF_SAMPLE_RATE;\n squared_mean = squared_mean * HALF_SAMPLE_RATE;\n float std_dev = sqrt( squared_mean - mean * mean );\n gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}"}),
|
|
n=t.clone();n.defines.HORIZONAL_PASS=1;var x=new B;x.setAttribute("position",new N(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));var w=new ja(x,t),ha=this;this.enabled=!1;this.autoUpdate=!0;this.needsUpdate=!1;this.type=1;this.render=function(d,e,f){if(!1!==ha.enabled&&(!1!==ha.autoUpdate||!1!==ha.needsUpdate)&&0!==d.length){var p=a.getRenderTarget(),l=a.getActiveCubeFace(),u=a.getActiveMipmapLevel(),q=a.state;q.setBlending(0);q.buffers.color.setClear(1,1,1,1);q.buffers.depth.setTest(!0);q.setScissorTest(!1);
|
|
n=t.clone();n.defines.HORIZONAL_PASS=1;var x=new B;x.setAttribute("position",new N(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));var w=new ja(x,t),ha=this;this.enabled=!1;this.autoUpdate=!0;this.needsUpdate=!1;this.type=1;this.render=function(d,e,f){if(!1!==ha.enabled&&(!1!==ha.autoUpdate||!1!==ha.needsUpdate)&&0!==d.length){var p=a.getRenderTarget(),l=a.getActiveCubeFace(),u=a.getActiveMipmapLevel(),q=a.state;q.setBlending(0);q.buffers.color.setClear(1,1,1,1);q.buffers.depth.setTest(!0);q.setScissorTest(!1);
|
|
-for(var r=0,F=d.length;r<F;r++){var x=d[r],C=x.shadow;if(void 0===C)console.warn("THREE.WebGLShadowMap:",x,"has no shadow.");else{k.copy(C.mapSize);var v=C.getFrameExtents();k.multiply(v);m.copy(C.mapSize);if(k.x>c||k.y>c)console.warn("THREE.WebGLShadowMap:",x,"has shadow exceeding max texture size, reducing"),k.x>c&&(m.x=Math.floor(c/v.x),k.x=m.x*v.x,C.mapSize.x=m.x),k.y>c&&(m.y=Math.floor(c/v.y),k.y=m.y*v.y,C.mapSize.y=m.y);null!==C.map||C.isPointLightShadow||3!==this.type||(v={minFilter:1006,magFilter:1006,
|
|
|
|
-format:1023},C.map=new za(k.x,k.y,v),C.map.texture.name=x.name+".shadowMap",C.mapPass=new za(k.x,k.y,v),C.camera.updateProjectionMatrix());null===C.map&&(v={minFilter:1003,magFilter:1003,format:1023},C.map=new za(k.x,k.y,v),C.map.texture.name=x.name+".shadowMap",C.camera.updateProjectionMatrix());a.setRenderTarget(C.map);a.clear();v=C.getViewportCount();for(var Z=0;Z<v;Z++){var U=C.getViewport(Z);z.set(m.x*U.x,m.y*U.y,m.x*U.z,m.y*U.w);q.viewport(z);C.updateMatrices(x,Z);h=C.getFrustum();g(e,f,C.camera,
|
|
|
|
-x,this.type)}C.isPointLightShadow||3!==this.type||(x=C,C=f,v=b.update(w),t.uniforms.shadow_pass.value=x.map.texture,t.uniforms.resolution.value=x.mapSize,t.uniforms.radius.value=x.radius,a.setRenderTarget(x.mapPass),a.clear(),a.renderBufferDirect(C,null,v,t,w,null),n.uniforms.shadow_pass.value=x.mapPass.texture,n.uniforms.resolution.value=x.mapSize,n.uniforms.radius.value=x.radius,a.setRenderTarget(x.map),a.clear(),a.renderBufferDirect(C,null,v,n,w,null))}}ha.needsUpdate=!1;a.setRenderTarget(p,l,
|
|
|
|
-u)}}}function Ak(a,b,c){function d(b,c,d){var e=new Uint8Array(4),f=a.createTexture();a.bindTexture(b,f);a.texParameteri(b,10241,9728);a.texParameteri(b,10240,9728);for(b=0;b<d;b++)a.texImage2D(c+b,0,6408,1,1,0,6408,5121,e);return f}function e(c,d){n[c]=1;0===x[c]&&(a.enableVertexAttribArray(c),x[c]=1);w[c]!==d&&((u?a:b.get("ANGLE_instanced_arrays"))[u?"vertexAttribDivisor":"vertexAttribDivisorANGLE"](c,d),w[c]=d)}function f(b){!0!==v[b]&&(a.enable(b),v[b]=!0)}function g(b){!1!==v[b]&&(a.disable(b),
|
|
|
|
-v[b]=!1)}function h(b,c,d,e,h,k,m,p){if(0===b)Z&&(g(3042),Z=!1);else if(Z||(f(3042),Z=!0),5!==b){if(b!==C||p!==E){if(100!==y||100!==Fa)a.blendEquation(32774),Fa=y=100;if(p)switch(b){case 1:a.blendFuncSeparate(1,771,1,771);break;case 2:a.blendFunc(1,1);break;case 3:a.blendFuncSeparate(0,0,769,771);break;case 4:a.blendFuncSeparate(0,768,0,770);break;default:console.error("THREE.WebGLState: Invalid blending: ",b)}else switch(b){case 1:a.blendFuncSeparate(770,771,1,771);break;case 2:a.blendFunc(770,1);
|
|
|
|
-break;case 3:a.blendFunc(0,769);break;case 4:a.blendFunc(0,768);break;default:console.error("THREE.WebGLState: Invalid blending: ",b)}D=I=Ba=ma=null;C=b;E=p}}else{h=h||c;k=k||d;m=m||e;if(c!==y||h!==Fa)a.blendEquationSeparate(Ic[c],Ic[h]),y=c,Fa=h;if(d!==ma||e!==Ba||k!==I||m!==D)a.blendFuncSeparate(K[d],K[e],K[k],K[m]),ma=d,Ba=e,I=k,D=m;C=b;E=null}}function k(b){A!==b&&(b?a.frontFace(2304):a.frontFace(2305),A=b)}function m(b){0!==b?(f(2884),b!==B&&(1===b?a.cullFace(1029):2===b?a.cullFace(1028):a.cullFace(1032))):
|
|
|
|
-g(2884);B=b}function l(b,c,d){if(b){if(f(32823),J!==c||N!==d)a.polygonOffset(c,d),J=c,N=d}else g(32823)}function p(b){void 0===b&&(b=33984+fa-1);M!==b&&(a.activeTexture(b),M=b)}var u=c.isWebGL2,r=new function(){var b=!1,c=new ca,d=null,e=new ca(0,0,0,0);return{setMask:function(c){d===c||b||(a.colorMask(c,c,c,c),d=c)},setLocked:function(a){b=a},setClear:function(b,d,f,g,h){!0===h&&(b*=g,d*=g,f*=g);c.set(b,d,f,g);!1===e.equals(c)&&(a.clearColor(b,d,f,g),e.copy(c))},reset:function(){b=!1;d=null;e.set(-1,
|
|
|
|
-0,0,0)}}},q=new function(){var b=!1,c=null,d=null,e=null;return{setTest:function(a){a?f(2929):g(2929)},setMask:function(d){c===d||b||(a.depthMask(d),c=d)},setFunc:function(b){if(d!==b){if(b)switch(b){case 0:a.depthFunc(512);break;case 1:a.depthFunc(519);break;case 2:a.depthFunc(513);break;case 3:a.depthFunc(515);break;case 4:a.depthFunc(514);break;case 5:a.depthFunc(518);break;case 6:a.depthFunc(516);break;case 7:a.depthFunc(517);break;default:a.depthFunc(515)}else a.depthFunc(515);d=b}},setLocked:function(a){b=
|
|
|
|
-a},setClear:function(b){e!==b&&(a.clearDepth(b),e=b)},reset:function(){b=!1;e=d=c=null}}},t=new function(){var b=!1,c=null,d=null,e=null,h=null,k=null,m=null,p=null,l=null;return{setTest:function(a){b||(a?f(2960):g(2960))},setMask:function(d){c===d||b||(a.stencilMask(d),c=d)},setFunc:function(b,c,f){if(d!==b||e!==c||h!==f)a.stencilFunc(b,c,f),d=b,e=c,h=f},setOp:function(b,c,d){if(k!==b||m!==c||p!==d)a.stencilOp(b,c,d),k=b,m=c,p=d},setLocked:function(a){b=a},setClear:function(b){l!==b&&(a.clearStencil(b),
|
|
|
|
-l=b)},reset:function(){b=!1;l=p=m=k=h=e=d=c=null}}};c=a.getParameter(34921);var n=new Uint8Array(c),x=new Uint8Array(c),w=new Uint8Array(c),v={},U=null,Z=null,C=null,y=null,ma=null,Ba=null,Fa=null,I=null,D=null,E=!1,A=null,B=null,G=null,J=null,N=null,fa=a.getParameter(35661),O=!1;c=0;c=a.getParameter(7938);-1!==c.indexOf("WebGL")?(c=parseFloat(/^WebGL ([0-9])/.exec(c)[1]),O=1<=c):-1!==c.indexOf("OpenGL ES")&&(c=parseFloat(/^OpenGL ES ([0-9])/.exec(c)[1]),O=2<=c);var M=null,Jd={},W=new ca,Vh=new ca,
|
|
|
|
-lg={};lg[3553]=d(3553,3553,1);lg[34067]=d(34067,34069,6);r.setClear(0,0,0,1);q.setClear(1);t.setClear(0);f(2929);q.setFunc(3);k(!1);m(1);f(2884);h(0);var Ic={100:32774,101:32778,102:32779};u?(Ic[103]=32775,Ic[104]=32776):(c=b.get("EXT_blend_minmax"),null!==c&&(Ic[103]=c.MIN_EXT,Ic[104]=c.MAX_EXT));var K={200:0,201:1,202:768,204:770,210:776,208:774,206:772,203:769,205:771,209:775,207:773};return{buffers:{color:r,depth:q,stencil:t},initAttributes:function(){for(var a=0,b=n.length;a<b;a++)n[a]=0},enableAttribute:function(a){e(a,
|
|
|
|
-0)},enableAttributeAndDivisor:e,disableUnusedAttributes:function(){for(var b=0,c=x.length;b!==c;++b)x[b]!==n[b]&&(a.disableVertexAttribArray(b),x[b]=0)},vertexAttribPointer:function(b,c,d,e,f,g){!0!==u||5124!==d&&5125!==d?a.vertexAttribPointer(b,c,d,e,f,g):a.vertexAttribIPointer(b,c,d,e,f,g)},enable:f,disable:g,useProgram:function(b){return U!==b?(a.useProgram(b),U=b,!0):!1},setBlending:h,setMaterial:function(a,b){2===a.side?g(2884):f(2884);var c=1===a.side;b&&(c=!c);k(c);1===a.blending&&!1===a.transparent?
|
|
|
|
-h(0):h(a.blending,a.blendEquation,a.blendSrc,a.blendDst,a.blendEquationAlpha,a.blendSrcAlpha,a.blendDstAlpha,a.premultipliedAlpha);q.setFunc(a.depthFunc);q.setTest(a.depthTest);q.setMask(a.depthWrite);r.setMask(a.colorWrite);b=a.stencilWrite;t.setTest(b);b&&(t.setMask(a.stencilWriteMask),t.setFunc(a.stencilFunc,a.stencilRef,a.stencilFuncMask),t.setOp(a.stencilFail,a.stencilZFail,a.stencilZPass));l(a.polygonOffset,a.polygonOffsetFactor,a.polygonOffsetUnits)},setFlipSided:k,setCullFace:m,setLineWidth:function(b){b!==
|
|
|
|
-G&&(O&&a.lineWidth(b),G=b)},setPolygonOffset:l,setScissorTest:function(a){a?f(3089):g(3089)},activeTexture:p,bindTexture:function(b,c){null===M&&p();var d=Jd[M];void 0===d&&(d={type:void 0,texture:void 0},Jd[M]=d);if(d.type!==b||d.texture!==c)a.bindTexture(b,c||lg[b]),d.type=b,d.texture=c},unbindTexture:function(){var b=Jd[M];void 0!==b&&void 0!==b.type&&(a.bindTexture(b.type,null),b.type=void 0,b.texture=void 0)},compressedTexImage2D:function(){try{a.compressedTexImage2D.apply(a,arguments)}catch(R){console.error("THREE.WebGLState:",
|
|
|
|
-R)}},texImage2D:function(){try{a.texImage2D.apply(a,arguments)}catch(R){console.error("THREE.WebGLState:",R)}},texImage3D:function(){try{a.texImage3D.apply(a,arguments)}catch(R){console.error("THREE.WebGLState:",R)}},scissor:function(b){!1===W.equals(b)&&(a.scissor(b.x,b.y,b.z,b.w),W.copy(b))},viewport:function(b){!1===Vh.equals(b)&&(a.viewport(b.x,b.y,b.z,b.w),Vh.copy(b))},reset:function(){for(var b=0;b<x.length;b++)1===x[b]&&(a.disableVertexAttribArray(b),x[b]=0);v={};M=null;Jd={};B=A=C=U=null;
|
|
|
|
-r.reset();q.reset();t.reset()}}}function Bk(a,b,c,d,e,f,g){function h(a,b){return J?new OffscreenCanvas(a,b):document.createElementNS("http://www.w3.org/1999/xhtml","canvas")}function k(a,b,c,d){var e=1;if(a.width>d||a.height>d)e=d/Math.max(a.width,a.height);if(1>e||!0===b){if("undefined"!==typeof HTMLImageElement&&a instanceof HTMLImageElement||"undefined"!==typeof HTMLCanvasElement&&a instanceof HTMLCanvasElement||"undefined"!==typeof ImageBitmap&&a instanceof ImageBitmap)return d=b?M.floorPowerOfTwo:
|
|
|
|
-Math.floor,b=d(e*a.width),e=d(e*a.height),void 0===G&&(G=h(b,e)),c=c?h(b,e):G,c.width=b,c.height=e,c.getContext("2d").drawImage(a,0,0,b,e),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+a.width+"x"+a.height+") to ("+b+"x"+e+")."),c;"data"in a&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+a.width+"x"+a.height+").")}return a}function m(a){return M.isPowerOfTwo(a.width)&&M.isPowerOfTwo(a.height)}function l(a,b){return a.generateMipmaps&&b&&1003!==a.minFilter&&
|
|
|
|
-1006!==a.minFilter}function p(b,c,e,f){a.generateMipmap(b);d.get(c).__maxMipLevel=Math.log(Math.max(e,f))*Math.LOG2E}function u(c,d,e){if(!1===Ba)return d;if(null!==c){if(void 0!==a[c])return a[c];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+c+"'")}c=d;6403===d&&(5126===e&&(c=33326),5131===e&&(c=33325),5121===e&&(c=33321));6407===d&&(5126===e&&(c=34837),5131===e&&(c=34843),5121===e&&(c=32849));6408===d&&(5126===e&&(c=34836),5131===e&&(c=34842),5121===e&&
|
|
|
|
-(c=32856));33325!==c&&33326!==c&&34842!==c&&34836!==c||b.get("EXT_color_buffer_float");return c}function r(a){return 1003===a||1004===a||1005===a?9728:9729}function q(b){b=b.target;b.removeEventListener("dispose",q);var c=d.get(b);void 0!==c.__webglInit&&(a.deleteTexture(c.__webglTexture),d.remove(b));b.isVideoTexture&&B.delete(b);g.memory.textures--}function t(b){b=b.target;b.removeEventListener("dispose",t);var c=d.get(b),e=d.get(b.texture);if(b){void 0!==e.__webglTexture&&a.deleteTexture(e.__webglTexture);
|
|
|
|
-b.depthTexture&&b.depthTexture.dispose();if(b.isWebGLCubeRenderTarget)for(e=0;6>e;e++)a.deleteFramebuffer(c.__webglFramebuffer[e]),c.__webglDepthbuffer&&a.deleteRenderbuffer(c.__webglDepthbuffer[e]);else a.deleteFramebuffer(c.__webglFramebuffer),c.__webglDepthbuffer&&a.deleteRenderbuffer(c.__webglDepthbuffer),c.__webglMultisampledFramebuffer&&a.deleteFramebuffer(c.__webglMultisampledFramebuffer),c.__webglColorRenderbuffer&&a.deleteRenderbuffer(c.__webglColorRenderbuffer),c.__webglDepthRenderbuffer&&
|
|
|
|
-a.deleteRenderbuffer(c.__webglDepthRenderbuffer);d.remove(b.texture);d.remove(b)}g.memory.textures--}function n(a,b){var e=d.get(a);if(a.isVideoTexture){var f=g.render.frame;B.get(a)!==f&&(B.set(a,f),a.update())}if(0<a.version&&e.__version!==a.version)if(f=a.image,void 0===f)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined");else if(!1===f.complete)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{Z(e,a,b);return}c.activeTexture(33984+
|
|
|
|
-b);c.bindTexture(3553,e.__webglTexture)}function x(b,e){if(6===b.image.length){var g=d.get(b);if(0<b.version&&g.__version!==b.version){U(g,b);c.activeTexture(33984+e);c.bindTexture(34067,g.__webglTexture);a.pixelStorei(37440,b.flipY);var h=b&&(b.isCompressedTexture||b.image[0].isCompressedTexture);e=b.image[0]&&b.image[0].isDataTexture;for(var z=[],q=0;6>q;q++)z[q]=h||e?e?b.image[q].image:b.image[q]:k(b.image[q],!1,!0,I);var r=z[0],t=m(r)||Ba,n=f.convert(b.format),F=f.convert(b.type),w=u(b.internalFormat,
|
|
|
|
-n,F);v(34067,b,t);if(h){for(q=0;6>q;q++){var x=z[q].mipmaps;for(h=0;h<x.length;h++){var W=x[h];1023!==b.format&&1022!==b.format?null!==n?c.compressedTexImage2D(34069+q,h,w,W.width,W.height,0,W.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):c.texImage2D(34069+q,h,w,W.width,W.height,0,n,F,W.data)}}g.__maxMipLevel=x.length-1}else{x=b.mipmaps;for(q=0;6>q;q++)if(e)for(c.texImage2D(34069+q,0,w,z[q].width,z[q].height,0,n,F,z[q].data),
|
|
|
|
-h=0;h<x.length;h++)W=x[h],W=W.image[q].image,c.texImage2D(34069+q,h+1,w,W.width,W.height,0,n,F,W.data);else for(c.texImage2D(34069+q,0,w,n,F,z[q]),h=0;h<x.length;h++)W=x[h],c.texImage2D(34069+q,h+1,w,n,F,W.image[q]);g.__maxMipLevel=x.length}l(b,t)&&p(34067,b,r.width,r.height);g.__version=b.version;if(b.onUpdate)b.onUpdate(b)}else c.activeTexture(33984+e),c.bindTexture(34067,g.__webglTexture)}}function w(a,b){c.activeTexture(33984+b);c.bindTexture(34067,d.get(a).__webglTexture)}function v(c,f,g){g?
|
|
|
|
-(a.texParameteri(c,10242,O[f.wrapS]),a.texParameteri(c,10243,O[f.wrapT]),32879!==c&&35866!==c||a.texParameteri(c,32882,O[f.wrapR]),a.texParameteri(c,10240,fa[f.magFilter]),a.texParameteri(c,10241,fa[f.minFilter])):(a.texParameteri(c,10242,33071),a.texParameteri(c,10243,33071),32879!==c&&35866!==c||a.texParameteri(c,32882,33071),1001===f.wrapS&&1001===f.wrapT||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),
|
|
|
|
-a.texParameteri(c,10240,r(f.magFilter)),a.texParameteri(c,10241,r(f.minFilter)),1003!==f.minFilter&&1006!==f.minFilter&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter."));!(g=b.get("EXT_texture_filter_anisotropic"))||1015===f.type&&null===b.get("OES_texture_float_linear")||1016===f.type&&null===(Ba||b.get("OES_texture_half_float_linear"))||!(1<f.anisotropy||d.get(f).__currentAnisotropy)||(a.texParameterf(c,
|
|
|
|
-g.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(f.anisotropy,e.getMaxAnisotropy())),d.get(f).__currentAnisotropy=f.anisotropy)}function U(b,c){void 0===b.__webglInit&&(b.__webglInit=!0,c.addEventListener("dispose",q),b.__webglTexture=a.createTexture(),g.memory.textures++)}function Z(b,d,e){var g=3553;d.isDataTexture2DArray&&(g=35866);d.isDataTexture3D&&(g=32879);U(b,d);c.activeTexture(33984+e);c.bindTexture(g,b.__webglTexture);a.pixelStorei(37440,d.flipY);a.pixelStorei(37441,d.premultiplyAlpha);a.pixelStorei(3317,
|
|
|
|
-d.unpackAlignment);e=Ba?!1:1001!==d.wrapS||1001!==d.wrapT||1003!==d.minFilter&&1006!==d.minFilter;e=e&&!1===m(d.image);e=k(d.image,e,!1,E);var h=m(e)||Ba,z=f.convert(d.format),q=f.convert(d.type),r=u(d.internalFormat,z,q);v(g,d,h);var t=d.mipmaps;if(d.isDepthTexture)r=6402,Ba?r=1015===d.type?36012:1014===d.type?33190:1020===d.type?35056:33189:1015===d.type&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),1026===d.format&&6402===r&&1012!==d.type&&1014!==d.type&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),
|
|
|
|
-d.type=1012,q=f.convert(d.type)),1027===d.format&&6402===r&&(r=34041,1020!==d.type&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),d.type=1020,q=f.convert(d.type))),c.texImage2D(3553,0,r,e.width,e.height,0,z,q,null);else if(d.isDataTexture)if(0<t.length&&h){for(var n=0,F=t.length;n<F;n++){var w=t[n];c.texImage2D(3553,n,r,w.width,w.height,0,z,q,w.data)}d.generateMipmaps=!1;b.__maxMipLevel=t.length-1}else c.texImage2D(3553,0,r,e.width,e.height,0,z,
|
|
|
|
-q,e.data),b.__maxMipLevel=0;else if(d.isCompressedTexture){n=0;for(F=t.length;n<F;n++)w=t[n],1023!==d.format&&1022!==d.format?null!==z?c.compressedTexImage2D(3553,n,r,w.width,w.height,0,w.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):c.texImage2D(3553,n,r,w.width,w.height,0,z,q,w.data);b.__maxMipLevel=t.length-1}else if(d.isDataTexture2DArray)c.texImage3D(35866,0,r,e.width,e.height,e.depth,0,z,q,e.data),b.__maxMipLevel=0;else if(d.isDataTexture3D)c.texImage3D(32879,
|
|
|
|
-0,r,e.width,e.height,e.depth,0,z,q,e.data),b.__maxMipLevel=0;else if(0<t.length&&h){n=0;for(F=t.length;n<F;n++)w=t[n],c.texImage2D(3553,n,r,z,q,w);d.generateMipmaps=!1;b.__maxMipLevel=t.length-1}else c.texImage2D(3553,0,r,z,q,e),b.__maxMipLevel=0;l(d,h)&&p(g,d,e.width,e.height);b.__version=d.version;if(d.onUpdate)d.onUpdate(d)}function C(b,e,g,h){var k=f.convert(e.texture.format),m=f.convert(e.texture.type),p=u(e.texture.internalFormat,k,m);c.texImage2D(h,0,p,e.width,e.height,0,k,m,null);a.bindFramebuffer(36160,
|
|
|
|
-b);a.framebufferTexture2D(36160,g,h,d.get(e.texture).__webglTexture,0);a.bindFramebuffer(36160,null)}function y(b,c,d){a.bindRenderbuffer(36161,b);if(c.depthBuffer&&!c.stencilBuffer){var e=33189;d?((d=c.depthTexture)&&d.isDepthTexture&&(1015===d.type?e=36012:1014===d.type&&(e=33190)),d=D(c),a.renderbufferStorageMultisample(36161,d,e,c.width,c.height)):a.renderbufferStorage(36161,e,c.width,c.height);a.framebufferRenderbuffer(36160,36096,36161,b)}else c.depthBuffer&&c.stencilBuffer?(d?(d=D(c),a.renderbufferStorageMultisample(36161,
|
|
|
|
-d,35056,c.width,c.height)):a.renderbufferStorage(36161,34041,c.width,c.height),a.framebufferRenderbuffer(36160,33306,36161,b)):(b=f.convert(c.texture.format),e=f.convert(c.texture.type),e=u(c.texture.internalFormat,b,e),d?(d=D(c),a.renderbufferStorageMultisample(36161,d,e,c.width,c.height)):a.renderbufferStorage(36161,e,c.width,c.height));a.bindRenderbuffer(36161,null)}function D(a){return Ba&&a.isWebGLMultisampleRenderTarget?Math.min(A,a.samples):0}var Ba=e.isWebGL2,Fa=e.maxTextures,I=e.maxCubemapSize,
|
|
|
|
-E=e.maxTextureSize,A=e.maxSamples,B=new WeakMap,G,J=!1;try{J="undefined"!==typeof OffscreenCanvas&&null!==(new OffscreenCanvas(1,1)).getContext("2d")}catch(Jd){}var N=0,O={1E3:10497,1001:33071,1002:33648},fa={1003:9728,1004:9984,1005:9986,1006:9729,1007:9985,1008:9987},P=!1,L=!1;this.allocateTextureUnit=function(){var a=N;a>=Fa&&console.warn("THREE.WebGLTextures: Trying to use "+a+" texture units while this GPU supports only "+Fa);N+=1;return a};this.resetTextureUnits=function(){N=0};this.setTexture2D=
|
|
|
|
-n;this.setTexture2DArray=function(a,b){var e=d.get(a);0<a.version&&e.__version!==a.version?Z(e,a,b):(c.activeTexture(33984+b),c.bindTexture(35866,e.__webglTexture))};this.setTexture3D=function(a,b){var e=d.get(a);0<a.version&&e.__version!==a.version?Z(e,a,b):(c.activeTexture(33984+b),c.bindTexture(32879,e.__webglTexture))};this.setTextureCube=x;this.setTextureCubeDynamic=w;this.setupRenderTarget=function(b){var e=d.get(b),h=d.get(b.texture);b.addEventListener("dispose",t);h.__webglTexture=a.createTexture();
|
|
|
|
-g.memory.textures++;var k=!0===b.isWebGLCubeRenderTarget,z=!0===b.isWebGLMultisampleRenderTarget,q=m(b)||Ba;!Ba||1022!==b.texture.format||1015!==b.texture.type&&1016!==b.texture.type||(b.texture.format=1023,console.warn("THREE.WebGLRenderer: Rendering to textures with RGB format is not supported. Using RGBA format instead."));if(k)for(e.__webglFramebuffer=[],z=0;6>z;z++)e.__webglFramebuffer[z]=a.createFramebuffer();else if(e.__webglFramebuffer=a.createFramebuffer(),z)if(Ba){e.__webglMultisampledFramebuffer=
|
|
|
|
-a.createFramebuffer();e.__webglColorRenderbuffer=a.createRenderbuffer();a.bindRenderbuffer(36161,e.__webglColorRenderbuffer);z=f.convert(b.texture.format);var r=f.convert(b.texture.type);z=u(b.texture.internalFormat,z,r);r=D(b);a.renderbufferStorageMultisample(36161,r,z,b.width,b.height);a.bindFramebuffer(36160,e.__webglMultisampledFramebuffer);a.framebufferRenderbuffer(36160,36064,36161,e.__webglColorRenderbuffer);a.bindRenderbuffer(36161,null);b.depthBuffer&&(e.__webglDepthRenderbuffer=a.createRenderbuffer(),
|
|
|
|
-y(e.__webglDepthRenderbuffer,b,!0));a.bindFramebuffer(36160,null)}else console.warn("THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.");if(k){c.bindTexture(34067,h.__webglTexture);v(34067,b.texture,q);for(z=0;6>z;z++)C(e.__webglFramebuffer[z],b,36064,34069+z);l(b.texture,q)&&p(34067,b.texture,b.width,b.height);c.bindTexture(34067,null)}else c.bindTexture(3553,h.__webglTexture),v(3553,b.texture,q),C(e.__webglFramebuffer,b,36064,3553),l(b.texture,q)&&p(3553,b.texture,
|
|
|
|
-b.width,b.height),c.bindTexture(3553,null);if(b.depthBuffer){e=d.get(b);h=!0===b.isWebGLCubeRenderTarget;if(b.depthTexture){if(h)throw Error("target.depthTexture not supported in Cube render targets");if(b&&b.isWebGLCubeRenderTarget)throw Error("Depth Texture with cube render targets is not supported");a.bindFramebuffer(36160,e.__webglFramebuffer);if(!b.depthTexture||!b.depthTexture.isDepthTexture)throw Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");d.get(b.depthTexture).__webglTexture&&
|
|
|
|
-b.depthTexture.image.width===b.width&&b.depthTexture.image.height===b.height||(b.depthTexture.image.width=b.width,b.depthTexture.image.height=b.height,b.depthTexture.needsUpdate=!0);n(b.depthTexture,0);e=d.get(b.depthTexture).__webglTexture;if(1026===b.depthTexture.format)a.framebufferTexture2D(36160,36096,3553,e,0);else if(1027===b.depthTexture.format)a.framebufferTexture2D(36160,33306,3553,e,0);else throw Error("Unknown depthTexture format");}else if(h)for(e.__webglDepthbuffer=[],h=0;6>h;h++)a.bindFramebuffer(36160,
|
|
|
|
-e.__webglFramebuffer[h]),e.__webglDepthbuffer[h]=a.createRenderbuffer(),y(e.__webglDepthbuffer[h],b,!1);else a.bindFramebuffer(36160,e.__webglFramebuffer),e.__webglDepthbuffer=a.createRenderbuffer(),y(e.__webglDepthbuffer,b,!1);a.bindFramebuffer(36160,null)}};this.updateRenderTargetMipmap=function(a){var b=a.texture,e=m(a)||Ba;if(l(b,e)){e=a.isWebGLCubeRenderTarget?34067:3553;var f=d.get(b).__webglTexture;c.bindTexture(e,f);p(e,b,a.width,a.height);c.bindTexture(e,null)}};this.updateMultisampleRenderTarget=
|
|
|
|
-function(b){if(b.isWebGLMultisampleRenderTarget)if(Ba){var c=d.get(b);a.bindFramebuffer(36008,c.__webglMultisampledFramebuffer);a.bindFramebuffer(36009,c.__webglFramebuffer);var e=b.width,f=b.height,g=16384;b.depthBuffer&&(g|=256);b.stencilBuffer&&(g|=1024);a.blitFramebuffer(0,0,e,f,0,0,e,f,g,9728);a.bindFramebuffer(36160,c.__webglMultisampledFramebuffer)}else console.warn("THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.")};this.safeSetTexture2D=function(a,b){a&&a.isWebGLRenderTarget&&
|
|
|
|
-(!1===P&&(console.warn("THREE.WebGLTextures.safeSetTexture2D: don't use render targets as textures. Use their .texture property instead."),P=!0),a=a.texture);n(a,b)};this.safeSetTextureCube=function(a,b){a&&a.isWebGLCubeRenderTarget&&(!1===L&&(console.warn("THREE.WebGLTextures.safeSetTextureCube: don't use cube render targets as textures. Use their .texture property instead."),L=!0),a=a.texture);a&&a.isCubeTexture||Array.isArray(a.image)&&6===a.image.length?x(a,b):w(a,b)}}function Wh(a,b,c){var d=
|
|
|
|
-c.isWebGL2;return{convert:function(a){if(1009===a)return 5121;if(1017===a)return 32819;if(1018===a)return 32820;if(1019===a)return 33635;if(1010===a)return 5120;if(1011===a)return 5122;if(1012===a)return 5123;if(1013===a)return 5124;if(1014===a)return 5125;if(1015===a)return 5126;if(1016===a){if(d)return 5131;var c=b.get("OES_texture_half_float");return null!==c?c.HALF_FLOAT_OES:null}if(1021===a)return 6406;if(1022===a)return 6407;if(1023===a)return 6408;if(1024===a)return 6409;if(1025===a)return 6410;
|
|
|
|
-if(1026===a)return 6402;if(1027===a)return 34041;if(1028===a)return 6403;if(1029===a)return 36244;if(1030===a)return 33319;if(1031===a)return 33320;if(1032===a)return 36248;if(1033===a)return 36249;if(33776===a||33777===a||33778===a||33779===a)if(c=b.get("WEBGL_compressed_texture_s3tc"),null!==c){if(33776===a)return c.COMPRESSED_RGB_S3TC_DXT1_EXT;if(33777===a)return c.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(33778===a)return c.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(33779===a)return c.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;
|
|
|
|
-if(35840===a||35841===a||35842===a||35843===a)if(c=b.get("WEBGL_compressed_texture_pvrtc"),null!==c){if(35840===a)return c.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(35841===a)return c.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(35842===a)return c.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(35843===a)return c.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(36196===a)return c=b.get("WEBGL_compressed_texture_etc1"),null!==c?c.COMPRESSED_RGB_ETC1_WEBGL:null;if(37492===a||37496===a)if(c=b.get("WEBGL_compressed_texture_etc"),
|
|
|
|
-null!==c){if(37492===a)return c.COMPRESSED_RGB8_ETC2;if(37496===a)return c.COMPRESSED_RGBA8_ETC2_EAC}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||37840===a||37841===a||37842===a||37843===a||37844===a||37845===a||37846===a||37847===a||37848===a||37849===a||37850===a||37851===a||37852===a||37853===a)return c=b.get("WEBGL_compressed_texture_astc"),null!==c?a:null;if(36492===a)return c=b.get("EXT_texture_compression_bptc"),
|
|
|
|
-null!==c?a:null;if(1020===a){if(d)return 34042;c=b.get("WEBGL_depth_texture");return null!==c?c.UNSIGNED_INT_24_8_WEBGL:null}}}}function Ke(a){ba.call(this);this.cameras=a||[]}function Jc(){E.call(this);this.type="Group"}function Le(){this._grip=this._targetRay=null}function Xh(a,b){function c(a){var b=q.get(a.inputSource);b&&b.dispatchEvent({type:a.type})}function d(){q.forEach(function(a,b){a.disconnect(b)});q.clear();a.setFramebuffer(null);a.setRenderTarget(a.getRenderTarget());D.stop();h.isPresenting=
|
|
|
|
-!1;h.dispatchEvent({type:"sessionend"})}function e(a){l=a;D.setContext(k);D.start();h.isPresenting=!0;h.dispatchEvent({type:"sessionstart"})}function f(a){for(var b=k.inputSources,c=0;c<r.length;c++)q.set(b[c],r[c]);for(c=0;c<a.removed.length;c++){b=a.removed[c];var d=q.get(b);d&&(d.dispatchEvent({type:"disconnected",data:b}),q.delete(b))}for(c=0;c<a.added.length;c++)b=a.added[c],(d=q.get(b))&&d.dispatchEvent({type:"connected",data:b})}function g(a,b){null===b?a.matrixWorld.copy(a.matrix):a.matrixWorld.multiplyMatrices(b.matrixWorld,
|
|
|
|
-a.matrix);a.matrixWorldInverse.getInverse(a.matrixWorld)}var h=this,k=null,m=1,l=null,p="local-floor",u=null,r=[],q=new Map,t=new ba;t.layers.enable(1);t.viewport=new ca;var F=new ba;F.layers.enable(2);F.viewport=new ca;var x=[t,F],w=new Ke;w.layers.enable(1);w.layers.enable(2);var v=null,U=null;this.isPresenting=this.enabled=!1;this.getController=function(a){var b=r[a];void 0===b&&(b=new Le,r[a]=b);return b.getTargetRaySpace()};this.getControllerGrip=function(a){var b=r[a];void 0===b&&(b=new Le,
|
|
|
|
-r[a]=b);return b.getGripSpace()};this.setFramebufferScaleFactor=function(a){m=a;!0===h.isPresenting&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")};this.setReferenceSpaceType=function(a){p=a;!0===h.isPresenting&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")};this.getReferenceSpace=function(){return l};this.getSession=function(){return k};this.setSession=function(a){k=a;null!==k&&(k.addEventListener("select",c),k.addEventListener("selectstart",
|
|
|
|
-c),k.addEventListener("selectend",c),k.addEventListener("squeeze",c),k.addEventListener("squeezestart",c),k.addEventListener("squeezeend",c),k.addEventListener("end",d),a=b.getContextAttributes(),a=new XRWebGLLayer(k,b,{antialias:a.antialias,alpha:a.alpha,depth:a.depth,stencil:a.stencil,framebufferScaleFactor:m}),k.updateRenderState({baseLayer:a}),k.requestReferenceSpace(p).then(e),k.addEventListener("inputsourceschange",f))};var Z=new n,C=new n;this.getCamera=function(a){w.near=F.near=t.near=a.near;
|
|
|
|
-w.far=F.far=t.far=a.far;if(v!==w.near||U!==w.far)k.updateRenderState({depthNear:w.near,depthFar:w.far}),v=w.near,U=w.far;var b=a.parent,c=w.cameras;g(w,b);for(var d=0;d<c.length;d++)g(c[d],b);a.matrixWorld.copy(w.matrixWorld);a=a.children;d=0;for(b=a.length;d<b;d++)a[d].updateMatrixWorld(!0);Z.setFromMatrixPosition(t.matrixWorld);C.setFromMatrixPosition(F.matrixWorld);d=Z.distanceTo(C);var e=t.projectionMatrix.elements,f=F.projectionMatrix.elements,h=e[14]/(e[10]-1);a=e[14]/(e[10]+1);b=(e[9]+1)/e[5];
|
|
|
|
-c=(e[9]-1)/e[5];var m=(e[8]-1)/e[0],p=(f[8]+1)/f[0];f=h*m;e=h*p;p=d/(-m+p);m=p*-m;t.matrixWorld.decompose(w.position,w.quaternion,w.scale);w.translateX(m);w.translateZ(p);w.matrixWorld.compose(w.position,w.quaternion,w.scale);w.matrixWorldInverse.getInverse(w.matrixWorld);h+=p;p=a+p;w.projectionMatrix.makePerspective(f-m,e+(d-m),b*a/p*h,c*a/p*h,h,p);return w};var y=null,D=new xh;D.setAnimationLoop(function(b,c){u=c.getViewerPose(l);if(null!==u){var d=u.views,e=k.renderState.baseLayer;a.setFramebuffer(e.framebuffer);
|
|
|
|
-var f=!1;d.length!==w.cameras.length&&(w.cameras.length=0,f=!0);for(var g=0;g<d.length;g++){var h=d[g],m=e.getViewport(h),p=x[g];p.matrix.fromArray(h.transform.matrix);p.projectionMatrix.fromArray(h.projectionMatrix);p.viewport.set(m.x,m.y,m.width,m.height);0===g&&w.matrix.copy(p.matrix);!0===f&&w.cameras.push(p)}}d=k.inputSources;for(g=0;g<r.length;g++)r[g].update(d[g],c,l);y&&y(b,c)});this.setAnimationLoop=function(a){y=a};this.dispose=function(){}}function mg(a){var b;function c(){ra=new rj(H);
|
|
|
|
-Ga=new pj(H,ra,a);!1===Ga.isWebGL2&&(ra.get("WEBGL_depth_texture"),ra.get("OES_texture_float"),ra.get("OES_texture_half_float"),ra.get("OES_texture_half_float_linear"),ra.get("OES_standard_derivatives"),ra.get("OES_element_index_uint"),ra.get("ANGLE_instanced_arrays"));ra.get("OES_texture_float_linear");qa=new Wh(H,ra,Ga);Y=new Ak(H,ra,Ga);Y.scissor(S.copy(ia).multiplyScalar(R).floor());Y.viewport(W.copy(Q).multiplyScalar(R).floor());ba=new uj(H);aa=new qk;ea=new Bk(H,ra,Y,aa,Ga,qa,ba);la=new mj(H,
|
|
|
|
-Ga);wa=new sj(H,la,ba);sa=new xj(H,wa,la,ba);ya=new wj(H);ta=new pk(I,ra,Ga);xa=new tk;va=new zk;pa=new nj(I,Y,sa,Z);Aa=new oj(H,ra,ba,Ga);Ca=new tj(H,ra,ba,Ga);ba.programs=ta.programs;I.capabilities=Ga;I.extensions=ra;I.properties=aa;I.renderLists=xa;I.state=Y;I.info=ba}function d(a){a.preventDefault();console.log("THREE.WebGLRenderer: Context Lost.");G=!0}function e(){console.log("THREE.WebGLRenderer: Context Restored.");G=!1;c()}function f(a){a=a.target;a.removeEventListener("dispose",f);g(a);
|
|
|
|
-aa.remove(a)}function g(a){var b=aa.get(a).program;a.program=void 0;void 0!==b&&ta.releaseProgram(b)}function h(a,b){a.render(function(a){I.renderBufferImmediate(a,b)})}function k(a,b,c,d){if(!1!==a.visible){if(a.layers.test(b.layers))if(a.isGroup)c=a.renderOrder;else if(a.isLOD)!0===a.autoUpdate&&a.update(b);else if(a.isLight)A.pushLight(a),a.castShadow&&A.pushShadow(a);else if(a.isSprite){if(!a.frustumCulled||jg.intersectsSprite(a)){d&&Jb.setFromMatrixPosition(a.matrixWorld).applyMatrix4(Id);var e=
|
|
|
|
-sa.update(a),f=a.material;f.visible&&B.push(a,e,f,c,Jb.z,null)}}else if(a.isImmediateRenderObject)d&&Jb.setFromMatrixPosition(a.matrixWorld).applyMatrix4(Id),B.push(a,null,a.material,c,Jb.z,null);else if(a.isMesh||a.isLine||a.isPoints)if(a.isSkinnedMesh&&a.skeleton.frame!==ba.render.frame&&(a.skeleton.update(),a.skeleton.frame=ba.render.frame),!a.frustumCulled||jg.intersectsObject(a))if(d&&Jb.setFromMatrixPosition(a.matrixWorld).applyMatrix4(Id),e=sa.update(a),f=a.material,Array.isArray(f))for(var g=
|
|
|
|
-e.groups,h=0,m=g.length;h<m;h++){var p=g[h],l=f[p.materialIndex];l&&l.visible&&B.push(a,e,l,c,Jb.z,p)}else f.visible&&B.push(a,e,f,c,Jb.z,null);a=a.children;h=0;for(m=a.length;h<m;h++)k(a[h],b,c,d)}}function m(a,b,c,d){for(var e=0,f=a.length;e<f;e++){var g=a[e],h=g.object,k=g.geometry,m=void 0===d?g.material:d;g=g.group;if(c.isArrayCamera){T=c;for(var p=c.cameras,z=0,q=p.length;z<q;z++){var u=p[z];h.layers.test(u.layers)&&(Y.viewport(W.copy(u.viewport)),A.setupLights(u),l(h,b,u,k,m,g))}}else T=null,
|
|
|
|
-l(h,b,c,k,m,g)}}function l(a,c,d,e,f,g){a.onBeforeRender(I,c,d,e,f,g);A=va.get(c,T||d);a.modelViewMatrix.multiplyMatrices(d.matrixWorldInverse,a.matrixWorld);a.normalMatrix.getNormalMatrix(a.modelViewMatrix);if(a.isImmediateRenderObject){var k=u(d,c,f,a);Y.setMaterial(f);fa=b=null;Je=!1;h(a,k)}else I.renderBufferDirect(d,c,e,f,a,g);a.onAfterRender(I,c,d,e,f,g);A=va.get(c,T||d)}function p(a,b,c){var d=aa.get(a),e=A.state.lights,h=e.state.version;c=ta.getParameters(a,e.state,A.state.shadowsArray,b,
|
|
|
|
-Ua.numPlanes,Ua.numIntersection,c);var k=ta.getProgramCacheKey(c),m=d.program,p=!0;if(void 0===m)a.addEventListener("dispose",f);else if(m.cacheKey!==k)g(a);else{if(d.lightsStateVersion!==h)d.lightsStateVersion=h;else if(void 0!==c.shaderID)return;p=!1}p&&(m=ta.acquireProgram(c,k),d.program=m,d.uniforms=c.uniforms,d.outputEncoding=c.outputEncoding,a.program=m);c=m.getAttributes();if(a.morphTargets)for(k=a.numSupportedMorphTargets=0;k<I.maxMorphTargets;k++)0<=c["morphTarget"+k]&&a.numSupportedMorphTargets++;
|
|
|
|
-if(a.morphNormals)for(k=a.numSupportedMorphNormals=0;k<I.maxMorphNormals;k++)0<=c["morphNormal"+k]&&a.numSupportedMorphNormals++;c=d.uniforms;if(!a.isShaderMaterial&&!a.isRawShaderMaterial||!0===a.clipping)d.numClippingPlanes=Ua.numPlanes,d.numIntersection=Ua.numIntersection,c.clippingPlanes=Ua.uniform;d.environment=a.isMeshStandardMaterial?b.environment:null;d.fog=b.fog;d.needsLights=a.isMeshLambertMaterial||a.isMeshToonMaterial||a.isMeshPhongMaterial||a.isMeshStandardMaterial||a.isShadowMaterial||
|
|
|
|
-a.isShaderMaterial&&!0===a.lights;d.lightsStateVersion=h;d.needsLights&&(c.ambientLightColor.value=e.state.ambient,c.lightProbe.value=e.state.probe,c.directionalLights.value=e.state.directional,c.directionalLightShadows.value=e.state.directionalShadow,c.spotLights.value=e.state.spot,c.spotLightShadows.value=e.state.spotShadow,c.rectAreaLights.value=e.state.rectArea,c.pointLights.value=e.state.point,c.pointLightShadows.value=e.state.pointShadow,c.hemisphereLights.value=e.state.hemi,c.directionalShadowMap.value=
|
|
|
|
-e.state.directionalShadowMap,c.directionalShadowMatrix.value=e.state.directionalShadowMatrix,c.spotShadowMap.value=e.state.spotShadowMap,c.spotShadowMatrix.value=e.state.spotShadowMatrix,c.pointShadowMap.value=e.state.pointShadowMap,c.pointShadowMatrix.value=e.state.pointShadowMatrix);a=d.program.getUniforms();a=Gb.seqWithValue(a.seq,c);d.uniformsList=a}function u(a,b,c,d){ea.resetTextureUnits();var e=b.fog,f=c.isMeshStandardMaterial?b.environment:null,g=null===L?I.outputEncoding:L.texture.encoding,
|
|
|
|
-h=aa.get(c),k=A.state.lights;oa&&(kg||a!==V)&&Ua.setState(c.clippingPlanes,c.clipIntersection,c.clipShadows,a,h,a===V&&c.id===Ie);c.version===h.__version?void 0===h.program?p(c,b,d):c.fog&&h.fog!==e?p(c,b,d):h.environment!==f?p(c,b,d):h.needsLights&&h.lightsStateVersion!==k.state.version?p(c,b,d):void 0===h.numClippingPlanes||h.numClippingPlanes===Ua.numPlanes&&h.numIntersection===Ua.numIntersection?h.outputEncoding!==g&&p(c,b,d):p(c,b,d):(p(c,b,d),h.__version=c.version);var m=!1,l=!1,z=!1;b=h.program;
|
|
|
|
-g=b.getUniforms();k=h.uniforms;Y.useProgram(b.program)&&(z=l=m=!0);c.id!==Ie&&(Ie=c.id,l=!0);if(m||V!==a){g.setValue(H,"projectionMatrix",a.projectionMatrix);Ga.logarithmicDepthBuffer&&g.setValue(H,"logDepthBufFC",2/(Math.log(a.far+1)/Math.LN2));V!==a&&(V=a,z=l=!0);if(c.isShaderMaterial||c.isMeshPhongMaterial||c.isMeshToonMaterial||c.isMeshStandardMaterial||c.envMap)m=g.map.cameraPosition,void 0!==m&&m.setValue(H,Jb.setFromMatrixPosition(a.matrixWorld));(c.isMeshPhongMaterial||c.isMeshToonMaterial||
|
|
|
|
-c.isMeshLambertMaterial||c.isMeshBasicMaterial||c.isMeshStandardMaterial||c.isShaderMaterial)&&g.setValue(H,"isOrthographic",!0===a.isOrthographicCamera);(c.isMeshPhongMaterial||c.isMeshToonMaterial||c.isMeshLambertMaterial||c.isMeshBasicMaterial||c.isMeshStandardMaterial||c.isShaderMaterial||c.skinning)&&g.setValue(H,"viewMatrix",a.matrixWorldInverse)}if(c.skinning&&(g.setOptional(H,d,"bindMatrix"),g.setOptional(H,d,"bindMatrixInverse"),a=d.skeleton))if(m=a.bones,Ga.floatVertexTextures){if(void 0===
|
|
|
|
-a.boneTexture){m=Math.sqrt(4*m.length);m=M.ceilPowerOfTwo(m);m=Math.max(m,4);var u=new Float32Array(m*m*4);u.set(a.boneMatrices);var t=new Zb(u,m,m,1023,1015);a.boneMatrices=u;a.boneTexture=t;a.boneTextureSize=m}g.setValue(H,"boneTexture",a.boneTexture,ea);g.setValue(H,"boneTextureSize",a.boneTextureSize)}else g.setOptional(H,a,"boneMatrices");if(l||h.receiveShadow!==d.receiveShadow)h.receiveShadow=d.receiveShadow,g.setValue(H,"receiveShadow",d.receiveShadow);if(l){g.setValue(H,"toneMappingExposure",
|
|
|
|
-I.toneMappingExposure);g.setValue(H,"toneMappingWhitePoint",I.toneMappingWhitePoint);h.needsLights&&(l=z,k.ambientLightColor.needsUpdate=l,k.lightProbe.needsUpdate=l,k.directionalLights.needsUpdate=l,k.directionalLightShadows.needsUpdate=l,k.pointLights.needsUpdate=l,k.pointLightShadows.needsUpdate=l,k.spotLights.needsUpdate=l,k.spotLightShadows.needsUpdate=l,k.rectAreaLights.needsUpdate=l,k.hemisphereLights.needsUpdate=l);e&&c.fog&&(k.fogColor.value.copy(e.color),e.isFog?(k.fogNear.value=e.near,
|
|
|
|
-k.fogFar.value=e.far):e.isFogExp2&&(k.fogDensity.value=e.density));if(c.isMeshBasicMaterial)r(k,c);else if(c.isMeshLambertMaterial)r(k,c),c.emissiveMap&&(k.emissiveMap.value=c.emissiveMap);else if(c.isMeshToonMaterial)r(k,c),k.specular.value.copy(c.specular),k.shininess.value=Math.max(c.shininess,1E-4),c.gradientMap&&(k.gradientMap.value=c.gradientMap),c.emissiveMap&&(k.emissiveMap.value=c.emissiveMap),c.bumpMap&&(k.bumpMap.value=c.bumpMap,k.bumpScale.value=c.bumpScale,1===c.side&&(k.bumpScale.value*=
|
|
|
|
--1)),c.normalMap&&(k.normalMap.value=c.normalMap,k.normalScale.value.copy(c.normalScale),1===c.side&&k.normalScale.value.negate()),c.displacementMap&&(k.displacementMap.value=c.displacementMap,k.displacementScale.value=c.displacementScale,k.displacementBias.value=c.displacementBias);else if(c.isMeshPhongMaterial)r(k,c),k.specular.value.copy(c.specular),k.shininess.value=Math.max(c.shininess,1E-4),c.emissiveMap&&(k.emissiveMap.value=c.emissiveMap),c.bumpMap&&(k.bumpMap.value=c.bumpMap,k.bumpScale.value=
|
|
|
|
-c.bumpScale,1===c.side&&(k.bumpScale.value*=-1)),c.normalMap&&(k.normalMap.value=c.normalMap,k.normalScale.value.copy(c.normalScale),1===c.side&&k.normalScale.value.negate()),c.displacementMap&&(k.displacementMap.value=c.displacementMap,k.displacementScale.value=c.displacementScale,k.displacementBias.value=c.displacementBias);else if(c.isMeshStandardMaterial)r(k,c,f),c.isMeshPhysicalMaterial?(q(k,c,f),k.reflectivity.value=c.reflectivity,k.clearcoat.value=c.clearcoat,k.clearcoatRoughness.value=c.clearcoatRoughness,
|
|
|
|
-c.sheen&&k.sheen.value.copy(c.sheen),c.clearcoatMap&&(k.clearcoatMap.value=c.clearcoatMap),c.clearcoatRoughnessMap&&(k.clearcoatRoughnessMap.value=c.clearcoatRoughnessMap),c.clearcoatNormalMap&&(k.clearcoatNormalScale.value.copy(c.clearcoatNormalScale),k.clearcoatNormalMap.value=c.clearcoatNormalMap,1===c.side&&k.clearcoatNormalScale.value.negate()),k.transparency.value=c.transparency):q(k,c,f);else if(c.isMeshMatcapMaterial)r(k,c),c.matcap&&(k.matcap.value=c.matcap),c.bumpMap&&(k.bumpMap.value=c.bumpMap,
|
|
|
|
-k.bumpScale.value=c.bumpScale,1===c.side&&(k.bumpScale.value*=-1)),c.normalMap&&(k.normalMap.value=c.normalMap,k.normalScale.value.copy(c.normalScale),1===c.side&&k.normalScale.value.negate()),c.displacementMap&&(k.displacementMap.value=c.displacementMap,k.displacementScale.value=c.displacementScale,k.displacementBias.value=c.displacementBias);else if(c.isMeshDepthMaterial)r(k,c),c.displacementMap&&(k.displacementMap.value=c.displacementMap,k.displacementScale.value=c.displacementScale,k.displacementBias.value=
|
|
|
|
-c.displacementBias);else if(c.isMeshDistanceMaterial)r(k,c),c.displacementMap&&(k.displacementMap.value=c.displacementMap,k.displacementScale.value=c.displacementScale,k.displacementBias.value=c.displacementBias),k.referencePosition.value.copy(c.referencePosition),k.nearDistance.value=c.nearDistance,k.farDistance.value=c.farDistance;else if(c.isMeshNormalMaterial)r(k,c),c.bumpMap&&(k.bumpMap.value=c.bumpMap,k.bumpScale.value=c.bumpScale,1===c.side&&(k.bumpScale.value*=-1)),c.normalMap&&(k.normalMap.value=
|
|
|
|
-c.normalMap,k.normalScale.value.copy(c.normalScale),1===c.side&&k.normalScale.value.negate()),c.displacementMap&&(k.displacementMap.value=c.displacementMap,k.displacementScale.value=c.displacementScale,k.displacementBias.value=c.displacementBias);else if(c.isLineBasicMaterial)k.diffuse.value.copy(c.color),k.opacity.value=c.opacity,c.isLineDashedMaterial&&(k.dashSize.value=c.dashSize,k.totalSize.value=c.dashSize+c.gapSize,k.scale.value=c.scale);else if(c.isPointsMaterial){k.diffuse.value.copy(c.color);
|
|
|
|
-k.opacity.value=c.opacity;k.size.value=c.size*R;k.scale.value=.5*K;c.map&&(k.map.value=c.map);c.alphaMap&&(k.alphaMap.value=c.alphaMap);if(c.map)var n=c.map;else c.alphaMap&&(n=c.alphaMap);void 0!==n&&(!0===n.matrixAutoUpdate&&n.updateMatrix(),k.uvTransform.value.copy(n.matrix))}else if(c.isSpriteMaterial){k.diffuse.value.copy(c.color);k.opacity.value=c.opacity;k.rotation.value=c.rotation;c.map&&(k.map.value=c.map);c.alphaMap&&(k.alphaMap.value=c.alphaMap);if(c.map)var w=c.map;else c.alphaMap&&(w=
|
|
|
|
-c.alphaMap);void 0!==w&&(!0===w.matrixAutoUpdate&&w.updateMatrix(),k.uvTransform.value.copy(w.matrix))}else c.isShadowMaterial&&(k.color.value.copy(c.color),k.opacity.value=c.opacity);void 0!==k.ltc_1&&(k.ltc_1.value=D.LTC_1);void 0!==k.ltc_2&&(k.ltc_2.value=D.LTC_2);Gb.upload(H,h.uniformsList,k,ea);c.isShaderMaterial&&(c.uniformsNeedUpdate=!1)}c.isShaderMaterial&&!0===c.uniformsNeedUpdate&&(Gb.upload(H,h.uniformsList,k,ea),c.uniformsNeedUpdate=!1);c.isSpriteMaterial&&g.setValue(H,"center",d.center);
|
|
|
|
-g.setValue(H,"modelViewMatrix",d.modelViewMatrix);g.setValue(H,"normalMatrix",d.normalMatrix);g.setValue(H,"modelMatrix",d.matrixWorld);return b}function r(a,b,c){a.opacity.value=b.opacity;b.color&&a.diffuse.value.copy(b.color);b.emissive&&a.emissive.value.copy(b.emissive).multiplyScalar(b.emissiveIntensity);b.map&&(a.map.value=b.map);b.alphaMap&&(a.alphaMap.value=b.alphaMap);b.specularMap&&(a.specularMap.value=b.specularMap);if(c=b.envMap||c)a.envMap.value=c,a.flipEnvMap.value=c.isCubeTexture?-1:
|
|
|
|
-1,a.reflectivity.value=b.reflectivity,a.refractionRatio.value=b.refractionRatio,a.maxMipLevel.value=aa.get(c).__maxMipLevel;b.lightMap&&(a.lightMap.value=b.lightMap,a.lightMapIntensity.value=b.lightMapIntensity);b.aoMap&&(a.aoMap.value=b.aoMap,a.aoMapIntensity.value=b.aoMapIntensity);if(b.map)var d=b.map;else b.specularMap?d=b.specularMap:b.displacementMap?d=b.displacementMap:b.normalMap?d=b.normalMap:b.bumpMap?d=b.bumpMap:b.roughnessMap?d=b.roughnessMap:b.metalnessMap?d=b.metalnessMap:b.alphaMap?
|
|
|
|
-d=b.alphaMap:b.emissiveMap&&(d=b.emissiveMap);void 0!==d&&(d.isWebGLRenderTarget&&(d=d.texture),!0===d.matrixAutoUpdate&&d.updateMatrix(),a.uvTransform.value.copy(d.matrix));if(b.aoMap)var e=b.aoMap;else b.lightMap&&(e=b.lightMap);void 0!==e&&(e.isWebGLRenderTarget&&(e=e.texture),!0===e.matrixAutoUpdate&&e.updateMatrix(),a.uv2Transform.value.copy(e.matrix))}function q(a,b,c){a.roughness.value=b.roughness;a.metalness.value=b.metalness;b.roughnessMap&&(a.roughnessMap.value=b.roughnessMap);b.metalnessMap&&
|
|
|
|
-(a.metalnessMap.value=b.metalnessMap);b.emissiveMap&&(a.emissiveMap.value=b.emissiveMap);b.bumpMap&&(a.bumpMap.value=b.bumpMap,a.bumpScale.value=b.bumpScale,1===b.side&&(a.bumpScale.value*=-1));b.normalMap&&(a.normalMap.value=b.normalMap,a.normalScale.value.copy(b.normalScale),1===b.side&&a.normalScale.value.negate());b.displacementMap&&(a.displacementMap.value=b.displacementMap,a.displacementScale.value=b.displacementScale,a.displacementBias.value=b.displacementBias);if(b.envMap||c)a.envMapIntensity.value=
|
|
|
|
-b.envMapIntensity}a=a||{};var t=void 0!==a.canvas?a.canvas:document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),F=void 0!==a.context?a.context:null,x=void 0!==a.alpha?a.alpha:!1,w=void 0!==a.depth?a.depth:!0,ha=void 0!==a.stencil?a.stencil:!0,U=void 0!==a.antialias?a.antialias:!1,Z=void 0!==a.premultipliedAlpha?a.premultipliedAlpha:!0,C=void 0!==a.preserveDrawingBuffer?a.preserveDrawingBuffer:!1,y=void 0!==a.powerPreference?a.powerPreference:"default",E=void 0!==a.failIfMajorPerformanceCaveat?
|
|
|
|
-a.failIfMajorPerformanceCaveat:!1,B=null,A=null;this.domElement=t;this.debug={checkShaderErrors:!0};this.sortObjects=this.autoClearStencil=this.autoClearDepth=this.autoClearColor=this.autoClear=!0;this.clippingPlanes=[];this.localClippingEnabled=!1;this.gammaFactor=2;this.outputEncoding=3E3;this.physicallyCorrectLights=!1;this.toneMapping=0;this.toneMappingWhitePoint=this.toneMappingExposure=1;this.maxMorphTargets=8;this.maxMorphNormals=4;var I=this,G=!1,N=null,O=0,J=0,L=null,X=null,Ie=-1;var fa=
|
|
|
|
-b=null;var Je=!1;var V=null,T=null,W=new ca,S=new ca,ja=null,da=t.width,K=t.height,R=1,ka=null,na=null,Q=new ca(0,0,da,K),ia=new ca(0,0,da,K),ig=!1,jg=new Ec,Ua=new qj,oa=!1,kg=!1,Id=new P,Jb=new n;try{x={alpha:x,depth:w,stencil:ha,antialias:U,premultipliedAlpha:Z,preserveDrawingBuffer:C,powerPreference:y,failIfMajorPerformanceCaveat:E,xrCompatible:!0};t.addEventListener("webglcontextlost",d,!1);t.addEventListener("webglcontextrestored",e,!1);var H=F||t.getContext("webgl",x)||t.getContext("experimental-webgl",
|
|
|
|
-x);if(null===H){if(null!==t.getContext("webgl"))throw Error("Error creating WebGL context with your selected attributes.");throw Error("Error creating WebGL context.");}void 0===H.getShaderPrecisionFormat&&(H.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(Yh){throw console.error("THREE.WebGLRenderer: "+Yh.message),Yh;}var ra,Ga,Y,ba,aa,ea,la,wa,sa,ta,xa,va,pa,ya,Aa,Ca,qa;c();var ua=new Xh(I,H);this.xr=ua;var Ea=new Uh(I,sa,Ga.maxTextureSize);this.shadowMap=Ea;
|
|
|
|
-this.getContext=function(){return H};this.getContextAttributes=function(){return H.getContextAttributes()};this.forceContextLoss=function(){var a=ra.get("WEBGL_lose_context");a&&a.loseContext()};this.forceContextRestore=function(){var a=ra.get("WEBGL_lose_context");a&&a.restoreContext()};this.getPixelRatio=function(){return R};this.setPixelRatio=function(a){void 0!==a&&(R=a,this.setSize(da,K,!1))};this.getSize=function(a){void 0===a&&(console.warn("WebGLRenderer: .getsize() now requires a Vector2 as an argument"),
|
|
|
|
-a=new v);return a.set(da,K)};this.setSize=function(a,b,c){ua.isPresenting?console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting."):(da=a,K=b,t.width=Math.floor(a*R),t.height=Math.floor(b*R),!1!==c&&(t.style.width=a+"px",t.style.height=b+"px"),this.setViewport(0,0,a,b))};this.getDrawingBufferSize=function(a){void 0===a&&(console.warn("WebGLRenderer: .getdrawingBufferSize() now requires a Vector2 as an argument"),a=new v);return a.set(da*R,K*R).floor()};this.setDrawingBufferSize=
|
|
|
|
-function(a,b,c){da=a;K=b;R=c;t.width=Math.floor(a*c);t.height=Math.floor(b*c);this.setViewport(0,0,a,b)};this.getCurrentViewport=function(a){void 0===a&&(console.warn("WebGLRenderer: .getCurrentViewport() now requires a Vector4 as an argument"),a=new ca);return a.copy(W)};this.getViewport=function(a){return a.copy(Q)};this.setViewport=function(a,b,c,d){a.isVector4?Q.set(a.x,a.y,a.z,a.w):Q.set(a,b,c,d);Y.viewport(W.copy(Q).multiplyScalar(R).floor())};this.getScissor=function(a){return a.copy(ia)};
|
|
|
|
-this.setScissor=function(a,b,c,d){a.isVector4?ia.set(a.x,a.y,a.z,a.w):ia.set(a,b,c,d);Y.scissor(S.copy(ia).multiplyScalar(R).floor())};this.getScissorTest=function(){return ig};this.setScissorTest=function(a){Y.setScissorTest(ig=a)};this.setOpaqueSort=function(a){ka=a};this.setTransparentSort=function(a){na=a};this.getClearColor=function(){return pa.getClearColor()};this.setClearColor=function(){pa.setClearColor.apply(pa,arguments)};this.getClearAlpha=function(){return pa.getClearAlpha()};this.setClearAlpha=
|
|
|
|
-function(){pa.setClearAlpha.apply(pa,arguments)};this.clear=function(a,b,c){var d=0;if(void 0===a||a)d|=16384;if(void 0===b||b)d|=256;if(void 0===c||c)d|=1024;H.clear(d)};this.clearColor=function(){this.clear(!0,!1,!1)};this.clearDepth=function(){this.clear(!1,!0,!1)};this.clearStencil=function(){this.clear(!1,!1,!0)};this.dispose=function(){t.removeEventListener("webglcontextlost",d,!1);t.removeEventListener("webglcontextrestored",e,!1);xa.dispose();va.dispose();aa.dispose();sa.dispose();ua.dispose();
|
|
|
|
-za.stop()};this.renderBufferImmediate=function(a,b){Y.initAttributes();var c=aa.get(a);a.hasPositions&&!c.position&&(c.position=H.createBuffer());a.hasNormals&&!c.normal&&(c.normal=H.createBuffer());a.hasUvs&&!c.uv&&(c.uv=H.createBuffer());a.hasColors&&!c.color&&(c.color=H.createBuffer());b=b.getAttributes();a.hasPositions&&(H.bindBuffer(34962,c.position),H.bufferData(34962,a.positionArray,35048),Y.enableAttribute(b.position),H.vertexAttribPointer(b.position,3,5126,!1,0,0));a.hasNormals&&(H.bindBuffer(34962,
|
|
|
|
-c.normal),H.bufferData(34962,a.normalArray,35048),Y.enableAttribute(b.normal),H.vertexAttribPointer(b.normal,3,5126,!1,0,0));a.hasUvs&&(H.bindBuffer(34962,c.uv),H.bufferData(34962,a.uvArray,35048),Y.enableAttribute(b.uv),H.vertexAttribPointer(b.uv,2,5126,!1,0,0));a.hasColors&&(H.bindBuffer(34962,c.color),H.bufferData(34962,a.colorArray,35048),Y.enableAttribute(b.color),H.vertexAttribPointer(b.color,3,5126,!1,0,0));Y.disableUnusedAttributes();H.drawArrays(4,0,a.count);a.count=0};var Ha=new ob;this.renderBufferDirect=
|
|
|
|
-function(a,c,d,e,f,g){null===c&&(c=Ha);var h=f.isMesh&&0>f.matrixWorld.determinant(),k=u(a,c,e,f);Y.setMaterial(e,h);var m=!1;if(b!==d.id||fa!==k.id||Je!==(!0===e.wireframe))b=d.id,fa=k.id,Je=!0===e.wireframe,m=!0;if(e.morphTargets||e.morphNormals)ya.update(f,d,e,k),m=!0;!0===f.isInstancedMesh&&(m=!0);a=d.index;c=d.attributes.position;if(null===a){if(void 0===c||0===c.count)return}else if(0===a.count)return;var p=1;!0===e.wireframe&&(a=wa.getWireframeAttribute(d),p=2);h=Aa;if(null!==a){var l=la.get(a);
|
|
|
|
-h=Ca;h.setIndex(l)}if(m){if(!1!==Ga.isWebGL2||!f.isInstancedMesh&&!d.isInstancedBufferGeometry||null!==ra.get("ANGLE_instanced_arrays")){Y.initAttributes();m=d.attributes;k=k.getAttributes();var z=e.defaultAttributeValues;for(ha in k){var q=k[ha];if(0<=q){var r=m[ha];if(void 0!==r){var t=r.normalized,n=r.itemSize,w=la.get(r);if(void 0!==w){var F=w.buffer,x=w.type;w=w.bytesPerElement;if(r.isInterleavedBufferAttribute){var v=r.data,C=v.stride;r=r.offset;v&&v.isInstancedInterleavedBuffer?(Y.enableAttributeAndDivisor(q,
|
|
|
|
-v.meshPerAttribute),void 0===d.maxInstancedCount&&(d.maxInstancedCount=v.meshPerAttribute*v.count)):Y.enableAttribute(q);H.bindBuffer(34962,F);Y.vertexAttribPointer(q,n,x,t,C*w,r*w)}else r.isInstancedBufferAttribute?(Y.enableAttributeAndDivisor(q,r.meshPerAttribute),void 0===d.maxInstancedCount&&(d.maxInstancedCount=r.meshPerAttribute*r.count)):Y.enableAttribute(q),H.bindBuffer(34962,F),Y.vertexAttribPointer(q,n,x,t,0,0)}}else if("instanceMatrix"===ha)w=la.get(f.instanceMatrix),void 0!==w&&(F=w.buffer,
|
|
|
|
-x=w.type,Y.enableAttributeAndDivisor(q+0,1),Y.enableAttributeAndDivisor(q+1,1),Y.enableAttributeAndDivisor(q+2,1),Y.enableAttributeAndDivisor(q+3,1),H.bindBuffer(34962,F),H.vertexAttribPointer(q+0,4,x,!1,64,0),H.vertexAttribPointer(q+1,4,x,!1,64,16),H.vertexAttribPointer(q+2,4,x,!1,64,32),H.vertexAttribPointer(q+3,4,x,!1,64,48));else if(void 0!==z&&(t=z[ha],void 0!==t))switch(t.length){case 2:H.vertexAttrib2fv(q,t);break;case 3:H.vertexAttrib3fv(q,t);break;case 4:H.vertexAttrib4fv(q,t);break;default:H.vertexAttrib1fv(q,
|
|
|
|
-t)}}}Y.disableUnusedAttributes()}null!==a&&H.bindBuffer(34963,l.buffer)}var ha=d.drawRange.start*p;m=null!==g?g.start*p:0;l=Math.max(ha,m);g=Math.max(0,Math.min(null!==a?a.count:c.count,ha+d.drawRange.count*p,m+(null!==g?g.count*p:Infinity))-1-l+1);0!==g&&(f.isMesh?!0===e.wireframe?(Y.setLineWidth(e.wireframeLinewidth*(null===L?R:1)),h.setMode(1)):h.setMode(4):f.isLine?(e=e.linewidth,void 0===e&&(e=1),Y.setLineWidth(e*(null===L?R:1)),f.isLineSegments?h.setMode(1):f.isLineLoop?h.setMode(2):h.setMode(3)):
|
|
|
|
-f.isPoints?h.setMode(0):f.isSprite&&h.setMode(4),f.isInstancedMesh?h.renderInstances(d,l,g,f.count):d.isInstancedBufferGeometry?h.renderInstances(d,l,g,d.maxInstancedCount):h.render(l,g))};this.compile=function(a,b){A=va.get(a,b);A.init();a.traverse(function(a){a.isLight&&(A.pushLight(a),a.castShadow&&A.pushShadow(a))});A.setupLights(b);var c={};a.traverse(function(b){if(b.material)if(Array.isArray(b.material))for(var d=0;d<b.material.length;d++)!1===b.material[d].uuid in c&&(p(b.material[d],a,b),
|
|
|
|
-c[b.material[d].uuid]=!0);else!1===b.material.uuid in c&&(p(b.material,a,b),c[b.material.uuid]=!0)})};var Da=null,za=new xh;za.setAnimationLoop(function(a){ua.isPresenting||Da&&Da(a)});"undefined"!==typeof window&&za.setContext(window);this.setAnimationLoop=function(a){Da=a;ua.setAnimationLoop(a);za.start()};this.render=function(a,c,d,e){if(void 0!==d){console.warn("THREE.WebGLRenderer.render(): the renderTarget argument has been removed. Use .setRenderTarget() instead.");var f=d}if(void 0!==e){console.warn("THREE.WebGLRenderer.render(): the forceClear argument has been removed. Use .clear() instead.");
|
|
|
|
-var g=e}c&&c.isCamera?G||(fa=b=null,Je=!1,Ie=-1,V=null,!0===a.autoUpdate&&a.updateMatrixWorld(),null===c.parent&&c.updateMatrixWorld(),ua.enabled&&ua.isPresenting&&(c=ua.getCamera(c)),a.onBeforeRender(I,a,c,f||L),A=va.get(a,c),A.init(),Id.multiplyMatrices(c.projectionMatrix,c.matrixWorldInverse),jg.setFromProjectionMatrix(Id),kg=this.localClippingEnabled,oa=Ua.init(this.clippingPlanes,kg,c),B=xa.get(a,c),B.init(),k(a,c,0,I.sortObjects),B.finish(),!0===I.sortObjects&&B.sort(ka,na),oa&&Ua.beginShadows(),
|
|
|
|
-Ea.render(A.state.shadowsArray,a,c),A.setupLights(c),oa&&Ua.endShadows(),this.info.autoReset&&this.info.reset(),void 0!==f&&this.setRenderTarget(f),pa.render(B,a,c,g),d=B.opaque,e=B.transparent,a.overrideMaterial?(f=a.overrideMaterial,d.length&&m(d,a,c,f),e.length&&m(e,a,c,f)):(d.length&&m(d,a,c),e.length&&m(e,a,c)),a.onAfterRender(I,a,c),null!==L&&(ea.updateRenderTargetMipmap(L),ea.updateMultisampleRenderTarget(L)),Y.buffers.depth.setTest(!0),Y.buffers.depth.setMask(!0),Y.buffers.color.setMask(!0),
|
|
|
|
-Y.setPolygonOffset(!1),A=B=null):console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.")};this.setFramebuffer=function(a){N!==a&&null===L&&H.bindFramebuffer(36160,a);N=a};this.getActiveCubeFace=function(){return O};this.getActiveMipmapLevel=function(){return J};this.getRenderTarget=function(){return L};this.setRenderTarget=function(a,b,c){L=a;O=b;J=c;a&&void 0===aa.get(a).__webglFramebuffer&&ea.setupRenderTarget(a);var d=N,e=!1;a?(d=aa.get(a).__webglFramebuffer,a.isWebGLCubeRenderTarget?
|
|
|
|
-(d=d[b||0],e=!0):d=a.isWebGLMultisampleRenderTarget?aa.get(a).__webglMultisampledFramebuffer:d,W.copy(a.viewport),S.copy(a.scissor),ja=a.scissorTest):(W.copy(Q).multiplyScalar(R).floor(),S.copy(ia).multiplyScalar(R).floor(),ja=ig);X!==d&&(H.bindFramebuffer(36160,d),X=d);Y.viewport(W);Y.scissor(S);Y.setScissorTest(ja);e&&(a=aa.get(a.texture),H.framebufferTexture2D(36160,36064,34069+(b||0),a.__webglTexture,c||0))};this.readRenderTargetPixels=function(a,b,c,d,e,f,g){if(a&&a.isWebGLRenderTarget){var h=
|
|
|
|
-aa.get(a).__webglFramebuffer;a.isWebGLCubeRenderTarget&&void 0!==g&&(h=h[g]);if(h){g=!1;h!==X&&(H.bindFramebuffer(36160,h),g=!0);try{var k=a.texture,m=k.format,p=k.type;1023!==m&&qa.convert(m)!==H.getParameter(35739)?console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format."):1009===p||qa.convert(p)===H.getParameter(35738)||1015===p&&(Ga.isWebGL2||ra.get("OES_texture_float")||ra.get("WEBGL_color_buffer_float"))||1016===p&&(Ga.isWebGL2?
|
|
|
|
-ra.get("EXT_color_buffer_float"):ra.get("EXT_color_buffer_half_float"))?36053===H.checkFramebufferStatus(36160)?0<=b&&b<=a.width-d&&0<=c&&c<=a.height-e&&H.readPixels(b,c,d,e,qa.convert(m),qa.convert(p),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{g&&H.bindFramebuffer(36160,X)}}}else console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.")};
|
|
|
|
-this.copyFramebufferToTexture=function(a,b,c){void 0===c&&(c=0);var d=Math.pow(2,-c),e=Math.floor(b.image.width*d);d=Math.floor(b.image.height*d);var f=qa.convert(b.format);ea.setTexture2D(b,0);H.copyTexImage2D(3553,c,f,a.x,a.y,e,d,0);Y.unbindTexture()};this.copyTextureToTexture=function(a,b,c,d){void 0===d&&(d=0);var e=b.image.width,f=b.image.height,g=qa.convert(c.format),h=qa.convert(c.type);ea.setTexture2D(c,0);b.isDataTexture?H.texSubImage2D(3553,d,a.x,a.y,e,f,g,h,b.image.data):b.isCompressedTexture?
|
|
|
|
-H.compressedTexSubImage2D(3553,d,a.x,a.y,b.mipmaps[0].width,b.mipmaps[0].height,g,b.mipmaps[0].data):H.texSubImage2D(3553,d,a.x,a.y,g,h,b.image);0===d&&c.generateMipmaps&&H.generateMipmap(3553);Y.unbindTexture()};this.initTexture=function(a){ea.setTexture2D(a,0);Y.unbindTexture()};"undefined"!==typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}function Me(a,b){this.name="";this.color=new A(a);this.density=void 0!==b?b:2.5E-4}function Ne(a,b,c){this.name=
|
|
|
|
-"";this.color=new A(a);this.near=void 0!==b?b:1;this.far=void 0!==c?c:1E3}function qb(a,b){this.array=a;this.stride=b;this.count=void 0!==a?a.length/b:0;this.usage=35044;this.updateRange={offset:0,count:-1};this.version=0}function Kd(a,b,c,d){this.data=a;this.itemSize=b;this.offset=c;this.normalized=!0===d}function Kb(a){J.call(this);this.type="SpriteMaterial";this.color=new A(16777215);this.alphaMap=this.map=null;this.rotation=0;this.transparent=this.sizeAttenuation=!0;this.setValues(a)}function Ld(a){E.call(this);
|
|
|
|
-this.type="Sprite";if(void 0===Kc){Kc=new B;var b=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]);b=new qb(b,5);Kc.setIndex([0,1,2,0,2,3]);Kc.setAttribute("position",new Kd(b,3,0,!1));Kc.setAttribute("uv",new Kd(b,2,3,!1))}this.geometry=Kc;this.material=void 0!==a?a:new Kb;this.center=new v(.5,.5)}function Oe(a,b,c,d,e,f){Lc.subVectors(a,c).addScalar(.5).multiply(d);void 0!==e?(Md.x=f*Lc.x-e*Lc.y,Md.y=e*Lc.x+f*Lc.y):Md.copy(Lc);a.copy(b);a.x+=Md.x;a.y+=Md.y;a.applyMatrix4(Zh)}
|
|
|
|
-function Nd(){E.call(this);this._currentLevel=0;this.type="LOD";Object.defineProperties(this,{levels:{enumerable:!0,value:[]}});this.autoUpdate=!0}function Pe(a,b){a&&a.isGeometry&&console.error("THREE.SkinnedMesh no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");ja.call(this,a,b);this.type="SkinnedMesh";this.bindMode="attached";this.bindMatrix=new P;this.bindMatrixInverse=new P}function Qe(a,b){a=a||[];this.bones=a.slice(0);this.boneMatrices=new Float32Array(16*this.bones.length);
|
|
|
|
-this.frame=-1;if(void 0===b)this.calculateInverses();else if(this.bones.length===b.length)this.boneInverses=b.slice(0);else for(console.warn("THREE.Skeleton boneInverses is the wrong length."),this.boneInverses=[],a=0,b=this.bones.length;a<b;a++)this.boneInverses.push(new P)}function ng(){E.call(this);this.type="Bone"}function Re(a,b,c){ja.call(this,a,b);this.instanceMatrix=new N(new Float32Array(16*c),16);this.count=c;this.frustumCulled=!1}function da(a){J.call(this);this.type="LineBasicMaterial";
|
|
|
|
-this.color=new A(16777215);this.linewidth=1;this.linejoin=this.linecap="round";this.setValues(a)}function Ja(a,b,c){1===c&&console.error("THREE.Line: parameter THREE.LinePieces no longer supported. Use THREE.LineSegments instead.");E.call(this);this.type="Line";this.geometry=void 0!==a?a:new B;this.material=void 0!==b?b:new da}function na(a,b){Ja.call(this,a,b);this.type="LineSegments"}function Se(a,b){Ja.call(this,a,b);this.type="LineLoop"}function Va(a){J.call(this);this.type="PointsMaterial";this.color=
|
|
|
|
-new A(16777215);this.alphaMap=this.map=null;this.size=1;this.sizeAttenuation=!0;this.morphTargets=!1;this.setValues(a)}function Mc(a,b){E.call(this);this.type="Points";this.geometry=void 0!==a?a:new B;this.material=void 0!==b?b:new Va;this.updateMorphTargets()}function og(a,b,c,d,e,f,g){var h=pg.distanceSqToPoint(a);h<c&&(c=new n,pg.closestPointToPoint(a,c),c.applyMatrix4(d),a=e.ray.origin.distanceTo(c),a<e.near||a>e.far||f.push({distance:a,distanceToRay:Math.sqrt(h),point:c,index:b,face:null,object:g}))}
|
|
|
|
-function qg(a,b,c,d,e,f,g,h,k){V.call(this,a,b,c,d,e,f,g,h,k);this.format=void 0!==g?g:1022;this.minFilter=void 0!==f?f:1006;this.magFilter=void 0!==e?e:1006;this.generateMipmaps=!1}function Nc(a,b,c,d,e,f,g,h,k,m,l,p){V.call(this,null,f,g,h,k,m,d,e,l,p);this.image={width:b,height:c};this.mipmaps=a;this.generateMipmaps=this.flipY=!1}function Od(a,b,c,d,e,f,g,h,k){V.call(this,a,b,c,d,e,f,g,h,k);this.needsUpdate=!0}function Pd(a,b,c,d,e,f,g,h,k,m){m=void 0!==m?m:1026;if(1026!==m&&1027!==m)throw Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");
|
|
|
|
-void 0===c&&1026===m&&(c=1012);void 0===c&&1027===m&&(c=1020);V.call(this,null,d,e,f,g,h,m,c,k);this.image={width:a,height:b};this.magFilter=void 0!==g?g:1003;this.minFilter=void 0!==h?h:1003;this.generateMipmaps=this.flipY=!1}function Oc(a){B.call(this);this.type="WireframeGeometry";var b=[],c,d,e,f=[0,0],g={},h=["a","b","c"];if(a&&a.isGeometry){var k=a.faces;var m=0;for(d=k.length;m<d;m++){var l=k[m];for(c=0;3>c;c++){var p=l[h[c]];var u=l[h[(c+1)%3]];f[0]=Math.min(p,u);f[1]=Math.max(p,u);p=f[0]+
|
|
|
|
-","+f[1];void 0===g[p]&&(g[p]={index1:f[0],index2:f[1]})}}for(p in g)m=g[p],h=a.vertices[m.index1],b.push(h.x,h.y,h.z),h=a.vertices[m.index2],b.push(h.x,h.y,h.z)}else if(a&&a.isBufferGeometry)if(h=new n,null!==a.index){k=a.attributes.position;l=a.index;var r=a.groups;0===r.length&&(r=[{start:0,count:l.count,materialIndex:0}]);a=0;for(e=r.length;a<e;++a)for(m=r[a],c=m.start,d=m.count,m=c,d=c+d;m<d;m+=3)for(c=0;3>c;c++)p=l.getX(m+c),u=l.getX(m+(c+1)%3),f[0]=Math.min(p,u),f[1]=Math.max(p,u),p=f[0]+","+
|
|
|
|
-f[1],void 0===g[p]&&(g[p]={index1:f[0],index2:f[1]});for(p in g)m=g[p],h.fromBufferAttribute(k,m.index1),b.push(h.x,h.y,h.z),h.fromBufferAttribute(k,m.index2),b.push(h.x,h.y,h.z)}else for(k=a.attributes.position,m=0,d=k.count/3;m<d;m++)for(c=0;3>c;c++)g=3*m+c,h.fromBufferAttribute(k,g),b.push(h.x,h.y,h.z),g=3*m+(c+1)%3,h.fromBufferAttribute(k,g),b.push(h.x,h.y,h.z);this.setAttribute("position",new y(b,3))}function Qd(a,b,c){O.call(this);this.type="ParametricGeometry";this.parameters={func:a,slices:b,
|
|
|
|
-stacks:c};this.fromBufferGeometry(new Pc(a,b,c));this.mergeVertices()}function Pc(a,b,c){B.call(this);this.type="ParametricBufferGeometry";this.parameters={func:a,slices:b,stacks:c};var d=[],e=[],f=[],g=[],h=new n,k=new n,m=new n,l=new n,p=new n,u,r;3>a.length&&console.error("THREE.ParametricGeometry: Function must now modify a Vector3 as third parameter.");var q=b+1;for(u=0;u<=c;u++){var t=u/c;for(r=0;r<=b;r++){var F=r/b;a(F,t,k);e.push(k.x,k.y,k.z);0<=F-1E-5?(a(F-1E-5,t,m),l.subVectors(k,m)):(a(F+
|
|
|
|
-1E-5,t,m),l.subVectors(m,k));0<=t-1E-5?(a(F,t-1E-5,m),p.subVectors(k,m)):(a(F,t+1E-5,m),p.subVectors(m,k));h.crossVectors(l,p).normalize();f.push(h.x,h.y,h.z);g.push(F,t)}}for(u=0;u<c;u++)for(r=0;r<b;r++)a=u*q+r+1,h=(u+1)*q+r+1,k=(u+1)*q+r,d.push(u*q+r,a,k),d.push(a,h,k);this.setIndex(d);this.setAttribute("position",new y(e,3));this.setAttribute("normal",new y(f,3));this.setAttribute("uv",new y(g,2))}function Rd(a,b,c,d){O.call(this);this.type="PolyhedronGeometry";this.parameters={vertices:a,indices:b,
|
|
|
|
-radius:c,detail:d};this.fromBufferGeometry(new Ea(a,b,c,d));this.mergeVertices()}function Ea(a,b,c,d){function e(a){h.push(a.x,a.y,a.z)}function f(b,c){b*=3;c.x=a[b+0];c.y=a[b+1];c.z=a[b+2]}function g(a,b,c,d){0>d&&1===a.x&&(k[b]=a.x-1);0===c.x&&0===c.z&&(k[b]=d/2/Math.PI+.5)}B.call(this);this.type="PolyhedronBufferGeometry";this.parameters={vertices:a,indices:b,radius:c,detail:d};c=c||1;d=d||0;var h=[],k=[];(function(a){for(var c=new n,d=new n,g=new n,h=0;h<b.length;h+=3){f(b[h+0],c);f(b[h+1],d);
|
|
|
|
-f(b[h+2],g);var k,m,l=c,x=d,w=g,v=Math.pow(2,a),U=[];for(m=0;m<=v;m++){U[m]=[];var Z=l.clone().lerp(w,m/v),C=x.clone().lerp(w,m/v),A=v-m;for(k=0;k<=A;k++)U[m][k]=0===k&&m===v?Z:Z.clone().lerp(C,k/A)}for(m=0;m<v;m++)for(k=0;k<2*(v-m)-1;k++)l=Math.floor(k/2),0===k%2?(e(U[m][l+1]),e(U[m+1][l]),e(U[m][l])):(e(U[m][l+1]),e(U[m+1][l+1]),e(U[m+1][l]))}})(d);(function(a){for(var b=new n,c=0;c<h.length;c+=3)b.x=h[c+0],b.y=h[c+1],b.z=h[c+2],b.normalize().multiplyScalar(a),h[c+0]=b.x,h[c+1]=b.y,h[c+2]=b.z})(c);
|
|
|
|
-(function(){for(var a=new n,b=0;b<h.length;b+=3)a.x=h[b+0],a.y=h[b+1],a.z=h[b+2],k.push(Math.atan2(a.z,-a.x)/2/Math.PI+.5,1-(Math.atan2(-a.y,Math.sqrt(a.x*a.x+a.z*a.z))/Math.PI+.5));a=new n;b=new n;for(var c=new n,d=new n,e=new v,f=new v,l=new v,F=0,x=0;F<h.length;F+=9,x+=6){a.set(h[F+0],h[F+1],h[F+2]);b.set(h[F+3],h[F+4],h[F+5]);c.set(h[F+6],h[F+7],h[F+8]);e.set(k[x+0],k[x+1]);f.set(k[x+2],k[x+3]);l.set(k[x+4],k[x+5]);d.copy(a).add(b).add(c).divideScalar(3);var w=Math.atan2(d.z,-d.x);g(e,x+0,a,w);
|
|
|
|
-g(f,x+2,b,w);g(l,x+4,c,w)}for(a=0;a<k.length;a+=6)b=k[a+0],c=k[a+2],d=k[a+4],e=Math.min(b,c,d),.9<Math.max(b,c,d)&&.1>e&&(.2>b&&(k[a+0]+=1),.2>c&&(k[a+2]+=1),.2>d&&(k[a+4]+=1))})();this.setAttribute("position",new y(h,3));this.setAttribute("normal",new y(h.slice(),3));this.setAttribute("uv",new y(k,2));0===d?this.computeVertexNormals():this.normalizeNormals()}function Sd(a,b){O.call(this);this.type="TetrahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new Qc(a,b));this.mergeVertices()}
|
|
|
|
-function Qc(a,b){Ea.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],a,b);this.type="TetrahedronBufferGeometry";this.parameters={radius:a,detail:b}}function Td(a,b){O.call(this);this.type="OctahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new ac(a,b));this.mergeVertices()}function ac(a,b){Ea.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],a,b);this.type="OctahedronBufferGeometry";this.parameters=
|
|
|
|
-{radius:a,detail:b}}function Ud(a,b){O.call(this);this.type="IcosahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new Rc(a,b));this.mergeVertices()}function Rc(a,b){var c=(1+Math.sqrt(5))/2;Ea.call(this,[-1,c,0,1,c,0,-1,-c,0,1,-c,0,0,-1,c,0,1,c,0,-1,-c,0,1,-c,c,0,-1,c,0,1,-c,0,-1,-c,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],a,b);this.type="IcosahedronBufferGeometry";this.parameters=
|
|
|
|
-{radius:a,detail:b}}function Vd(a,b){O.call(this);this.type="DodecahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new Sc(a,b));this.mergeVertices()}function Sc(a,b){var c=(1+Math.sqrt(5))/2,d=1/c;Ea.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,-d,-c,0,-d,c,0,d,-c,0,d,c,-d,-c,0,-d,c,0,d,-c,0,d,c,0,-c,0,-d,c,0,-d,-c,0,d,c,0,d],[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],a,b);this.type="DodecahedronBufferGeometry";this.parameters={radius:a,detail:b}}function Wd(a,b,c,d,e,f){O.call(this);this.type="TubeGeometry";this.parameters={path:a,tubularSegments:b,radius:c,radialSegments:d,closed:e};void 0!==f&&console.warn("THREE.TubeGeometry: taper has been removed.");a=new bc(a,b,c,d,e);this.tangents=a.tangents;this.normals=
|
|
|
|
-a.normals;this.binormals=a.binormals;this.fromBufferGeometry(a);this.mergeVertices()}function bc(a,b,c,d,e){function f(e){l=a.getPointAt(e/b,l);var f=g.normals[e];e=g.binormals[e];for(u=0;u<=d;u++){var m=u/d*Math.PI*2,p=Math.sin(m);m=-Math.cos(m);k.x=m*f.x+p*e.x;k.y=m*f.y+p*e.y;k.z=m*f.z+p*e.z;k.normalize();q.push(k.x,k.y,k.z);h.x=l.x+c*k.x;h.y=l.y+c*k.y;h.z=l.z+c*k.z;r.push(h.x,h.y,h.z)}}B.call(this);this.type="TubeBufferGeometry";this.parameters={path:a,tubularSegments:b,radius:c,radialSegments:d,
|
|
|
|
-closed:e};b=b||64;c=c||1;d=d||8;e=e||!1;var g=a.computeFrenetFrames(b,e);this.tangents=g.tangents;this.normals=g.normals;this.binormals=g.binormals;var h=new n,k=new n,m=new v,l=new n,p,u,r=[],q=[],t=[],F=[];for(p=0;p<b;p++)f(p);f(!1===e?b:0);for(p=0;p<=b;p++)for(u=0;u<=d;u++)m.x=p/b,m.y=u/d,t.push(m.x,m.y);(function(){for(u=1;u<=b;u++)for(p=1;p<=d;p++){var a=(d+1)*u+(p-1),c=(d+1)*u+p,e=(d+1)*(u-1)+p;F.push((d+1)*(u-1)+(p-1),a,e);F.push(a,c,e)}})();this.setIndex(F);this.setAttribute("position",new y(r,
|
|
|
|
-3));this.setAttribute("normal",new y(q,3));this.setAttribute("uv",new y(t,2))}function Xd(a,b,c,d,e,f,g){O.call(this);this.type="TorusKnotGeometry";this.parameters={radius:a,tube:b,tubularSegments:c,radialSegments:d,p:e,q:f};void 0!==g&&console.warn("THREE.TorusKnotGeometry: heightScale has been deprecated. Use .scale( x, y, z ) instead.");this.fromBufferGeometry(new Tc(a,b,c,d,e,f));this.mergeVertices()}function Tc(a,b,c,d,e,f){function g(a,b,c,d,e){var f=Math.sin(a);b=c/b*a;c=Math.cos(b);e.x=d*
|
|
|
|
-(2+c)*.5*Math.cos(a);e.y=d*(2+c)*f*.5;e.z=d*Math.sin(b)*.5}B.call(this);this.type="TorusKnotBufferGeometry";this.parameters={radius:a,tube:b,tubularSegments:c,radialSegments:d,p:e,q:f};a=a||1;b=b||.4;c=Math.floor(c)||64;d=Math.floor(d)||8;e=e||2;f=f||3;var h=[],k=[],m=[],l=[],p,u=new n,r=new n,q=new n,t=new n,F=new n,x=new n,w=new n;for(p=0;p<=c;++p){var v=p/c*e*Math.PI*2;g(v,e,f,a,q);g(v+.01,e,f,a,t);x.subVectors(t,q);w.addVectors(t,q);F.crossVectors(x,w);w.crossVectors(F,x);F.normalize();w.normalize();
|
|
|
|
-for(v=0;v<=d;++v){var U=v/d*Math.PI*2,Z=-b*Math.cos(U);U=b*Math.sin(U);u.x=q.x+(Z*w.x+U*F.x);u.y=q.y+(Z*w.y+U*F.y);u.z=q.z+(Z*w.z+U*F.z);k.push(u.x,u.y,u.z);r.subVectors(u,q).normalize();m.push(r.x,r.y,r.z);l.push(p/c);l.push(v/d)}}for(v=1;v<=c;v++)for(p=1;p<=d;p++)a=(d+1)*v+(p-1),b=(d+1)*v+p,e=(d+1)*(v-1)+p,h.push((d+1)*(v-1)+(p-1),a,e),h.push(a,b,e);this.setIndex(h);this.setAttribute("position",new y(k,3));this.setAttribute("normal",new y(m,3));this.setAttribute("uv",new y(l,2))}function Yd(a,b,
|
|
|
|
-c,d,e){O.call(this);this.type="TorusGeometry";this.parameters={radius:a,tube:b,radialSegments:c,tubularSegments:d,arc:e};this.fromBufferGeometry(new Uc(a,b,c,d,e));this.mergeVertices()}function Uc(a,b,c,d,e){B.call(this);this.type="TorusBufferGeometry";this.parameters={radius:a,tube:b,radialSegments:c,tubularSegments:d,arc:e};a=a||1;b=b||.4;c=Math.floor(c)||8;d=Math.floor(d)||6;e=e||2*Math.PI;var f=[],g=[],h=[],k=[],m=new n,l=new n,p=new n,u,r;for(u=0;u<=c;u++)for(r=0;r<=d;r++){var q=r/d*e,t=u/c*
|
|
|
|
-Math.PI*2;l.x=(a+b*Math.cos(t))*Math.cos(q);l.y=(a+b*Math.cos(t))*Math.sin(q);l.z=b*Math.sin(t);g.push(l.x,l.y,l.z);m.x=a*Math.cos(q);m.y=a*Math.sin(q);p.subVectors(l,m).normalize();h.push(p.x,p.y,p.z);k.push(r/d);k.push(u/c)}for(u=1;u<=c;u++)for(r=1;r<=d;r++)a=(d+1)*(u-1)+r-1,b=(d+1)*(u-1)+r,e=(d+1)*u+r,f.push((d+1)*u+r-1,a,e),f.push(a,b,e);this.setIndex(f);this.setAttribute("position",new y(g,3));this.setAttribute("normal",new y(h,3));this.setAttribute("uv",new y(k,2))}function $h(a,b,c,d,e){for(var f,
|
|
|
|
-g=0,h=b,k=c-d;h<c;h+=d)g+=(a[k]-a[h])*(a[h+1]+a[k+1]),k=h;if(e===0<g)for(e=b;e<c;e+=d)f=ai(e,a[e],a[e+1],f);else for(e=c-d;e>=b;e-=d)f=ai(e,a[e],a[e+1],f);f&&Te(f,f.next)&&(Zd(f),f=f.next);return f}function Lb(a,b){if(!a)return a;b||(b=a);do{var c=!1;if(a.steiner||!Te(a,a.next)&&0!==Q(a.prev,a,a.next))a=a.next;else{Zd(a);a=b=a.prev;if(a===a.next)break;c=!0}}while(c||a!==b);return b}function $d(a,b,c,d,e,f,g){if(a){if(!g&&f){var h=a,k=h;do null===k.z&&(k.z=rg(k.x,k.y,d,e,f)),k.prevZ=k.prev,k=k.nextZ=
|
|
|
|
-k.next;while(k!==h);k.prevZ.nextZ=null;k.prevZ=null;h=k;var m,l,p,u,r=1;do{k=h;var q=h=null;for(l=0;k;){l++;var n=k;for(m=p=0;m<r&&(p++,n=n.nextZ,n);m++);for(u=r;0<p||0<u&&n;)0!==p&&(0===u||!n||k.z<=n.z)?(m=k,k=k.nextZ,p--):(m=n,n=n.nextZ,u--),q?q.nextZ=m:h=m,m.prevZ=q,q=m;k=n}q.nextZ=null;r*=2}while(1<l)}for(h=a;a.prev!==a.next;){k=a.prev;n=a.next;if(f)q=Ck(a,d,e,f);else a:if(q=a,l=q.prev,p=q,r=q.next,0<=Q(l,p,r))q=!1;else{for(m=q.next.next;m!==q.prev;){if(Vc(l.x,l.y,p.x,p.y,r.x,r.y,m.x,m.y)&&0<=
|
|
|
|
-Q(m.prev,m,m.next)){q=!1;break a}m=m.next}q=!0}if(q)b.push(k.i/c),b.push(a.i/c),b.push(n.i/c),Zd(a),h=a=n.next;else if(a=n,a===h){if(!g)$d(Lb(a),b,c,d,e,f,1);else if(1===g){a=Lb(a);g=b;h=c;k=a;do n=k.prev,q=k.next.next,!Te(n,q)&&bi(n,k,k.next,q)&&ae(n,q)&&ae(q,n)&&(g.push(n.i/h),g.push(k.i/h),g.push(q.i/h),Zd(k),Zd(k.next),k=a=q),k=k.next;while(k!==a);a=Lb(k);$d(a,b,c,d,e,f,2)}else if(2===g)a:{g=a;do{for(h=g.next.next;h!==g.prev;){if(k=g.i!==h.i){k=g;n=h;if(q=k.next.i!==n.i&&k.prev.i!==n.i){b:{q=
|
|
|
|
-k;do{if(q.i!==k.i&&q.next.i!==k.i&&q.i!==n.i&&q.next.i!==n.i&&bi(q,q.next,k,n)){q=!0;break b}q=q.next}while(q!==k);q=!1}q=!q}if(q){if(q=ae(k,n)&&ae(n,k)){q=k;l=!1;p=(k.x+n.x)/2;r=(k.y+n.y)/2;do q.y>r!==q.next.y>r&&q.next.y!==q.y&&p<(q.next.x-q.x)*(r-q.y)/(q.next.y-q.y)+q.x&&(l=!l),q=q.next;while(q!==k);q=l}q=q&&(Q(k.prev,k,n.prev)||Q(k,n.prev,n))||Te(k,n)&&0<Q(k.prev,k,k.next)&&0<Q(n.prev,n,n.next)}k=q}if(k){a=ci(g,h);g=Lb(g,g.next);a=Lb(a,a.next);$d(g,b,c,d,e,f);$d(a,b,c,d,e,f);break a}h=h.next}g=
|
|
|
|
-g.next}while(g!==a)}break}}}}function Ck(a,b,c,d){var e=a.prev,f=a.next;if(0<=Q(e,a,f))return!1;var g=e.x>a.x?e.x>f.x?e.x:f.x:a.x>f.x?a.x:f.x,h=e.y>a.y?e.y>f.y?e.y:f.y:a.y>f.y?a.y:f.y,k=rg(e.x<a.x?e.x<f.x?e.x:f.x:a.x<f.x?a.x:f.x,e.y<a.y?e.y<f.y?e.y:f.y:a.y<f.y?a.y:f.y,b,c,d);b=rg(g,h,b,c,d);c=a.prevZ;for(d=a.nextZ;c&&c.z>=k&&d&&d.z<=b;){if(c!==a.prev&&c!==a.next&&Vc(e.x,e.y,a.x,a.y,f.x,f.y,c.x,c.y)&&0<=Q(c.prev,c,c.next))return!1;c=c.prevZ;if(d!==a.prev&&d!==a.next&&Vc(e.x,e.y,a.x,a.y,f.x,f.y,d.x,
|
|
|
|
-d.y)&&0<=Q(d.prev,d,d.next))return!1;d=d.nextZ}for(;c&&c.z>=k;){if(c!==a.prev&&c!==a.next&&Vc(e.x,e.y,a.x,a.y,f.x,f.y,c.x,c.y)&&0<=Q(c.prev,c,c.next))return!1;c=c.prevZ}for(;d&&d.z<=b;){if(d!==a.prev&&d!==a.next&&Vc(e.x,e.y,a.x,a.y,f.x,f.y,d.x,d.y)&&0<=Q(d.prev,d,d.next))return!1;d=d.nextZ}return!0}function Dk(a,b){return a.x-b.x}function Ek(a,b){var c=b,d=a.x,e=a.y,f=-Infinity;do{if(e<=c.y&&e>=c.next.y&&c.next.y!==c.y){var g=c.x+(e-c.y)*(c.next.x-c.x)/(c.next.y-c.y);if(g<=d&&g>f){f=g;if(g===d){if(e===
|
|
|
|
-c.y)return c;if(e===c.next.y)return c.next}var h=c.x<c.next.x?c:c.next}}c=c.next}while(c!==b);if(!h)return null;if(d===f)return h;b=h;g=h.x;var k=h.y,m=Infinity;c=h;do{if(d>=c.x&&c.x>=g&&d!==c.x&&Vc(e<k?d:f,e,g,k,e<k?f:d,e,c.x,c.y)){var l=Math.abs(e-c.y)/(d-c.x);var p;if((p=ae(c,a))&&!(p=l<m)&&(p=l===m)&&!(p=c.x>h.x)&&(p=c.x===h.x)){p=h;var u=c;p=0>Q(p.prev,p,u.prev)&&0>Q(u.next,p,p.next)}p&&(h=c,m=l)}c=c.next}while(c!==b);return h}function rg(a,b,c,d,e){a=32767*(a-c)*e;b=32767*(b-d)*e;a=(a|a<<8)&
|
|
|
|
-16711935;a=(a|a<<4)&252645135;a=(a|a<<2)&858993459;b=(b|b<<8)&16711935;b=(b|b<<4)&252645135;b=(b|b<<2)&858993459;return(a|a<<1)&1431655765|((b|b<<1)&1431655765)<<1}function Fk(a){var b=a,c=a;do{if(b.x<c.x||b.x===c.x&&b.y<c.y)c=b;b=b.next}while(b!==a);return c}function Vc(a,b,c,d,e,f,g,h){return 0<=(e-g)*(b-h)-(a-g)*(f-h)&&0<=(a-g)*(d-h)-(c-g)*(b-h)&&0<=(c-g)*(f-h)-(e-g)*(d-h)}function Q(a,b,c){return(b.y-a.y)*(c.x-b.x)-(b.x-a.x)*(c.y-b.y)}function Te(a,b){return a.x===b.x&&a.y===b.y}function bi(a,
|
|
|
|
-b,c,d){var e=Ue(Q(a,b,c)),f=Ue(Q(a,b,d)),g=Ue(Q(c,d,a)),h=Ue(Q(c,d,b));return e!==f&&g!==h||0===e&&Ve(a,c,b)||0===f&&Ve(a,d,b)||0===g&&Ve(c,a,d)||0===h&&Ve(c,b,d)?!0:!1}function Ve(a,b,c){return b.x<=Math.max(a.x,c.x)&&b.x>=Math.min(a.x,c.x)&&b.y<=Math.max(a.y,c.y)&&b.y>=Math.min(a.y,c.y)}function Ue(a){return 0<a?1:0>a?-1:0}function ae(a,b){return 0>Q(a.prev,a,a.next)?0<=Q(a,b,a.next)&&0<=Q(a,a.prev,b):0>Q(a,b,a.prev)||0>Q(a,a.next,b)}function ci(a,b){var c=new sg(a.i,a.x,a.y),d=new sg(b.i,b.x,b.y),
|
|
|
|
-e=a.next,f=b.prev;a.next=b;b.prev=a;c.next=e;e.prev=c;d.next=c;c.prev=d;f.next=d;d.prev=f;return d}function ai(a,b,c,d){a=new sg(a,b,c);d?(a.next=d.next,a.prev=d,d.next.prev=a,d.next=a):(a.prev=a,a.next=a);return a}function Zd(a){a.next.prev=a.prev;a.prev.next=a.next;a.prevZ&&(a.prevZ.nextZ=a.nextZ);a.nextZ&&(a.nextZ.prevZ=a.prevZ)}function sg(a,b,c){this.i=a;this.x=b;this.y=c;this.nextZ=this.prevZ=this.z=this.next=this.prev=null;this.steiner=!1}function di(a){var b=a.length;2<b&&a[b-1].equals(a[0])&&
|
|
|
|
-a.pop()}function ei(a,b){for(var c=0;c<b.length;c++)a.push(b[c].x),a.push(b[c].y)}function cc(a,b){O.call(this);this.type="ExtrudeGeometry";this.parameters={shapes:a,options:b};this.fromBufferGeometry(new fb(a,b));this.mergeVertices()}function fb(a,b){function c(a){function c(a,b,c){b||console.error("THREE.ExtrudeGeometry: vec does not exist");return b.clone().multiplyScalar(c).add(a)}function g(a,b,c){var d=a.x-b.x;var e=a.y-b.y;var f=c.x-a.x;var g=c.y-a.y,h=d*d+e*e;if(Math.abs(d*g-e*f)>Number.EPSILON){var k=
|
|
|
|
-Math.sqrt(h),m=Math.sqrt(f*f+g*g);h=b.x-e/k;b=b.y+d/k;g=((c.x-g/m-h)*g-(c.y+f/m-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 v(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 v(f/e,d/e)}function h(a,b){for(K=a.length;0<=--K;){var c=K;var f=K-1;0>f&&(f=a.length-1);var g,h=w+2*y;for(g=0;g<h;g++){var k=X*g,m=X*
|
|
|
|
-(g+1),l=b+f+k,p=b+f+m;m=b+c+m;q(b+c+k);q(l);q(m);q(l);q(p);q(m);k=e.length/3;k=D.generateSideWallUV(d,e,k-6,k-3,k-2,k-1);t(k[0]);t(k[1]);t(k[3]);t(k[1]);t(k[2]);t(k[3])}}}function k(a,b,c){F.push(a);F.push(b);F.push(c)}function l(a,b,c){q(a);q(b);q(c);a=e.length/3;a=D.generateTopUV(d,e,a-3,a-2,a-1);t(a[0]);t(a[1]);t(a[2])}function q(a){e.push(F[3*a]);e.push(F[3*a+1]);e.push(F[3*a+2])}function t(a){f.push(a.x);f.push(a.y)}var F=[],x=void 0!==b.curveSegments?b.curveSegments:12,w=void 0!==b.steps?b.steps:
|
|
|
|
-1,ha=void 0!==b.depth?b.depth:100,U=void 0!==b.bevelEnabled?b.bevelEnabled:!0,Z=void 0!==b.bevelThickness?b.bevelThickness:6,C=void 0!==b.bevelSize?b.bevelSize:Z-2,A=void 0!==b.bevelOffset?b.bevelOffset:0,y=void 0!==b.bevelSegments?b.bevelSegments:3,B=b.extrudePath,D=void 0!==b.UVGenerator?b.UVGenerator:Gk;void 0!==b.amount&&(console.warn("THREE.ExtrudeBufferGeometry: amount has been renamed to depth."),ha=b.amount);var I=!1;if(B){var E=B.getSpacedPoints(w);I=!0;U=!1;var G=B.computeFrenetFrames(w,
|
|
|
|
-!1);var N=new n;var O=new n;var J=new n}U||(A=C=Z=y=0);var L;x=a.extractPoints(x);a=x.shape;var M=x.holes;if(!rb.isClockWise(a)){a=a.reverse();var fa=0;for(L=M.length;fa<L;fa++){var P=M[fa];rb.isClockWise(P)&&(M[fa]=P.reverse())}}var aa=rb.triangulateShape(a,M),V=a;fa=0;for(L=M.length;fa<L;fa++)P=M[fa],a=a.concat(P);var W,X=a.length,T,da=aa.length;x=[];var K=0;var R=V.length;var S=R-1;for(W=K+1;K<R;K++,S++,W++)S===R&&(S=0),W===R&&(W=0),x[K]=g(V[K],V[S],V[W]);B=[];var ea=x.concat();fa=0;for(L=M.length;fa<
|
|
|
|
-L;fa++){P=M[fa];var ba=[];K=0;R=P.length;S=R-1;for(W=K+1;K<R;K++,S++,W++)S===R&&(S=0),W===R&&(W=0),ba[K]=g(P[K],P[S],P[W]);B.push(ba);ea=ea.concat(ba)}for(S=0;S<y;S++){R=S/y;var ca=Z*Math.cos(R*Math.PI/2);W=C*Math.sin(R*Math.PI/2)+A;K=0;for(R=V.length;K<R;K++){var Q=c(V[K],x[K],W);k(Q.x,Q.y,-ca)}fa=0;for(L=M.length;fa<L;fa++)for(P=M[fa],ba=B[fa],K=0,R=P.length;K<R;K++)Q=c(P[K],ba[K],W),k(Q.x,Q.y,-ca)}W=C+A;for(K=0;K<X;K++)Q=U?c(a[K],ea[K],W):a[K],I?(O.copy(G.normals[0]).multiplyScalar(Q.x),N.copy(G.binormals[0]).multiplyScalar(Q.y),
|
|
|
|
-J.copy(E[0]).add(O).add(N),k(J.x,J.y,J.z)):k(Q.x,Q.y,0);for(R=1;R<=w;R++)for(K=0;K<X;K++)Q=U?c(a[K],ea[K],W):a[K],I?(O.copy(G.normals[R]).multiplyScalar(Q.x),N.copy(G.binormals[R]).multiplyScalar(Q.y),J.copy(E[R]).add(O).add(N),k(J.x,J.y,J.z)):k(Q.x,Q.y,ha/w*R);for(S=y-1;0<=S;S--){R=S/y;ca=Z*Math.cos(R*Math.PI/2);W=C*Math.sin(R*Math.PI/2)+A;K=0;for(R=V.length;K<R;K++)Q=c(V[K],x[K],W),k(Q.x,Q.y,ha+ca);fa=0;for(L=M.length;fa<L;fa++)for(P=M[fa],ba=B[fa],K=0,R=P.length;K<R;K++)Q=c(P[K],ba[K],W),I?k(Q.x,
|
|
|
|
-Q.y+E[w-1].y,E[w-1].x+ca):k(Q.x,Q.y,ha+ca)}(function(){var a=e.length/3;if(U){var b=0*X;for(K=0;K<da;K++)T=aa[K],l(T[2]+b,T[1]+b,T[0]+b);b=X*(w+2*y);for(K=0;K<da;K++)T=aa[K],l(T[0]+b,T[1]+b,T[2]+b)}else{for(K=0;K<da;K++)T=aa[K],l(T[2],T[1],T[0]);for(K=0;K<da;K++)T=aa[K],l(T[0]+X*w,T[1]+X*w,T[2]+X*w)}d.addGroup(a,e.length/3-a,0)})();(function(){var a=e.length/3,b=0;h(V,b);b+=V.length;fa=0;for(L=M.length;fa<L;fa++)P=M[fa],h(P,b),b+=P.length;d.addGroup(a,e.length/3-a,1)})()}B.call(this);this.type="ExtrudeBufferGeometry";
|
|
|
|
-this.parameters={shapes:a,options:b};a=Array.isArray(a)?a:[a];for(var d=this,e=[],f=[],g=0,h=a.length;g<h;g++)c(a[g]);this.setAttribute("position",new y(e,3));this.setAttribute("uv",new y(f,2));this.computeVertexNormals()}function fi(a,b,c){c.shapes=[];if(Array.isArray(a))for(var d=0,e=a.length;d<e;d++)c.shapes.push(a[d].uuid);else c.shapes.push(a.uuid);void 0!==b.extrudePath&&(c.options.extrudePath=b.extrudePath.toJSON());return c}function be(a,b){O.call(this);this.type="TextGeometry";this.parameters=
|
|
|
|
-{text:a,parameters:b};this.fromBufferGeometry(new Wc(a,b));this.mergeVertices()}function Wc(a,b){b=b||{};var c=b.font;if(!c||!c.isFont)return console.error("THREE.TextGeometry: font parameter is not an instance of THREE.Font."),new O;a=c.generateShapes(a,b.size);b.depth=void 0!==b.height?b.height:50;void 0===b.bevelThickness&&(b.bevelThickness=10);void 0===b.bevelSize&&(b.bevelSize=8);void 0===b.bevelEnabled&&(b.bevelEnabled=!1);fb.call(this,a,b);this.type="TextBufferGeometry"}function ce(a,b,c,d,
|
|
|
|
-e,f,g){O.call(this);this.type="SphereGeometry";this.parameters={radius:a,widthSegments:b,heightSegments:c,phiStart:d,phiLength:e,thetaStart:f,thetaLength:g};this.fromBufferGeometry(new dc(a,b,c,d,e,f,g));this.mergeVertices()}function dc(a,b,c,d,e,f,g){B.call(this);this.type="SphereBufferGeometry";this.parameters={radius:a,widthSegments:b,heightSegments:c,phiStart:d,phiLength:e,thetaStart:f,thetaLength:g};a=a||1;b=Math.max(3,Math.floor(b)||8);c=Math.max(2,Math.floor(c)||6);d=void 0!==d?d:0;e=void 0!==
|
|
|
|
-e?e:2*Math.PI;f=void 0!==f?f:0;g=void 0!==g?g:Math.PI;var h=Math.min(f+g,Math.PI),k,m,l=0,p=[],u=new n,r=new n,q=[],t=[],F=[],v=[];for(m=0;m<=c;m++){var w=[],ha=m/c,U=0;0==m&&0==f?U=.5/b:m==c&&h==Math.PI&&(U=-.5/b);for(k=0;k<=b;k++){var Z=k/b;u.x=-a*Math.cos(d+Z*e)*Math.sin(f+ha*g);u.y=a*Math.cos(f+ha*g);u.z=a*Math.sin(d+Z*e)*Math.sin(f+ha*g);t.push(u.x,u.y,u.z);r.copy(u).normalize();F.push(r.x,r.y,r.z);v.push(Z+U,1-ha);w.push(l++)}p.push(w)}for(m=0;m<c;m++)for(k=0;k<b;k++)a=p[m][k+1],d=p[m][k],e=
|
|
|
|
-p[m+1][k],g=p[m+1][k+1],(0!==m||0<f)&&q.push(a,d,g),(m!==c-1||h<Math.PI)&&q.push(d,e,g);this.setIndex(q);this.setAttribute("position",new y(t,3));this.setAttribute("normal",new y(F,3));this.setAttribute("uv",new y(v,2))}function de(a,b,c,d,e,f){O.call(this);this.type="RingGeometry";this.parameters={innerRadius:a,outerRadius:b,thetaSegments:c,phiSegments:d,thetaStart:e,thetaLength:f};this.fromBufferGeometry(new Xc(a,b,c,d,e,f));this.mergeVertices()}function Xc(a,b,c,d,e,f){B.call(this);this.type="RingBufferGeometry";
|
|
|
|
-this.parameters={innerRadius:a,outerRadius:b,thetaSegments:c,phiSegments:d,thetaStart:e,thetaLength:f};a=a||.5;b=b||1;e=void 0!==e?e:0;f=void 0!==f?f:2*Math.PI;c=void 0!==c?Math.max(3,c):8;d=void 0!==d?Math.max(1,d):1;var g=[],h=[],k=[],m=[],l=a,p=(b-a)/d,u=new n,r=new v,q,t;for(q=0;q<=d;q++){for(t=0;t<=c;t++)a=e+t/c*f,u.x=l*Math.cos(a),u.y=l*Math.sin(a),h.push(u.x,u.y,u.z),k.push(0,0,1),r.x=(u.x/b+1)/2,r.y=(u.y/b+1)/2,m.push(r.x,r.y);l+=p}for(q=0;q<d;q++)for(b=q*(c+1),t=0;t<c;t++)a=t+b,e=a+c+1,f=
|
|
|
|
-a+c+2,l=a+1,g.push(a,e,l),g.push(e,f,l);this.setIndex(g);this.setAttribute("position",new y(h,3));this.setAttribute("normal",new y(k,3));this.setAttribute("uv",new y(m,2))}function ee(a,b,c,d){O.call(this);this.type="LatheGeometry";this.parameters={points:a,segments:b,phiStart:c,phiLength:d};this.fromBufferGeometry(new Yc(a,b,c,d));this.mergeVertices()}function Yc(a,b,c,d){B.call(this);this.type="LatheBufferGeometry";this.parameters={points:a,segments:b,phiStart:c,phiLength:d};b=Math.floor(b)||12;
|
|
|
|
-c=c||0;d=d||2*Math.PI;d=M.clamp(d,0,2*Math.PI);var e=[],f=[],g=[],h=1/b,k=new n,m=new v,l;for(l=0;l<=b;l++){var p=c+l*h*d;var u=Math.sin(p),r=Math.cos(p);for(p=0;p<=a.length-1;p++)k.x=a[p].x*u,k.y=a[p].y,k.z=a[p].x*r,f.push(k.x,k.y,k.z),m.x=l/b,m.y=p/(a.length-1),g.push(m.x,m.y)}for(l=0;l<b;l++)for(p=0;p<a.length-1;p++)c=p+l*a.length,h=c+a.length,k=c+a.length+1,m=c+1,e.push(c,h,m),e.push(h,k,m);this.setIndex(e);this.setAttribute("position",new y(f,3));this.setAttribute("uv",new y(g,2));this.computeVertexNormals();
|
|
|
|
-if(d===2*Math.PI)for(d=this.attributes.normal.array,e=new n,f=new n,g=new n,c=b*a.length*3,p=l=0;l<a.length;l++,p+=3)e.x=d[p+0],e.y=d[p+1],e.z=d[p+2],f.x=d[c+p+0],f.y=d[c+p+1],f.z=d[c+p+2],g.addVectors(e,f).normalize(),d[p+0]=d[c+p+0]=g.x,d[p+1]=d[c+p+1]=g.y,d[p+2]=d[c+p+2]=g.z}function ec(a,b){O.call(this);this.type="ShapeGeometry";"object"===typeof b&&(console.warn("THREE.ShapeGeometry: Options parameter has been removed."),b=b.curveSegments);this.parameters={shapes:a,curveSegments:b};this.fromBufferGeometry(new fc(a,
|
|
|
|
-b));this.mergeVertices()}function fc(a,b){function c(a){var c,h=e.length/3;a=a.extractPoints(b);var m=a.shape,l=a.holes;!1===rb.isClockWise(m)&&(m=m.reverse());a=0;for(c=l.length;a<c;a++){var z=l[a];!0===rb.isClockWise(z)&&(l[a]=z.reverse())}var n=rb.triangulateShape(m,l);a=0;for(c=l.length;a<c;a++)z=l[a],m=m.concat(z);a=0;for(c=m.length;a<c;a++)z=m[a],e.push(z.x,z.y,0),f.push(0,0,1),g.push(z.x,z.y);a=0;for(c=n.length;a<c;a++)m=n[a],d.push(m[0]+h,m[1]+h,m[2]+h),k+=3}B.call(this);this.type="ShapeBufferGeometry";
|
|
|
|
-this.parameters={shapes:a,curveSegments:b};b=b||12;var d=[],e=[],f=[],g=[],h=0,k=0;if(!1===Array.isArray(a))c(a);else for(var m=0;m<a.length;m++)c(a[m]),this.addGroup(h,k,m),h+=k,k=0;this.setIndex(d);this.setAttribute("position",new y(e,3));this.setAttribute("normal",new y(f,3));this.setAttribute("uv",new y(g,2))}function gi(a,b){b.shapes=[];if(Array.isArray(a))for(var c=0,d=a.length;c<d;c++)b.shapes.push(a[c].uuid);else b.shapes.push(a.uuid);return b}function Zc(a,b){B.call(this);this.type="EdgesGeometry";
|
|
|
|
-this.parameters={thresholdAngle:b};var c=[];b=Math.cos(M.DEG2RAD*(void 0!==b?b:1));var d=[0,0],e={},f=["a","b","c"];if(a.isBufferGeometry){var g=new O;g.fromBufferGeometry(a)}else g=a.clone();g.mergeVertices();g.computeFaceNormals();a=g.vertices;g=g.faces;for(var h=0,k=g.length;h<k;h++)for(var m=g[h],l=0;3>l;l++){var p=m[f[l]];var u=m[f[(l+1)%3]];d[0]=Math.min(p,u);d[1]=Math.max(p,u);p=d[0]+","+d[1];void 0===e[p]?e[p]={index1:d[0],index2:d[1],face1:h,face2:void 0}:e[p].face2=h}for(p in e)if(d=e[p],
|
|
|
|
-void 0===d.face2||g[d.face1].normal.dot(g[d.face2].normal)<=b)f=a[d.index1],c.push(f.x,f.y,f.z),f=a[d.index2],c.push(f.x,f.y,f.z);this.setAttribute("position",new y(c,3))}function gc(a,b,c,d,e,f,g,h){O.call(this);this.type="CylinderGeometry";this.parameters={radiusTop:a,radiusBottom:b,height:c,radialSegments:d,heightSegments:e,openEnded:f,thetaStart:g,thetaLength:h};this.fromBufferGeometry(new sb(a,b,c,d,e,f,g,h));this.mergeVertices()}function sb(a,b,c,d,e,f,g,h){function k(c){var e,f=new v,k=new n,
|
|
|
|
-z=0,t=!0===c?a:b,w=!0===c?1:-1;var A=q;for(e=1;e<=d;e++)p.push(0,F*w,0),u.push(0,w,0),r.push(.5,.5),q++;var y=q;for(e=0;e<=d;e++){var B=e/d*h+g,D=Math.cos(B);B=Math.sin(B);k.x=t*B;k.y=F*w;k.z=t*D;p.push(k.x,k.y,k.z);u.push(0,w,0);f.x=.5*D+.5;f.y=.5*B*w+.5;r.push(f.x,f.y);q++}for(e=0;e<d;e++)f=A+e,k=y+e,!0===c?l.push(k,k+1,f):l.push(k+1,k,f),z+=3;m.addGroup(x,z,!0===c?1:2);x+=z}B.call(this);this.type="CylinderBufferGeometry";this.parameters={radiusTop:a,radiusBottom:b,height:c,radialSegments:d,heightSegments:e,
|
|
|
|
-openEnded:f,thetaStart:g,thetaLength:h};var m=this;a=void 0!==a?a:1;b=void 0!==b?b:1;c=c||1;d=Math.floor(d)||8;e=Math.floor(e)||1;f=void 0!==f?f:!1;g=void 0!==g?g:0;h=void 0!==h?h:2*Math.PI;var l=[],p=[],u=[],r=[],q=0,t=[],F=c/2,x=0;(function(){var f,k,z=new n,v=new n,C=0,A=(b-a)/c;for(k=0;k<=e;k++){var B=[],y=k/e,D=y*(b-a)+a;for(f=0;f<=d;f++){var E=f/d,G=E*h+g,J=Math.sin(G);G=Math.cos(G);v.x=D*J;v.y=-y*c+F;v.z=D*G;p.push(v.x,v.y,v.z);z.set(J,A,G).normalize();u.push(z.x,z.y,z.z);r.push(E,1-y);B.push(q++)}t.push(B)}for(f=
|
|
|
|
-0;f<d;f++)for(k=0;k<e;k++)z=t[k+1][f],v=t[k+1][f+1],A=t[k][f+1],l.push(t[k][f],z,A),l.push(z,v,A),C+=6;m.addGroup(x,C,0);x+=C})();!1===f&&(0<a&&k(!0),0<b&&k(!1));this.setIndex(l);this.setAttribute("position",new y(p,3));this.setAttribute("normal",new y(u,3));this.setAttribute("uv",new y(r,2))}function fe(a,b,c,d,e,f,g){gc.call(this,0,a,b,c,d,e,f,g);this.type="ConeGeometry";this.parameters={radius:a,height:b,radialSegments:c,heightSegments:d,openEnded:e,thetaStart:f,thetaLength:g}}function ge(a,b,
|
|
|
|
-c,d,e,f,g){sb.call(this,0,a,b,c,d,e,f,g);this.type="ConeBufferGeometry";this.parameters={radius:a,height:b,radialSegments:c,heightSegments:d,openEnded:e,thetaStart:f,thetaLength:g}}function he(a,b,c,d){O.call(this);this.type="CircleGeometry";this.parameters={radius:a,segments:b,thetaStart:c,thetaLength:d};this.fromBufferGeometry(new $c(a,b,c,d));this.mergeVertices()}function $c(a,b,c,d){B.call(this);this.type="CircleBufferGeometry";this.parameters={radius:a,segments:b,thetaStart:c,thetaLength:d};
|
|
|
|
-a=a||1;b=void 0!==b?Math.max(3,b):8;c=void 0!==c?c:0;d=void 0!==d?d:2*Math.PI;var e=[],f=[],g=[],h=[],k,m=new n,l=new v;f.push(0,0,0);g.push(0,0,1);h.push(.5,.5);var p=0;for(k=3;p<=b;p++,k+=3){var u=c+p/b*d;m.x=a*Math.cos(u);m.y=a*Math.sin(u);f.push(m.x,m.y,m.z);g.push(0,0,1);l.x=(f[k]/a+1)/2;l.y=(f[k+1]/a+1)/2;h.push(l.x,l.y)}for(k=1;k<=b;k++)e.push(k,k+1,0);this.setIndex(e);this.setAttribute("position",new y(f,3));this.setAttribute("normal",new y(g,3));this.setAttribute("uv",new y(h,2))}function hc(a){J.call(this);
|
|
|
|
-this.type="ShadowMaterial";this.color=new A(0);this.transparent=!0;this.setValues(a)}function tb(a){Aa.call(this,a);this.type="RawShaderMaterial"}function gb(a){J.call(this);this.defines={STANDARD:""};this.type="MeshStandardMaterial";this.color=new A(16777215);this.roughness=1;this.metalness=0;this.lightMap=this.map=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.emissive=new A(0);this.emissiveIntensity=1;this.bumpMap=this.emissiveMap=null;this.bumpScale=1;this.normalMap=
|
|
|
|
-null;this.normalMapType=0;this.normalScale=new v(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.envMap=this.alphaMap=this.metalnessMap=this.roughnessMap=null;this.envMapIntensity=1;this.refractionRatio=.98;this.wireframe=!1;this.wireframeLinewidth=1;this.wireframeLinejoin=this.wireframeLinecap="round";this.vertexTangents=this.morphNormals=this.morphTargets=this.skinning=!1;this.setValues(a)}function ic(a){gb.call(this);this.defines={STANDARD:"",PHYSICAL:""};this.type=
|
|
|
|
-"MeshPhysicalMaterial";this.clearcoat=0;this.clearcoatMap=null;this.clearcoatRoughness=0;this.clearcoatRoughnessMap=null;this.clearcoatNormalScale=new v(1,1);this.clearcoatNormalMap=null;this.reflectivity=.5;this.sheen=null;this.transparency=0;this.setValues(a)}function Mb(a){J.call(this);this.type="MeshPhongMaterial";this.color=new A(16777215);this.specular=new A(1118481);this.shininess=30;this.lightMap=this.map=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.emissive=new A(0);
|
|
|
|
-this.emissiveIntensity=1;this.bumpMap=this.emissiveMap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=0;this.normalScale=new v(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.envMap=this.alphaMap=this.specularMap=null;this.combine=0;this.reflectivity=1;this.refractionRatio=.98;this.wireframe=!1;this.wireframeLinewidth=1;this.wireframeLinejoin=this.wireframeLinecap="round";this.morphNormals=this.morphTargets=this.skinning=!1;this.setValues(a)}function jc(a){J.call(this);
|
|
|
|
-this.defines={TOON:""};this.type="MeshToonMaterial";this.color=new A(16777215);this.specular=new A(1118481);this.shininess=30;this.lightMap=this.gradientMap=this.map=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.emissive=new A(0);this.emissiveIntensity=1;this.bumpMap=this.emissiveMap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=0;this.normalScale=new v(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.alphaMap=this.specularMap=
|
|
|
|
-null;this.wireframe=!1;this.wireframeLinewidth=1;this.wireframeLinejoin=this.wireframeLinecap="round";this.morphNormals=this.morphTargets=this.skinning=!1;this.setValues(a)}function kc(a){J.call(this);this.type="MeshNormalMaterial";this.bumpMap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=0;this.normalScale=new v(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.wireframe=!1;this.wireframeLinewidth=1;this.morphNormals=this.morphTargets=this.skinning=
|
|
|
|
-this.fog=!1;this.setValues(a)}function lc(a){J.call(this);this.type="MeshLambertMaterial";this.color=new A(16777215);this.lightMap=this.map=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.emissive=new A(0);this.emissiveIntensity=1;this.envMap=this.alphaMap=this.specularMap=this.emissiveMap=null;this.combine=0;this.reflectivity=1;this.refractionRatio=.98;this.wireframe=!1;this.wireframeLinewidth=1;this.wireframeLinejoin=this.wireframeLinecap="round";this.morphNormals=this.morphTargets=
|
|
|
|
-this.skinning=!1;this.setValues(a)}function mc(a){J.call(this);this.defines={MATCAP:""};this.type="MeshMatcapMaterial";this.color=new A(16777215);this.bumpMap=this.map=this.matcap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=0;this.normalScale=new v(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.alphaMap=null;this.morphNormals=this.morphTargets=this.skinning=!1;this.setValues(a)}function nc(a){da.call(this);this.type="LineDashedMaterial";this.scale=
|
|
|
|
-1;this.dashSize=3;this.gapSize=1;this.setValues(a)}function Ka(a,b,c,d){this.parameterPositions=a;this._cachedIndex=0;this.resultBuffer=void 0!==d?d:new b.constructor(c);this.sampleValues=b;this.valueSize=c}function We(a,b,c,d){Ka.call(this,a,b,c,d);this._offsetNext=this._weightNext=this._offsetPrev=this._weightPrev=-0}function ie(a,b,c,d){Ka.call(this,a,b,c,d)}function Xe(a,b,c,d){Ka.call(this,a,b,c,d)}function sa(a,b,c,d){if(void 0===a)throw Error("THREE.KeyframeTrack: track name is undefined");
|
|
|
|
-if(void 0===b||0===b.length)throw Error("THREE.KeyframeTrack: no keyframes in track named "+a);this.name=a;this.times=ka.convertArray(b,this.TimeBufferType);this.values=ka.convertArray(c,this.ValueBufferType);this.setInterpolation(d||this.DefaultInterpolation)}function Ye(a,b,c){sa.call(this,a,b,c)}function Ze(a,b,c,d){sa.call(this,a,b,c,d)}function ad(a,b,c,d){sa.call(this,a,b,c,d)}function $e(a,b,c,d){Ka.call(this,a,b,c,d)}function je(a,b,c,d){sa.call(this,a,b,c,d)}function af(a,b,c,d){sa.call(this,
|
|
|
|
-a,b,c,d)}function bd(a,b,c,d){sa.call(this,a,b,c,d)}function Pa(a,b,c,d){this.name=a;this.tracks=c;this.duration=void 0!==b?b:-1;this.blendMode=void 0!==d?d:2500;this.uuid=M.generateUUID();0>this.duration&&this.resetDuration()}function Hk(a){switch(a.toLowerCase()){case "scalar":case "double":case "float":case "number":case "integer":return ad;case "vector":case "vector2":case "vector3":case "vector4":return bd;case "color":return Ze;case "quaternion":return je;case "bool":case "boolean":return Ye;
|
|
|
|
-case "string":return af}throw Error("THREE.KeyframeTrack: Unsupported typeName: "+a);}function Ik(a){if(void 0===a.type)throw Error("THREE.KeyframeTrack: track type undefined, can not parse");var b=Hk(a.type);if(void 0===a.times){var c=[],d=[];ka.flattenJSON(a.keys,c,d,"value");a.times=c;a.values=d}return void 0!==b.parse?b.parse(a):new b(a.name,a.times,a.values,a.interpolation)}function tg(a,b,c){var d=this,e=!1,f=0,g=0,h=void 0,k=[];this.onStart=void 0;this.onLoad=a;this.onProgress=b;this.onError=
|
|
|
|
-c;this.itemStart=function(a){g++;if(!1===e&&void 0!==d.onStart)d.onStart(a,f,g);e=!0};this.itemEnd=function(a){f++;if(void 0!==d.onProgress)d.onProgress(a,f,g);if(f===g&&(e=!1,void 0!==d.onLoad))d.onLoad()};this.itemError=function(a){if(void 0!==d.onError)d.onError(a)};this.resolveURL=function(a){return h?h(a):a};this.setURLModifier=function(a){h=a;return this};this.addHandler=function(a,b){k.push(a,b);return this};this.removeHandler=function(a){a=k.indexOf(a);-1!==a&&k.splice(a,2);return this};this.getHandler=
|
|
|
|
-function(a){for(var b=0,c=k.length;b<c;b+=2){var d=k[b],e=k[b+1];d.global&&(d.lastIndex=0);if(d.test(a))return e}return null}}function X(a){this.manager=void 0!==a?a:hi;this.crossOrigin="anonymous";this.resourcePath=this.path=""}function Qa(a){X.call(this,a)}function ug(a){X.call(this,a)}function vg(a){X.call(this,a)}function bf(a){X.call(this,a)}function cd(a){X.call(this,a)}function cf(a){X.call(this,a)}function df(a){X.call(this,a)}function G(){this.type="Curve";this.arcLengthDivisions=200}function La(a,
|
|
|
|
-b,c,d,e,f,g,h){G.call(this);this.type="EllipseCurve";this.aX=a||0;this.aY=b||0;this.xRadius=c||1;this.yRadius=d||1;this.aStartAngle=e||0;this.aEndAngle=f||2*Math.PI;this.aClockwise=g||!1;this.aRotation=h||0}function dd(a,b,c,d,e,f){La.call(this,a,b,c,c,d,e,f);this.type="ArcCurve"}function wg(){var a=0,b=0,c=0,d=0;return{initCatmullRom:function(e,f,g,h,k){e=k*(g-e);h=k*(h-f);a=f;b=e;c=-3*f+3*g-2*e-h;d=2*f-2*g+e+h},initNonuniformCatmullRom:function(e,f,g,h,k,m,l){e=((f-e)/k-(g-e)/(k+m)+(g-f)/m)*m;h=
|
|
|
|
-((g-f)/m-(h-f)/(m+l)+(h-g)/l)*m;a=f;b=e;c=-3*f+3*g-2*e-h;d=2*f-2*g+e+h},calc:function(e){var f=e*e;return a+b*e+c*f+d*f*e}}}function pa(a,b,c,d){G.call(this);this.type="CatmullRomCurve3";this.points=a||[];this.closed=b||!1;this.curveType=c||"centripetal";this.tension=d||.5}function ii(a,b,c,d,e){b=.5*(d-b);e=.5*(e-c);var f=a*a;return(2*c-2*d+b+e)*a*f+(-3*c+3*d-2*b-e)*f+b*a+c}function ke(a,b,c,d){var e=1-a;return e*e*b+2*(1-a)*a*c+a*a*d}function le(a,b,c,d,e){var f=1-a,g=1-a;return f*f*f*b+3*g*g*a*
|
|
|
|
-c+3*(1-a)*a*a*d+a*a*a*e}function Wa(a,b,c,d){G.call(this);this.type="CubicBezierCurve";this.v0=a||new v;this.v1=b||new v;this.v2=c||new v;this.v3=d||new v}function hb(a,b,c,d){G.call(this);this.type="CubicBezierCurve3";this.v0=a||new n;this.v1=b||new n;this.v2=c||new n;this.v3=d||new n}function Ha(a,b){G.call(this);this.type="LineCurve";this.v1=a||new v;this.v2=b||new v}function Xa(a,b){G.call(this);this.type="LineCurve3";this.v1=a||new n;this.v2=b||new n}function Ya(a,b,c){G.call(this);this.type=
|
|
|
|
-"QuadraticBezierCurve";this.v0=a||new v;this.v1=b||new v;this.v2=c||new v}function ib(a,b,c){G.call(this);this.type="QuadraticBezierCurve3";this.v0=a||new n;this.v1=b||new n;this.v2=c||new n}function Za(a){G.call(this);this.type="SplineCurve";this.points=a||[]}function ub(){G.call(this);this.type="CurvePath";this.curves=[];this.autoClose=!1}function $a(a){ub.call(this);this.type="Path";this.currentPoint=new v;a&&this.setFromPoints(a)}function Nb(a){$a.call(this,a);this.uuid=M.generateUUID();this.type=
|
|
|
|
-"Shape";this.holes=[]}function S(a,b){E.call(this);this.type="Light";this.color=new A(a);this.intensity=void 0!==b?b:1;this.receiveShadow=void 0}function ef(a,b,c){S.call(this,a,c);this.type="HemisphereLight";this.castShadow=void 0;this.position.copy(E.DefaultUp);this.updateMatrix();this.groundColor=new A(b)}function jb(a){this.camera=a;this.bias=0;this.radius=1;this.mapSize=new v(512,512);this.mapPass=this.map=null;this.matrix=new P;this._frustum=new Ec;this._frameExtents=new v(1,1);this._viewportCount=
|
|
|
|
-1;this._viewports=[new ca(0,0,1,1)]}function ff(){jb.call(this,new ba(50,1,.5,500))}function gf(a,b,c,d,e,f){S.call(this,a,b);this.type="SpotLight";this.position.copy(E.DefaultUp);this.updateMatrix();this.target=new E;Object.defineProperty(this,"power",{get:function(){return this.intensity*Math.PI},set:function(a){this.intensity=a/Math.PI}});this.distance=void 0!==c?c:0;this.angle=void 0!==d?d:Math.PI/3;this.penumbra=void 0!==e?e:0;this.decay=void 0!==f?f:1;this.shadow=new ff}function xg(){jb.call(this,
|
|
|
|
-new ba(90,1,.5,500));this._frameExtents=new v(4,2);this._viewportCount=6;this._viewports=[new ca(2,1,1,1),new ca(0,1,1,1),new ca(3,1,1,1),new ca(1,1,1,1),new ca(3,0,1,1),new ca(1,0,1,1)];this._cubeDirections=[new n(1,0,0),new n(-1,0,0),new n(0,0,1),new n(0,0,-1),new n(0,1,0),new n(0,-1,0)];this._cubeUps=[new n(0,1,0),new n(0,1,0),new n(0,1,0),new n(0,1,0),new n(0,0,1),new n(0,0,-1)]}function hf(a,b,c,d){S.call(this,a,b);this.type="PointLight";Object.defineProperty(this,"power",{get:function(){return 4*
|
|
|
|
-this.intensity*Math.PI},set:function(a){this.intensity=a/(4*Math.PI)}});this.distance=void 0!==c?c:0;this.decay=void 0!==d?d:1;this.shadow=new xg}function ed(a,b,c,d,e,f){db.call(this);this.type="OrthographicCamera";this.zoom=1;this.view=null;this.left=void 0!==a?a:-1;this.right=void 0!==b?b:1;this.top=void 0!==c?c:1;this.bottom=void 0!==d?d:-1;this.near=void 0!==e?e:.1;this.far=void 0!==f?f:2E3;this.updateProjectionMatrix()}function jf(){jb.call(this,new ed(-5,5,5,-5,.5,500))}function kf(a,b){S.call(this,
|
|
|
|
-a,b);this.type="DirectionalLight";this.position.copy(E.DefaultUp);this.updateMatrix();this.target=new E;this.shadow=new jf}function lf(a,b){S.call(this,a,b);this.type="AmbientLight";this.castShadow=void 0}function mf(a,b,c,d){S.call(this,a,b);this.type="RectAreaLight";this.width=void 0!==c?c:10;this.height=void 0!==d?d:10}function nf(){this.coefficients=[];for(var a=0;9>a;a++)this.coefficients.push(new n)}function Ra(a,b){S.call(this,void 0,b);this.type="LightProbe";this.sh=void 0!==a?a:new nf}function of(a){X.call(this,
|
|
|
|
-a);this.textures={}}function pf(){B.call(this);this.type="InstancedBufferGeometry";this.maxInstancedCount=void 0}function qf(a,b,c,d){"number"===typeof c&&(d=c,c=!1,console.error("THREE.InstancedBufferAttribute: The constructor now expects normalized as the third argument."));N.call(this,a,b,c);this.meshPerAttribute=d||1}function rf(a){X.call(this,a)}function sf(a){X.call(this,a)}function yg(a){"undefined"===typeof createImageBitmap&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported.");
|
|
|
|
-"undefined"===typeof fetch&&console.warn("THREE.ImageBitmapLoader: fetch() not supported.");X.call(this,a);this.options=void 0}function zg(){this.type="ShapePath";this.color=new A;this.subPaths=[];this.currentPath=null}function Ag(a){this.type="Font";this.data=a}function Bg(a){X.call(this,a)}function tf(a){X.call(this,a)}function Cg(a,b,c){Ra.call(this,void 0,c);a=(new A).set(a);c=(new A).set(b);b=new n(a.r,a.g,a.b);a=new n(c.r,c.g,c.b);c=Math.sqrt(Math.PI);var d=c*Math.sqrt(.75);this.sh.coefficients[0].copy(b).add(a).multiplyScalar(c);
|
|
|
|
-this.sh.coefficients[1].copy(b).sub(a).multiplyScalar(d)}function Dg(a,b){Ra.call(this,void 0,b);a=(new A).set(a);this.sh.coefficients[0].set(a.r,a.g,a.b).multiplyScalar(2*Math.sqrt(Math.PI))}function ji(){this.type="StereoCamera";this.aspect=1;this.eyeSep=.064;this.cameraL=new ba;this.cameraL.layers.enable(1);this.cameraL.matrixAutoUpdate=!1;this.cameraR=new ba;this.cameraR.layers.enable(2);this.cameraR.matrixAutoUpdate=!1;this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,
|
|
|
|
-eyeSep:null}}function Eg(a){this.autoStart=void 0!==a?a:!0;this.elapsedTime=this.oldTime=this.startTime=0;this.running=!1}function Fg(){E.call(this);this.type="AudioListener";this.context=Gg.getContext();this.gain=this.context.createGain();this.gain.connect(this.context.destination);this.filter=null;this.timeDelta=0;this._clock=new Eg}function fd(a){E.call(this);this.type="Audio";this.listener=a;this.context=a.context;this.gain=this.context.createGain();this.gain.connect(a.getInput());this.autoplay=
|
|
|
|
-!1;this.buffer=null;this.detune=0;this.loop=!1;this.offset=this.loopEnd=this.loopStart=0;this.duration=void 0;this.playbackRate=1;this.isPlaying=!1;this.hasPlaybackControl=!0;this.sourceType="empty";this._progress=this._startedAt=0;this.filters=[]}function Hg(a){fd.call(this,a);this.panner=this.context.createPanner();this.panner.panningModel="HRTF";this.panner.connect(this.gain)}function Ig(a,b){this.analyser=a.context.createAnalyser();this.analyser.fftSize=void 0!==b?b:2048;this.data=new Uint8Array(this.analyser.frequencyBinCount);
|
|
|
|
-a.getOutput().connect(this.analyser)}function Jg(a,b,c){this.binding=a;this.valueSize=c;switch(b){case "quaternion":a=this._slerp;b=this._slerpAdditive;var d=this._setAdditiveIdentityQuaternion;this.buffer=new Float64Array(24);this._workIndex=5;break;case "string":case "bool":b=a=this._select;d=this._setAdditiveIdentityOther;this.buffer=Array(5*c);break;default:a=this._lerp,b=this._lerpAdditive,d=this._setAdditiveIdentityNumeric,this.buffer=new Float64Array(5*c)}this._mixBufferRegion=a;this._mixBufferRegionAdditive=
|
|
|
|
-b;this._setIdentity=d;this._origIndex=3;this._addIndex=4;this.referenceCount=this.useCount=this.cumulativeWeightAdditive=this.cumulativeWeight=0}function ki(a,b,c){c=c||ya.parseTrackName(b);this._targetGroup=a;this._bindings=a.subscribe_(b,c)}function ya(a,b,c){this.path=b;this.parsedPath=c||ya.parseTrackName(b);this.node=ya.findNode(a,this.parsedPath.nodeName)||a;this.rootNode=a}function li(){this.uuid=M.generateUUID();this._objects=Array.prototype.slice.call(arguments);this.nCachedObjects_=0;var a=
|
|
|
|
-{};this._indicesByUUID=a;for(var b=0,c=arguments.length;b!==c;++b)a[arguments[b].uuid]=b;this._paths=[];this._parsedPaths=[];this._bindings=[];this._bindingsIndicesByPath={};var d=this;this.stats={objects:{get total(){return d._objects.length},get inUse(){return this.total-d.nCachedObjects_}},get bindingsPerObject(){return d._bindings.length}}}function mi(a,b,c,d){this._mixer=a;this._clip=b;this._localRoot=c||null;this.blendMode=d||b.blendMode;a=b.tracks;b=a.length;c=Array(b);d={endingStart:2400,
|
|
|
|
-endingEnd:2400};for(var e=0;e!==b;++e){var f=a[e].createInterpolant(null);c[e]=f;f.settings=d}this._interpolantSettings=d;this._interpolants=c;this._propertyBindings=Array(b);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 Kg(a){this._root=a;this._initMemoryManager();this.time=this._accuIndex=0;this.timeScale=1}function uf(a,b){"string"===typeof a&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),a=b);this.value=a}function Lg(a,b,c){qb.call(this,a,b);this.meshPerAttribute=c||1}function Mg(a,b,c,d){this.ray=new Wb(a,b);this.near=c||0;this.far=d||Infinity;this.camera=null;this.layers=new Ce;this.params={Mesh:{},Line:{threshold:1},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 ni(a,b){return a.distance-b.distance}function Ng(a,b,c,d){a.layers.test(b.layers)&&a.raycast(b,c);if(!0===d){a=a.children;d=0;for(var e=a.length;d<e;d++)Ng(a[d],b,c,!0)}}function oi(a,b,c){this.radius=void 0!==a?a:1;this.phi=void 0!==b?b:0;this.theta=void 0!==c?c:0;return this}function pi(a,b,c){this.radius=void 0!==a?
|
|
|
|
-a:1;this.theta=void 0!==b?b:0;this.y=void 0!==c?c:0;return this}function Og(a,b){this.min=void 0!==a?a:new v(Infinity,Infinity);this.max=void 0!==b?b:new v(-Infinity,-Infinity)}function Pg(a,b){this.start=void 0!==a?a:new n;this.end=void 0!==b?b:new n}function me(a){E.call(this);this.material=a;this.render=function(){}}function gd(a,b){E.call(this);this.light=a;this.light.updateMatrixWorld();this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1;this.color=b;a=new B;b=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,
|
|
|
|
-0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(var c=0,d=1;32>c;c++,d++){var e=c/32*Math.PI*2,f=d/32*Math.PI*2;b.push(Math.cos(e),Math.sin(e),1,Math.cos(f),Math.sin(f),1)}a.setAttribute("position",new y(b,3));b=new da({fog:!1,toneMapped:!1});this.cone=new na(a,b);this.add(this.cone);this.update()}function qi(a){var b=[];a&&a.isBone&&b.push(a);for(var c=0;c<a.children.length;c++)b.push.apply(b,qi(a.children[c]));return b}function oc(a){for(var b=qi(a),c=new B,d=[],e=[],f=new A(0,0,1),g=new A(0,1,0),h=0;h<b.length;h++){var k=
|
|
|
|
-b[h];k.parent&&k.parent.isBone&&(d.push(0,0,0),d.push(0,0,0),e.push(f.r,f.g,f.b),e.push(g.r,g.g,g.b))}c.setAttribute("position",new y(d,3));c.setAttribute("color",new y(e,3));d=new da({vertexColors:!0,depthTest:!1,depthWrite:!1,toneMapped:!1,transparent:!0});na.call(this,c,d);this.type="SkeletonHelper";this.root=a;this.bones=b;this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1}function hd(a,b,c){this.light=a;this.light.updateMatrixWorld();this.color=c;a=new dc(b,4,2);b=new Na({wireframe:!0,fog:!1,
|
|
|
|
-toneMapped:!1});ja.call(this,a,b);this.type="PointLightHelper";this.matrix=this.light.matrixWorld;this.matrixAutoUpdate=!1;this.update()}function id(a,b,c){E.call(this);this.light=a;this.light.updateMatrixWorld();this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1;this.color=c;a=new ac(b);a.rotateY(.5*Math.PI);this.material=new Na({wireframe:!0,fog:!1,toneMapped:!1});void 0===this.color&&(this.material.vertexColors=!0);b=a.getAttribute("position");b=new Float32Array(3*b.count);a.setAttribute("color",
|
|
|
|
-new N(b,3));this.add(new ja(a,this.material));this.update()}function vf(a,b,c,d){a=a||10;b=b||10;c=new A(void 0!==c?c:4473924);d=new A(void 0!==d?d:8947848);var e=b/2,f=a/b,g=a/2;a=[];for(var h=[],k=0,m=0,l=-g;k<=b;k++,l+=f){a.push(-g,0,l,g,0,l);a.push(l,0,-g,l,0,g);var p=k===e?c:d;p.toArray(h,m);m+=3;p.toArray(h,m);m+=3;p.toArray(h,m);m+=3;p.toArray(h,m);m+=3}b=new B;b.setAttribute("position",new y(a,3));b.setAttribute("color",new y(h,3));c=new da({vertexColors:!0,toneMapped:!1});na.call(this,b,
|
|
|
|
-c);this.type="GridHelper"}function wf(a,b,c,d,e,f){a=a||10;b=b||16;c=c||8;d=d||64;e=new A(void 0!==e?e:4473924);f=new A(void 0!==f?f:8947848);var g=[],h=[],k;for(k=0;k<=b;k++){var m=k/b*2*Math.PI;var l=Math.sin(m)*a;m=Math.cos(m)*a;g.push(0,0,0);g.push(l,0,m);var p=k&1?e:f;h.push(p.r,p.g,p.b);h.push(p.r,p.g,p.b)}for(k=0;k<=c;k++){p=k&1?e:f;var n=a-a/c*k;for(b=0;b<d;b++)m=b/d*2*Math.PI,l=Math.sin(m)*n,m=Math.cos(m)*n,g.push(l,0,m),h.push(p.r,p.g,p.b),m=(b+1)/d*2*Math.PI,l=Math.sin(m)*n,m=Math.cos(m)*
|
|
|
|
-n,g.push(l,0,m),h.push(p.r,p.g,p.b)}a=new B;a.setAttribute("position",new y(g,3));a.setAttribute("color",new y(h,3));g=new da({vertexColors:!0,toneMapped:!1});na.call(this,a,g);this.type="PolarGridHelper"}function jd(a,b,c){E.call(this);this.light=a;this.light.updateMatrixWorld();this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1;this.color=c;void 0===b&&(b=1);a=new B;a.setAttribute("position",new y([-b,b,0,b,b,0,b,-b,0,-b,-b,0,-b,b,0],3));b=new da({fog:!1,toneMapped:!1});this.lightPlane=new Ja(a,
|
|
|
|
-b);this.add(this.lightPlane);a=new B;a.setAttribute("position",new y([0,0,0,0,0,1],3));this.targetLine=new Ja(a,b);this.add(this.targetLine);this.update()}function ne(a){function b(a,b,d){c(a,d);c(b,d)}function c(a,b){f.push(0,0,0);g.push(b.r,b.g,b.b);void 0===h[a]&&(h[a]=[]);h[a].push(f.length/3-1)}var d=new B,e=new da({color:16777215,vertexColors:!0,toneMapped:!1}),f=[],g=[],h={},k=new A(16755200),m=new A(16711680),l=new A(43775),p=new A(16777215),n=new A(3355443);b("n1","n2",k);b("n2","n4",k);
|
|
|
|
-b("n4","n3",k);b("n3","n1",k);b("f1","f2",k);b("f2","f4",k);b("f4","f3",k);b("f3","f1",k);b("n1","f1",k);b("n2","f2",k);b("n3","f3",k);b("n4","f4",k);b("p","n1",m);b("p","n2",m);b("p","n3",m);b("p","n4",m);b("u1","u2",l);b("u2","u3",l);b("u3","u1",l);b("c","t",p);b("p","c",n);b("cn1","cn2",n);b("cn3","cn4",n);b("cf1","cf2",n);b("cf3","cf4",n);d.setAttribute("position",new y(f,3));d.setAttribute("color",new y(g,3));na.call(this,d,e);this.type="CameraHelper";this.camera=a;this.camera.updateProjectionMatrix&&
|
|
|
|
-this.camera.updateProjectionMatrix();this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1;this.pointMap=h;this.update()}function oa(a,b,c,d,e,f,g){xf.set(e,f,g).unproject(d);a=b[a];if(void 0!==a)for(c=c.getAttribute("position"),b=0,d=a.length;b<d;b++)c.setXYZ(a[b],xf.x,xf.y,xf.z)}function vb(a,b){this.object=a;void 0===b&&(b=16776960);a=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]);var c=new Float32Array(24),d=new B;d.setIndex(new N(a,1));d.setAttribute("position",new N(c,3));na.call(this,
|
|
|
|
-d,new da({color:b,toneMapped:!1}));this.type="BoxHelper";this.matrixAutoUpdate=!1;this.update()}function oe(a,b){this.type="Box3Helper";this.box=a;b=b||16776960;a=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]);var c=new B;c.setIndex(new N(a,1));c.setAttribute("position",new y([1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1],3));na.call(this,c,new da({color:b,toneMapped:!1}));this.type="Box3Helper";this.geometry.computeBoundingSphere()}function pe(a,b,c){this.plane=
|
|
|
|
-a;this.size=void 0===b?1:b;a=void 0!==c?c:16776960;b=new B;b.setAttribute("position",new y([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,0,1,0,0,0],3));b.computeBoundingSphere();Ja.call(this,b,new da({color:a,toneMapped:!1}));this.type="PlaneHelper";b=new B;b.setAttribute("position",new y([1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1],3));b.computeBoundingSphere();this.add(new ja(b,new Na({color:a,opacity:.2,transparent:!0,depthWrite:!1,toneMapped:!1})))}function wb(a,b,c,d,e,f){E.call(this);
|
|
|
|
-this.type="ArrowHelper";void 0===a&&(a=new n(0,0,1));void 0===b&&(b=new n(0,0,0));void 0===c&&(c=1);void 0===d&&(d=16776960);void 0===e&&(e=.2*c);void 0===f&&(f=.2*e);void 0===yf&&(yf=new B,yf.setAttribute("position",new y([0,0,0,0,1,0],3)),Qg=new sb(0,.5,1,5,1),Qg.translate(0,-.5,0));this.position.copy(b);this.line=new Ja(yf,new da({color:d,toneMapped:!1}));this.line.matrixAutoUpdate=!1;this.add(this.line);this.cone=new ja(Qg,new Na({color:d,toneMapped:!1}));this.cone.matrixAutoUpdate=!1;this.add(this.cone);
|
|
|
|
-this.setDirection(a);this.setLength(c,e,f)}function qe(a){a=a||1;var b=[0,0,0,a,0,0,0,0,0,0,a,0,0,0,0,0,0,a];a=new B;a.setAttribute("position",new y(b,3));a.setAttribute("color",new y([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],3));b=new da({vertexColors:!0,toneMapped:!1});na.call(this,a,b);this.type="AxesHelper"}function Rg(a){this._renderer=a;this._pingPongRenderTarget=null;a=new Float32Array(20);var b=new n(0,1,0);a=new tb({defines:{n:20},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:a},
|
|
|
|
-latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:b},inputEncoding:{value:kb[3E3]},outputEncoding:{value:kb[3E3]}},vertexShader:Sg(),fragmentShader:"\nprecision mediump float;\nprecision mediump int;\nvarying vec3 vOutputDirection;\nuniform sampler2D envMap;\nuniform int samples;\nuniform float weights[n];\nuniform bool latitudinal;\nuniform float dTheta;\nuniform float mipInt;\nuniform vec3 poleAxis;\n\n"+Tg()+"\n\n#define ENVMAP_TYPE_CUBE_UV\n#include <cube_uv_reflection_fragment>\n\nvec3 getSample(float theta, vec3 axis) {\n\tfloat cosTheta = cos(theta);\n\t// Rodrigues' axis-angle rotation\n\tvec3 sampleDirection = vOutputDirection * cosTheta\n\t\t+ cross(axis, vOutputDirection) * sin(theta)\n\t\t+ axis * dot(axis, vOutputDirection) * (1.0 - cosTheta);\n\treturn bilinearCubeUV(envMap, sampleDirection, mipInt);\n}\n\nvoid main() {\n\tvec3 axis = latitudinal ? poleAxis : cross(poleAxis, vOutputDirection);\n\tif (all(equal(axis, vec3(0.0))))\n\t\taxis = vec3(vOutputDirection.z, 0.0, - vOutputDirection.x);\n\taxis = normalize(axis);\n\tgl_FragColor = vec4(0.0);\n\tgl_FragColor.rgb += weights[0] * getSample(0.0, axis);\n\tfor (int i = 1; i < n; i++) {\n\t\tif (i >= samples)\n\t\t\tbreak;\n\t\tfloat theta = dTheta * float(i);\n\t\tgl_FragColor.rgb += weights[i] * getSample(-1.0 * theta, axis);\n\t\tgl_FragColor.rgb += weights[i] * getSample(theta, axis);\n\t}\n\tgl_FragColor = linearToOutputTexel(gl_FragColor);\n}\n\t\t",
|
|
|
|
|
|
+for(var r=0,F=d.length;r<F;r++){var x=d[r],C=x.shadow;if(void 0===C)console.warn("THREE.WebGLShadowMap:",x,"has no shadow.");else{k.copy(C.mapSize);var v=C.getFrameExtents();k.multiply(v);m.copy(C.mapSize);if(k.x>c||k.y>c)k.x>c&&(m.x=Math.floor(c/v.x),k.x=m.x*v.x,C.mapSize.x=m.x),k.y>c&&(m.y=Math.floor(c/v.y),k.y=m.y*v.y,C.mapSize.y=m.y);null!==C.map||C.isPointLightShadow||3!==this.type||(v={minFilter:1006,magFilter:1006,format:1023},C.map=new za(k.x,k.y,v),C.map.texture.name=x.name+".shadowMap",
|
|
|
|
+C.mapPass=new za(k.x,k.y,v),C.camera.updateProjectionMatrix());null===C.map&&(v={minFilter:1003,magFilter:1003,format:1023},C.map=new za(k.x,k.y,v),C.map.texture.name=x.name+".shadowMap",C.camera.updateProjectionMatrix());a.setRenderTarget(C.map);a.clear();v=C.getViewportCount();for(var Z=0;Z<v;Z++){var U=C.getViewport(Z);z.set(m.x*U.x,m.y*U.y,m.x*U.z,m.y*U.w);q.viewport(z);C.updateMatrices(x,Z);h=C.getFrustum();g(e,f,C.camera,x,this.type)}C.isPointLightShadow||3!==this.type||(x=C,C=f,v=b.update(w),
|
|
|
|
+t.uniforms.shadow_pass.value=x.map.texture,t.uniforms.resolution.value=x.mapSize,t.uniforms.radius.value=x.radius,a.setRenderTarget(x.mapPass),a.clear(),a.renderBufferDirect(C,null,v,t,w,null),n.uniforms.shadow_pass.value=x.mapPass.texture,n.uniforms.resolution.value=x.mapSize,n.uniforms.radius.value=x.radius,a.setRenderTarget(x.map),a.clear(),a.renderBufferDirect(C,null,v,n,w,null))}}ha.needsUpdate=!1;a.setRenderTarget(p,l,u)}}}function Ak(a,b,c){function d(b,c,d){var e=new Uint8Array(4),f=a.createTexture();
|
|
|
|
+a.bindTexture(b,f);a.texParameteri(b,10241,9728);a.texParameteri(b,10240,9728);for(b=0;b<d;b++)a.texImage2D(c+b,0,6408,1,1,0,6408,5121,e);return f}function e(c,d){n[c]=1;0===x[c]&&(a.enableVertexAttribArray(c),x[c]=1);w[c]!==d&&((u?a:b.get("ANGLE_instanced_arrays"))[u?"vertexAttribDivisor":"vertexAttribDivisorANGLE"](c,d),w[c]=d)}function f(b){!0!==v[b]&&(a.enable(b),v[b]=!0)}function g(b){!1!==v[b]&&(a.disable(b),v[b]=!1)}function h(b,c,d,e,h,k,m,p){if(0===b)Z&&(g(3042),Z=!1);else if(Z||(f(3042),
|
|
|
|
+Z=!0),5!==b){if(b!==C||p!==E){if(100!==y||100!==Fa)a.blendEquation(32774),Fa=y=100;if(p)switch(b){case 1:a.blendFuncSeparate(1,771,1,771);break;case 2:a.blendFunc(1,1);break;case 3:a.blendFuncSeparate(0,0,769,771);break;case 4:a.blendFuncSeparate(0,768,0,770);break;default:console.error("THREE.WebGLState: Invalid blending: ",b)}else switch(b){case 1:a.blendFuncSeparate(770,771,1,771);break;case 2:a.blendFunc(770,1);break;case 3:a.blendFunc(0,769);break;case 4:a.blendFunc(0,768);break;default:console.error("THREE.WebGLState: Invalid blending: ",
|
|
|
|
+b)}D=I=Ba=ma=null;C=b;E=p}}else{h=h||c;k=k||d;m=m||e;if(c!==y||h!==Fa)a.blendEquationSeparate(Ic[c],Ic[h]),y=c,Fa=h;if(d!==ma||e!==Ba||k!==I||m!==D)a.blendFuncSeparate(K[d],K[e],K[k],K[m]),ma=d,Ba=e,I=k,D=m;C=b;E=null}}function k(b){A!==b&&(b?a.frontFace(2304):a.frontFace(2305),A=b)}function m(b){0!==b?(f(2884),b!==B&&(1===b?a.cullFace(1029):2===b?a.cullFace(1028):a.cullFace(1032))):g(2884);B=b}function l(b,c,d){if(b){if(f(32823),J!==c||N!==d)a.polygonOffset(c,d),J=c,N=d}else g(32823)}function p(b){void 0===
|
|
|
|
+b&&(b=33984+fa-1);M!==b&&(a.activeTexture(b),M=b)}var u=c.isWebGL2,r=new function(){var b=!1,c=new ca,d=null,e=new ca(0,0,0,0);return{setMask:function(c){d===c||b||(a.colorMask(c,c,c,c),d=c)},setLocked:function(a){b=a},setClear:function(b,d,f,g,h){!0===h&&(b*=g,d*=g,f*=g);c.set(b,d,f,g);!1===e.equals(c)&&(a.clearColor(b,d,f,g),e.copy(c))},reset:function(){b=!1;d=null;e.set(-1,0,0,0)}}},q=new function(){var b=!1,c=null,d=null,e=null;return{setTest:function(a){a?f(2929):g(2929)},setMask:function(d){c===
|
|
|
|
+d||b||(a.depthMask(d),c=d)},setFunc:function(b){if(d!==b){if(b)switch(b){case 0:a.depthFunc(512);break;case 1:a.depthFunc(519);break;case 2:a.depthFunc(513);break;case 3:a.depthFunc(515);break;case 4:a.depthFunc(514);break;case 5:a.depthFunc(518);break;case 6:a.depthFunc(516);break;case 7:a.depthFunc(517);break;default:a.depthFunc(515)}else a.depthFunc(515);d=b}},setLocked:function(a){b=a},setClear:function(b){e!==b&&(a.clearDepth(b),e=b)},reset:function(){b=!1;e=d=c=null}}},t=new function(){var b=
|
|
|
|
+!1,c=null,d=null,e=null,h=null,k=null,m=null,p=null,l=null;return{setTest:function(a){b||(a?f(2960):g(2960))},setMask:function(d){c===d||b||(a.stencilMask(d),c=d)},setFunc:function(b,c,f){if(d!==b||e!==c||h!==f)a.stencilFunc(b,c,f),d=b,e=c,h=f},setOp:function(b,c,d){if(k!==b||m!==c||p!==d)a.stencilOp(b,c,d),k=b,m=c,p=d},setLocked:function(a){b=a},setClear:function(b){l!==b&&(a.clearStencil(b),l=b)},reset:function(){b=!1;l=p=m=k=h=e=d=c=null}}};c=a.getParameter(34921);var n=new Uint8Array(c),x=new Uint8Array(c),
|
|
|
|
+w=new Uint8Array(c),v={},U=null,Z=null,C=null,y=null,ma=null,Ba=null,Fa=null,I=null,D=null,E=!1,A=null,B=null,G=null,J=null,N=null,fa=a.getParameter(35661),O=!1;c=0;c=a.getParameter(7938);-1!==c.indexOf("WebGL")?(c=parseFloat(/^WebGL ([0-9])/.exec(c)[1]),O=1<=c):-1!==c.indexOf("OpenGL ES")&&(c=parseFloat(/^OpenGL ES ([0-9])/.exec(c)[1]),O=2<=c);var M=null,Jd={},W=new ca,Vh=new ca,lg={};lg[3553]=d(3553,3553,1);lg[34067]=d(34067,34069,6);r.setClear(0,0,0,1);q.setClear(1);t.setClear(0);f(2929);q.setFunc(3);
|
|
|
|
+k(!1);m(1);f(2884);h(0);var Ic={100:32774,101:32778,102:32779};u?(Ic[103]=32775,Ic[104]=32776):(c=b.get("EXT_blend_minmax"),null!==c&&(Ic[103]=c.MIN_EXT,Ic[104]=c.MAX_EXT));var K={200:0,201:1,202:768,204:770,210:776,208:774,206:772,203:769,205:771,209:775,207:773};return{buffers:{color:r,depth:q,stencil:t},initAttributes:function(){for(var a=0,b=n.length;a<b;a++)n[a]=0},enableAttribute:function(a){e(a,0)},enableAttributeAndDivisor:e,disableUnusedAttributes:function(){for(var b=0,c=x.length;b!==c;++b)x[b]!==
|
|
|
|
+n[b]&&(a.disableVertexAttribArray(b),x[b]=0)},vertexAttribPointer:function(b,c,d,e,f,g){!0!==u||5124!==d&&5125!==d?a.vertexAttribPointer(b,c,d,e,f,g):a.vertexAttribIPointer(b,c,d,e,f,g)},enable:f,disable:g,useProgram:function(b){return U!==b?(a.useProgram(b),U=b,!0):!1},setBlending:h,setMaterial:function(a,b){2===a.side?g(2884):f(2884);var c=1===a.side;b&&(c=!c);k(c);1===a.blending&&!1===a.transparent?h(0):h(a.blending,a.blendEquation,a.blendSrc,a.blendDst,a.blendEquationAlpha,a.blendSrcAlpha,a.blendDstAlpha,
|
|
|
|
+a.premultipliedAlpha);q.setFunc(a.depthFunc);q.setTest(a.depthTest);q.setMask(a.depthWrite);r.setMask(a.colorWrite);b=a.stencilWrite;t.setTest(b);b&&(t.setMask(a.stencilWriteMask),t.setFunc(a.stencilFunc,a.stencilRef,a.stencilFuncMask),t.setOp(a.stencilFail,a.stencilZFail,a.stencilZPass));l(a.polygonOffset,a.polygonOffsetFactor,a.polygonOffsetUnits)},setFlipSided:k,setCullFace:m,setLineWidth:function(b){b!==G&&(O&&a.lineWidth(b),G=b)},setPolygonOffset:l,setScissorTest:function(a){a?f(3089):g(3089)},
|
|
|
|
+activeTexture:p,bindTexture:function(b,c){null===M&&p();var d=Jd[M];void 0===d&&(d={type:void 0,texture:void 0},Jd[M]=d);if(d.type!==b||d.texture!==c)a.bindTexture(b,c||lg[b]),d.type=b,d.texture=c},unbindTexture:function(){var b=Jd[M];void 0!==b&&void 0!==b.type&&(a.bindTexture(b.type,null),b.type=void 0,b.texture=void 0)},compressedTexImage2D:function(){try{a.compressedTexImage2D.apply(a,arguments)}catch(R){console.error("THREE.WebGLState:",R)}},texImage2D:function(){try{a.texImage2D.apply(a,arguments)}catch(R){console.error("THREE.WebGLState:",
|
|
|
|
+R)}},texImage3D:function(){try{a.texImage3D.apply(a,arguments)}catch(R){console.error("THREE.WebGLState:",R)}},scissor:function(b){!1===W.equals(b)&&(a.scissor(b.x,b.y,b.z,b.w),W.copy(b))},viewport:function(b){!1===Vh.equals(b)&&(a.viewport(b.x,b.y,b.z,b.w),Vh.copy(b))},reset:function(){for(var b=0;b<x.length;b++)1===x[b]&&(a.disableVertexAttribArray(b),x[b]=0);v={};M=null;Jd={};B=A=C=U=null;r.reset();q.reset();t.reset()}}}function Bk(a,b,c,d,e,f,g){function h(a,b){return J?new OffscreenCanvas(a,
|
|
|
|
+b):document.createElementNS("http://www.w3.org/1999/xhtml","canvas")}function k(a,b,c,d){var e=1;if(a.width>d||a.height>d)e=d/Math.max(a.width,a.height);if(1>e||!0===b){if("undefined"!==typeof HTMLImageElement&&a instanceof HTMLImageElement||"undefined"!==typeof HTMLCanvasElement&&a instanceof HTMLCanvasElement||"undefined"!==typeof ImageBitmap&&a instanceof ImageBitmap)return d=b?M.floorPowerOfTwo:Math.floor,b=d(e*a.width),e=d(e*a.height),void 0===G&&(G=h(b,e)),c=c?h(b,e):G,c.width=b,c.height=e,
|
|
|
|
+c.getContext("2d").drawImage(a,0,0,b,e),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+a.width+"x"+a.height+") to ("+b+"x"+e+")."),c;"data"in a&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+a.width+"x"+a.height+").")}return a}function m(a){return M.isPowerOfTwo(a.width)&&M.isPowerOfTwo(a.height)}function l(a,b){return a.generateMipmaps&&b&&1003!==a.minFilter&&1006!==a.minFilter}function p(b,c,e,f){a.generateMipmap(b);d.get(c).__maxMipLevel=Math.log(Math.max(e,
|
|
|
|
+f))*Math.LOG2E}function u(c,d,e){if(!1===Ba)return d;if(null!==c){if(void 0!==a[c])return a[c];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+c+"'")}c=d;6403===d&&(5126===e&&(c=33326),5131===e&&(c=33325),5121===e&&(c=33321));6407===d&&(5126===e&&(c=34837),5131===e&&(c=34843),5121===e&&(c=32849));6408===d&&(5126===e&&(c=34836),5131===e&&(c=34842),5121===e&&(c=32856));33325!==c&&33326!==c&&34842!==c&&34836!==c||b.get("EXT_color_buffer_float");return c}function r(a){return 1003===
|
|
|
|
+a||1004===a||1005===a?9728:9729}function q(b){b=b.target;b.removeEventListener("dispose",q);var c=d.get(b);void 0!==c.__webglInit&&(a.deleteTexture(c.__webglTexture),d.remove(b));b.isVideoTexture&&B.delete(b);g.memory.textures--}function t(b){b=b.target;b.removeEventListener("dispose",t);var c=d.get(b),e=d.get(b.texture);if(b){void 0!==e.__webglTexture&&a.deleteTexture(e.__webglTexture);b.depthTexture&&b.depthTexture.dispose();if(b.isWebGLCubeRenderTarget)for(e=0;6>e;e++)a.deleteFramebuffer(c.__webglFramebuffer[e]),
|
|
|
|
+c.__webglDepthbuffer&&a.deleteRenderbuffer(c.__webglDepthbuffer[e]);else a.deleteFramebuffer(c.__webglFramebuffer),c.__webglDepthbuffer&&a.deleteRenderbuffer(c.__webglDepthbuffer),c.__webglMultisampledFramebuffer&&a.deleteFramebuffer(c.__webglMultisampledFramebuffer),c.__webglColorRenderbuffer&&a.deleteRenderbuffer(c.__webglColorRenderbuffer),c.__webglDepthRenderbuffer&&a.deleteRenderbuffer(c.__webglDepthRenderbuffer);d.remove(b.texture);d.remove(b)}g.memory.textures--}function n(a,b){var e=d.get(a);
|
|
|
|
+if(a.isVideoTexture){var f=g.render.frame;B.get(a)!==f&&(B.set(a,f),a.update())}if(0<a.version&&e.__version!==a.version)if(f=a.image,void 0===f)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined");else if(!1===f.complete)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{Z(e,a,b);return}c.activeTexture(33984+b);c.bindTexture(3553,e.__webglTexture)}function x(b,e){if(6===b.image.length){var g=d.get(b);if(0<b.version&&g.__version!==
|
|
|
|
+b.version){U(g,b);c.activeTexture(33984+e);c.bindTexture(34067,g.__webglTexture);a.pixelStorei(37440,b.flipY);var h=b&&(b.isCompressedTexture||b.image[0].isCompressedTexture);e=b.image[0]&&b.image[0].isDataTexture;for(var z=[],q=0;6>q;q++)z[q]=h||e?e?b.image[q].image:b.image[q]:k(b.image[q],!1,!0,I);var r=z[0],t=m(r)||Ba,n=f.convert(b.format),F=f.convert(b.type),w=u(b.internalFormat,n,F);v(34067,b,t);if(h){for(q=0;6>q;q++){var x=z[q].mipmaps;for(h=0;h<x.length;h++){var W=x[h];1023!==b.format&&1022!==
|
|
|
|
+b.format?null!==n?c.compressedTexImage2D(34069+q,h,w,W.width,W.height,0,W.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):c.texImage2D(34069+q,h,w,W.width,W.height,0,n,F,W.data)}}g.__maxMipLevel=x.length-1}else{x=b.mipmaps;for(q=0;6>q;q++)if(e)for(c.texImage2D(34069+q,0,w,z[q].width,z[q].height,0,n,F,z[q].data),h=0;h<x.length;h++)W=x[h],W=W.image[q].image,c.texImage2D(34069+q,h+1,w,W.width,W.height,0,n,F,W.data);else for(c.texImage2D(34069+
|
|
|
|
+q,0,w,n,F,z[q]),h=0;h<x.length;h++)W=x[h],c.texImage2D(34069+q,h+1,w,n,F,W.image[q]);g.__maxMipLevel=x.length}l(b,t)&&p(34067,b,r.width,r.height);g.__version=b.version;if(b.onUpdate)b.onUpdate(b)}else c.activeTexture(33984+e),c.bindTexture(34067,g.__webglTexture)}}function w(a,b){c.activeTexture(33984+b);c.bindTexture(34067,d.get(a).__webglTexture)}function v(c,f,g){g?(a.texParameteri(c,10242,O[f.wrapS]),a.texParameteri(c,10243,O[f.wrapT]),32879!==c&&35866!==c||a.texParameteri(c,32882,O[f.wrapR]),
|
|
|
|
+a.texParameteri(c,10240,fa[f.magFilter]),a.texParameteri(c,10241,fa[f.minFilter])):(a.texParameteri(c,10242,33071),a.texParameteri(c,10243,33071),32879!==c&&35866!==c||a.texParameteri(c,32882,33071),1001===f.wrapS&&1001===f.wrapT||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),a.texParameteri(c,10240,r(f.magFilter)),a.texParameteri(c,10241,r(f.minFilter)),1003!==f.minFilter&&1006!==f.minFilter&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter."));
|
|
|
|
+!(g=b.get("EXT_texture_filter_anisotropic"))||1015===f.type&&null===b.get("OES_texture_float_linear")||1016===f.type&&null===(Ba||b.get("OES_texture_half_float_linear"))||!(1<f.anisotropy||d.get(f).__currentAnisotropy)||(a.texParameterf(c,g.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(f.anisotropy,e.getMaxAnisotropy())),d.get(f).__currentAnisotropy=f.anisotropy)}function U(b,c){void 0===b.__webglInit&&(b.__webglInit=!0,c.addEventListener("dispose",q),b.__webglTexture=a.createTexture(),g.memory.textures++)}
|
|
|
|
+function Z(b,d,e){var g=3553;d.isDataTexture2DArray&&(g=35866);d.isDataTexture3D&&(g=32879);U(b,d);c.activeTexture(33984+e);c.bindTexture(g,b.__webglTexture);a.pixelStorei(37440,d.flipY);a.pixelStorei(37441,d.premultiplyAlpha);a.pixelStorei(3317,d.unpackAlignment);e=Ba?!1:1001!==d.wrapS||1001!==d.wrapT||1003!==d.minFilter&&1006!==d.minFilter;e=e&&!1===m(d.image);e=k(d.image,e,!1,E);var h=m(e)||Ba,z=f.convert(d.format),q=f.convert(d.type),r=u(d.internalFormat,z,q);v(g,d,h);var t=d.mipmaps;if(d.isDepthTexture)r=
|
|
|
|
+6402,Ba?r=1015===d.type?36012:1014===d.type?33190:1020===d.type?35056:33189:1015===d.type&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),1026===d.format&&6402===r&&1012!==d.type&&1014!==d.type&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),d.type=1012,q=f.convert(d.type)),1027===d.format&&6402===r&&(r=34041,1020!==d.type&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),
|
|
|
|
+d.type=1020,q=f.convert(d.type))),c.texImage2D(3553,0,r,e.width,e.height,0,z,q,null);else if(d.isDataTexture)if(0<t.length&&h){for(var n=0,F=t.length;n<F;n++){var w=t[n];c.texImage2D(3553,n,r,w.width,w.height,0,z,q,w.data)}d.generateMipmaps=!1;b.__maxMipLevel=t.length-1}else c.texImage2D(3553,0,r,e.width,e.height,0,z,q,e.data),b.__maxMipLevel=0;else if(d.isCompressedTexture){n=0;for(F=t.length;n<F;n++)w=t[n],1023!==d.format&&1022!==d.format?null!==z?c.compressedTexImage2D(3553,n,r,w.width,w.height,
|
|
|
|
+0,w.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):c.texImage2D(3553,n,r,w.width,w.height,0,z,q,w.data);b.__maxMipLevel=t.length-1}else if(d.isDataTexture2DArray)c.texImage3D(35866,0,r,e.width,e.height,e.depth,0,z,q,e.data),b.__maxMipLevel=0;else if(d.isDataTexture3D)c.texImage3D(32879,0,r,e.width,e.height,e.depth,0,z,q,e.data),b.__maxMipLevel=0;else if(0<t.length&&h){n=0;for(F=t.length;n<F;n++)w=t[n],c.texImage2D(3553,n,r,z,q,
|
|
|
|
+w);d.generateMipmaps=!1;b.__maxMipLevel=t.length-1}else c.texImage2D(3553,0,r,z,q,e),b.__maxMipLevel=0;l(d,h)&&p(g,d,e.width,e.height);b.__version=d.version;if(d.onUpdate)d.onUpdate(d)}function C(b,e,g,h){var k=f.convert(e.texture.format),m=f.convert(e.texture.type),p=u(e.texture.internalFormat,k,m);c.texImage2D(h,0,p,e.width,e.height,0,k,m,null);a.bindFramebuffer(36160,b);a.framebufferTexture2D(36160,g,h,d.get(e.texture).__webglTexture,0);a.bindFramebuffer(36160,null)}function y(b,c,d){a.bindRenderbuffer(36161,
|
|
|
|
+b);if(c.depthBuffer&&!c.stencilBuffer){var e=33189;d?((d=c.depthTexture)&&d.isDepthTexture&&(1015===d.type?e=36012:1014===d.type&&(e=33190)),d=D(c),a.renderbufferStorageMultisample(36161,d,e,c.width,c.height)):a.renderbufferStorage(36161,e,c.width,c.height);a.framebufferRenderbuffer(36160,36096,36161,b)}else c.depthBuffer&&c.stencilBuffer?(d?(d=D(c),a.renderbufferStorageMultisample(36161,d,35056,c.width,c.height)):a.renderbufferStorage(36161,34041,c.width,c.height),a.framebufferRenderbuffer(36160,
|
|
|
|
+33306,36161,b)):(b=f.convert(c.texture.format),e=f.convert(c.texture.type),e=u(c.texture.internalFormat,b,e),d?(d=D(c),a.renderbufferStorageMultisample(36161,d,e,c.width,c.height)):a.renderbufferStorage(36161,e,c.width,c.height));a.bindRenderbuffer(36161,null)}function D(a){return Ba&&a.isWebGLMultisampleRenderTarget?Math.min(A,a.samples):0}var Ba=e.isWebGL2,Fa=e.maxTextures,I=e.maxCubemapSize,E=e.maxTextureSize,A=e.maxSamples,B=new WeakMap,G,J=!1;try{J="undefined"!==typeof OffscreenCanvas&&null!==
|
|
|
|
+(new OffscreenCanvas(1,1)).getContext("2d")}catch(Jd){}var N=0,O={1E3:10497,1001:33071,1002:33648},fa={1003:9728,1004:9984,1005:9986,1006:9729,1007:9985,1008:9987},P=!1,L=!1;this.allocateTextureUnit=function(){var a=N;a>=Fa&&console.warn("THREE.WebGLTextures: Trying to use "+a+" texture units while this GPU supports only "+Fa);N+=1;return a};this.resetTextureUnits=function(){N=0};this.setTexture2D=n;this.setTexture2DArray=function(a,b){var e=d.get(a);0<a.version&&e.__version!==a.version?Z(e,a,b):
|
|
|
|
+(c.activeTexture(33984+b),c.bindTexture(35866,e.__webglTexture))};this.setTexture3D=function(a,b){var e=d.get(a);0<a.version&&e.__version!==a.version?Z(e,a,b):(c.activeTexture(33984+b),c.bindTexture(32879,e.__webglTexture))};this.setTextureCube=x;this.setTextureCubeDynamic=w;this.setupRenderTarget=function(b){var e=d.get(b),h=d.get(b.texture);b.addEventListener("dispose",t);h.__webglTexture=a.createTexture();g.memory.textures++;var k=!0===b.isWebGLCubeRenderTarget,z=!0===b.isWebGLMultisampleRenderTarget,
|
|
|
|
+q=m(b)||Ba;!Ba||1022!==b.texture.format||1015!==b.texture.type&&1016!==b.texture.type||(b.texture.format=1023,console.warn("THREE.WebGLRenderer: Rendering to textures with RGB format is not supported. Using RGBA format instead."));if(k)for(e.__webglFramebuffer=[],z=0;6>z;z++)e.__webglFramebuffer[z]=a.createFramebuffer();else if(e.__webglFramebuffer=a.createFramebuffer(),z)if(Ba){e.__webglMultisampledFramebuffer=a.createFramebuffer();e.__webglColorRenderbuffer=a.createRenderbuffer();a.bindRenderbuffer(36161,
|
|
|
|
+e.__webglColorRenderbuffer);z=f.convert(b.texture.format);var r=f.convert(b.texture.type);z=u(b.texture.internalFormat,z,r);r=D(b);a.renderbufferStorageMultisample(36161,r,z,b.width,b.height);a.bindFramebuffer(36160,e.__webglMultisampledFramebuffer);a.framebufferRenderbuffer(36160,36064,36161,e.__webglColorRenderbuffer);a.bindRenderbuffer(36161,null);b.depthBuffer&&(e.__webglDepthRenderbuffer=a.createRenderbuffer(),y(e.__webglDepthRenderbuffer,b,!0));a.bindFramebuffer(36160,null)}else console.warn("THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.");
|
|
|
|
+if(k){c.bindTexture(34067,h.__webglTexture);v(34067,b.texture,q);for(z=0;6>z;z++)C(e.__webglFramebuffer[z],b,36064,34069+z);l(b.texture,q)&&p(34067,b.texture,b.width,b.height);c.bindTexture(34067,null)}else c.bindTexture(3553,h.__webglTexture),v(3553,b.texture,q),C(e.__webglFramebuffer,b,36064,3553),l(b.texture,q)&&p(3553,b.texture,b.width,b.height),c.bindTexture(3553,null);if(b.depthBuffer){e=d.get(b);h=!0===b.isWebGLCubeRenderTarget;if(b.depthTexture){if(h)throw Error("target.depthTexture not supported in Cube render targets");
|
|
|
|
+if(b&&b.isWebGLCubeRenderTarget)throw Error("Depth Texture with cube render targets is not supported");a.bindFramebuffer(36160,e.__webglFramebuffer);if(!b.depthTexture||!b.depthTexture.isDepthTexture)throw Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");d.get(b.depthTexture).__webglTexture&&b.depthTexture.image.width===b.width&&b.depthTexture.image.height===b.height||(b.depthTexture.image.width=b.width,b.depthTexture.image.height=b.height,b.depthTexture.needsUpdate=!0);
|
|
|
|
+n(b.depthTexture,0);e=d.get(b.depthTexture).__webglTexture;if(1026===b.depthTexture.format)a.framebufferTexture2D(36160,36096,3553,e,0);else if(1027===b.depthTexture.format)a.framebufferTexture2D(36160,33306,3553,e,0);else throw Error("Unknown depthTexture format");}else if(h)for(e.__webglDepthbuffer=[],h=0;6>h;h++)a.bindFramebuffer(36160,e.__webglFramebuffer[h]),e.__webglDepthbuffer[h]=a.createRenderbuffer(),y(e.__webglDepthbuffer[h],b,!1);else a.bindFramebuffer(36160,e.__webglFramebuffer),e.__webglDepthbuffer=
|
|
|
|
+a.createRenderbuffer(),y(e.__webglDepthbuffer,b,!1);a.bindFramebuffer(36160,null)}};this.updateRenderTargetMipmap=function(a){var b=a.texture,e=m(a)||Ba;if(l(b,e)){e=a.isWebGLCubeRenderTarget?34067:3553;var f=d.get(b).__webglTexture;c.bindTexture(e,f);p(e,b,a.width,a.height);c.bindTexture(e,null)}};this.updateMultisampleRenderTarget=function(b){if(b.isWebGLMultisampleRenderTarget)if(Ba){var c=d.get(b);a.bindFramebuffer(36008,c.__webglMultisampledFramebuffer);a.bindFramebuffer(36009,c.__webglFramebuffer);
|
|
|
|
+var e=b.width,f=b.height,g=16384;b.depthBuffer&&(g|=256);b.stencilBuffer&&(g|=1024);a.blitFramebuffer(0,0,e,f,0,0,e,f,g,9728);a.bindFramebuffer(36160,c.__webglMultisampledFramebuffer)}else console.warn("THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.")};this.safeSetTexture2D=function(a,b){a&&a.isWebGLRenderTarget&&(!1===P&&(console.warn("THREE.WebGLTextures.safeSetTexture2D: don't use render targets as textures. Use their .texture property instead."),P=!0),a=a.texture);
|
|
|
|
+n(a,b)};this.safeSetTextureCube=function(a,b){a&&a.isWebGLCubeRenderTarget&&(!1===L&&(console.warn("THREE.WebGLTextures.safeSetTextureCube: don't use cube render targets as textures. Use their .texture property instead."),L=!0),a=a.texture);a&&a.isCubeTexture||Array.isArray(a.image)&&6===a.image.length?x(a,b):w(a,b)}}function Wh(a,b,c){var d=c.isWebGL2;return{convert:function(a){if(1009===a)return 5121;if(1017===a)return 32819;if(1018===a)return 32820;if(1019===a)return 33635;if(1010===a)return 5120;
|
|
|
|
+if(1011===a)return 5122;if(1012===a)return 5123;if(1013===a)return 5124;if(1014===a)return 5125;if(1015===a)return 5126;if(1016===a){if(d)return 5131;var c=b.get("OES_texture_half_float");return null!==c?c.HALF_FLOAT_OES:null}if(1021===a)return 6406;if(1022===a)return 6407;if(1023===a)return 6408;if(1024===a)return 6409;if(1025===a)return 6410;if(1026===a)return 6402;if(1027===a)return 34041;if(1028===a)return 6403;if(1029===a)return 36244;if(1030===a)return 33319;if(1031===a)return 33320;if(1032===
|
|
|
|
+a)return 36248;if(1033===a)return 36249;if(33776===a||33777===a||33778===a||33779===a)if(c=b.get("WEBGL_compressed_texture_s3tc"),null!==c){if(33776===a)return c.COMPRESSED_RGB_S3TC_DXT1_EXT;if(33777===a)return c.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(33778===a)return c.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(33779===a)return c.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(35840===a||35841===a||35842===a||35843===a)if(c=b.get("WEBGL_compressed_texture_pvrtc"),null!==c){if(35840===a)return c.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;
|
|
|
|
+if(35841===a)return c.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(35842===a)return c.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(35843===a)return c.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(36196===a)return c=b.get("WEBGL_compressed_texture_etc1"),null!==c?c.COMPRESSED_RGB_ETC1_WEBGL:null;if(37492===a||37496===a)if(c=b.get("WEBGL_compressed_texture_etc"),null!==c){if(37492===a)return c.COMPRESSED_RGB8_ETC2;if(37496===a)return c.COMPRESSED_RGBA8_ETC2_EAC}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||37840===a||37841===a||37842===a||37843===a||37844===a||37845===a||37846===a||37847===a||37848===a||37849===a||37850===a||37851===a||37852===a||37853===a)return c=b.get("WEBGL_compressed_texture_astc"),null!==c?a:null;if(36492===a)return c=b.get("EXT_texture_compression_bptc"),null!==c?a:null;if(1020===a){if(d)return 34042;c=b.get("WEBGL_depth_texture");return null!==c?c.UNSIGNED_INT_24_8_WEBGL:null}}}}
|
|
|
|
+function Ke(a){ba.call(this);this.cameras=a||[]}function Jc(){E.call(this);this.type="Group"}function Le(){this._grip=this._targetRay=null}function Xh(a,b){function c(a){var b=q.get(a.inputSource);b&&b.dispatchEvent({type:a.type})}function d(){q.forEach(function(a,b){a.disconnect(b)});q.clear();a.setFramebuffer(null);a.setRenderTarget(a.getRenderTarget());D.stop();h.isPresenting=!1;h.dispatchEvent({type:"sessionend"})}function e(a){l=a;D.setContext(k);D.start();h.isPresenting=!0;h.dispatchEvent({type:"sessionstart"})}
|
|
|
|
+function f(a){for(var b=k.inputSources,c=0;c<r.length;c++)q.set(b[c],r[c]);for(c=0;c<a.removed.length;c++){b=a.removed[c];var d=q.get(b);d&&(d.dispatchEvent({type:"disconnected",data:b}),q.delete(b))}for(c=0;c<a.added.length;c++)b=a.added[c],(d=q.get(b))&&d.dispatchEvent({type:"connected",data:b})}function g(a,b){null===b?a.matrixWorld.copy(a.matrix):a.matrixWorld.multiplyMatrices(b.matrixWorld,a.matrix);a.matrixWorldInverse.getInverse(a.matrixWorld)}var h=this,k=null,m=1,l=null,p="local-floor",u=
|
|
|
|
+null,r=[],q=new Map,t=new ba;t.layers.enable(1);t.viewport=new ca;var F=new ba;F.layers.enable(2);F.viewport=new ca;var x=[t,F],w=new Ke;w.layers.enable(1);w.layers.enable(2);var v=null,U=null;this.isPresenting=this.enabled=!1;this.getController=function(a){var b=r[a];void 0===b&&(b=new Le,r[a]=b);return b.getTargetRaySpace()};this.getControllerGrip=function(a){var b=r[a];void 0===b&&(b=new Le,r[a]=b);return b.getGripSpace()};this.setFramebufferScaleFactor=function(a){m=a;!0===h.isPresenting&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")};
|
|
|
|
+this.setReferenceSpaceType=function(a){p=a;!0===h.isPresenting&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")};this.getReferenceSpace=function(){return l};this.getSession=function(){return k};this.setSession=function(a){k=a;null!==k&&(k.addEventListener("select",c),k.addEventListener("selectstart",c),k.addEventListener("selectend",c),k.addEventListener("squeeze",c),k.addEventListener("squeezestart",c),k.addEventListener("squeezeend",c),k.addEventListener("end",
|
|
|
|
+d),a=b.getContextAttributes(),a=new XRWebGLLayer(k,b,{antialias:a.antialias,alpha:a.alpha,depth:a.depth,stencil:a.stencil,framebufferScaleFactor:m}),k.updateRenderState({baseLayer:a}),k.requestReferenceSpace(p).then(e),k.addEventListener("inputsourceschange",f))};var Z=new n,C=new n;this.getCamera=function(a){w.near=F.near=t.near=a.near;w.far=F.far=t.far=a.far;if(v!==w.near||U!==w.far)k.updateRenderState({depthNear:w.near,depthFar:w.far}),v=w.near,U=w.far;var b=a.parent,c=w.cameras;g(w,b);for(var d=
|
|
|
|
+0;d<c.length;d++)g(c[d],b);a.matrixWorld.copy(w.matrixWorld);a=a.children;d=0;for(b=a.length;d<b;d++)a[d].updateMatrixWorld(!0);if(2===c.length){Z.setFromMatrixPosition(t.matrixWorld);C.setFromMatrixPosition(F.matrixWorld);c=Z.distanceTo(C);var e=t.projectionMatrix.elements,f=F.projectionMatrix.elements,h=e[14]/(e[10]-1);d=e[14]/(e[10]+1);a=(e[9]+1)/e[5];b=(e[9]-1)/e[5];var m=(e[8]-1)/e[0],p=(f[8]+1)/f[0];f=h*m;e=h*p;p=c/(-m+p);m=p*-m;t.matrixWorld.decompose(w.position,w.quaternion,w.scale);w.translateX(m);
|
|
|
|
+w.translateZ(p);w.matrixWorld.compose(w.position,w.quaternion,w.scale);w.matrixWorldInverse.getInverse(w.matrixWorld);h+=p;p=d+p;w.projectionMatrix.makePerspective(f-m,e+(c-m),a*d/p*h,b*d/p*h,h,p)}else w.projectionMatrix.copy(t.projectionMatrix);return w};var y=null,D=new xh;D.setAnimationLoop(function(b,c){u=c.getViewerPose(l);if(null!==u){var d=u.views,e=k.renderState.baseLayer;a.setFramebuffer(e.framebuffer);var f=!1;d.length!==w.cameras.length&&(w.cameras.length=0,f=!0);for(var g=0;g<d.length;g++){var h=
|
|
|
|
+d[g],m=e.getViewport(h),p=x[g];p.matrix.fromArray(h.transform.matrix);p.projectionMatrix.fromArray(h.projectionMatrix);p.viewport.set(m.x,m.y,m.width,m.height);0===g&&w.matrix.copy(p.matrix);!0===f&&w.cameras.push(p)}}d=k.inputSources;for(g=0;g<r.length;g++)r[g].update(d[g],c,l);y&&y(b,c)});this.setAnimationLoop=function(a){y=a};this.dispose=function(){}}function mg(a){var b;function c(){ra=new rj(H);Ga=new pj(H,ra,a);!1===Ga.isWebGL2&&(ra.get("WEBGL_depth_texture"),ra.get("OES_texture_float"),ra.get("OES_texture_half_float"),
|
|
|
|
+ra.get("OES_texture_half_float_linear"),ra.get("OES_standard_derivatives"),ra.get("OES_element_index_uint"),ra.get("ANGLE_instanced_arrays"));ra.get("OES_texture_float_linear");qa=new Wh(H,ra,Ga);Y=new Ak(H,ra,Ga);Y.scissor(S.copy(ia).multiplyScalar(R).floor());Y.viewport(W.copy(Q).multiplyScalar(R).floor());ba=new uj(H);aa=new qk;ea=new Bk(H,ra,Y,aa,Ga,qa,ba);la=new mj(H,Ga);wa=new sj(H,la,ba);sa=new xj(H,wa,la,ba);ya=new wj(H);ta=new pk(I,ra,Ga);xa=new tk;va=new zk;pa=new nj(I,Y,sa,Z);Aa=new oj(H,
|
|
|
|
+ra,ba,Ga);Ca=new tj(H,ra,ba,Ga);ba.programs=ta.programs;I.capabilities=Ga;I.extensions=ra;I.properties=aa;I.renderLists=xa;I.state=Y;I.info=ba}function d(a){a.preventDefault();console.log("THREE.WebGLRenderer: Context Lost.");G=!0}function e(){console.log("THREE.WebGLRenderer: Context Restored.");G=!1;c()}function f(a){a=a.target;a.removeEventListener("dispose",f);g(a);aa.remove(a)}function g(a){var b=aa.get(a).program;a.program=void 0;void 0!==b&&ta.releaseProgram(b)}function h(a,b){a.render(function(a){I.renderBufferImmediate(a,
|
|
|
|
+b)})}function k(a,b,c,d){if(!1!==a.visible){if(a.layers.test(b.layers))if(a.isGroup)c=a.renderOrder;else if(a.isLOD)!0===a.autoUpdate&&a.update(b);else if(a.isLight)A.pushLight(a),a.castShadow&&A.pushShadow(a);else if(a.isSprite){if(!a.frustumCulled||jg.intersectsSprite(a)){d&&Jb.setFromMatrixPosition(a.matrixWorld).applyMatrix4(Id);var e=sa.update(a),f=a.material;f.visible&&B.push(a,e,f,c,Jb.z,null)}}else if(a.isImmediateRenderObject)d&&Jb.setFromMatrixPosition(a.matrixWorld).applyMatrix4(Id),B.push(a,
|
|
|
|
+null,a.material,c,Jb.z,null);else if(a.isMesh||a.isLine||a.isPoints)if(a.isSkinnedMesh&&a.skeleton.frame!==ba.render.frame&&(a.skeleton.update(),a.skeleton.frame=ba.render.frame),!a.frustumCulled||jg.intersectsObject(a))if(d&&Jb.setFromMatrixPosition(a.matrixWorld).applyMatrix4(Id),e=sa.update(a),f=a.material,Array.isArray(f))for(var g=e.groups,h=0,m=g.length;h<m;h++){var p=g[h],l=f[p.materialIndex];l&&l.visible&&B.push(a,e,l,c,Jb.z,p)}else f.visible&&B.push(a,e,f,c,Jb.z,null);a=a.children;h=0;for(m=
|
|
|
|
+a.length;h<m;h++)k(a[h],b,c,d)}}function m(a,b,c,d){for(var e=0,f=a.length;e<f;e++){var g=a[e],h=g.object,k=g.geometry,m=void 0===d?g.material:d;g=g.group;if(c.isArrayCamera){T=c;for(var p=c.cameras,z=0,q=p.length;z<q;z++){var u=p[z];h.layers.test(u.layers)&&(Y.viewport(W.copy(u.viewport)),A.setupLights(u),l(h,b,u,k,m,g))}}else T=null,l(h,b,c,k,m,g)}}function l(a,c,d,e,f,g){a.onBeforeRender(I,c,d,e,f,g);A=va.get(c,T||d);a.modelViewMatrix.multiplyMatrices(d.matrixWorldInverse,a.matrixWorld);a.normalMatrix.getNormalMatrix(a.modelViewMatrix);
|
|
|
|
+if(a.isImmediateRenderObject){var k=u(d,c,f,a);Y.setMaterial(f);fa=b=null;Je=!1;h(a,k)}else I.renderBufferDirect(d,c,e,f,a,g);a.onAfterRender(I,c,d,e,f,g);A=va.get(c,T||d)}function p(a,b,c){var d=aa.get(a),e=A.state.lights,h=e.state.version;c=ta.getParameters(a,e.state,A.state.shadowsArray,b,Ua.numPlanes,Ua.numIntersection,c);var k=ta.getProgramCacheKey(c),m=d.program,p=!0;if(void 0===m)a.addEventListener("dispose",f);else if(m.cacheKey!==k)g(a);else{if(d.lightsStateVersion!==h)d.lightsStateVersion=
|
|
|
|
+h;else if(void 0!==c.shaderID)return;p=!1}p&&(m=ta.acquireProgram(c,k),d.program=m,d.uniforms=c.uniforms,d.outputEncoding=c.outputEncoding,a.program=m);c=m.getAttributes();if(a.morphTargets)for(k=a.numSupportedMorphTargets=0;k<I.maxMorphTargets;k++)0<=c["morphTarget"+k]&&a.numSupportedMorphTargets++;if(a.morphNormals)for(k=a.numSupportedMorphNormals=0;k<I.maxMorphNormals;k++)0<=c["morphNormal"+k]&&a.numSupportedMorphNormals++;c=d.uniforms;if(!a.isShaderMaterial&&!a.isRawShaderMaterial||!0===a.clipping)d.numClippingPlanes=
|
|
|
|
+Ua.numPlanes,d.numIntersection=Ua.numIntersection,c.clippingPlanes=Ua.uniform;d.environment=a.isMeshStandardMaterial?b.environment:null;d.fog=b.fog;d.needsLights=a.isMeshLambertMaterial||a.isMeshToonMaterial||a.isMeshPhongMaterial||a.isMeshStandardMaterial||a.isShadowMaterial||a.isShaderMaterial&&!0===a.lights;d.lightsStateVersion=h;d.needsLights&&(c.ambientLightColor.value=e.state.ambient,c.lightProbe.value=e.state.probe,c.directionalLights.value=e.state.directional,c.directionalLightShadows.value=
|
|
|
|
+e.state.directionalShadow,c.spotLights.value=e.state.spot,c.spotLightShadows.value=e.state.spotShadow,c.rectAreaLights.value=e.state.rectArea,c.pointLights.value=e.state.point,c.pointLightShadows.value=e.state.pointShadow,c.hemisphereLights.value=e.state.hemi,c.directionalShadowMap.value=e.state.directionalShadowMap,c.directionalShadowMatrix.value=e.state.directionalShadowMatrix,c.spotShadowMap.value=e.state.spotShadowMap,c.spotShadowMatrix.value=e.state.spotShadowMatrix,c.pointShadowMap.value=e.state.pointShadowMap,
|
|
|
|
+c.pointShadowMatrix.value=e.state.pointShadowMatrix);a=d.program.getUniforms();a=Gb.seqWithValue(a.seq,c);d.uniformsList=a}function u(a,b,c,d){ea.resetTextureUnits();var e=b.fog,f=c.isMeshStandardMaterial?b.environment:null,g=null===L?I.outputEncoding:L.texture.encoding,h=aa.get(c),k=A.state.lights;oa&&(kg||a!==V)&&Ua.setState(c.clippingPlanes,c.clipIntersection,c.clipShadows,a,h,a===V&&c.id===Ie);c.version===h.__version?void 0===h.program?p(c,b,d):c.fog&&h.fog!==e?p(c,b,d):h.environment!==f?p(c,
|
|
|
|
+b,d):h.needsLights&&h.lightsStateVersion!==k.state.version?p(c,b,d):void 0===h.numClippingPlanes||h.numClippingPlanes===Ua.numPlanes&&h.numIntersection===Ua.numIntersection?h.outputEncoding!==g&&p(c,b,d):p(c,b,d):(p(c,b,d),h.__version=c.version);var m=!1,l=!1,z=!1;b=h.program;g=b.getUniforms();k=h.uniforms;Y.useProgram(b.program)&&(z=l=m=!0);c.id!==Ie&&(Ie=c.id,l=!0);if(m||V!==a){g.setValue(H,"projectionMatrix",a.projectionMatrix);Ga.logarithmicDepthBuffer&&g.setValue(H,"logDepthBufFC",2/(Math.log(a.far+
|
|
|
|
+1)/Math.LN2));V!==a&&(V=a,z=l=!0);if(c.isShaderMaterial||c.isMeshPhongMaterial||c.isMeshToonMaterial||c.isMeshStandardMaterial||c.envMap)m=g.map.cameraPosition,void 0!==m&&m.setValue(H,Jb.setFromMatrixPosition(a.matrixWorld));(c.isMeshPhongMaterial||c.isMeshToonMaterial||c.isMeshLambertMaterial||c.isMeshBasicMaterial||c.isMeshStandardMaterial||c.isShaderMaterial)&&g.setValue(H,"isOrthographic",!0===a.isOrthographicCamera);(c.isMeshPhongMaterial||c.isMeshToonMaterial||c.isMeshLambertMaterial||c.isMeshBasicMaterial||
|
|
|
|
+c.isMeshStandardMaterial||c.isShaderMaterial||c.skinning)&&g.setValue(H,"viewMatrix",a.matrixWorldInverse)}if(c.skinning&&(g.setOptional(H,d,"bindMatrix"),g.setOptional(H,d,"bindMatrixInverse"),a=d.skeleton))if(m=a.bones,Ga.floatVertexTextures){if(void 0===a.boneTexture){m=Math.sqrt(4*m.length);m=M.ceilPowerOfTwo(m);m=Math.max(m,4);var u=new Float32Array(m*m*4);u.set(a.boneMatrices);var t=new Zb(u,m,m,1023,1015);a.boneMatrices=u;a.boneTexture=t;a.boneTextureSize=m}g.setValue(H,"boneTexture",a.boneTexture,
|
|
|
|
+ea);g.setValue(H,"boneTextureSize",a.boneTextureSize)}else g.setOptional(H,a,"boneMatrices");if(l||h.receiveShadow!==d.receiveShadow)h.receiveShadow=d.receiveShadow,g.setValue(H,"receiveShadow",d.receiveShadow);if(l){g.setValue(H,"toneMappingExposure",I.toneMappingExposure);g.setValue(H,"toneMappingWhitePoint",I.toneMappingWhitePoint);h.needsLights&&(l=z,k.ambientLightColor.needsUpdate=l,k.lightProbe.needsUpdate=l,k.directionalLights.needsUpdate=l,k.directionalLightShadows.needsUpdate=l,k.pointLights.needsUpdate=
|
|
|
|
+l,k.pointLightShadows.needsUpdate=l,k.spotLights.needsUpdate=l,k.spotLightShadows.needsUpdate=l,k.rectAreaLights.needsUpdate=l,k.hemisphereLights.needsUpdate=l);e&&c.fog&&(k.fogColor.value.copy(e.color),e.isFog?(k.fogNear.value=e.near,k.fogFar.value=e.far):e.isFogExp2&&(k.fogDensity.value=e.density));if(c.isMeshBasicMaterial)r(k,c);else if(c.isMeshLambertMaterial)r(k,c),c.emissiveMap&&(k.emissiveMap.value=c.emissiveMap);else if(c.isMeshToonMaterial)r(k,c),k.specular.value.copy(c.specular),k.shininess.value=
|
|
|
|
+Math.max(c.shininess,1E-4),c.gradientMap&&(k.gradientMap.value=c.gradientMap),c.emissiveMap&&(k.emissiveMap.value=c.emissiveMap),c.bumpMap&&(k.bumpMap.value=c.bumpMap,k.bumpScale.value=c.bumpScale,1===c.side&&(k.bumpScale.value*=-1)),c.normalMap&&(k.normalMap.value=c.normalMap,k.normalScale.value.copy(c.normalScale),1===c.side&&k.normalScale.value.negate()),c.displacementMap&&(k.displacementMap.value=c.displacementMap,k.displacementScale.value=c.displacementScale,k.displacementBias.value=c.displacementBias);
|
|
|
|
+else if(c.isMeshPhongMaterial)r(k,c),k.specular.value.copy(c.specular),k.shininess.value=Math.max(c.shininess,1E-4),c.emissiveMap&&(k.emissiveMap.value=c.emissiveMap),c.bumpMap&&(k.bumpMap.value=c.bumpMap,k.bumpScale.value=c.bumpScale,1===c.side&&(k.bumpScale.value*=-1)),c.normalMap&&(k.normalMap.value=c.normalMap,k.normalScale.value.copy(c.normalScale),1===c.side&&k.normalScale.value.negate()),c.displacementMap&&(k.displacementMap.value=c.displacementMap,k.displacementScale.value=c.displacementScale,
|
|
|
|
+k.displacementBias.value=c.displacementBias);else if(c.isMeshStandardMaterial)r(k,c,f),c.isMeshPhysicalMaterial?(q(k,c,f),k.reflectivity.value=c.reflectivity,k.clearcoat.value=c.clearcoat,k.clearcoatRoughness.value=c.clearcoatRoughness,c.sheen&&k.sheen.value.copy(c.sheen),c.clearcoatMap&&(k.clearcoatMap.value=c.clearcoatMap),c.clearcoatRoughnessMap&&(k.clearcoatRoughnessMap.value=c.clearcoatRoughnessMap),c.clearcoatNormalMap&&(k.clearcoatNormalScale.value.copy(c.clearcoatNormalScale),k.clearcoatNormalMap.value=
|
|
|
|
+c.clearcoatNormalMap,1===c.side&&k.clearcoatNormalScale.value.negate()),k.transparency.value=c.transparency):q(k,c,f);else if(c.isMeshMatcapMaterial)r(k,c),c.matcap&&(k.matcap.value=c.matcap),c.bumpMap&&(k.bumpMap.value=c.bumpMap,k.bumpScale.value=c.bumpScale,1===c.side&&(k.bumpScale.value*=-1)),c.normalMap&&(k.normalMap.value=c.normalMap,k.normalScale.value.copy(c.normalScale),1===c.side&&k.normalScale.value.negate()),c.displacementMap&&(k.displacementMap.value=c.displacementMap,k.displacementScale.value=
|
|
|
|
+c.displacementScale,k.displacementBias.value=c.displacementBias);else if(c.isMeshDepthMaterial)r(k,c),c.displacementMap&&(k.displacementMap.value=c.displacementMap,k.displacementScale.value=c.displacementScale,k.displacementBias.value=c.displacementBias);else if(c.isMeshDistanceMaterial)r(k,c),c.displacementMap&&(k.displacementMap.value=c.displacementMap,k.displacementScale.value=c.displacementScale,k.displacementBias.value=c.displacementBias),k.referencePosition.value.copy(c.referencePosition),k.nearDistance.value=
|
|
|
|
+c.nearDistance,k.farDistance.value=c.farDistance;else if(c.isMeshNormalMaterial)r(k,c),c.bumpMap&&(k.bumpMap.value=c.bumpMap,k.bumpScale.value=c.bumpScale,1===c.side&&(k.bumpScale.value*=-1)),c.normalMap&&(k.normalMap.value=c.normalMap,k.normalScale.value.copy(c.normalScale),1===c.side&&k.normalScale.value.negate()),c.displacementMap&&(k.displacementMap.value=c.displacementMap,k.displacementScale.value=c.displacementScale,k.displacementBias.value=c.displacementBias);else if(c.isLineBasicMaterial)k.diffuse.value.copy(c.color),
|
|
|
|
+k.opacity.value=c.opacity,c.isLineDashedMaterial&&(k.dashSize.value=c.dashSize,k.totalSize.value=c.dashSize+c.gapSize,k.scale.value=c.scale);else if(c.isPointsMaterial){k.diffuse.value.copy(c.color);k.opacity.value=c.opacity;k.size.value=c.size*R;k.scale.value=.5*K;c.map&&(k.map.value=c.map);c.alphaMap&&(k.alphaMap.value=c.alphaMap);if(c.map)var n=c.map;else c.alphaMap&&(n=c.alphaMap);void 0!==n&&(!0===n.matrixAutoUpdate&&n.updateMatrix(),k.uvTransform.value.copy(n.matrix))}else if(c.isSpriteMaterial){k.diffuse.value.copy(c.color);
|
|
|
|
+k.opacity.value=c.opacity;k.rotation.value=c.rotation;c.map&&(k.map.value=c.map);c.alphaMap&&(k.alphaMap.value=c.alphaMap);if(c.map)var w=c.map;else c.alphaMap&&(w=c.alphaMap);void 0!==w&&(!0===w.matrixAutoUpdate&&w.updateMatrix(),k.uvTransform.value.copy(w.matrix))}else c.isShadowMaterial&&(k.color.value.copy(c.color),k.opacity.value=c.opacity);void 0!==k.ltc_1&&(k.ltc_1.value=D.LTC_1);void 0!==k.ltc_2&&(k.ltc_2.value=D.LTC_2);Gb.upload(H,h.uniformsList,k,ea);c.isShaderMaterial&&(c.uniformsNeedUpdate=
|
|
|
|
+!1)}c.isShaderMaterial&&!0===c.uniformsNeedUpdate&&(Gb.upload(H,h.uniformsList,k,ea),c.uniformsNeedUpdate=!1);c.isSpriteMaterial&&g.setValue(H,"center",d.center);g.setValue(H,"modelViewMatrix",d.modelViewMatrix);g.setValue(H,"normalMatrix",d.normalMatrix);g.setValue(H,"modelMatrix",d.matrixWorld);return b}function r(a,b,c){a.opacity.value=b.opacity;b.color&&a.diffuse.value.copy(b.color);b.emissive&&a.emissive.value.copy(b.emissive).multiplyScalar(b.emissiveIntensity);b.map&&(a.map.value=b.map);b.alphaMap&&
|
|
|
|
+(a.alphaMap.value=b.alphaMap);b.specularMap&&(a.specularMap.value=b.specularMap);if(c=b.envMap||c)a.envMap.value=c,a.flipEnvMap.value=c.isCubeTexture?-1:1,a.reflectivity.value=b.reflectivity,a.refractionRatio.value=b.refractionRatio,a.maxMipLevel.value=aa.get(c).__maxMipLevel;b.lightMap&&(a.lightMap.value=b.lightMap,a.lightMapIntensity.value=b.lightMapIntensity);b.aoMap&&(a.aoMap.value=b.aoMap,a.aoMapIntensity.value=b.aoMapIntensity);if(b.map)var d=b.map;else b.specularMap?d=b.specularMap:b.displacementMap?
|
|
|
|
+d=b.displacementMap:b.normalMap?d=b.normalMap:b.bumpMap?d=b.bumpMap:b.roughnessMap?d=b.roughnessMap:b.metalnessMap?d=b.metalnessMap:b.alphaMap?d=b.alphaMap:b.emissiveMap&&(d=b.emissiveMap);void 0!==d&&(d.isWebGLRenderTarget&&(d=d.texture),!0===d.matrixAutoUpdate&&d.updateMatrix(),a.uvTransform.value.copy(d.matrix));if(b.aoMap)var e=b.aoMap;else b.lightMap&&(e=b.lightMap);void 0!==e&&(e.isWebGLRenderTarget&&(e=e.texture),!0===e.matrixAutoUpdate&&e.updateMatrix(),a.uv2Transform.value.copy(e.matrix))}
|
|
|
|
+function q(a,b,c){a.roughness.value=b.roughness;a.metalness.value=b.metalness;b.roughnessMap&&(a.roughnessMap.value=b.roughnessMap);b.metalnessMap&&(a.metalnessMap.value=b.metalnessMap);b.emissiveMap&&(a.emissiveMap.value=b.emissiveMap);b.bumpMap&&(a.bumpMap.value=b.bumpMap,a.bumpScale.value=b.bumpScale,1===b.side&&(a.bumpScale.value*=-1));b.normalMap&&(a.normalMap.value=b.normalMap,a.normalScale.value.copy(b.normalScale),1===b.side&&a.normalScale.value.negate());b.displacementMap&&(a.displacementMap.value=
|
|
|
|
+b.displacementMap,a.displacementScale.value=b.displacementScale,a.displacementBias.value=b.displacementBias);if(b.envMap||c)a.envMapIntensity.value=b.envMapIntensity}a=a||{};var t=void 0!==a.canvas?a.canvas:document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),F=void 0!==a.context?a.context:null,x=void 0!==a.alpha?a.alpha:!1,w=void 0!==a.depth?a.depth:!0,ha=void 0!==a.stencil?a.stencil:!0,U=void 0!==a.antialias?a.antialias:!1,Z=void 0!==a.premultipliedAlpha?a.premultipliedAlpha:!0,C=void 0!==
|
|
|
|
+a.preserveDrawingBuffer?a.preserveDrawingBuffer:!1,y=void 0!==a.powerPreference?a.powerPreference:"default",E=void 0!==a.failIfMajorPerformanceCaveat?a.failIfMajorPerformanceCaveat:!1,B=null,A=null;this.domElement=t;this.debug={checkShaderErrors:!0};this.sortObjects=this.autoClearStencil=this.autoClearDepth=this.autoClearColor=this.autoClear=!0;this.clippingPlanes=[];this.localClippingEnabled=!1;this.gammaFactor=2;this.outputEncoding=3E3;this.physicallyCorrectLights=!1;this.toneMapping=0;this.toneMappingWhitePoint=
|
|
|
|
+this.toneMappingExposure=1;this.maxMorphTargets=8;this.maxMorphNormals=4;var I=this,G=!1,N=null,O=0,J=0,L=null,X=null,Ie=-1;var fa=b=null;var Je=!1;var V=null,T=null,W=new ca,S=new ca,ja=null,da=t.width,K=t.height,R=1,ka=null,na=null,Q=new ca(0,0,da,K),ia=new ca(0,0,da,K),ig=!1,jg=new Ec,Ua=new qj,oa=!1,kg=!1,Id=new P,Jb=new n;try{x={alpha:x,depth:w,stencil:ha,antialias:U,premultipliedAlpha:Z,preserveDrawingBuffer:C,powerPreference:y,failIfMajorPerformanceCaveat:E,xrCompatible:!0};t.addEventListener("webglcontextlost",
|
|
|
|
+d,!1);t.addEventListener("webglcontextrestored",e,!1);var H=F||t.getContext("webgl",x)||t.getContext("experimental-webgl",x);if(null===H){if(null!==t.getContext("webgl"))throw Error("Error creating WebGL context with your selected attributes.");throw Error("Error creating WebGL context.");}void 0===H.getShaderPrecisionFormat&&(H.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(Yh){throw console.error("THREE.WebGLRenderer: "+Yh.message),Yh;}var ra,Ga,Y,ba,aa,ea,
|
|
|
|
+la,wa,sa,ta,xa,va,pa,ya,Aa,Ca,qa;c();var ua=new Xh(I,H);this.xr=ua;var Ea=new Uh(I,sa,Ga.maxTextureSize);this.shadowMap=Ea;this.getContext=function(){return H};this.getContextAttributes=function(){return H.getContextAttributes()};this.forceContextLoss=function(){var a=ra.get("WEBGL_lose_context");a&&a.loseContext()};this.forceContextRestore=function(){var a=ra.get("WEBGL_lose_context");a&&a.restoreContext()};this.getPixelRatio=function(){return R};this.setPixelRatio=function(a){void 0!==a&&(R=a,this.setSize(da,
|
|
|
|
+K,!1))};this.getSize=function(a){void 0===a&&(console.warn("WebGLRenderer: .getsize() now requires a Vector2 as an argument"),a=new v);return a.set(da,K)};this.setSize=function(a,b,c){ua.isPresenting?console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting."):(da=a,K=b,t.width=Math.floor(a*R),t.height=Math.floor(b*R),!1!==c&&(t.style.width=a+"px",t.style.height=b+"px"),this.setViewport(0,0,a,b))};this.getDrawingBufferSize=function(a){void 0===a&&(console.warn("WebGLRenderer: .getdrawingBufferSize() now requires a Vector2 as an argument"),
|
|
|
|
+a=new v);return a.set(da*R,K*R).floor()};this.setDrawingBufferSize=function(a,b,c){da=a;K=b;R=c;t.width=Math.floor(a*c);t.height=Math.floor(b*c);this.setViewport(0,0,a,b)};this.getCurrentViewport=function(a){void 0===a&&(console.warn("WebGLRenderer: .getCurrentViewport() now requires a Vector4 as an argument"),a=new ca);return a.copy(W)};this.getViewport=function(a){return a.copy(Q)};this.setViewport=function(a,b,c,d){a.isVector4?Q.set(a.x,a.y,a.z,a.w):Q.set(a,b,c,d);Y.viewport(W.copy(Q).multiplyScalar(R).floor())};
|
|
|
|
+this.getScissor=function(a){return a.copy(ia)};this.setScissor=function(a,b,c,d){a.isVector4?ia.set(a.x,a.y,a.z,a.w):ia.set(a,b,c,d);Y.scissor(S.copy(ia).multiplyScalar(R).floor())};this.getScissorTest=function(){return ig};this.setScissorTest=function(a){Y.setScissorTest(ig=a)};this.setOpaqueSort=function(a){ka=a};this.setTransparentSort=function(a){na=a};this.getClearColor=function(){return pa.getClearColor()};this.setClearColor=function(){pa.setClearColor.apply(pa,arguments)};this.getClearAlpha=
|
|
|
|
+function(){return pa.getClearAlpha()};this.setClearAlpha=function(){pa.setClearAlpha.apply(pa,arguments)};this.clear=function(a,b,c){var d=0;if(void 0===a||a)d|=16384;if(void 0===b||b)d|=256;if(void 0===c||c)d|=1024;H.clear(d)};this.clearColor=function(){this.clear(!0,!1,!1)};this.clearDepth=function(){this.clear(!1,!0,!1)};this.clearStencil=function(){this.clear(!1,!1,!0)};this.dispose=function(){t.removeEventListener("webglcontextlost",d,!1);t.removeEventListener("webglcontextrestored",e,!1);xa.dispose();
|
|
|
|
+va.dispose();aa.dispose();sa.dispose();ua.dispose();za.stop()};this.renderBufferImmediate=function(a,b){Y.initAttributes();var c=aa.get(a);a.hasPositions&&!c.position&&(c.position=H.createBuffer());a.hasNormals&&!c.normal&&(c.normal=H.createBuffer());a.hasUvs&&!c.uv&&(c.uv=H.createBuffer());a.hasColors&&!c.color&&(c.color=H.createBuffer());b=b.getAttributes();a.hasPositions&&(H.bindBuffer(34962,c.position),H.bufferData(34962,a.positionArray,35048),Y.enableAttribute(b.position),H.vertexAttribPointer(b.position,
|
|
|
|
+3,5126,!1,0,0));a.hasNormals&&(H.bindBuffer(34962,c.normal),H.bufferData(34962,a.normalArray,35048),Y.enableAttribute(b.normal),H.vertexAttribPointer(b.normal,3,5126,!1,0,0));a.hasUvs&&(H.bindBuffer(34962,c.uv),H.bufferData(34962,a.uvArray,35048),Y.enableAttribute(b.uv),H.vertexAttribPointer(b.uv,2,5126,!1,0,0));a.hasColors&&(H.bindBuffer(34962,c.color),H.bufferData(34962,a.colorArray,35048),Y.enableAttribute(b.color),H.vertexAttribPointer(b.color,3,5126,!1,0,0));Y.disableUnusedAttributes();H.drawArrays(4,
|
|
|
|
+0,a.count);a.count=0};var Ha=new ob;this.renderBufferDirect=function(a,c,d,e,f,g){null===c&&(c=Ha);var h=f.isMesh&&0>f.matrixWorld.determinant(),k=u(a,c,e,f);Y.setMaterial(e,h);var m=!1;if(b!==d.id||fa!==k.id||Je!==(!0===e.wireframe))b=d.id,fa=k.id,Je=!0===e.wireframe,m=!0;if(e.morphTargets||e.morphNormals)ya.update(f,d,e,k),m=!0;!0===f.isInstancedMesh&&(m=!0);a=d.index;c=d.attributes.position;if(null===a){if(void 0===c||0===c.count)return}else if(0===a.count)return;var p=1;!0===e.wireframe&&(a=wa.getWireframeAttribute(d),
|
|
|
|
+p=2);h=Aa;if(null!==a){var l=la.get(a);h=Ca;h.setIndex(l)}if(m){if(!1!==Ga.isWebGL2||!f.isInstancedMesh&&!d.isInstancedBufferGeometry||null!==ra.get("ANGLE_instanced_arrays")){Y.initAttributes();m=d.attributes;k=k.getAttributes();var z=e.defaultAttributeValues;for(ha in k){var q=k[ha];if(0<=q){var r=m[ha];if(void 0!==r){var t=r.normalized,n=r.itemSize,w=la.get(r);if(void 0!==w){var F=w.buffer,x=w.type;w=w.bytesPerElement;if(r.isInterleavedBufferAttribute){var v=r.data,C=v.stride;r=r.offset;v&&v.isInstancedInterleavedBuffer?
|
|
|
|
+(Y.enableAttributeAndDivisor(q,v.meshPerAttribute),void 0===d.maxInstancedCount&&(d.maxInstancedCount=v.meshPerAttribute*v.count)):Y.enableAttribute(q);H.bindBuffer(34962,F);Y.vertexAttribPointer(q,n,x,t,C*w,r*w)}else r.isInstancedBufferAttribute?(Y.enableAttributeAndDivisor(q,r.meshPerAttribute),void 0===d.maxInstancedCount&&(d.maxInstancedCount=r.meshPerAttribute*r.count)):Y.enableAttribute(q),H.bindBuffer(34962,F),Y.vertexAttribPointer(q,n,x,t,0,0)}}else if("instanceMatrix"===ha)w=la.get(f.instanceMatrix),
|
|
|
|
+void 0!==w&&(F=w.buffer,x=w.type,Y.enableAttributeAndDivisor(q+0,1),Y.enableAttributeAndDivisor(q+1,1),Y.enableAttributeAndDivisor(q+2,1),Y.enableAttributeAndDivisor(q+3,1),H.bindBuffer(34962,F),H.vertexAttribPointer(q+0,4,x,!1,64,0),H.vertexAttribPointer(q+1,4,x,!1,64,16),H.vertexAttribPointer(q+2,4,x,!1,64,32),H.vertexAttribPointer(q+3,4,x,!1,64,48));else if(void 0!==z&&(t=z[ha],void 0!==t))switch(t.length){case 2:H.vertexAttrib2fv(q,t);break;case 3:H.vertexAttrib3fv(q,t);break;case 4:H.vertexAttrib4fv(q,
|
|
|
|
+t);break;default:H.vertexAttrib1fv(q,t)}}}Y.disableUnusedAttributes()}null!==a&&H.bindBuffer(34963,l.buffer)}var ha=d.drawRange.start*p;m=null!==g?g.start*p:0;l=Math.max(ha,m);g=Math.max(0,Math.min(null!==a?a.count:c.count,ha+d.drawRange.count*p,m+(null!==g?g.count*p:Infinity))-1-l+1);0!==g&&(f.isMesh?!0===e.wireframe?(Y.setLineWidth(e.wireframeLinewidth*(null===L?R:1)),h.setMode(1)):h.setMode(4):f.isLine?(e=e.linewidth,void 0===e&&(e=1),Y.setLineWidth(e*(null===L?R:1)),f.isLineSegments?h.setMode(1):
|
|
|
|
+f.isLineLoop?h.setMode(2):h.setMode(3)):f.isPoints?h.setMode(0):f.isSprite&&h.setMode(4),f.isInstancedMesh?h.renderInstances(d,l,g,f.count):d.isInstancedBufferGeometry?h.renderInstances(d,l,g,d.maxInstancedCount):h.render(l,g))};this.compile=function(a,b){A=va.get(a,b);A.init();a.traverse(function(a){a.isLight&&(A.pushLight(a),a.castShadow&&A.pushShadow(a))});A.setupLights(b);var c={};a.traverse(function(b){if(b.material)if(Array.isArray(b.material))for(var d=0;d<b.material.length;d++)!1===b.material[d].uuid in
|
|
|
|
+c&&(p(b.material[d],a,b),c[b.material[d].uuid]=!0);else!1===b.material.uuid in c&&(p(b.material,a,b),c[b.material.uuid]=!0)})};var Da=null,za=new xh;za.setAnimationLoop(function(a){ua.isPresenting||Da&&Da(a)});"undefined"!==typeof window&&za.setContext(window);this.setAnimationLoop=function(a){Da=a;ua.setAnimationLoop(a);za.start()};this.render=function(a,c,d,e){if(void 0!==d){console.warn("THREE.WebGLRenderer.render(): the renderTarget argument has been removed. Use .setRenderTarget() instead.");
|
|
|
|
+var f=d}if(void 0!==e){console.warn("THREE.WebGLRenderer.render(): the forceClear argument has been removed. Use .clear() instead.");var g=e}c&&c.isCamera?G||(fa=b=null,Je=!1,Ie=-1,V=null,!0===a.autoUpdate&&a.updateMatrixWorld(),null===c.parent&&c.updateMatrixWorld(),ua.enabled&&ua.isPresenting&&(c=ua.getCamera(c)),a.onBeforeRender(I,a,c,f||L),A=va.get(a,c),A.init(),Id.multiplyMatrices(c.projectionMatrix,c.matrixWorldInverse),jg.setFromProjectionMatrix(Id),kg=this.localClippingEnabled,oa=Ua.init(this.clippingPlanes,
|
|
|
|
+kg,c),B=xa.get(a,c),B.init(),k(a,c,0,I.sortObjects),B.finish(),!0===I.sortObjects&&B.sort(ka,na),oa&&Ua.beginShadows(),Ea.render(A.state.shadowsArray,a,c),A.setupLights(c),oa&&Ua.endShadows(),this.info.autoReset&&this.info.reset(),void 0!==f&&this.setRenderTarget(f),pa.render(B,a,c,g),d=B.opaque,e=B.transparent,a.overrideMaterial?(f=a.overrideMaterial,d.length&&m(d,a,c,f),e.length&&m(e,a,c,f)):(d.length&&m(d,a,c),e.length&&m(e,a,c)),a.onAfterRender(I,a,c),null!==L&&(ea.updateRenderTargetMipmap(L),
|
|
|
|
+ea.updateMultisampleRenderTarget(L)),Y.buffers.depth.setTest(!0),Y.buffers.depth.setMask(!0),Y.buffers.color.setMask(!0),Y.setPolygonOffset(!1),A=B=null):console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.")};this.setFramebuffer=function(a){N!==a&&null===L&&H.bindFramebuffer(36160,a);N=a};this.getActiveCubeFace=function(){return O};this.getActiveMipmapLevel=function(){return J};this.getRenderTarget=function(){return L};this.setRenderTarget=function(a,b,c){L=a;O=b;
|
|
|
|
+J=c;a&&void 0===aa.get(a).__webglFramebuffer&&ea.setupRenderTarget(a);var d=N,e=!1;a?(d=aa.get(a).__webglFramebuffer,a.isWebGLCubeRenderTarget?(d=d[b||0],e=!0):d=a.isWebGLMultisampleRenderTarget?aa.get(a).__webglMultisampledFramebuffer:d,W.copy(a.viewport),S.copy(a.scissor),ja=a.scissorTest):(W.copy(Q).multiplyScalar(R).floor(),S.copy(ia).multiplyScalar(R).floor(),ja=ig);X!==d&&(H.bindFramebuffer(36160,d),X=d);Y.viewport(W);Y.scissor(S);Y.setScissorTest(ja);e&&(a=aa.get(a.texture),H.framebufferTexture2D(36160,
|
|
|
|
+36064,34069+(b||0),a.__webglTexture,c||0))};this.readRenderTargetPixels=function(a,b,c,d,e,f,g){if(a&&a.isWebGLRenderTarget){var h=aa.get(a).__webglFramebuffer;a.isWebGLCubeRenderTarget&&void 0!==g&&(h=h[g]);if(h){g=!1;h!==X&&(H.bindFramebuffer(36160,h),g=!0);try{var k=a.texture,m=k.format,p=k.type;1023!==m&&qa.convert(m)!==H.getParameter(35739)?console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format."):1009===p||qa.convert(p)===H.getParameter(35738)||
|
|
|
|
+1015===p&&(Ga.isWebGL2||ra.get("OES_texture_float")||ra.get("WEBGL_color_buffer_float"))||1016===p&&(Ga.isWebGL2?ra.get("EXT_color_buffer_float"):ra.get("EXT_color_buffer_half_float"))?36053===H.checkFramebufferStatus(36160)?0<=b&&b<=a.width-d&&0<=c&&c<=a.height-e&&H.readPixels(b,c,d,e,qa.convert(m),qa.convert(p),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{g&&
|
|
|
|
+H.bindFramebuffer(36160,X)}}}else console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.")};this.copyFramebufferToTexture=function(a,b,c){void 0===c&&(c=0);var d=Math.pow(2,-c),e=Math.floor(b.image.width*d);d=Math.floor(b.image.height*d);var f=qa.convert(b.format);ea.setTexture2D(b,0);H.copyTexImage2D(3553,c,f,a.x,a.y,e,d,0);Y.unbindTexture()};this.copyTextureToTexture=function(a,b,c,d){void 0===d&&(d=0);var e=b.image.width,f=b.image.height,g=qa.convert(c.format),
|
|
|
|
+h=qa.convert(c.type);ea.setTexture2D(c,0);b.isDataTexture?H.texSubImage2D(3553,d,a.x,a.y,e,f,g,h,b.image.data):b.isCompressedTexture?H.compressedTexSubImage2D(3553,d,a.x,a.y,b.mipmaps[0].width,b.mipmaps[0].height,g,b.mipmaps[0].data):H.texSubImage2D(3553,d,a.x,a.y,g,h,b.image);0===d&&c.generateMipmaps&&H.generateMipmap(3553);Y.unbindTexture()};this.initTexture=function(a){ea.setTexture2D(a,0);Y.unbindTexture()};"undefined"!==typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",
|
|
|
|
+{detail:this}))}function Me(a,b){this.name="";this.color=new A(a);this.density=void 0!==b?b:2.5E-4}function Ne(a,b,c){this.name="";this.color=new A(a);this.near=void 0!==b?b:1;this.far=void 0!==c?c:1E3}function qb(a,b){this.array=a;this.stride=b;this.count=void 0!==a?a.length/b:0;this.usage=35044;this.updateRange={offset:0,count:-1};this.version=0}function Kd(a,b,c,d){this.data=a;this.itemSize=b;this.offset=c;this.normalized=!0===d}function Kb(a){J.call(this);this.type="SpriteMaterial";this.color=
|
|
|
|
+new A(16777215);this.alphaMap=this.map=null;this.rotation=0;this.transparent=this.sizeAttenuation=!0;this.setValues(a)}function Ld(a){E.call(this);this.type="Sprite";if(void 0===Kc){Kc=new B;var b=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]);b=new qb(b,5);Kc.setIndex([0,1,2,0,2,3]);Kc.setAttribute("position",new Kd(b,3,0,!1));Kc.setAttribute("uv",new Kd(b,2,3,!1))}this.geometry=Kc;this.material=void 0!==a?a:new Kb;this.center=new v(.5,.5)}function Oe(a,b,c,d,e,f){Lc.subVectors(a,
|
|
|
|
+c).addScalar(.5).multiply(d);void 0!==e?(Md.x=f*Lc.x-e*Lc.y,Md.y=e*Lc.x+f*Lc.y):Md.copy(Lc);a.copy(b);a.x+=Md.x;a.y+=Md.y;a.applyMatrix4(Zh)}function Nd(){E.call(this);this._currentLevel=0;this.type="LOD";Object.defineProperties(this,{levels:{enumerable:!0,value:[]}});this.autoUpdate=!0}function Pe(a,b){a&&a.isGeometry&&console.error("THREE.SkinnedMesh no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");ja.call(this,a,b);this.type="SkinnedMesh";this.bindMode="attached";this.bindMatrix=
|
|
|
|
+new P;this.bindMatrixInverse=new P}function Qe(a,b){a=a||[];this.bones=a.slice(0);this.boneMatrices=new Float32Array(16*this.bones.length);this.frame=-1;if(void 0===b)this.calculateInverses();else if(this.bones.length===b.length)this.boneInverses=b.slice(0);else for(console.warn("THREE.Skeleton boneInverses is the wrong length."),this.boneInverses=[],a=0,b=this.bones.length;a<b;a++)this.boneInverses.push(new P)}function ng(){E.call(this);this.type="Bone"}function Re(a,b,c){ja.call(this,a,b);this.instanceMatrix=
|
|
|
|
+new N(new Float32Array(16*c),16);this.count=c;this.frustumCulled=!1}function da(a){J.call(this);this.type="LineBasicMaterial";this.color=new A(16777215);this.linewidth=1;this.linejoin=this.linecap="round";this.setValues(a)}function Ja(a,b,c){1===c&&console.error("THREE.Line: parameter THREE.LinePieces no longer supported. Use THREE.LineSegments instead.");E.call(this);this.type="Line";this.geometry=void 0!==a?a:new B;this.material=void 0!==b?b:new da}function na(a,b){Ja.call(this,a,b);this.type="LineSegments"}
|
|
|
|
+function Se(a,b){Ja.call(this,a,b);this.type="LineLoop"}function Va(a){J.call(this);this.type="PointsMaterial";this.color=new A(16777215);this.alphaMap=this.map=null;this.size=1;this.sizeAttenuation=!0;this.morphTargets=!1;this.setValues(a)}function Mc(a,b){E.call(this);this.type="Points";this.geometry=void 0!==a?a:new B;this.material=void 0!==b?b:new Va;this.updateMorphTargets()}function og(a,b,c,d,e,f,g){var h=pg.distanceSqToPoint(a);h<c&&(c=new n,pg.closestPointToPoint(a,c),c.applyMatrix4(d),a=
|
|
|
|
+e.ray.origin.distanceTo(c),a<e.near||a>e.far||f.push({distance:a,distanceToRay:Math.sqrt(h),point:c,index:b,face:null,object:g}))}function qg(a,b,c,d,e,f,g,h,k){V.call(this,a,b,c,d,e,f,g,h,k);this.format=void 0!==g?g:1022;this.minFilter=void 0!==f?f:1006;this.magFilter=void 0!==e?e:1006;this.generateMipmaps=!1}function Nc(a,b,c,d,e,f,g,h,k,m,l,p){V.call(this,null,f,g,h,k,m,d,e,l,p);this.image={width:b,height:c};this.mipmaps=a;this.generateMipmaps=this.flipY=!1}function Od(a,b,c,d,e,f,g,h,k){V.call(this,
|
|
|
|
+a,b,c,d,e,f,g,h,k);this.needsUpdate=!0}function Pd(a,b,c,d,e,f,g,h,k,m){m=void 0!==m?m:1026;if(1026!==m&&1027!==m)throw Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===c&&1026===m&&(c=1012);void 0===c&&1027===m&&(c=1020);V.call(this,null,d,e,f,g,h,m,c,k);this.image={width:a,height:b};this.magFilter=void 0!==g?g:1003;this.minFilter=void 0!==h?h:1003;this.generateMipmaps=this.flipY=!1}function Oc(a){B.call(this);this.type="WireframeGeometry";var b=
|
|
|
|
+[],c,d,e,f=[0,0],g={},h=["a","b","c"];if(a&&a.isGeometry){var k=a.faces;var m=0;for(d=k.length;m<d;m++){var l=k[m];for(c=0;3>c;c++){var p=l[h[c]];var u=l[h[(c+1)%3]];f[0]=Math.min(p,u);f[1]=Math.max(p,u);p=f[0]+","+f[1];void 0===g[p]&&(g[p]={index1:f[0],index2:f[1]})}}for(p in g)m=g[p],h=a.vertices[m.index1],b.push(h.x,h.y,h.z),h=a.vertices[m.index2],b.push(h.x,h.y,h.z)}else if(a&&a.isBufferGeometry)if(h=new n,null!==a.index){k=a.attributes.position;l=a.index;var r=a.groups;0===r.length&&(r=[{start:0,
|
|
|
|
+count:l.count,materialIndex:0}]);a=0;for(e=r.length;a<e;++a)for(m=r[a],c=m.start,d=m.count,m=c,d=c+d;m<d;m+=3)for(c=0;3>c;c++)p=l.getX(m+c),u=l.getX(m+(c+1)%3),f[0]=Math.min(p,u),f[1]=Math.max(p,u),p=f[0]+","+f[1],void 0===g[p]&&(g[p]={index1:f[0],index2:f[1]});for(p in g)m=g[p],h.fromBufferAttribute(k,m.index1),b.push(h.x,h.y,h.z),h.fromBufferAttribute(k,m.index2),b.push(h.x,h.y,h.z)}else for(k=a.attributes.position,m=0,d=k.count/3;m<d;m++)for(c=0;3>c;c++)g=3*m+c,h.fromBufferAttribute(k,g),b.push(h.x,
|
|
|
|
+h.y,h.z),g=3*m+(c+1)%3,h.fromBufferAttribute(k,g),b.push(h.x,h.y,h.z);this.setAttribute("position",new y(b,3))}function Qd(a,b,c){O.call(this);this.type="ParametricGeometry";this.parameters={func:a,slices:b,stacks:c};this.fromBufferGeometry(new Pc(a,b,c));this.mergeVertices()}function Pc(a,b,c){B.call(this);this.type="ParametricBufferGeometry";this.parameters={func:a,slices:b,stacks:c};var d=[],e=[],f=[],g=[],h=new n,k=new n,m=new n,l=new n,p=new n,u,r;3>a.length&&console.error("THREE.ParametricGeometry: Function must now modify a Vector3 as third parameter.");
|
|
|
|
+var q=b+1;for(u=0;u<=c;u++){var t=u/c;for(r=0;r<=b;r++){var F=r/b;a(F,t,k);e.push(k.x,k.y,k.z);0<=F-1E-5?(a(F-1E-5,t,m),l.subVectors(k,m)):(a(F+1E-5,t,m),l.subVectors(m,k));0<=t-1E-5?(a(F,t-1E-5,m),p.subVectors(k,m)):(a(F,t+1E-5,m),p.subVectors(m,k));h.crossVectors(l,p).normalize();f.push(h.x,h.y,h.z);g.push(F,t)}}for(u=0;u<c;u++)for(r=0;r<b;r++)a=u*q+r+1,h=(u+1)*q+r+1,k=(u+1)*q+r,d.push(u*q+r,a,k),d.push(a,h,k);this.setIndex(d);this.setAttribute("position",new y(e,3));this.setAttribute("normal",
|
|
|
|
+new y(f,3));this.setAttribute("uv",new y(g,2))}function Rd(a,b,c,d){O.call(this);this.type="PolyhedronGeometry";this.parameters={vertices:a,indices:b,radius:c,detail:d};this.fromBufferGeometry(new Ea(a,b,c,d));this.mergeVertices()}function Ea(a,b,c,d){function e(a){h.push(a.x,a.y,a.z)}function f(b,c){b*=3;c.x=a[b+0];c.y=a[b+1];c.z=a[b+2]}function g(a,b,c,d){0>d&&1===a.x&&(k[b]=a.x-1);0===c.x&&0===c.z&&(k[b]=d/2/Math.PI+.5)}B.call(this);this.type="PolyhedronBufferGeometry";this.parameters={vertices:a,
|
|
|
|
+indices:b,radius:c,detail:d};c=c||1;d=d||0;var h=[],k=[];(function(a){for(var c=new n,d=new n,g=new n,h=0;h<b.length;h+=3){f(b[h+0],c);f(b[h+1],d);f(b[h+2],g);var k,m,l=c,x=d,w=g,v=Math.pow(2,a),U=[];for(m=0;m<=v;m++){U[m]=[];var Z=l.clone().lerp(w,m/v),C=x.clone().lerp(w,m/v),A=v-m;for(k=0;k<=A;k++)U[m][k]=0===k&&m===v?Z:Z.clone().lerp(C,k/A)}for(m=0;m<v;m++)for(k=0;k<2*(v-m)-1;k++)l=Math.floor(k/2),0===k%2?(e(U[m][l+1]),e(U[m+1][l]),e(U[m][l])):(e(U[m][l+1]),e(U[m+1][l+1]),e(U[m+1][l]))}})(d);(function(a){for(var b=
|
|
|
|
+new n,c=0;c<h.length;c+=3)b.x=h[c+0],b.y=h[c+1],b.z=h[c+2],b.normalize().multiplyScalar(a),h[c+0]=b.x,h[c+1]=b.y,h[c+2]=b.z})(c);(function(){for(var a=new n,b=0;b<h.length;b+=3)a.x=h[b+0],a.y=h[b+1],a.z=h[b+2],k.push(Math.atan2(a.z,-a.x)/2/Math.PI+.5,1-(Math.atan2(-a.y,Math.sqrt(a.x*a.x+a.z*a.z))/Math.PI+.5));a=new n;b=new n;for(var c=new n,d=new n,e=new v,f=new v,l=new v,F=0,x=0;F<h.length;F+=9,x+=6){a.set(h[F+0],h[F+1],h[F+2]);b.set(h[F+3],h[F+4],h[F+5]);c.set(h[F+6],h[F+7],h[F+8]);e.set(k[x+0],
|
|
|
|
+k[x+1]);f.set(k[x+2],k[x+3]);l.set(k[x+4],k[x+5]);d.copy(a).add(b).add(c).divideScalar(3);var w=Math.atan2(d.z,-d.x);g(e,x+0,a,w);g(f,x+2,b,w);g(l,x+4,c,w)}for(a=0;a<k.length;a+=6)b=k[a+0],c=k[a+2],d=k[a+4],e=Math.min(b,c,d),.9<Math.max(b,c,d)&&.1>e&&(.2>b&&(k[a+0]+=1),.2>c&&(k[a+2]+=1),.2>d&&(k[a+4]+=1))})();this.setAttribute("position",new y(h,3));this.setAttribute("normal",new y(h.slice(),3));this.setAttribute("uv",new y(k,2));0===d?this.computeVertexNormals():this.normalizeNormals()}function Sd(a,
|
|
|
|
+b){O.call(this);this.type="TetrahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new Qc(a,b));this.mergeVertices()}function Qc(a,b){Ea.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],a,b);this.type="TetrahedronBufferGeometry";this.parameters={radius:a,detail:b}}function Td(a,b){O.call(this);this.type="OctahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new ac(a,b));this.mergeVertices()}function ac(a,b){Ea.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],a,b);this.type="OctahedronBufferGeometry";this.parameters={radius:a,detail:b}}function Ud(a,b){O.call(this);this.type="IcosahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new Rc(a,b));this.mergeVertices()}function Rc(a,b){var c=(1+Math.sqrt(5))/2;Ea.call(this,[-1,c,0,1,c,0,-1,-c,0,1,-c,0,0,-1,c,0,1,c,0,-1,-c,0,1,-c,c,0,-1,c,0,1,-c,0,-1,-c,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],a,b);this.type="IcosahedronBufferGeometry";this.parameters={radius:a,detail:b}}function Vd(a,b){O.call(this);this.type="DodecahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new Sc(a,b));this.mergeVertices()}function Sc(a,b){var c=(1+Math.sqrt(5))/2,d=1/c;Ea.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,-d,-c,0,-d,c,0,d,-c,0,d,c,-d,-c,0,-d,c,0,d,-c,0,d,c,
|
|
|
|
+0,-c,0,-d,c,0,-d,-c,0,d,c,0,d],[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],a,b);this.type="DodecahedronBufferGeometry";this.parameters={radius:a,detail:b}}function Wd(a,b,c,d,e,f){O.call(this);this.type="TubeGeometry";this.parameters={path:a,tubularSegments:b,radius:c,radialSegments:d,
|
|
|
|
+closed:e};void 0!==f&&console.warn("THREE.TubeGeometry: taper has been removed.");a=new bc(a,b,c,d,e);this.tangents=a.tangents;this.normals=a.normals;this.binormals=a.binormals;this.fromBufferGeometry(a);this.mergeVertices()}function bc(a,b,c,d,e){function f(e){l=a.getPointAt(e/b,l);var f=g.normals[e];e=g.binormals[e];for(u=0;u<=d;u++){var m=u/d*Math.PI*2,p=Math.sin(m);m=-Math.cos(m);k.x=m*f.x+p*e.x;k.y=m*f.y+p*e.y;k.z=m*f.z+p*e.z;k.normalize();q.push(k.x,k.y,k.z);h.x=l.x+c*k.x;h.y=l.y+c*k.y;h.z=
|
|
|
|
+l.z+c*k.z;r.push(h.x,h.y,h.z)}}B.call(this);this.type="TubeBufferGeometry";this.parameters={path:a,tubularSegments:b,radius:c,radialSegments:d,closed:e};b=b||64;c=c||1;d=d||8;e=e||!1;var g=a.computeFrenetFrames(b,e);this.tangents=g.tangents;this.normals=g.normals;this.binormals=g.binormals;var h=new n,k=new n,m=new v,l=new n,p,u,r=[],q=[],t=[],F=[];for(p=0;p<b;p++)f(p);f(!1===e?b:0);for(p=0;p<=b;p++)for(u=0;u<=d;u++)m.x=p/b,m.y=u/d,t.push(m.x,m.y);(function(){for(u=1;u<=b;u++)for(p=1;p<=d;p++){var a=
|
|
|
|
+(d+1)*u+(p-1),c=(d+1)*u+p,e=(d+1)*(u-1)+p;F.push((d+1)*(u-1)+(p-1),a,e);F.push(a,c,e)}})();this.setIndex(F);this.setAttribute("position",new y(r,3));this.setAttribute("normal",new y(q,3));this.setAttribute("uv",new y(t,2))}function Xd(a,b,c,d,e,f,g){O.call(this);this.type="TorusKnotGeometry";this.parameters={radius:a,tube:b,tubularSegments:c,radialSegments:d,p:e,q:f};void 0!==g&&console.warn("THREE.TorusKnotGeometry: heightScale has been deprecated. Use .scale( x, y, z ) instead.");this.fromBufferGeometry(new Tc(a,
|
|
|
|
+b,c,d,e,f));this.mergeVertices()}function Tc(a,b,c,d,e,f){function g(a,b,c,d,e){var f=Math.sin(a);b=c/b*a;c=Math.cos(b);e.x=d*(2+c)*.5*Math.cos(a);e.y=d*(2+c)*f*.5;e.z=d*Math.sin(b)*.5}B.call(this);this.type="TorusKnotBufferGeometry";this.parameters={radius:a,tube:b,tubularSegments:c,radialSegments:d,p:e,q:f};a=a||1;b=b||.4;c=Math.floor(c)||64;d=Math.floor(d)||8;e=e||2;f=f||3;var h=[],k=[],m=[],l=[],p,u=new n,r=new n,q=new n,t=new n,F=new n,x=new n,w=new n;for(p=0;p<=c;++p){var v=p/c*e*Math.PI*2;
|
|
|
|
+g(v,e,f,a,q);g(v+.01,e,f,a,t);x.subVectors(t,q);w.addVectors(t,q);F.crossVectors(x,w);w.crossVectors(F,x);F.normalize();w.normalize();for(v=0;v<=d;++v){var U=v/d*Math.PI*2,Z=-b*Math.cos(U);U=b*Math.sin(U);u.x=q.x+(Z*w.x+U*F.x);u.y=q.y+(Z*w.y+U*F.y);u.z=q.z+(Z*w.z+U*F.z);k.push(u.x,u.y,u.z);r.subVectors(u,q).normalize();m.push(r.x,r.y,r.z);l.push(p/c);l.push(v/d)}}for(v=1;v<=c;v++)for(p=1;p<=d;p++)a=(d+1)*v+(p-1),b=(d+1)*v+p,e=(d+1)*(v-1)+p,h.push((d+1)*(v-1)+(p-1),a,e),h.push(a,b,e);this.setIndex(h);
|
|
|
|
+this.setAttribute("position",new y(k,3));this.setAttribute("normal",new y(m,3));this.setAttribute("uv",new y(l,2))}function Yd(a,b,c,d,e){O.call(this);this.type="TorusGeometry";this.parameters={radius:a,tube:b,radialSegments:c,tubularSegments:d,arc:e};this.fromBufferGeometry(new Uc(a,b,c,d,e));this.mergeVertices()}function Uc(a,b,c,d,e){B.call(this);this.type="TorusBufferGeometry";this.parameters={radius:a,tube:b,radialSegments:c,tubularSegments:d,arc:e};a=a||1;b=b||.4;c=Math.floor(c)||8;d=Math.floor(d)||
|
|
|
|
+6;e=e||2*Math.PI;var f=[],g=[],h=[],k=[],m=new n,l=new n,p=new n,u,r;for(u=0;u<=c;u++)for(r=0;r<=d;r++){var q=r/d*e,t=u/c*Math.PI*2;l.x=(a+b*Math.cos(t))*Math.cos(q);l.y=(a+b*Math.cos(t))*Math.sin(q);l.z=b*Math.sin(t);g.push(l.x,l.y,l.z);m.x=a*Math.cos(q);m.y=a*Math.sin(q);p.subVectors(l,m).normalize();h.push(p.x,p.y,p.z);k.push(r/d);k.push(u/c)}for(u=1;u<=c;u++)for(r=1;r<=d;r++)a=(d+1)*(u-1)+r-1,b=(d+1)*(u-1)+r,e=(d+1)*u+r,f.push((d+1)*u+r-1,a,e),f.push(a,b,e);this.setIndex(f);this.setAttribute("position",
|
|
|
|
+new y(g,3));this.setAttribute("normal",new y(h,3));this.setAttribute("uv",new y(k,2))}function $h(a,b,c,d,e){for(var f,g=0,h=b,k=c-d;h<c;h+=d)g+=(a[k]-a[h])*(a[h+1]+a[k+1]),k=h;if(e===0<g)for(e=b;e<c;e+=d)f=ai(e,a[e],a[e+1],f);else for(e=c-d;e>=b;e-=d)f=ai(e,a[e],a[e+1],f);f&&Te(f,f.next)&&(Zd(f),f=f.next);return f}function Lb(a,b){if(!a)return a;b||(b=a);do{var c=!1;if(a.steiner||!Te(a,a.next)&&0!==Q(a.prev,a,a.next))a=a.next;else{Zd(a);a=b=a.prev;if(a===a.next)break;c=!0}}while(c||a!==b);return b}
|
|
|
|
+function $d(a,b,c,d,e,f,g){if(a){if(!g&&f){var h=a,k=h;do null===k.z&&(k.z=rg(k.x,k.y,d,e,f)),k.prevZ=k.prev,k=k.nextZ=k.next;while(k!==h);k.prevZ.nextZ=null;k.prevZ=null;h=k;var m,l,p,u,r=1;do{k=h;var q=h=null;for(l=0;k;){l++;var n=k;for(m=p=0;m<r&&(p++,n=n.nextZ,n);m++);for(u=r;0<p||0<u&&n;)0!==p&&(0===u||!n||k.z<=n.z)?(m=k,k=k.nextZ,p--):(m=n,n=n.nextZ,u--),q?q.nextZ=m:h=m,m.prevZ=q,q=m;k=n}q.nextZ=null;r*=2}while(1<l)}for(h=a;a.prev!==a.next;){k=a.prev;n=a.next;if(f)q=Ck(a,d,e,f);else a:if(q=
|
|
|
|
+a,l=q.prev,p=q,r=q.next,0<=Q(l,p,r))q=!1;else{for(m=q.next.next;m!==q.prev;){if(Vc(l.x,l.y,p.x,p.y,r.x,r.y,m.x,m.y)&&0<=Q(m.prev,m,m.next)){q=!1;break a}m=m.next}q=!0}if(q)b.push(k.i/c),b.push(a.i/c),b.push(n.i/c),Zd(a),h=a=n.next;else if(a=n,a===h){if(!g)$d(Lb(a),b,c,d,e,f,1);else if(1===g){a=Lb(a);g=b;h=c;k=a;do n=k.prev,q=k.next.next,!Te(n,q)&&bi(n,k,k.next,q)&&ae(n,q)&&ae(q,n)&&(g.push(n.i/h),g.push(k.i/h),g.push(q.i/h),Zd(k),Zd(k.next),k=a=q),k=k.next;while(k!==a);a=Lb(k);$d(a,b,c,d,e,f,2)}else if(2===
|
|
|
|
+g)a:{g=a;do{for(h=g.next.next;h!==g.prev;){if(k=g.i!==h.i){k=g;n=h;if(q=k.next.i!==n.i&&k.prev.i!==n.i){b:{q=k;do{if(q.i!==k.i&&q.next.i!==k.i&&q.i!==n.i&&q.next.i!==n.i&&bi(q,q.next,k,n)){q=!0;break b}q=q.next}while(q!==k);q=!1}q=!q}if(q){if(q=ae(k,n)&&ae(n,k)){q=k;l=!1;p=(k.x+n.x)/2;r=(k.y+n.y)/2;do q.y>r!==q.next.y>r&&q.next.y!==q.y&&p<(q.next.x-q.x)*(r-q.y)/(q.next.y-q.y)+q.x&&(l=!l),q=q.next;while(q!==k);q=l}q=q&&(Q(k.prev,k,n.prev)||Q(k,n.prev,n))||Te(k,n)&&0<Q(k.prev,k,k.next)&&0<Q(n.prev,
|
|
|
|
+n,n.next)}k=q}if(k){a=ci(g,h);g=Lb(g,g.next);a=Lb(a,a.next);$d(g,b,c,d,e,f);$d(a,b,c,d,e,f);break a}h=h.next}g=g.next}while(g!==a)}break}}}}function Ck(a,b,c,d){var e=a.prev,f=a.next;if(0<=Q(e,a,f))return!1;var g=e.x>a.x?e.x>f.x?e.x:f.x:a.x>f.x?a.x:f.x,h=e.y>a.y?e.y>f.y?e.y:f.y:a.y>f.y?a.y:f.y,k=rg(e.x<a.x?e.x<f.x?e.x:f.x:a.x<f.x?a.x:f.x,e.y<a.y?e.y<f.y?e.y:f.y:a.y<f.y?a.y:f.y,b,c,d);b=rg(g,h,b,c,d);c=a.prevZ;for(d=a.nextZ;c&&c.z>=k&&d&&d.z<=b;){if(c!==a.prev&&c!==a.next&&Vc(e.x,e.y,a.x,a.y,f.x,f.y,
|
|
|
|
+c.x,c.y)&&0<=Q(c.prev,c,c.next))return!1;c=c.prevZ;if(d!==a.prev&&d!==a.next&&Vc(e.x,e.y,a.x,a.y,f.x,f.y,d.x,d.y)&&0<=Q(d.prev,d,d.next))return!1;d=d.nextZ}for(;c&&c.z>=k;){if(c!==a.prev&&c!==a.next&&Vc(e.x,e.y,a.x,a.y,f.x,f.y,c.x,c.y)&&0<=Q(c.prev,c,c.next))return!1;c=c.prevZ}for(;d&&d.z<=b;){if(d!==a.prev&&d!==a.next&&Vc(e.x,e.y,a.x,a.y,f.x,f.y,d.x,d.y)&&0<=Q(d.prev,d,d.next))return!1;d=d.nextZ}return!0}function Dk(a,b){return a.x-b.x}function Ek(a,b){var c=b,d=a.x,e=a.y,f=-Infinity;do{if(e<=c.y&&
|
|
|
|
+e>=c.next.y&&c.next.y!==c.y){var g=c.x+(e-c.y)*(c.next.x-c.x)/(c.next.y-c.y);if(g<=d&&g>f){f=g;if(g===d){if(e===c.y)return c;if(e===c.next.y)return c.next}var h=c.x<c.next.x?c:c.next}}c=c.next}while(c!==b);if(!h)return null;if(d===f)return h;b=h;g=h.x;var k=h.y,m=Infinity;c=h;do{if(d>=c.x&&c.x>=g&&d!==c.x&&Vc(e<k?d:f,e,g,k,e<k?f:d,e,c.x,c.y)){var l=Math.abs(e-c.y)/(d-c.x);var p;if((p=ae(c,a))&&!(p=l<m)&&(p=l===m)&&!(p=c.x>h.x)&&(p=c.x===h.x)){p=h;var u=c;p=0>Q(p.prev,p,u.prev)&&0>Q(u.next,p,p.next)}p&&
|
|
|
|
+(h=c,m=l)}c=c.next}while(c!==b);return h}function rg(a,b,c,d,e){a=32767*(a-c)*e;b=32767*(b-d)*e;a=(a|a<<8)&16711935;a=(a|a<<4)&252645135;a=(a|a<<2)&858993459;b=(b|b<<8)&16711935;b=(b|b<<4)&252645135;b=(b|b<<2)&858993459;return(a|a<<1)&1431655765|((b|b<<1)&1431655765)<<1}function Fk(a){var b=a,c=a;do{if(b.x<c.x||b.x===c.x&&b.y<c.y)c=b;b=b.next}while(b!==a);return c}function Vc(a,b,c,d,e,f,g,h){return 0<=(e-g)*(b-h)-(a-g)*(f-h)&&0<=(a-g)*(d-h)-(c-g)*(b-h)&&0<=(c-g)*(f-h)-(e-g)*(d-h)}function Q(a,b,
|
|
|
|
+c){return(b.y-a.y)*(c.x-b.x)-(b.x-a.x)*(c.y-b.y)}function Te(a,b){return a.x===b.x&&a.y===b.y}function bi(a,b,c,d){var e=Ue(Q(a,b,c)),f=Ue(Q(a,b,d)),g=Ue(Q(c,d,a)),h=Ue(Q(c,d,b));return e!==f&&g!==h||0===e&&Ve(a,c,b)||0===f&&Ve(a,d,b)||0===g&&Ve(c,a,d)||0===h&&Ve(c,b,d)?!0:!1}function Ve(a,b,c){return b.x<=Math.max(a.x,c.x)&&b.x>=Math.min(a.x,c.x)&&b.y<=Math.max(a.y,c.y)&&b.y>=Math.min(a.y,c.y)}function Ue(a){return 0<a?1:0>a?-1:0}function ae(a,b){return 0>Q(a.prev,a,a.next)?0<=Q(a,b,a.next)&&0<=
|
|
|
|
+Q(a,a.prev,b):0>Q(a,b,a.prev)||0>Q(a,a.next,b)}function ci(a,b){var c=new sg(a.i,a.x,a.y),d=new sg(b.i,b.x,b.y),e=a.next,f=b.prev;a.next=b;b.prev=a;c.next=e;e.prev=c;d.next=c;c.prev=d;f.next=d;d.prev=f;return d}function ai(a,b,c,d){a=new sg(a,b,c);d?(a.next=d.next,a.prev=d,d.next.prev=a,d.next=a):(a.prev=a,a.next=a);return a}function Zd(a){a.next.prev=a.prev;a.prev.next=a.next;a.prevZ&&(a.prevZ.nextZ=a.nextZ);a.nextZ&&(a.nextZ.prevZ=a.prevZ)}function sg(a,b,c){this.i=a;this.x=b;this.y=c;this.nextZ=
|
|
|
|
+this.prevZ=this.z=this.next=this.prev=null;this.steiner=!1}function di(a){var b=a.length;2<b&&a[b-1].equals(a[0])&&a.pop()}function ei(a,b){for(var c=0;c<b.length;c++)a.push(b[c].x),a.push(b[c].y)}function cc(a,b){O.call(this);this.type="ExtrudeGeometry";this.parameters={shapes:a,options:b};this.fromBufferGeometry(new fb(a,b));this.mergeVertices()}function fb(a,b){function c(a){function c(a,b,c){b||console.error("THREE.ExtrudeGeometry: vec does not exist");return b.clone().multiplyScalar(c).add(a)}
|
|
|
|
+function g(a,b,c){var d=a.x-b.x;var e=a.y-b.y;var f=c.x-a.x;var g=c.y-a.y,h=d*d+e*e;if(Math.abs(d*g-e*f)>Number.EPSILON){var k=Math.sqrt(h),m=Math.sqrt(f*f+g*g);h=b.x-e/k;b=b.y+d/k;g=((c.x-g/m-h)*g-(c.y+f/m-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 v(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 v(f/e,d/
|
|
|
|
+e)}function h(a,b){for(K=a.length;0<=--K;){var c=K;var f=K-1;0>f&&(f=a.length-1);var g,h=w+2*y;for(g=0;g<h;g++){var k=X*g,m=X*(g+1),l=b+f+k,p=b+f+m;m=b+c+m;q(b+c+k);q(l);q(m);q(l);q(p);q(m);k=e.length/3;k=D.generateSideWallUV(d,e,k-6,k-3,k-2,k-1);t(k[0]);t(k[1]);t(k[3]);t(k[1]);t(k[2]);t(k[3])}}}function k(a,b,c){F.push(a);F.push(b);F.push(c)}function l(a,b,c){q(a);q(b);q(c);a=e.length/3;a=D.generateTopUV(d,e,a-3,a-2,a-1);t(a[0]);t(a[1]);t(a[2])}function q(a){e.push(F[3*a]);e.push(F[3*a+1]);e.push(F[3*
|
|
|
|
+a+2])}function t(a){f.push(a.x);f.push(a.y)}var F=[],x=void 0!==b.curveSegments?b.curveSegments:12,w=void 0!==b.steps?b.steps:1,ha=void 0!==b.depth?b.depth:100,U=void 0!==b.bevelEnabled?b.bevelEnabled:!0,Z=void 0!==b.bevelThickness?b.bevelThickness:6,C=void 0!==b.bevelSize?b.bevelSize:Z-2,A=void 0!==b.bevelOffset?b.bevelOffset:0,y=void 0!==b.bevelSegments?b.bevelSegments:3,B=b.extrudePath,D=void 0!==b.UVGenerator?b.UVGenerator:Gk;void 0!==b.amount&&(console.warn("THREE.ExtrudeBufferGeometry: amount has been renamed to depth."),
|
|
|
|
+ha=b.amount);var I=!1;if(B){var E=B.getSpacedPoints(w);I=!0;U=!1;var G=B.computeFrenetFrames(w,!1);var N=new n;var O=new n;var J=new n}U||(A=C=Z=y=0);var L;x=a.extractPoints(x);a=x.shape;var M=x.holes;if(!rb.isClockWise(a)){a=a.reverse();var fa=0;for(L=M.length;fa<L;fa++){var P=M[fa];rb.isClockWise(P)&&(M[fa]=P.reverse())}}var aa=rb.triangulateShape(a,M),V=a;fa=0;for(L=M.length;fa<L;fa++)P=M[fa],a=a.concat(P);var W,X=a.length,T,da=aa.length;x=[];var K=0;var R=V.length;var S=R-1;for(W=K+1;K<R;K++,
|
|
|
|
+S++,W++)S===R&&(S=0),W===R&&(W=0),x[K]=g(V[K],V[S],V[W]);B=[];var ea=x.concat();fa=0;for(L=M.length;fa<L;fa++){P=M[fa];var ba=[];K=0;R=P.length;S=R-1;for(W=K+1;K<R;K++,S++,W++)S===R&&(S=0),W===R&&(W=0),ba[K]=g(P[K],P[S],P[W]);B.push(ba);ea=ea.concat(ba)}for(S=0;S<y;S++){R=S/y;var ca=Z*Math.cos(R*Math.PI/2);W=C*Math.sin(R*Math.PI/2)+A;K=0;for(R=V.length;K<R;K++){var Q=c(V[K],x[K],W);k(Q.x,Q.y,-ca)}fa=0;for(L=M.length;fa<L;fa++)for(P=M[fa],ba=B[fa],K=0,R=P.length;K<R;K++)Q=c(P[K],ba[K],W),k(Q.x,Q.y,
|
|
|
|
+-ca)}W=C+A;for(K=0;K<X;K++)Q=U?c(a[K],ea[K],W):a[K],I?(O.copy(G.normals[0]).multiplyScalar(Q.x),N.copy(G.binormals[0]).multiplyScalar(Q.y),J.copy(E[0]).add(O).add(N),k(J.x,J.y,J.z)):k(Q.x,Q.y,0);for(R=1;R<=w;R++)for(K=0;K<X;K++)Q=U?c(a[K],ea[K],W):a[K],I?(O.copy(G.normals[R]).multiplyScalar(Q.x),N.copy(G.binormals[R]).multiplyScalar(Q.y),J.copy(E[R]).add(O).add(N),k(J.x,J.y,J.z)):k(Q.x,Q.y,ha/w*R);for(S=y-1;0<=S;S--){R=S/y;ca=Z*Math.cos(R*Math.PI/2);W=C*Math.sin(R*Math.PI/2)+A;K=0;for(R=V.length;K<
|
|
|
|
+R;K++)Q=c(V[K],x[K],W),k(Q.x,Q.y,ha+ca);fa=0;for(L=M.length;fa<L;fa++)for(P=M[fa],ba=B[fa],K=0,R=P.length;K<R;K++)Q=c(P[K],ba[K],W),I?k(Q.x,Q.y+E[w-1].y,E[w-1].x+ca):k(Q.x,Q.y,ha+ca)}(function(){var a=e.length/3;if(U){var b=0*X;for(K=0;K<da;K++)T=aa[K],l(T[2]+b,T[1]+b,T[0]+b);b=X*(w+2*y);for(K=0;K<da;K++)T=aa[K],l(T[0]+b,T[1]+b,T[2]+b)}else{for(K=0;K<da;K++)T=aa[K],l(T[2],T[1],T[0]);for(K=0;K<da;K++)T=aa[K],l(T[0]+X*w,T[1]+X*w,T[2]+X*w)}d.addGroup(a,e.length/3-a,0)})();(function(){var a=e.length/
|
|
|
|
+3,b=0;h(V,b);b+=V.length;fa=0;for(L=M.length;fa<L;fa++)P=M[fa],h(P,b),b+=P.length;d.addGroup(a,e.length/3-a,1)})()}B.call(this);this.type="ExtrudeBufferGeometry";this.parameters={shapes:a,options:b};a=Array.isArray(a)?a:[a];for(var d=this,e=[],f=[],g=0,h=a.length;g<h;g++)c(a[g]);this.setAttribute("position",new y(e,3));this.setAttribute("uv",new y(f,2));this.computeVertexNormals()}function fi(a,b,c){c.shapes=[];if(Array.isArray(a))for(var d=0,e=a.length;d<e;d++)c.shapes.push(a[d].uuid);else c.shapes.push(a.uuid);
|
|
|
|
+void 0!==b.extrudePath&&(c.options.extrudePath=b.extrudePath.toJSON());return c}function be(a,b){O.call(this);this.type="TextGeometry";this.parameters={text:a,parameters:b};this.fromBufferGeometry(new Wc(a,b));this.mergeVertices()}function Wc(a,b){b=b||{};var c=b.font;if(!c||!c.isFont)return console.error("THREE.TextGeometry: font parameter is not an instance of THREE.Font."),new O;a=c.generateShapes(a,b.size);b.depth=void 0!==b.height?b.height:50;void 0===b.bevelThickness&&(b.bevelThickness=10);
|
|
|
|
+void 0===b.bevelSize&&(b.bevelSize=8);void 0===b.bevelEnabled&&(b.bevelEnabled=!1);fb.call(this,a,b);this.type="TextBufferGeometry"}function ce(a,b,c,d,e,f,g){O.call(this);this.type="SphereGeometry";this.parameters={radius:a,widthSegments:b,heightSegments:c,phiStart:d,phiLength:e,thetaStart:f,thetaLength:g};this.fromBufferGeometry(new dc(a,b,c,d,e,f,g));this.mergeVertices()}function dc(a,b,c,d,e,f,g){B.call(this);this.type="SphereBufferGeometry";this.parameters={radius:a,widthSegments:b,heightSegments:c,
|
|
|
|
+phiStart:d,phiLength:e,thetaStart:f,thetaLength:g};a=a||1;b=Math.max(3,Math.floor(b)||8);c=Math.max(2,Math.floor(c)||6);d=void 0!==d?d:0;e=void 0!==e?e:2*Math.PI;f=void 0!==f?f:0;g=void 0!==g?g:Math.PI;var h=Math.min(f+g,Math.PI),k,m,l=0,p=[],u=new n,r=new n,q=[],t=[],F=[],v=[];for(m=0;m<=c;m++){var w=[],ha=m/c,U=0;0==m&&0==f?U=.5/b:m==c&&h==Math.PI&&(U=-.5/b);for(k=0;k<=b;k++){var Z=k/b;u.x=-a*Math.cos(d+Z*e)*Math.sin(f+ha*g);u.y=a*Math.cos(f+ha*g);u.z=a*Math.sin(d+Z*e)*Math.sin(f+ha*g);t.push(u.x,
|
|
|
|
+u.y,u.z);r.copy(u).normalize();F.push(r.x,r.y,r.z);v.push(Z+U,1-ha);w.push(l++)}p.push(w)}for(m=0;m<c;m++)for(k=0;k<b;k++)a=p[m][k+1],d=p[m][k],e=p[m+1][k],g=p[m+1][k+1],(0!==m||0<f)&&q.push(a,d,g),(m!==c-1||h<Math.PI)&&q.push(d,e,g);this.setIndex(q);this.setAttribute("position",new y(t,3));this.setAttribute("normal",new y(F,3));this.setAttribute("uv",new y(v,2))}function de(a,b,c,d,e,f){O.call(this);this.type="RingGeometry";this.parameters={innerRadius:a,outerRadius:b,thetaSegments:c,phiSegments:d,
|
|
|
|
+thetaStart:e,thetaLength:f};this.fromBufferGeometry(new Xc(a,b,c,d,e,f));this.mergeVertices()}function Xc(a,b,c,d,e,f){B.call(this);this.type="RingBufferGeometry";this.parameters={innerRadius:a,outerRadius:b,thetaSegments:c,phiSegments:d,thetaStart:e,thetaLength:f};a=a||.5;b=b||1;e=void 0!==e?e:0;f=void 0!==f?f:2*Math.PI;c=void 0!==c?Math.max(3,c):8;d=void 0!==d?Math.max(1,d):1;var g=[],h=[],k=[],m=[],l=a,p=(b-a)/d,u=new n,r=new v,q,t;for(q=0;q<=d;q++){for(t=0;t<=c;t++)a=e+t/c*f,u.x=l*Math.cos(a),
|
|
|
|
+u.y=l*Math.sin(a),h.push(u.x,u.y,u.z),k.push(0,0,1),r.x=(u.x/b+1)/2,r.y=(u.y/b+1)/2,m.push(r.x,r.y);l+=p}for(q=0;q<d;q++)for(b=q*(c+1),t=0;t<c;t++)a=t+b,e=a+c+1,f=a+c+2,l=a+1,g.push(a,e,l),g.push(e,f,l);this.setIndex(g);this.setAttribute("position",new y(h,3));this.setAttribute("normal",new y(k,3));this.setAttribute("uv",new y(m,2))}function ee(a,b,c,d){O.call(this);this.type="LatheGeometry";this.parameters={points:a,segments:b,phiStart:c,phiLength:d};this.fromBufferGeometry(new Yc(a,b,c,d));this.mergeVertices()}
|
|
|
|
+function Yc(a,b,c,d){B.call(this);this.type="LatheBufferGeometry";this.parameters={points:a,segments:b,phiStart:c,phiLength:d};b=Math.floor(b)||12;c=c||0;d=d||2*Math.PI;d=M.clamp(d,0,2*Math.PI);var e=[],f=[],g=[],h=1/b,k=new n,m=new v,l;for(l=0;l<=b;l++){var p=c+l*h*d;var u=Math.sin(p),r=Math.cos(p);for(p=0;p<=a.length-1;p++)k.x=a[p].x*u,k.y=a[p].y,k.z=a[p].x*r,f.push(k.x,k.y,k.z),m.x=l/b,m.y=p/(a.length-1),g.push(m.x,m.y)}for(l=0;l<b;l++)for(p=0;p<a.length-1;p++)c=p+l*a.length,h=c+a.length,k=c+a.length+
|
|
|
|
+1,m=c+1,e.push(c,h,m),e.push(h,k,m);this.setIndex(e);this.setAttribute("position",new y(f,3));this.setAttribute("uv",new y(g,2));this.computeVertexNormals();if(d===2*Math.PI)for(d=this.attributes.normal.array,e=new n,f=new n,g=new n,c=b*a.length*3,p=l=0;l<a.length;l++,p+=3)e.x=d[p+0],e.y=d[p+1],e.z=d[p+2],f.x=d[c+p+0],f.y=d[c+p+1],f.z=d[c+p+2],g.addVectors(e,f).normalize(),d[p+0]=d[c+p+0]=g.x,d[p+1]=d[c+p+1]=g.y,d[p+2]=d[c+p+2]=g.z}function ec(a,b){O.call(this);this.type="ShapeGeometry";"object"===
|
|
|
|
+typeof b&&(console.warn("THREE.ShapeGeometry: Options parameter has been removed."),b=b.curveSegments);this.parameters={shapes:a,curveSegments:b};this.fromBufferGeometry(new fc(a,b));this.mergeVertices()}function fc(a,b){function c(a){var c,h=e.length/3;a=a.extractPoints(b);var m=a.shape,l=a.holes;!1===rb.isClockWise(m)&&(m=m.reverse());a=0;for(c=l.length;a<c;a++){var z=l[a];!0===rb.isClockWise(z)&&(l[a]=z.reverse())}var n=rb.triangulateShape(m,l);a=0;for(c=l.length;a<c;a++)z=l[a],m=m.concat(z);a=
|
|
|
|
+0;for(c=m.length;a<c;a++)z=m[a],e.push(z.x,z.y,0),f.push(0,0,1),g.push(z.x,z.y);a=0;for(c=n.length;a<c;a++)m=n[a],d.push(m[0]+h,m[1]+h,m[2]+h),k+=3}B.call(this);this.type="ShapeBufferGeometry";this.parameters={shapes:a,curveSegments:b};b=b||12;var d=[],e=[],f=[],g=[],h=0,k=0;if(!1===Array.isArray(a))c(a);else for(var m=0;m<a.length;m++)c(a[m]),this.addGroup(h,k,m),h+=k,k=0;this.setIndex(d);this.setAttribute("position",new y(e,3));this.setAttribute("normal",new y(f,3));this.setAttribute("uv",new y(g,
|
|
|
|
+2))}function gi(a,b){b.shapes=[];if(Array.isArray(a))for(var c=0,d=a.length;c<d;c++)b.shapes.push(a[c].uuid);else b.shapes.push(a.uuid);return b}function Zc(a,b){B.call(this);this.type="EdgesGeometry";this.parameters={thresholdAngle:b};var c=[];b=Math.cos(M.DEG2RAD*(void 0!==b?b:1));var d=[0,0],e={},f=["a","b","c"];if(a.isBufferGeometry){var g=new O;g.fromBufferGeometry(a)}else g=a.clone();g.mergeVertices();g.computeFaceNormals();a=g.vertices;g=g.faces;for(var h=0,k=g.length;h<k;h++)for(var m=g[h],
|
|
|
|
+l=0;3>l;l++){var p=m[f[l]];var u=m[f[(l+1)%3]];d[0]=Math.min(p,u);d[1]=Math.max(p,u);p=d[0]+","+d[1];void 0===e[p]?e[p]={index1:d[0],index2:d[1],face1:h,face2:void 0}:e[p].face2=h}for(p in e)if(d=e[p],void 0===d.face2||g[d.face1].normal.dot(g[d.face2].normal)<=b)f=a[d.index1],c.push(f.x,f.y,f.z),f=a[d.index2],c.push(f.x,f.y,f.z);this.setAttribute("position",new y(c,3))}function gc(a,b,c,d,e,f,g,h){O.call(this);this.type="CylinderGeometry";this.parameters={radiusTop:a,radiusBottom:b,height:c,radialSegments:d,
|
|
|
|
+heightSegments:e,openEnded:f,thetaStart:g,thetaLength:h};this.fromBufferGeometry(new sb(a,b,c,d,e,f,g,h));this.mergeVertices()}function sb(a,b,c,d,e,f,g,h){function k(c){var e,f=new v,k=new n,z=0,t=!0===c?a:b,w=!0===c?1:-1;var A=q;for(e=1;e<=d;e++)p.push(0,F*w,0),u.push(0,w,0),r.push(.5,.5),q++;var y=q;for(e=0;e<=d;e++){var B=e/d*h+g,D=Math.cos(B);B=Math.sin(B);k.x=t*B;k.y=F*w;k.z=t*D;p.push(k.x,k.y,k.z);u.push(0,w,0);f.x=.5*D+.5;f.y=.5*B*w+.5;r.push(f.x,f.y);q++}for(e=0;e<d;e++)f=A+e,k=y+e,!0===
|
|
|
|
+c?l.push(k,k+1,f):l.push(k+1,k,f),z+=3;m.addGroup(x,z,!0===c?1:2);x+=z}B.call(this);this.type="CylinderBufferGeometry";this.parameters={radiusTop:a,radiusBottom:b,height:c,radialSegments:d,heightSegments:e,openEnded:f,thetaStart:g,thetaLength:h};var m=this;a=void 0!==a?a:1;b=void 0!==b?b:1;c=c||1;d=Math.floor(d)||8;e=Math.floor(e)||1;f=void 0!==f?f:!1;g=void 0!==g?g:0;h=void 0!==h?h:2*Math.PI;var l=[],p=[],u=[],r=[],q=0,t=[],F=c/2,x=0;(function(){var f,k,z=new n,v=new n,C=0,A=(b-a)/c;for(k=0;k<=e;k++){var B=
|
|
|
|
+[],y=k/e,D=y*(b-a)+a;for(f=0;f<=d;f++){var E=f/d,G=E*h+g,J=Math.sin(G);G=Math.cos(G);v.x=D*J;v.y=-y*c+F;v.z=D*G;p.push(v.x,v.y,v.z);z.set(J,A,G).normalize();u.push(z.x,z.y,z.z);r.push(E,1-y);B.push(q++)}t.push(B)}for(f=0;f<d;f++)for(k=0;k<e;k++)z=t[k+1][f],v=t[k+1][f+1],A=t[k][f+1],l.push(t[k][f],z,A),l.push(z,v,A),C+=6;m.addGroup(x,C,0);x+=C})();!1===f&&(0<a&&k(!0),0<b&&k(!1));this.setIndex(l);this.setAttribute("position",new y(p,3));this.setAttribute("normal",new y(u,3));this.setAttribute("uv",
|
|
|
|
+new y(r,2))}function fe(a,b,c,d,e,f,g){gc.call(this,0,a,b,c,d,e,f,g);this.type="ConeGeometry";this.parameters={radius:a,height:b,radialSegments:c,heightSegments:d,openEnded:e,thetaStart:f,thetaLength:g}}function ge(a,b,c,d,e,f,g){sb.call(this,0,a,b,c,d,e,f,g);this.type="ConeBufferGeometry";this.parameters={radius:a,height:b,radialSegments:c,heightSegments:d,openEnded:e,thetaStart:f,thetaLength:g}}function he(a,b,c,d){O.call(this);this.type="CircleGeometry";this.parameters={radius:a,segments:b,thetaStart:c,
|
|
|
|
+thetaLength:d};this.fromBufferGeometry(new $c(a,b,c,d));this.mergeVertices()}function $c(a,b,c,d){B.call(this);this.type="CircleBufferGeometry";this.parameters={radius:a,segments:b,thetaStart:c,thetaLength:d};a=a||1;b=void 0!==b?Math.max(3,b):8;c=void 0!==c?c:0;d=void 0!==d?d:2*Math.PI;var e=[],f=[],g=[],h=[],k,m=new n,l=new v;f.push(0,0,0);g.push(0,0,1);h.push(.5,.5);var p=0;for(k=3;p<=b;p++,k+=3){var u=c+p/b*d;m.x=a*Math.cos(u);m.y=a*Math.sin(u);f.push(m.x,m.y,m.z);g.push(0,0,1);l.x=(f[k]/a+1)/
|
|
|
|
+2;l.y=(f[k+1]/a+1)/2;h.push(l.x,l.y)}for(k=1;k<=b;k++)e.push(k,k+1,0);this.setIndex(e);this.setAttribute("position",new y(f,3));this.setAttribute("normal",new y(g,3));this.setAttribute("uv",new y(h,2))}function hc(a){J.call(this);this.type="ShadowMaterial";this.color=new A(0);this.transparent=!0;this.setValues(a)}function tb(a){Aa.call(this,a);this.type="RawShaderMaterial"}function gb(a){J.call(this);this.defines={STANDARD:""};this.type="MeshStandardMaterial";this.color=new A(16777215);this.roughness=
|
|
|
|
+1;this.metalness=0;this.lightMap=this.map=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.emissive=new A(0);this.emissiveIntensity=1;this.bumpMap=this.emissiveMap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=0;this.normalScale=new v(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.envMap=this.alphaMap=this.metalnessMap=this.roughnessMap=null;this.envMapIntensity=1;this.refractionRatio=.98;this.wireframe=!1;this.wireframeLinewidth=
|
|
|
|
+1;this.wireframeLinejoin=this.wireframeLinecap="round";this.vertexTangents=this.morphNormals=this.morphTargets=this.skinning=!1;this.setValues(a)}function ic(a){gb.call(this);this.defines={STANDARD:"",PHYSICAL:""};this.type="MeshPhysicalMaterial";this.clearcoat=0;this.clearcoatMap=null;this.clearcoatRoughness=0;this.clearcoatRoughnessMap=null;this.clearcoatNormalScale=new v(1,1);this.clearcoatNormalMap=null;this.reflectivity=.5;this.sheen=null;this.transparency=0;this.setValues(a)}function Mb(a){J.call(this);
|
|
|
|
+this.type="MeshPhongMaterial";this.color=new A(16777215);this.specular=new A(1118481);this.shininess=30;this.lightMap=this.map=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.emissive=new A(0);this.emissiveIntensity=1;this.bumpMap=this.emissiveMap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=0;this.normalScale=new v(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.envMap=this.alphaMap=this.specularMap=null;this.combine=0;
|
|
|
|
+this.reflectivity=1;this.refractionRatio=.98;this.wireframe=!1;this.wireframeLinewidth=1;this.wireframeLinejoin=this.wireframeLinecap="round";this.morphNormals=this.morphTargets=this.skinning=!1;this.setValues(a)}function jc(a){J.call(this);this.defines={TOON:""};this.type="MeshToonMaterial";this.color=new A(16777215);this.specular=new A(1118481);this.shininess=30;this.lightMap=this.gradientMap=this.map=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.emissive=new A(0);this.emissiveIntensity=
|
|
|
|
+1;this.bumpMap=this.emissiveMap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=0;this.normalScale=new v(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.alphaMap=this.specularMap=null;this.wireframe=!1;this.wireframeLinewidth=1;this.wireframeLinejoin=this.wireframeLinecap="round";this.morphNormals=this.morphTargets=this.skinning=!1;this.setValues(a)}function kc(a){J.call(this);this.type="MeshNormalMaterial";this.bumpMap=null;this.bumpScale=1;this.normalMap=
|
|
|
|
+null;this.normalMapType=0;this.normalScale=new v(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.wireframe=!1;this.wireframeLinewidth=1;this.morphNormals=this.morphTargets=this.skinning=this.fog=!1;this.setValues(a)}function lc(a){J.call(this);this.type="MeshLambertMaterial";this.color=new A(16777215);this.lightMap=this.map=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.emissive=new A(0);this.emissiveIntensity=1;this.envMap=this.alphaMap=
|
|
|
|
+this.specularMap=this.emissiveMap=null;this.combine=0;this.reflectivity=1;this.refractionRatio=.98;this.wireframe=!1;this.wireframeLinewidth=1;this.wireframeLinejoin=this.wireframeLinecap="round";this.morphNormals=this.morphTargets=this.skinning=!1;this.setValues(a)}function mc(a){J.call(this);this.defines={MATCAP:""};this.type="MeshMatcapMaterial";this.color=new A(16777215);this.bumpMap=this.map=this.matcap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=0;this.normalScale=new v(1,1);
|
|
|
|
+this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.alphaMap=null;this.morphNormals=this.morphTargets=this.skinning=!1;this.setValues(a)}function nc(a){da.call(this);this.type="LineDashedMaterial";this.scale=1;this.dashSize=3;this.gapSize=1;this.setValues(a)}function Ka(a,b,c,d){this.parameterPositions=a;this._cachedIndex=0;this.resultBuffer=void 0!==d?d:new b.constructor(c);this.sampleValues=b;this.valueSize=c}function We(a,b,c,d){Ka.call(this,a,b,c,d);this._offsetNext=
|
|
|
|
+this._weightNext=this._offsetPrev=this._weightPrev=-0}function ie(a,b,c,d){Ka.call(this,a,b,c,d)}function Xe(a,b,c,d){Ka.call(this,a,b,c,d)}function sa(a,b,c,d){if(void 0===a)throw Error("THREE.KeyframeTrack: track name is undefined");if(void 0===b||0===b.length)throw Error("THREE.KeyframeTrack: no keyframes in track named "+a);this.name=a;this.times=ka.convertArray(b,this.TimeBufferType);this.values=ka.convertArray(c,this.ValueBufferType);this.setInterpolation(d||this.DefaultInterpolation)}function Ye(a,
|
|
|
|
+b,c){sa.call(this,a,b,c)}function Ze(a,b,c,d){sa.call(this,a,b,c,d)}function ad(a,b,c,d){sa.call(this,a,b,c,d)}function $e(a,b,c,d){Ka.call(this,a,b,c,d)}function je(a,b,c,d){sa.call(this,a,b,c,d)}function af(a,b,c,d){sa.call(this,a,b,c,d)}function bd(a,b,c,d){sa.call(this,a,b,c,d)}function Pa(a,b,c,d){this.name=a;this.tracks=c;this.duration=void 0!==b?b:-1;this.blendMode=void 0!==d?d:2500;this.uuid=M.generateUUID();0>this.duration&&this.resetDuration()}function Hk(a){switch(a.toLowerCase()){case "scalar":case "double":case "float":case "number":case "integer":return ad;
|
|
|
|
+case "vector":case "vector2":case "vector3":case "vector4":return bd;case "color":return Ze;case "quaternion":return je;case "bool":case "boolean":return Ye;case "string":return af}throw Error("THREE.KeyframeTrack: Unsupported typeName: "+a);}function Ik(a){if(void 0===a.type)throw Error("THREE.KeyframeTrack: track type undefined, can not parse");var b=Hk(a.type);if(void 0===a.times){var c=[],d=[];ka.flattenJSON(a.keys,c,d,"value");a.times=c;a.values=d}return void 0!==b.parse?b.parse(a):new b(a.name,
|
|
|
|
+a.times,a.values,a.interpolation)}function tg(a,b,c){var d=this,e=!1,f=0,g=0,h=void 0,k=[];this.onStart=void 0;this.onLoad=a;this.onProgress=b;this.onError=c;this.itemStart=function(a){g++;if(!1===e&&void 0!==d.onStart)d.onStart(a,f,g);e=!0};this.itemEnd=function(a){f++;if(void 0!==d.onProgress)d.onProgress(a,f,g);if(f===g&&(e=!1,void 0!==d.onLoad))d.onLoad()};this.itemError=function(a){if(void 0!==d.onError)d.onError(a)};this.resolveURL=function(a){return h?h(a):a};this.setURLModifier=function(a){h=
|
|
|
|
+a;return this};this.addHandler=function(a,b){k.push(a,b);return this};this.removeHandler=function(a){a=k.indexOf(a);-1!==a&&k.splice(a,2);return this};this.getHandler=function(a){for(var b=0,c=k.length;b<c;b+=2){var d=k[b],e=k[b+1];d.global&&(d.lastIndex=0);if(d.test(a))return e}return null}}function X(a){this.manager=void 0!==a?a:hi;this.crossOrigin="anonymous";this.resourcePath=this.path=""}function Qa(a){X.call(this,a)}function ug(a){X.call(this,a)}function vg(a){X.call(this,a)}function bf(a){X.call(this,
|
|
|
|
+a)}function cd(a){X.call(this,a)}function cf(a){X.call(this,a)}function df(a){X.call(this,a)}function G(){this.type="Curve";this.arcLengthDivisions=200}function La(a,b,c,d,e,f,g,h){G.call(this);this.type="EllipseCurve";this.aX=a||0;this.aY=b||0;this.xRadius=c||1;this.yRadius=d||1;this.aStartAngle=e||0;this.aEndAngle=f||2*Math.PI;this.aClockwise=g||!1;this.aRotation=h||0}function dd(a,b,c,d,e,f){La.call(this,a,b,c,c,d,e,f);this.type="ArcCurve"}function wg(){var a=0,b=0,c=0,d=0;return{initCatmullRom:function(e,
|
|
|
|
+f,g,h,k){e=k*(g-e);h=k*(h-f);a=f;b=e;c=-3*f+3*g-2*e-h;d=2*f-2*g+e+h},initNonuniformCatmullRom:function(e,f,g,h,k,m,l){e=((f-e)/k-(g-e)/(k+m)+(g-f)/m)*m;h=((g-f)/m-(h-f)/(m+l)+(h-g)/l)*m;a=f;b=e;c=-3*f+3*g-2*e-h;d=2*f-2*g+e+h},calc:function(e){var f=e*e;return a+b*e+c*f+d*f*e}}}function pa(a,b,c,d){G.call(this);this.type="CatmullRomCurve3";this.points=a||[];this.closed=b||!1;this.curveType=c||"centripetal";this.tension=d||.5}function ii(a,b,c,d,e){b=.5*(d-b);e=.5*(e-c);var f=a*a;return(2*c-2*d+b+e)*
|
|
|
|
+a*f+(-3*c+3*d-2*b-e)*f+b*a+c}function ke(a,b,c,d){var e=1-a;return e*e*b+2*(1-a)*a*c+a*a*d}function le(a,b,c,d,e){var f=1-a,g=1-a;return f*f*f*b+3*g*g*a*c+3*(1-a)*a*a*d+a*a*a*e}function Wa(a,b,c,d){G.call(this);this.type="CubicBezierCurve";this.v0=a||new v;this.v1=b||new v;this.v2=c||new v;this.v3=d||new v}function hb(a,b,c,d){G.call(this);this.type="CubicBezierCurve3";this.v0=a||new n;this.v1=b||new n;this.v2=c||new n;this.v3=d||new n}function Ha(a,b){G.call(this);this.type="LineCurve";this.v1=a||
|
|
|
|
+new v;this.v2=b||new v}function Xa(a,b){G.call(this);this.type="LineCurve3";this.v1=a||new n;this.v2=b||new n}function Ya(a,b,c){G.call(this);this.type="QuadraticBezierCurve";this.v0=a||new v;this.v1=b||new v;this.v2=c||new v}function ib(a,b,c){G.call(this);this.type="QuadraticBezierCurve3";this.v0=a||new n;this.v1=b||new n;this.v2=c||new n}function Za(a){G.call(this);this.type="SplineCurve";this.points=a||[]}function ub(){G.call(this);this.type="CurvePath";this.curves=[];this.autoClose=!1}function $a(a){ub.call(this);
|
|
|
|
+this.type="Path";this.currentPoint=new v;a&&this.setFromPoints(a)}function Nb(a){$a.call(this,a);this.uuid=M.generateUUID();this.type="Shape";this.holes=[]}function S(a,b){E.call(this);this.type="Light";this.color=new A(a);this.intensity=void 0!==b?b:1;this.receiveShadow=void 0}function ef(a,b,c){S.call(this,a,c);this.type="HemisphereLight";this.castShadow=void 0;this.position.copy(E.DefaultUp);this.updateMatrix();this.groundColor=new A(b)}function jb(a){this.camera=a;this.bias=0;this.radius=1;this.mapSize=
|
|
|
|
+new v(512,512);this.mapPass=this.map=null;this.matrix=new P;this._frustum=new Ec;this._frameExtents=new v(1,1);this._viewportCount=1;this._viewports=[new ca(0,0,1,1)]}function ff(){jb.call(this,new ba(50,1,.5,500))}function gf(a,b,c,d,e,f){S.call(this,a,b);this.type="SpotLight";this.position.copy(E.DefaultUp);this.updateMatrix();this.target=new E;Object.defineProperty(this,"power",{get:function(){return this.intensity*Math.PI},set:function(a){this.intensity=a/Math.PI}});this.distance=void 0!==c?c:
|
|
|
|
+0;this.angle=void 0!==d?d:Math.PI/3;this.penumbra=void 0!==e?e:0;this.decay=void 0!==f?f:1;this.shadow=new ff}function xg(){jb.call(this,new ba(90,1,.5,500));this._frameExtents=new v(4,2);this._viewportCount=6;this._viewports=[new ca(2,1,1,1),new ca(0,1,1,1),new ca(3,1,1,1),new ca(1,1,1,1),new ca(3,0,1,1),new ca(1,0,1,1)];this._cubeDirections=[new n(1,0,0),new n(-1,0,0),new n(0,0,1),new n(0,0,-1),new n(0,1,0),new n(0,-1,0)];this._cubeUps=[new n(0,1,0),new n(0,1,0),new n(0,1,0),new n(0,1,0),new n(0,
|
|
|
|
+0,1),new n(0,0,-1)]}function hf(a,b,c,d){S.call(this,a,b);this.type="PointLight";Object.defineProperty(this,"power",{get:function(){return 4*this.intensity*Math.PI},set:function(a){this.intensity=a/(4*Math.PI)}});this.distance=void 0!==c?c:0;this.decay=void 0!==d?d:1;this.shadow=new xg}function ed(a,b,c,d,e,f){db.call(this);this.type="OrthographicCamera";this.zoom=1;this.view=null;this.left=void 0!==a?a:-1;this.right=void 0!==b?b:1;this.top=void 0!==c?c:1;this.bottom=void 0!==d?d:-1;this.near=void 0!==
|
|
|
|
+e?e:.1;this.far=void 0!==f?f:2E3;this.updateProjectionMatrix()}function jf(){jb.call(this,new ed(-5,5,5,-5,.5,500))}function kf(a,b){S.call(this,a,b);this.type="DirectionalLight";this.position.copy(E.DefaultUp);this.updateMatrix();this.target=new E;this.shadow=new jf}function lf(a,b){S.call(this,a,b);this.type="AmbientLight";this.castShadow=void 0}function mf(a,b,c,d){S.call(this,a,b);this.type="RectAreaLight";this.width=void 0!==c?c:10;this.height=void 0!==d?d:10}function nf(){this.coefficients=
|
|
|
|
+[];for(var a=0;9>a;a++)this.coefficients.push(new n)}function Ra(a,b){S.call(this,void 0,b);this.type="LightProbe";this.sh=void 0!==a?a:new nf}function of(a){X.call(this,a);this.textures={}}function pf(){B.call(this);this.type="InstancedBufferGeometry";this.maxInstancedCount=void 0}function qf(a,b,c,d){"number"===typeof c&&(d=c,c=!1,console.error("THREE.InstancedBufferAttribute: The constructor now expects normalized as the third argument."));N.call(this,a,b,c);this.meshPerAttribute=d||1}function rf(a){X.call(this,
|
|
|
|
+a)}function sf(a){X.call(this,a)}function yg(a){"undefined"===typeof createImageBitmap&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported.");"undefined"===typeof fetch&&console.warn("THREE.ImageBitmapLoader: fetch() not supported.");X.call(this,a);this.options=void 0}function zg(){this.type="ShapePath";this.color=new A;this.subPaths=[];this.currentPath=null}function Ag(a){this.type="Font";this.data=a}function Bg(a){X.call(this,a)}function tf(a){X.call(this,a)}function Cg(a,
|
|
|
|
+b,c){Ra.call(this,void 0,c);a=(new A).set(a);c=(new A).set(b);b=new n(a.r,a.g,a.b);a=new n(c.r,c.g,c.b);c=Math.sqrt(Math.PI);var d=c*Math.sqrt(.75);this.sh.coefficients[0].copy(b).add(a).multiplyScalar(c);this.sh.coefficients[1].copy(b).sub(a).multiplyScalar(d)}function Dg(a,b){Ra.call(this,void 0,b);a=(new A).set(a);this.sh.coefficients[0].set(a.r,a.g,a.b).multiplyScalar(2*Math.sqrt(Math.PI))}function ji(){this.type="StereoCamera";this.aspect=1;this.eyeSep=.064;this.cameraL=new ba;this.cameraL.layers.enable(1);
|
|
|
|
+this.cameraL.matrixAutoUpdate=!1;this.cameraR=new ba;this.cameraR.layers.enable(2);this.cameraR.matrixAutoUpdate=!1;this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}function Eg(a){this.autoStart=void 0!==a?a:!0;this.elapsedTime=this.oldTime=this.startTime=0;this.running=!1}function Fg(){E.call(this);this.type="AudioListener";this.context=Gg.getContext();this.gain=this.context.createGain();this.gain.connect(this.context.destination);this.filter=null;this.timeDelta=
|
|
|
|
+0;this._clock=new Eg}function fd(a){E.call(this);this.type="Audio";this.listener=a;this.context=a.context;this.gain=this.context.createGain();this.gain.connect(a.getInput());this.autoplay=!1;this.buffer=null;this.detune=0;this.loop=!1;this.offset=this.loopEnd=this.loopStart=0;this.duration=void 0;this.playbackRate=1;this.isPlaying=!1;this.hasPlaybackControl=!0;this.sourceType="empty";this._progress=this._startedAt=0;this.filters=[]}function Hg(a){fd.call(this,a);this.panner=this.context.createPanner();
|
|
|
|
+this.panner.panningModel="HRTF";this.panner.connect(this.gain)}function Ig(a,b){this.analyser=a.context.createAnalyser();this.analyser.fftSize=void 0!==b?b:2048;this.data=new Uint8Array(this.analyser.frequencyBinCount);a.getOutput().connect(this.analyser)}function Jg(a,b,c){this.binding=a;this.valueSize=c;switch(b){case "quaternion":a=this._slerp;b=this._slerpAdditive;var d=this._setAdditiveIdentityQuaternion;this.buffer=new Float64Array(24);this._workIndex=5;break;case "string":case "bool":b=a=this._select;
|
|
|
|
+d=this._setAdditiveIdentityOther;this.buffer=Array(5*c);break;default:a=this._lerp,b=this._lerpAdditive,d=this._setAdditiveIdentityNumeric,this.buffer=new Float64Array(5*c)}this._mixBufferRegion=a;this._mixBufferRegionAdditive=b;this._setIdentity=d;this._origIndex=3;this._addIndex=4;this.referenceCount=this.useCount=this.cumulativeWeightAdditive=this.cumulativeWeight=0}function ki(a,b,c){c=c||ya.parseTrackName(b);this._targetGroup=a;this._bindings=a.subscribe_(b,c)}function ya(a,b,c){this.path=b;
|
|
|
|
+this.parsedPath=c||ya.parseTrackName(b);this.node=ya.findNode(a,this.parsedPath.nodeName)||a;this.rootNode=a}function li(){this.uuid=M.generateUUID();this._objects=Array.prototype.slice.call(arguments);this.nCachedObjects_=0;var a={};this._indicesByUUID=a;for(var b=0,c=arguments.length;b!==c;++b)a[arguments[b].uuid]=b;this._paths=[];this._parsedPaths=[];this._bindings=[];this._bindingsIndicesByPath={};var d=this;this.stats={objects:{get total(){return d._objects.length},get inUse(){return this.total-
|
|
|
|
+d.nCachedObjects_}},get bindingsPerObject(){return d._bindings.length}}}function mi(a,b,c,d){this._mixer=a;this._clip=b;this._localRoot=c||null;this.blendMode=d||b.blendMode;a=b.tracks;b=a.length;c=Array(b);d={endingStart:2400,endingEnd:2400};for(var e=0;e!==b;++e){var f=a[e].createInterpolant(null);c[e]=f;f.settings=d}this._interpolantSettings=d;this._interpolants=c;this._propertyBindings=Array(b);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 Kg(a){this._root=a;this._initMemoryManager();this.time=this._accuIndex=0;this.timeScale=1}function uf(a,b){"string"===typeof a&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),a=b);this.value=a}function Lg(a,b,c){qb.call(this,
|
|
|
|
+a,b);this.meshPerAttribute=c||1}function Mg(a,b,c,d){this.ray=new Wb(a,b);this.near=c||0;this.far=d||Infinity;this.camera=null;this.layers=new Ce;this.params={Mesh:{},Line:{threshold:1},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 ni(a,b){return a.distance-b.distance}function Ng(a,b,c,d){a.layers.test(b.layers)&&a.raycast(b,
|
|
|
|
+c);if(!0===d){a=a.children;d=0;for(var e=a.length;d<e;d++)Ng(a[d],b,c,!0)}}function oi(a,b,c){this.radius=void 0!==a?a:1;this.phi=void 0!==b?b:0;this.theta=void 0!==c?c:0;return this}function pi(a,b,c){this.radius=void 0!==a?a:1;this.theta=void 0!==b?b:0;this.y=void 0!==c?c:0;return this}function Og(a,b){this.min=void 0!==a?a:new v(Infinity,Infinity);this.max=void 0!==b?b:new v(-Infinity,-Infinity)}function Pg(a,b){this.start=void 0!==a?a:new n;this.end=void 0!==b?b:new n}function me(a){E.call(this);
|
|
|
|
+this.material=a;this.render=function(){}}function gd(a,b){E.call(this);this.light=a;this.light.updateMatrixWorld();this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1;this.color=b;a=new B;b=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(var c=0,d=1;32>c;c++,d++){var e=c/32*Math.PI*2,f=d/32*Math.PI*2;b.push(Math.cos(e),Math.sin(e),1,Math.cos(f),Math.sin(f),1)}a.setAttribute("position",new y(b,3));b=new da({fog:!1,toneMapped:!1});this.cone=new na(a,b);this.add(this.cone);this.update()}
|
|
|
|
+function qi(a){var b=[];a&&a.isBone&&b.push(a);for(var c=0;c<a.children.length;c++)b.push.apply(b,qi(a.children[c]));return b}function oc(a){for(var b=qi(a),c=new B,d=[],e=[],f=new A(0,0,1),g=new A(0,1,0),h=0;h<b.length;h++){var k=b[h];k.parent&&k.parent.isBone&&(d.push(0,0,0),d.push(0,0,0),e.push(f.r,f.g,f.b),e.push(g.r,g.g,g.b))}c.setAttribute("position",new y(d,3));c.setAttribute("color",new y(e,3));d=new da({vertexColors:!0,depthTest:!1,depthWrite:!1,toneMapped:!1,transparent:!0});na.call(this,
|
|
|
|
+c,d);this.type="SkeletonHelper";this.root=a;this.bones=b;this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1}function hd(a,b,c){this.light=a;this.light.updateMatrixWorld();this.color=c;a=new dc(b,4,2);b=new Na({wireframe:!0,fog:!1,toneMapped:!1});ja.call(this,a,b);this.type="PointLightHelper";this.matrix=this.light.matrixWorld;this.matrixAutoUpdate=!1;this.update()}function id(a,b,c){E.call(this);this.light=a;this.light.updateMatrixWorld();this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1;this.color=
|
|
|
|
+c;a=new ac(b);a.rotateY(.5*Math.PI);this.material=new Na({wireframe:!0,fog:!1,toneMapped:!1});void 0===this.color&&(this.material.vertexColors=!0);b=a.getAttribute("position");b=new Float32Array(3*b.count);a.setAttribute("color",new N(b,3));this.add(new ja(a,this.material));this.update()}function vf(a,b,c,d){a=a||10;b=b||10;c=new A(void 0!==c?c:4473924);d=new A(void 0!==d?d:8947848);var e=b/2,f=a/b,g=a/2;a=[];for(var h=[],k=0,m=0,l=-g;k<=b;k++,l+=f){a.push(-g,0,l,g,0,l);a.push(l,0,-g,l,0,g);var p=
|
|
|
|
+k===e?c:d;p.toArray(h,m);m+=3;p.toArray(h,m);m+=3;p.toArray(h,m);m+=3;p.toArray(h,m);m+=3}b=new B;b.setAttribute("position",new y(a,3));b.setAttribute("color",new y(h,3));c=new da({vertexColors:!0,toneMapped:!1});na.call(this,b,c);this.type="GridHelper"}function wf(a,b,c,d,e,f){a=a||10;b=b||16;c=c||8;d=d||64;e=new A(void 0!==e?e:4473924);f=new A(void 0!==f?f:8947848);var g=[],h=[],k;for(k=0;k<=b;k++){var m=k/b*2*Math.PI;var l=Math.sin(m)*a;m=Math.cos(m)*a;g.push(0,0,0);g.push(l,0,m);var p=k&1?e:f;
|
|
|
|
+h.push(p.r,p.g,p.b);h.push(p.r,p.g,p.b)}for(k=0;k<=c;k++){p=k&1?e:f;var n=a-a/c*k;for(b=0;b<d;b++)m=b/d*2*Math.PI,l=Math.sin(m)*n,m=Math.cos(m)*n,g.push(l,0,m),h.push(p.r,p.g,p.b),m=(b+1)/d*2*Math.PI,l=Math.sin(m)*n,m=Math.cos(m)*n,g.push(l,0,m),h.push(p.r,p.g,p.b)}a=new B;a.setAttribute("position",new y(g,3));a.setAttribute("color",new y(h,3));g=new da({vertexColors:!0,toneMapped:!1});na.call(this,a,g);this.type="PolarGridHelper"}function jd(a,b,c){E.call(this);this.light=a;this.light.updateMatrixWorld();
|
|
|
|
+this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1;this.color=c;void 0===b&&(b=1);a=new B;a.setAttribute("position",new y([-b,b,0,b,b,0,b,-b,0,-b,-b,0,-b,b,0],3));b=new da({fog:!1,toneMapped:!1});this.lightPlane=new Ja(a,b);this.add(this.lightPlane);a=new B;a.setAttribute("position",new y([0,0,0,0,0,1],3));this.targetLine=new Ja(a,b);this.add(this.targetLine);this.update()}function ne(a){function b(a,b,d){c(a,d);c(b,d)}function c(a,b){f.push(0,0,0);g.push(b.r,b.g,b.b);void 0===h[a]&&(h[a]=[]);h[a].push(f.length/
|
|
|
|
+3-1)}var d=new B,e=new da({color:16777215,vertexColors:!0,toneMapped:!1}),f=[],g=[],h={},k=new A(16755200),m=new A(16711680),l=new A(43775),p=new A(16777215),n=new A(3355443);b("n1","n2",k);b("n2","n4",k);b("n4","n3",k);b("n3","n1",k);b("f1","f2",k);b("f2","f4",k);b("f4","f3",k);b("f3","f1",k);b("n1","f1",k);b("n2","f2",k);b("n3","f3",k);b("n4","f4",k);b("p","n1",m);b("p","n2",m);b("p","n3",m);b("p","n4",m);b("u1","u2",l);b("u2","u3",l);b("u3","u1",l);b("c","t",p);b("p","c",n);b("cn1","cn2",n);b("cn3",
|
|
|
|
+"cn4",n);b("cf1","cf2",n);b("cf3","cf4",n);d.setAttribute("position",new y(f,3));d.setAttribute("color",new y(g,3));na.call(this,d,e);this.type="CameraHelper";this.camera=a;this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix();this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1;this.pointMap=h;this.update()}function oa(a,b,c,d,e,f,g){xf.set(e,f,g).unproject(d);a=b[a];if(void 0!==a)for(c=c.getAttribute("position"),b=0,d=a.length;b<d;b++)c.setXYZ(a[b],xf.x,xf.y,xf.z)}function vb(a,
|
|
|
|
+b){this.object=a;void 0===b&&(b=16776960);a=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]);var c=new Float32Array(24),d=new B;d.setIndex(new N(a,1));d.setAttribute("position",new N(c,3));na.call(this,d,new da({color:b,toneMapped:!1}));this.type="BoxHelper";this.matrixAutoUpdate=!1;this.update()}function oe(a,b){this.type="Box3Helper";this.box=a;b=b||16776960;a=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]);var c=new B;c.setIndex(new N(a,1));c.setAttribute("position",
|
|
|
|
+new y([1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1],3));na.call(this,c,new da({color:b,toneMapped:!1}));this.type="Box3Helper";this.geometry.computeBoundingSphere()}function pe(a,b,c){this.plane=a;this.size=void 0===b?1:b;a=void 0!==c?c:16776960;b=new B;b.setAttribute("position",new y([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,0,1,0,0,0],3));b.computeBoundingSphere();Ja.call(this,b,new da({color:a,toneMapped:!1}));this.type="PlaneHelper";b=new B;b.setAttribute("position",
|
|
|
|
+new y([1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1],3));b.computeBoundingSphere();this.add(new ja(b,new Na({color:a,opacity:.2,transparent:!0,depthWrite:!1,toneMapped:!1})))}function wb(a,b,c,d,e,f){E.call(this);this.type="ArrowHelper";void 0===a&&(a=new n(0,0,1));void 0===b&&(b=new n(0,0,0));void 0===c&&(c=1);void 0===d&&(d=16776960);void 0===e&&(e=.2*c);void 0===f&&(f=.2*e);void 0===yf&&(yf=new B,yf.setAttribute("position",new y([0,0,0,0,1,0],3)),Qg=new sb(0,.5,1,5,1),Qg.translate(0,-.5,0));this.position.copy(b);
|
|
|
|
+this.line=new Ja(yf,new da({color:d,toneMapped:!1}));this.line.matrixAutoUpdate=!1;this.add(this.line);this.cone=new ja(Qg,new Na({color:d,toneMapped:!1}));this.cone.matrixAutoUpdate=!1;this.add(this.cone);this.setDirection(a);this.setLength(c,e,f)}function qe(a){a=a||1;var b=[0,0,0,a,0,0,0,0,0,0,a,0,0,0,0,0,0,a];a=new B;a.setAttribute("position",new y(b,3));a.setAttribute("color",new y([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],3));b=new da({vertexColors:!0,toneMapped:!1});na.call(this,a,b);this.type=
|
|
|
|
+"AxesHelper"}function Rg(a){this._renderer=a;this._pingPongRenderTarget=null;a=new Float32Array(20);var b=new n(0,1,0);a=new tb({defines:{n:20},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:a},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:b},inputEncoding:{value:kb[3E3]},outputEncoding:{value:kb[3E3]}},vertexShader:Sg(),fragmentShader:"\nprecision mediump float;\nprecision mediump int;\nvarying vec3 vOutputDirection;\nuniform sampler2D envMap;\nuniform int samples;\nuniform float weights[n];\nuniform bool latitudinal;\nuniform float dTheta;\nuniform float mipInt;\nuniform vec3 poleAxis;\n\n"+
|
|
|
|
+Tg()+"\n\n#define ENVMAP_TYPE_CUBE_UV\n#include <cube_uv_reflection_fragment>\n\nvec3 getSample(float theta, vec3 axis) {\n\tfloat cosTheta = cos(theta);\n\t// Rodrigues' axis-angle rotation\n\tvec3 sampleDirection = vOutputDirection * cosTheta\n\t\t+ cross(axis, vOutputDirection) * sin(theta)\n\t\t+ axis * dot(axis, vOutputDirection) * (1.0 - cosTheta);\n\treturn bilinearCubeUV(envMap, sampleDirection, mipInt);\n}\n\nvoid main() {\n\tvec3 axis = latitudinal ? poleAxis : cross(poleAxis, vOutputDirection);\n\tif (all(equal(axis, vec3(0.0))))\n\t\taxis = vec3(vOutputDirection.z, 0.0, - vOutputDirection.x);\n\taxis = normalize(axis);\n\tgl_FragColor = vec4(0.0);\n\tgl_FragColor.rgb += weights[0] * getSample(0.0, axis);\n\tfor (int i = 1; i < n; i++) {\n\t\tif (i >= samples)\n\t\t\tbreak;\n\t\tfloat theta = dTheta * float(i);\n\t\tgl_FragColor.rgb += weights[i] * getSample(-1.0 * theta, axis);\n\t\tgl_FragColor.rgb += weights[i] * getSample(theta, axis);\n\t}\n\tgl_FragColor = linearToOutputTexel(gl_FragColor);\n}\n\t\t",
|
|
blending:0,depthTest:!1,depthWrite:!1});a.type="SphericalGaussianBlur";this._blurMaterial=a;this._cubemapShader=this._equirectShader=null;this._compileMaterial(this._blurMaterial)}function ri(a){a=new za(3*lb,3*lb,a);a.texture.mapping=306;a.texture.name="PMREM.cubeUv";a.scissorTest=!0;return a}function Ug(a,b,c,d,e){a.viewport.set(b,c,d,e);a.scissor.set(b,c,d,e)}function si(){var a=new v(1,1);a=new tb({uniforms:{envMap:{value:null},texelSize:{value:a},inputEncoding:{value:kb[3E3]},outputEncoding:{value:kb[3E3]}},
|
|
blending:0,depthTest:!1,depthWrite:!1});a.type="SphericalGaussianBlur";this._blurMaterial=a;this._cubemapShader=this._equirectShader=null;this._compileMaterial(this._blurMaterial)}function ri(a){a=new za(3*lb,3*lb,a);a.texture.mapping=306;a.texture.name="PMREM.cubeUv";a.scissorTest=!0;return a}function Ug(a,b,c,d,e){a.viewport.set(b,c,d,e);a.scissor.set(b,c,d,e)}function si(){var a=new v(1,1);a=new tb({uniforms:{envMap:{value:null},texelSize:{value:a},inputEncoding:{value:kb[3E3]},outputEncoding:{value:kb[3E3]}},
|
|
vertexShader:Sg(),fragmentShader:"\nprecision mediump float;\nprecision mediump int;\nvarying vec3 vOutputDirection;\nuniform sampler2D envMap;\nuniform vec2 texelSize;\n\n"+Tg()+"\n\n#define RECIPROCAL_PI 0.31830988618\n#define RECIPROCAL_PI2 0.15915494\n\nvoid main() {\n\tgl_FragColor = vec4(0.0);\n\tvec3 outputDirection = normalize(vOutputDirection);\n\tvec2 uv;\n\tuv.y = asin(clamp(outputDirection.y, -1.0, 1.0)) * RECIPROCAL_PI + 0.5;\n\tuv.x = atan(outputDirection.z, outputDirection.x) * RECIPROCAL_PI2 + 0.5;\n\tvec2 f = fract(uv / texelSize - 0.5);\n\tuv -= f * texelSize;\n\tvec3 tl = envMapTexelToLinear(texture2D(envMap, uv)).rgb;\n\tuv.x += texelSize.x;\n\tvec3 tr = envMapTexelToLinear(texture2D(envMap, uv)).rgb;\n\tuv.y += texelSize.y;\n\tvec3 br = envMapTexelToLinear(texture2D(envMap, uv)).rgb;\n\tuv.x -= texelSize.x;\n\tvec3 bl = envMapTexelToLinear(texture2D(envMap, uv)).rgb;\n\tvec3 tm = mix(tl, tr, f.x);\n\tvec3 bm = mix(bl, br, f.x);\n\tgl_FragColor.rgb = mix(tm, bm, f.y);\n\tgl_FragColor = linearToOutputTexel(gl_FragColor);\n}\n\t\t",
|
|
vertexShader:Sg(),fragmentShader:"\nprecision mediump float;\nprecision mediump int;\nvarying vec3 vOutputDirection;\nuniform sampler2D envMap;\nuniform vec2 texelSize;\n\n"+Tg()+"\n\n#define RECIPROCAL_PI 0.31830988618\n#define RECIPROCAL_PI2 0.15915494\n\nvoid main() {\n\tgl_FragColor = vec4(0.0);\n\tvec3 outputDirection = normalize(vOutputDirection);\n\tvec2 uv;\n\tuv.y = asin(clamp(outputDirection.y, -1.0, 1.0)) * RECIPROCAL_PI + 0.5;\n\tuv.x = atan(outputDirection.z, outputDirection.x) * RECIPROCAL_PI2 + 0.5;\n\tvec2 f = fract(uv / texelSize - 0.5);\n\tuv -= f * texelSize;\n\tvec3 tl = envMapTexelToLinear(texture2D(envMap, uv)).rgb;\n\tuv.x += texelSize.x;\n\tvec3 tr = envMapTexelToLinear(texture2D(envMap, uv)).rgb;\n\tuv.y += texelSize.y;\n\tvec3 br = envMapTexelToLinear(texture2D(envMap, uv)).rgb;\n\tuv.x -= texelSize.x;\n\tvec3 bl = envMapTexelToLinear(texture2D(envMap, uv)).rgb;\n\tvec3 tm = mix(tl, tr, f.x);\n\tvec3 bm = mix(bl, br, f.x);\n\tgl_FragColor.rgb = mix(tm, bm, f.y);\n\tgl_FragColor = linearToOutputTexel(gl_FragColor);\n}\n\t\t",
|
|
blending:0,depthTest:!1,depthWrite:!1});a.type="EquirectangularToCubeUV";return a}function ti(){var a=new tb({uniforms:{envMap:{value:null},inputEncoding:{value:kb[3E3]},outputEncoding:{value:kb[3E3]}},vertexShader:Sg(),fragmentShader:"\nprecision mediump float;\nprecision mediump int;\nvarying vec3 vOutputDirection;\nuniform samplerCube envMap;\n\n"+Tg()+"\n\nvoid main() {\n\tgl_FragColor = vec4(0.0);\n\tgl_FragColor.rgb = envMapTexelToLinear(textureCube(envMap, vec3( - vOutputDirection.x, vOutputDirection.yz ))).rgb;\n\tgl_FragColor = linearToOutputTexel(gl_FragColor);\n}\n\t\t",
|
|
blending:0,depthTest:!1,depthWrite:!1});a.type="EquirectangularToCubeUV";return a}function ti(){var a=new tb({uniforms:{envMap:{value:null},inputEncoding:{value:kb[3E3]},outputEncoding:{value:kb[3E3]}},vertexShader:Sg(),fragmentShader:"\nprecision mediump float;\nprecision mediump int;\nvarying vec3 vOutputDirection;\nuniform samplerCube envMap;\n\n"+Tg()+"\n\nvoid main() {\n\tgl_FragColor = vec4(0.0);\n\tgl_FragColor.rgb = envMapTexelToLinear(textureCube(envMap, vec3( - vOutputDirection.x, vOutputDirection.yz ))).rgb;\n\tgl_FragColor = linearToOutputTexel(gl_FragColor);\n}\n\t\t",
|