|
@@ -2,48 +2,48 @@
|
|
|
(function(k,La){"object"===typeof exports&&"undefined"!==typeof module?La(exports):"function"===typeof define&&define.amd?define(["exports"],La):(k=k||self,La(k.THREE={}))})(this,function(k){function La(){}function fa(c,a,b,d,e,f,g,h,l,n){Object.defineProperty(this,"id",{value:gj++});this.uuid=T.generateUUID();this.name="";this.image=void 0!==c?c:fa.DEFAULT_IMAGE;this.mipmaps=[];this.mapping=void 0!==a?a:fa.DEFAULT_MAPPING;this.wrapS=void 0!==b?b:1001;this.wrapT=void 0!==d?d:1001;this.magFilter=void 0!==
|
|
|
e?e:1006;this.minFilter=void 0!==f?f:1008;this.anisotropy=void 0!==l?l:1;this.format=void 0!==g?g:1023;this.internalFormat=null;this.type=void 0!==h?h:1009;this.offset=new p(0,0);this.repeat=new p(1,1);this.center=new p(0,0);this.rotation=0;this.matrixAutoUpdate=!0;this.matrix=new X;this.generateMipmaps=!0;this.premultiplyAlpha=!1;this.flipY=!0;this.unpackAlignment=4;this.encoding=void 0!==n?n:3E3;this.version=0;this.onUpdate=null}function Sa(c,a,b){this.width=c;this.height=a;this.scissor=new B(0,
|
|
|
0,c,a);this.scissorTest=!1;this.viewport=new B(0,0,c,a);b=b||{};this.texture=new fa(void 0,b.mapping,b.wrapS,b.wrapT,b.magFilter,b.minFilter,b.format,b.type,b.anisotropy,b.encoding);this.texture.image={};this.texture.image.width=c;this.texture.image.height=a;this.texture.generateMipmaps=void 0!==b.generateMipmaps?b.generateMipmaps:!1;this.texture.minFilter=void 0!==b.minFilter?b.minFilter:1006;this.depthBuffer=void 0!==b.depthBuffer?b.depthBuffer:!0;this.stencilBuffer=void 0!==b.stencilBuffer?b.stencilBuffer:
|
|
|
-!1;this.depthTexture=void 0!==b.depthTexture?b.depthTexture:null}function lg(c,a,b){Sa.call(this,c,a,b);this.samples=4}function mg(c,a,b,d,e){for(var f=0,g=c.length-3;f<=g;f+=3){jc.fromArray(c,f);var h=e.x*Math.abs(jc.x)+e.y*Math.abs(jc.y)+e.z*Math.abs(jc.z),l=a.dot(jc),n=b.dot(jc),r=d.dot(jc);if(Math.max(-Math.max(l,n,r),Math.min(l,n,r))>h)return!1}return!0}function D(){Object.defineProperty(this,"id",{value:hj++});this.uuid=T.generateUUID();this.name="";this.type="Object3D";this.parent=null;this.children=
|
|
|
-[];this.up=D.DefaultUp.clone();var c=new m,a=new ra,b=new O,d=new m(1,1,1);a._onChange(function(){b.setFromEuler(a,!1)});b._onChange(function(){a.setFromQuaternion(b,void 0,!1)});Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:c},rotation:{configurable:!0,enumerable:!0,value:a},quaternion:{configurable:!0,enumerable:!0,value:b},scale:{configurable:!0,enumerable:!0,value:d},modelViewMatrix:{value:new z},normalMatrix:{value:new X}});this.matrix=new z;this.matrixWorld=new z;
|
|
|
-this.matrixAutoUpdate=D.DefaultMatrixAutoUpdate;this.matrixWorldNeedsUpdate=!1;this.layers=new nb;this.visible=!0;this.receiveShadow=this.castShadow=!1;this.frustumCulled=!0;this.renderOrder=0;this.userData={}}function ng(c,a,b){0>b&&(b+=1);1<b&&--b;return b<1/6?c+6*(a-c)*b:.5>b?a:b<2/3?c+6*(a-c)*(2/3-b):c}function og(c){return.04045>c?.0773993808*c:Math.pow(.9478672986*c+.0521327014,2.4)}function pg(c){return.0031308>c?12.92*c:1.055*Math.pow(c,.41666)-.055}function M(){Object.defineProperty(this,
|
|
|
+!1;this.depthTexture=void 0!==b.depthTexture?b.depthTexture:null}function lg(c,a,b){Sa.call(this,c,a,b);this.samples=4}function mg(c,a,b,d,e){for(var f=0,g=c.length-3;f<=g;f+=3){jc.fromArray(c,f);var h=e.x*Math.abs(jc.x)+e.y*Math.abs(jc.y)+e.z*Math.abs(jc.z),l=a.dot(jc),n=b.dot(jc),r=d.dot(jc);if(Math.max(-Math.max(l,n,r),Math.min(l,n,r))>h)return!1}return!0}function F(){Object.defineProperty(this,"id",{value:hj++});this.uuid=T.generateUUID();this.name="";this.type="Object3D";this.parent=null;this.children=
|
|
|
+[];this.up=F.DefaultUp.clone();var c=new m,a=new ra,b=new O,d=new m(1,1,1);a._onChange(function(){b.setFromEuler(a,!1)});b._onChange(function(){a.setFromQuaternion(b,void 0,!1)});Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:c},rotation:{configurable:!0,enumerable:!0,value:a},quaternion:{configurable:!0,enumerable:!0,value:b},scale:{configurable:!0,enumerable:!0,value:d},modelViewMatrix:{value:new z},normalMatrix:{value:new X}});this.matrix=new z;this.matrixWorld=new z;
|
|
|
+this.matrixAutoUpdate=F.DefaultMatrixAutoUpdate;this.matrixWorldNeedsUpdate=!1;this.layers=new nb;this.visible=!0;this.receiveShadow=this.castShadow=!1;this.frustumCulled=!0;this.renderOrder=0;this.userData={}}function ng(c,a,b){0>b&&(b+=1);1<b&&--b;return b<1/6?c+6*(a-c)*b:.5>b?a:b<2/3?c+6*(a-c)*(2/3-b):c}function og(c){return.04045>c?.0773993808*c:Math.pow(.9478672986*c+.0521327014,2.4)}function pg(c){return.0031308>c?12.92*c:1.055*Math.pow(c,.41666)-.055}function L(){Object.defineProperty(this,
|
|
|
"id",{value:ij++});this.uuid=T.generateUUID();this.name="";this.type="Material";this.fog=!0;this.blending=1;this.side=0;this.vertexColors=this.flatShading=!1;this.opacity=1;this.transparent=!1;this.blendSrc=204;this.blendDst=205;this.blendEquation=100;this.blendEquationAlpha=this.blendDstAlpha=this.blendSrcAlpha=null;this.depthFunc=3;this.depthWrite=this.depthTest=!0;this.stencilWriteMask=255;this.stencilFunc=519;this.stencilRef=0;this.stencilFuncMask=255;this.stencilZPass=this.stencilZFail=this.stencilFail=
|
|
|
-7680;this.stencilWrite=!1;this.clippingPlanes=null;this.clipShadows=this.clipIntersection=!1;this.shadowSide=null;this.colorWrite=!0;this.precision=null;this.polygonOffset=!1;this.polygonOffsetUnits=this.polygonOffsetFactor=0;this.dithering=!1;this.alphaTest=0;this.premultipliedAlpha=!1;this.toneMapped=this.visible=!0;this.userData={};this.version=0}function Za(c){M.call(this);this.type="MeshBasicMaterial";this.color=new x(16777215);this.lightMap=this.map=null;this.lightMapIntensity=1;this.aoMap=
|
|
|
+7680;this.stencilWrite=!1;this.clippingPlanes=null;this.clipShadows=this.clipIntersection=!1;this.shadowSide=null;this.colorWrite=!0;this.precision=null;this.polygonOffset=!1;this.polygonOffsetUnits=this.polygonOffsetFactor=0;this.dithering=!1;this.alphaTest=0;this.premultipliedAlpha=!1;this.toneMapped=this.visible=!0;this.userData={};this.version=0}function Za(c){L.call(this);this.type="MeshBasicMaterial";this.color=new x(16777215);this.lightMap=this.map=null;this.lightMapIntensity=1;this.aoMap=
|
|
|
null;this.aoMapIntensity=1;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.morphTargets=this.skinning=!1;this.setValues(c)}function N(c,a,b){if(Array.isArray(c))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.name="";this.array=c;this.itemSize=a;this.count=void 0!==c?c.length/a:0;this.normalized=!0===b;this.usage=
|
|
|
-35044;this.updateRange={offset:0,count:-1};this.version=0}function Nd(c,a,b){N.call(this,new Int8Array(c),a,b)}function Od(c,a,b){N.call(this,new Uint8Array(c),a,b)}function Pd(c,a,b){N.call(this,new Uint8ClampedArray(c),a,b)}function Qd(c,a,b){N.call(this,new Int16Array(c),a,b)}function kc(c,a,b){N.call(this,new Uint16Array(c),a,b)}function Rd(c,a,b){N.call(this,new Int32Array(c),a,b)}function lc(c,a,b){N.call(this,new Uint32Array(c),a,b)}function H(c,a,b){N.call(this,new Float32Array(c),a,b)}function Sd(c,
|
|
|
-a,b){N.call(this,new Float64Array(c),a,b)}function yh(c){if(0===c.length)return-Infinity;for(var a=c[0],b=1,d=c.length;b<d;++b)c[b]>a&&(a=c[b]);return a}function G(){Object.defineProperty(this,"id",{value:jj+=2});this.uuid=T.generateUUID();this.name="";this.type="BufferGeometry";this.index=null;this.attributes={};this.morphAttributes={};this.morphTargetsRelative=!1;this.groups=[];this.boundingSphere=this.boundingBox=null;this.drawRange={start:0,count:Infinity};this.userData={}}function na(c,a){D.call(this);
|
|
|
+35044;this.updateRange={offset:0,count:-1};this.version=0}function Nd(c,a,b){N.call(this,new Int8Array(c),a,b)}function Od(c,a,b){N.call(this,new Uint8Array(c),a,b)}function Pd(c,a,b){N.call(this,new Uint8ClampedArray(c),a,b)}function Qd(c,a,b){N.call(this,new Int16Array(c),a,b)}function kc(c,a,b){N.call(this,new Uint16Array(c),a,b)}function Rd(c,a,b){N.call(this,new Int32Array(c),a,b)}function lc(c,a,b){N.call(this,new Uint32Array(c),a,b)}function I(c,a,b){N.call(this,new Float32Array(c),a,b)}function Sd(c,
|
|
|
+a,b){N.call(this,new Float64Array(c),a,b)}function yh(c){if(0===c.length)return-Infinity;for(var a=c[0],b=1,d=c.length;b<d;++b)c[b]>a&&(a=c[b]);return a}function G(){Object.defineProperty(this,"id",{value:jj+=2});this.uuid=T.generateUUID();this.name="";this.type="BufferGeometry";this.index=null;this.attributes={};this.morphAttributes={};this.morphTargetsRelative=!1;this.groups=[];this.boundingSphere=this.boundingBox=null;this.drawRange={start:0,count:Infinity};this.userData={}}function na(c,a){F.call(this);
|
|
|
this.type="Mesh";this.geometry=void 0!==c?c:new G;this.material=void 0!==a?a:new Za;this.updateMorphTargets()}function zh(c,a,b,d,e,f,g,h){if(null===(1===a.side?d.intersectTriangle(g,f,e,!0,h):d.intersectTriangle(e,f,g,2!==a.side,h)))return null;Ve.copy(h);Ve.applyMatrix4(c.matrixWorld);a=b.ray.origin.distanceTo(Ve);return a<b.near||a>b.far?null:{distance:a,point:Ve.clone(),object:c}}function We(c,a,b,d,e,f,g,h,l,n,r,u){Mb.fromBufferAttribute(e,n);Nb.fromBufferAttribute(e,r);Ob.fromBufferAttribute(e,
|
|
|
u);e=c.morphTargetInfluences;if(a.morphTargets&&f&&e){Xe.set(0,0,0);Ye.set(0,0,0);Ze.set(0,0,0);for(var q=0,k=f.length;q<k;q++){var t=e[q],w=f[q];0!==t&&(qg.fromBufferAttribute(w,n),rg.fromBufferAttribute(w,r),sg.fromBufferAttribute(w,u),g?(Xe.addScaledVector(qg,t),Ye.addScaledVector(rg,t),Ze.addScaledVector(sg,t)):(Xe.addScaledVector(qg.sub(Mb),t),Ye.addScaledVector(rg.sub(Nb),t),Ze.addScaledVector(sg.sub(Ob),t)))}Mb.add(Xe);Nb.add(Ye);Ob.add(Ze)}c.isSkinnedMesh&&(c.boneTransform(n,Mb),c.boneTransform(r,
|
|
|
Nb),c.boneTransform(u,Ob));if(c=zh(c,a,b,d,Mb,Nb,Ob,Td))h&&(Nc.fromBufferAttribute(h,n),Oc.fromBufferAttribute(h,r),Pc.fromBufferAttribute(h,u),c.uv=S.getUV(Td,Mb,Nb,Ob,Nc,Oc,Pc,new p)),l&&(Nc.fromBufferAttribute(l,n),Oc.fromBufferAttribute(l,r),Pc.fromBufferAttribute(l,u),c.uv2=S.getUV(Td,Mb,Nb,Ob,Nc,Oc,Pc,new p)),h=new mc(n,r,u),S.getNormal(Mb,Nb,Ob,h.normal),c.face=h;return c}function P(){Object.defineProperty(this,"id",{value:kj+=2});this.uuid=T.generateUUID();this.name="";this.type="Geometry";
|
|
|
this.vertices=[];this.colors=[];this.faces=[];this.faceVertexUvs=[[]];this.morphTargets=[];this.morphNormals=[];this.skinWeights=[];this.skinIndices=[];this.lineDistances=[];this.boundingSphere=this.boundingBox=null;this.groupsNeedUpdate=this.lineDistancesNeedUpdate=this.colorsNeedUpdate=this.normalsNeedUpdate=this.uvsNeedUpdate=this.verticesNeedUpdate=this.elementsNeedUpdate=!1}function Qc(c,a,b,d,e,f){P.call(this);this.type="BoxGeometry";this.parameters={width:c,height:a,depth:b,widthSegments:d,
|
|
|
-heightSegments:e,depthSegments:f};this.fromBufferGeometry(new Pb(c,a,b,d,e,f));this.mergeVertices()}function Pb(c,a,b,d,e,f){function g(a,b,c,d,e,f,g,v,A,K,p){var t=f/A,E=g/K,w=f/2,y=g/2,J=v/2;g=A+1;for(var C=K+1,Ga=f=0,F=new m,Q=0;Q<C;Q++)for(var x=Q*E-y,B=0;B<g;B++)F[a]=(B*t-w)*d,F[b]=x*e,F[c]=J,n.push(F.x,F.y,F.z),F[a]=0,F[b]=0,F[c]=0<v?1:-1,r.push(F.x,F.y,F.z),u.push(B/A),u.push(1-Q/K),f+=1;for(a=0;a<K;a++)for(b=0;b<A;b++)c=q+b+g*(a+1),d=q+(b+1)+g*(a+1),e=q+(b+1)+g*a,l.push(q+b+g*a,c,e),l.push(c,
|
|
|
+heightSegments:e,depthSegments:f};this.fromBufferGeometry(new Pb(c,a,b,d,e,f));this.mergeVertices()}function Pb(c,a,b,d,e,f){function g(a,b,c,d,e,f,g,v,A,M,p){var t=f/A,C=g/M,w=f/2,y=g/2,E=v/2;g=A+1;for(var D=M+1,Ga=f=0,H=new m,Q=0;Q<D;Q++)for(var x=Q*C-y,B=0;B<g;B++)H[a]=(B*t-w)*d,H[b]=x*e,H[c]=E,n.push(H.x,H.y,H.z),H[a]=0,H[b]=0,H[c]=0<v?1:-1,r.push(H.x,H.y,H.z),u.push(B/A),u.push(1-Q/M),f+=1;for(a=0;a<M;a++)for(b=0;b<A;b++)c=q+b+g*(a+1),d=q+(b+1)+g*(a+1),e=q+(b+1)+g*a,l.push(q+b+g*a,c,e),l.push(c,
|
|
|
d,e),Ga+=6;h.addGroup(k,Ga,p);k+=Ga;q+=f}void 0===c&&(c=1);void 0===a&&(a=1);void 0===b&&(b=1);void 0===d&&(d=1);void 0===e&&(e=1);void 0===f&&(f=1);G.call(this);this.type="BoxBufferGeometry";this.parameters={width:c,height:a,depth:b,widthSegments:d,heightSegments:e,depthSegments:f};var h=this;d=Math.floor(d);e=Math.floor(e);f=Math.floor(f);var l=[],n=[],r=[],u=[],q=0,k=0;g("z","y","x",-1,-1,b,a,c,f,e,0);g("z","y","x",1,-1,b,a,-c,f,e,1);g("x","z","y",1,1,c,b,a,d,f,2);g("x","z","y",1,-1,c,b,-a,d,f,
|
|
|
-3);g("x","y","z",1,-1,c,a,b,d,e,4);g("x","y","z",-1,-1,c,a,-b,d,e,5);this.setIndex(l);this.setAttribute("position",new H(n,3));this.setAttribute("normal",new H(r,3));this.setAttribute("uv",new H(u,2))}function Rc(c){var a={},b;for(b in c){a[b]={};for(var d in c[b]){var e=c[b][d];e&&(e.isColor||e.isMatrix3||e.isMatrix4||e.isVector2||e.isVector3||e.isVector4||e.isTexture)?a[b][d]=e.clone():Array.isArray(e)?a[b][d]=e.slice():a[b][d]=e}}return a}function oa(c){for(var a={},b=0;b<c.length;b++){var d=Rc(c[b]),
|
|
|
-e;for(e in d)a[e]=d[e]}return a}function Aa(c){M.call(this);this.type="ShaderMaterial";this.defines={};this.uniforms={};this.vertexShader="void main() {\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}";this.fragmentShader="void main() {\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}";this.linewidth=1;this.wireframe=!1;this.wireframeLinewidth=1;this.morphNormals=this.morphTargets=this.skinning=this.clipping=this.lights=this.fog=!1;this.extensions={derivatives:!1,fragDepth:!1,
|
|
|
-drawBuffers:!1,shaderTextureLOD:!1};this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv2:[0,0]};this.index0AttributeName=void 0;this.uniformsNeedUpdate=!1;void 0!==c&&(void 0!==c.attributes&&console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."),this.setValues(c))}function ob(){D.call(this);this.type="Camera";this.matrixWorldInverse=new z;this.projectionMatrix=new z;this.projectionMatrixInverse=new z}function ta(c,a,b,d){ob.call(this);this.type=
|
|
|
-"PerspectiveCamera";this.fov=void 0!==c?c:50;this.zoom=1;this.near=void 0!==b?b:.1;this.far=void 0!==d?d:2E3;this.focus=10;this.aspect=void 0!==a?a:1;this.view=null;this.filmGauge=35;this.filmOffset=0;this.updateProjectionMatrix()}function Sc(c,a,b){D.call(this);this.type="CubeCamera";if(!0!==b.isWebGLCubeRenderTarget)console.error("THREE.CubeCamera: The constructor now expects an instance of WebGLCubeRenderTarget as third parameter.");else{this.renderTarget=b;var d=new ta(90,1,c,a);d.layers=this.layers;
|
|
|
-d.up.set(0,-1,0);d.lookAt(new m(1,0,0));this.add(d);var e=new ta(90,1,c,a);e.layers=this.layers;e.up.set(0,-1,0);e.lookAt(new m(-1,0,0));this.add(e);var f=new ta(90,1,c,a);f.layers=this.layers;f.up.set(0,0,1);f.lookAt(new m(0,1,0));this.add(f);var g=new ta(90,1,c,a);g.layers=this.layers;g.up.set(0,0,-1);g.lookAt(new m(0,-1,0));this.add(g);var h=new ta(90,1,c,a);h.layers=this.layers;h.up.set(0,-1,0);h.lookAt(new m(0,0,1));this.add(h);var l=new ta(90,1,c,a);l.layers=this.layers;l.up.set(0,-1,0);l.lookAt(new m(0,
|
|
|
-0,-1));this.add(l);this.update=function(a,c){null===this.parent&&this.updateMatrixWorld();var n=a.xr.enabled,r=a.getRenderTarget();a.xr.enabled=!1;var k=b.texture.generateMipmaps;b.texture.generateMipmaps=!1;a.setRenderTarget(b,0);a.render(c,d);a.setRenderTarget(b,1);a.render(c,e);a.setRenderTarget(b,2);a.render(c,f);a.setRenderTarget(b,3);a.render(c,g);a.setRenderTarget(b,4);a.render(c,h);b.texture.generateMipmaps=k;a.setRenderTarget(b,5);a.render(c,l);a.setRenderTarget(r);a.xr.enabled=n};this.clear=
|
|
|
-function(a,c,d,e){for(var f=a.getRenderTarget(),g=0;6>g;g++)a.setRenderTarget(b,g),a.clear(c,d,e);a.setRenderTarget(f)}}}function Qb(c,a,b){Number.isInteger(a)&&(console.warn("THREE.WebGLCubeRenderTarget: constructor signature is now WebGLCubeRenderTarget( size, options )"),a=b);Sa.call(this,c,c,a);this.texture.isWebGLCubeRenderTargetTexture=!0}function nc(c,a,b,d,e,f,g,h,l,n,r,u){fa.call(this,null,f,g,h,l,n,d,e,r,u);this.image={data:c||null,width:a||1,height:b||1};this.magFilter=void 0!==l?l:1003;
|
|
|
-this.minFilter=void 0!==n?n:1003;this.flipY=this.generateMipmaps=!1;this.unpackAlignment=1;this.needsUpdate=!0}function Ah(){function c(b,g){d(b,g);e=a.requestAnimationFrame(c)}var a=null,b=!1,d=null,e=null;return{start:function(){!0!==b&&null!==d&&(e=a.requestAnimationFrame(c),b=!0)},stop:function(){a.cancelAnimationFrame(e);b=!1},setAnimationLoop:function(a){d=a},setContext:function(b){a=b}}}function lj(c,a){function b(a,b){var d=a.array,e=a.usage,f=c.createBuffer();c.bindBuffer(b,f);c.bufferData(b,
|
|
|
-d,e);a.onUploadCallback();b=5126;d instanceof Float32Array?b=5126:d instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):d instanceof Uint16Array?b=5123:d instanceof Int16Array?b=5122:d instanceof Uint32Array?b=5125:d instanceof Int32Array?b=5124:d instanceof Int8Array?b=5120:d instanceof Uint8Array&&(b=5121);return{buffer:f,type:b,bytesPerElement:d.BYTES_PER_ELEMENT,version:a.version}}var d=a.isWebGL2,e=new WeakMap;return{get:function(a){a.isInterleavedBufferAttribute&&
|
|
|
+3);g("x","y","z",1,-1,c,a,b,d,e,4);g("x","y","z",-1,-1,c,a,-b,d,e,5);this.setIndex(l);this.setAttribute("position",new I(n,3));this.setAttribute("normal",new I(r,3));this.setAttribute("uv",new I(u,2))}function Rc(c){var a={},b;for(b in c){a[b]={};for(var d in c[b]){var e=c[b][d];e&&(e.isColor||e.isMatrix3||e.isMatrix4||e.isVector2||e.isVector3||e.isVector4||e.isTexture)?a[b][d]=e.clone():Array.isArray(e)?a[b][d]=e.slice():a[b][d]=e}}return a}function oa(c){for(var a={},b=0;b<c.length;b++){var d=Rc(c[b]),
|
|
|
+e;for(e in d)a[e]=d[e]}return a}function Aa(c){L.call(this);this.type="ShaderMaterial";this.defines={};this.uniforms={};this.vertexShader="void main() {\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}";this.fragmentShader="void main() {\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}";this.linewidth=1;this.wireframe=!1;this.wireframeLinewidth=1;this.morphNormals=this.morphTargets=this.skinning=this.clipping=this.lights=this.fog=!1;this.extensions={derivatives:!1,fragDepth:!1,
|
|
|
+drawBuffers:!1,shaderTextureLOD:!1};this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv2:[0,0]};this.index0AttributeName=void 0;this.uniformsNeedUpdate=!1;this.glslVersion=null;void 0!==c&&(void 0!==c.attributes&&console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."),this.setValues(c))}function ob(){F.call(this);this.type="Camera";this.matrixWorldInverse=new z;this.projectionMatrix=new z;this.projectionMatrixInverse=new z}function ta(c,a,b,d){ob.call(this);
|
|
|
+this.type="PerspectiveCamera";this.fov=void 0!==c?c:50;this.zoom=1;this.near=void 0!==b?b:.1;this.far=void 0!==d?d:2E3;this.focus=10;this.aspect=void 0!==a?a:1;this.view=null;this.filmGauge=35;this.filmOffset=0;this.updateProjectionMatrix()}function Sc(c,a,b){F.call(this);this.type="CubeCamera";if(!0!==b.isWebGLCubeRenderTarget)console.error("THREE.CubeCamera: The constructor now expects an instance of WebGLCubeRenderTarget as third parameter.");else{this.renderTarget=b;var d=new ta(90,1,c,a);d.layers=
|
|
|
+this.layers;d.up.set(0,-1,0);d.lookAt(new m(1,0,0));this.add(d);var e=new ta(90,1,c,a);e.layers=this.layers;e.up.set(0,-1,0);e.lookAt(new m(-1,0,0));this.add(e);var f=new ta(90,1,c,a);f.layers=this.layers;f.up.set(0,0,1);f.lookAt(new m(0,1,0));this.add(f);var g=new ta(90,1,c,a);g.layers=this.layers;g.up.set(0,0,-1);g.lookAt(new m(0,-1,0));this.add(g);var h=new ta(90,1,c,a);h.layers=this.layers;h.up.set(0,-1,0);h.lookAt(new m(0,0,1));this.add(h);var l=new ta(90,1,c,a);l.layers=this.layers;l.up.set(0,
|
|
|
+-1,0);l.lookAt(new m(0,0,-1));this.add(l);this.update=function(a,c){null===this.parent&&this.updateMatrixWorld();var n=a.xr.enabled,r=a.getRenderTarget();a.xr.enabled=!1;var k=b.texture.generateMipmaps;b.texture.generateMipmaps=!1;a.setRenderTarget(b,0);a.render(c,d);a.setRenderTarget(b,1);a.render(c,e);a.setRenderTarget(b,2);a.render(c,f);a.setRenderTarget(b,3);a.render(c,g);a.setRenderTarget(b,4);a.render(c,h);b.texture.generateMipmaps=k;a.setRenderTarget(b,5);a.render(c,l);a.setRenderTarget(r);
|
|
|
+a.xr.enabled=n};this.clear=function(a,c,d,e){for(var f=a.getRenderTarget(),g=0;6>g;g++)a.setRenderTarget(b,g),a.clear(c,d,e);a.setRenderTarget(f)}}}function Qb(c,a,b){Number.isInteger(a)&&(console.warn("THREE.WebGLCubeRenderTarget: constructor signature is now WebGLCubeRenderTarget( size, options )"),a=b);Sa.call(this,c,c,a);this.texture.isWebGLCubeRenderTargetTexture=!0}function nc(c,a,b,d,e,f,g,h,l,n,r,u){fa.call(this,null,f,g,h,l,n,d,e,r,u);this.image={data:c||null,width:a||1,height:b||1};this.magFilter=
|
|
|
+void 0!==l?l:1003;this.minFilter=void 0!==n?n:1003;this.flipY=this.generateMipmaps=!1;this.unpackAlignment=1;this.needsUpdate=!0}function Ah(){function c(b,g){d(b,g);e=a.requestAnimationFrame(c)}var a=null,b=!1,d=null,e=null;return{start:function(){!0!==b&&null!==d&&(e=a.requestAnimationFrame(c),b=!0)},stop:function(){a.cancelAnimationFrame(e);b=!1},setAnimationLoop:function(a){d=a},setContext:function(b){a=b}}}function lj(c,a){function b(a,b){var d=a.array,e=a.usage,f=c.createBuffer();c.bindBuffer(b,
|
|
|
+f);c.bufferData(b,d,e);a.onUploadCallback();b=5126;d instanceof Float32Array?b=5126:d instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):d instanceof Uint16Array?b=5123:d instanceof Int16Array?b=5122:d instanceof Uint32Array?b=5125:d instanceof Int32Array?b=5124:d instanceof Int8Array?b=5120:d instanceof Uint8Array&&(b=5121);return{buffer:f,type:b,bytesPerElement:d.BYTES_PER_ELEMENT,version:a.version}}var d=a.isWebGL2,e=new WeakMap;return{get:function(a){a.isInterleavedBufferAttribute&&
|
|
|
(a=a.data);return e.get(a)},remove:function(a){a.isInterleavedBufferAttribute&&(a=a.data);var b=e.get(a);b&&(c.deleteBuffer(b.buffer),e.delete(a))},update:function(a,g){if(a.isGLBufferAttribute)g=e.get(a),(!g||g.version<a.version)&&e.set(a,{buffer:a.buffer,type:a.type,bytesPerElement:a.elementSize,version:a.version});else{a.isInterleavedBufferAttribute&&(a=a.data);var f=e.get(a);if(void 0===f)e.set(a,b(a,g));else if(f.version<a.version){var l=a.array,n=a.updateRange;c.bindBuffer(g,f.buffer);-1===
|
|
|
n.count?c.bufferSubData(g,0,l):(d?c.bufferSubData(g,n.offset*l.BYTES_PER_ELEMENT,l,n.offset,n.count):c.bufferSubData(g,n.offset*l.BYTES_PER_ELEMENT,l.subarray(n.offset,n.offset+n.count)),n.count=-1);f.version=a.version}}}}}function Ud(c,a,b,d){P.call(this);this.type="PlaneGeometry";this.parameters={width:c,height:a,widthSegments:b,heightSegments:d};this.fromBufferGeometry(new oc(c,a,b,d));this.mergeVertices()}function oc(c,a,b,d){G.call(this);this.type="PlaneBufferGeometry";this.parameters={width:c,
|
|
|
-height:a,widthSegments:b,heightSegments:d};c=c||1;a=a||1;var e=c/2,f=a/2;b=Math.floor(b)||1;d=Math.floor(d)||1;var g=b+1,h=d+1,l=c/b,n=a/d;a=[];c=[];for(var r=[],u=[],q=0;q<h;q++)for(var k=q*n-f,t=0;t<g;t++)c.push(t*l-e,-k,0),r.push(0,0,1),u.push(t/b),u.push(1-q/d);for(e=0;e<d;e++)for(f=0;f<b;f++)h=f+g*(e+1),l=f+1+g*(e+1),n=f+1+g*e,a.push(f+g*e,h,n),a.push(h,l,n);this.setIndex(a);this.setAttribute("position",new H(c,3));this.setAttribute("normal",new H(r,3));this.setAttribute("uv",new H(u,2))}function mj(c,
|
|
|
-a,b,d,e){function f(a,c){b.buffers.color.setClear(a.r,a.g,a.b,c,e)}var g=new x(0),h=0,l,n,r=null,u=0,q=null;return{getClearColor:function(){return g},setClearColor:function(a,b){g.set(a);h=void 0!==b?b:1;f(g,h)},getClearAlpha:function(){return h},setClearAlpha:function(a){h=a;f(g,h)},render:function(b,e,k,E){(e=!0===e.isScene?e.background:null)&&e.isTexture&&(e=a.get(e));k=c.xr;(k=k.getSession&&k.getSession())&&"additive"===k.environmentBlendMode&&(e=null);null===e?f(g,h):e&&e.isColor&&(f(e,1),E=
|
|
|
-!0);(c.autoClear||E)&&c.clear(c.autoClearColor,c.autoClearDepth,c.autoClearStencil);if(e&&(e.isCubeTexture||e.isWebGLCubeRenderTarget||e.isWebGLCubeRenderTargetTexture||306===e.mapping)){void 0===n&&(n=new na(new Pb(1,1,1),new Aa({name:"BackgroundCubeMaterial",uniforms:Rc(db.cube.uniforms),vertexShader:db.cube.vertexShader,fragmentShader:db.cube.fragmentShader,side:1,depthTest:!1,depthWrite:!1,fog:!1})),n.geometry.deleteAttribute("normal"),n.geometry.deleteAttribute("uv"),n.onBeforeRender=function(a,
|
|
|
+height:a,widthSegments:b,heightSegments:d};c=c||1;a=a||1;var e=c/2,f=a/2;b=Math.floor(b)||1;d=Math.floor(d)||1;var g=b+1,h=d+1,l=c/b,n=a/d;a=[];c=[];for(var r=[],u=[],q=0;q<h;q++)for(var k=q*n-f,t=0;t<g;t++)c.push(t*l-e,-k,0),r.push(0,0,1),u.push(t/b),u.push(1-q/d);for(e=0;e<d;e++)for(f=0;f<b;f++)h=f+g*(e+1),l=f+1+g*(e+1),n=f+1+g*e,a.push(f+g*e,h,n),a.push(h,l,n);this.setIndex(a);this.setAttribute("position",new I(c,3));this.setAttribute("normal",new I(r,3));this.setAttribute("uv",new I(u,2))}function mj(c,
|
|
|
+a,b,d,e){function f(a,c){b.buffers.color.setClear(a.r,a.g,a.b,c,e)}var g=new x(0),h=0,l,n,r=null,u=0,q=null;return{getClearColor:function(){return g},setClearColor:function(a,b){g.set(a);h=void 0!==b?b:1;f(g,h)},getClearAlpha:function(){return h},setClearAlpha:function(a){h=a;f(g,h)},render:function(b,e,k,C){(e=!0===e.isScene?e.background:null)&&e.isTexture&&(e=a.get(e));k=c.xr;(k=k.getSession&&k.getSession())&&"additive"===k.environmentBlendMode&&(e=null);null===e?f(g,h):e&&e.isColor&&(f(e,1),C=
|
|
|
+!0);(c.autoClear||C)&&c.clear(c.autoClearColor,c.autoClearDepth,c.autoClearStencil);if(e&&(e.isCubeTexture||e.isWebGLCubeRenderTarget||e.isWebGLCubeRenderTargetTexture||306===e.mapping)){void 0===n&&(n=new na(new Pb(1,1,1),new Aa({name:"BackgroundCubeMaterial",uniforms:Rc(db.cube.uniforms),vertexShader:db.cube.vertexShader,fragmentShader:db.cube.fragmentShader,side:1,depthTest:!1,depthWrite:!1,fog:!1})),n.geometry.deleteAttribute("normal"),n.geometry.deleteAttribute("uv"),n.onBeforeRender=function(a,
|
|
|
b,c){this.matrixWorld.copyPosition(c.matrixWorld)},Object.defineProperty(n.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),d.update(n));e.isWebGLCubeRenderTarget&&(e=e.texture);n.material.uniforms.envMap.value=e;n.material.uniforms.flipEnvMap.value=e.isCubeTexture?-1:1;if(r!==e||u!==e.version||q!==c.toneMapping)n.material.needsUpdate=!0,r=e,u=e.version,q=c.toneMapping;b.unshift(n,n.geometry,n.material,0,0,null)}else if(e&&e.isTexture){void 0===l&&(l=new na(new oc(2,2),new Aa({name:"BackgroundMaterial",
|
|
|
uniforms:Rc(db.background.uniforms),vertexShader:db.background.vertexShader,fragmentShader:db.background.fragmentShader,side:0,depthTest:!1,depthWrite:!1,fog:!1})),l.geometry.deleteAttribute("normal"),Object.defineProperty(l.material,"map",{get:function(){return this.uniforms.t2D.value}}),d.update(l));l.material.uniforms.t2D.value=e;!0===e.matrixAutoUpdate&&e.updateMatrix();l.material.uniforms.uvTransform.value.copy(e.matrix);if(r!==e||u!==e.version||q!==c.toneMapping)l.material.needsUpdate=!0,r=
|
|
|
-e,u=e.version,q=c.toneMapping;b.unshift(l,l.geometry,l.material,0,0,null)}}}}function nj(c,a,b,d){function e(a){return d.isWebGL2?c.bindVertexArray(a):t.bindVertexArrayOES(a)}function f(a){return d.isWebGL2?c.deleteVertexArray(a):t.deleteVertexArrayOES(a)}function g(a){for(var b=[],c=[],d=[],e=0;e<k;e++)b[e]=0,c[e]=0,d[e]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:b,enabledAttributes:c,attributeDivisors:d,object:a,attributes:{},index:null}}function h(){for(var a=J.newAttributes,
|
|
|
-b=0,c=a.length;b<c;b++)a[b]=0}function l(a){n(a,0)}function n(b,e){var f=J.enabledAttributes,g=J.attributeDivisors;J.newAttributes[b]=1;0===f[b]&&(c.enableVertexAttribArray(b),f[b]=1);g[b]!==e&&((d.isWebGL2?c:a.get("ANGLE_instanced_arrays"))[d.isWebGL2?"vertexAttribDivisor":"vertexAttribDivisorANGLE"](b,e),g[b]=e)}function r(){for(var a=J.newAttributes,b=J.enabledAttributes,d=0,e=b.length;d<e;d++)b[d]!==a[d]&&(c.disableVertexAttribArray(d),b[d]=0)}function u(){q();J!==m&&(J=m,e(J.object))}function q(){m.geometry=
|
|
|
-null;m.program=null;m.wireframe=!1}var k=c.getParameter(34921),t=d.isWebGL2?null:a.get("OES_vertex_array_object"),w=d.isWebGL2||null!==t,E={},m=g(null),J=m;return{setup:function(f,u,q,k,v){var m=!1;if(w){m=!0===u.wireframe;var y=E[k.id];void 0===y&&(y={},E[k.id]=y);var A=y[q.id];void 0===A&&(A={},y[q.id]=A);y=A[m];void 0===y&&(y=g(d.isWebGL2?c.createVertexArray():t.createVertexArrayOES()),A[m]=y);m=y;J!==m&&(J=m,e(J.object));a:if(m=J.attributes,A=k.attributes,Object.keys(m).length!==Object.keys(A).length)m=
|
|
|
-!0;else{for(var C in A){y=m[C];var K=A[C];if(K.isGLBufferAttribute||void 0===y||y.attribute!==K||y.data!==K.data){m=!0;break a}}m=J.index!==v?!0:!1}if(m){C={};A=k.attributes;for(var Ga in A)y=A[Ga],K={},K.attribute=y,y.data&&(K.data=y.data),C[Ga]=K;J.attributes=C;J.index=v}}else if(Ga=!0===u.wireframe,J.geometry!==k.id||J.program!==q.id||J.wireframe!==Ga)J.geometry=k.id,J.program=q.id,J.wireframe=Ga,m=!0;!0===f.isInstancedMesh&&(m=!0);null!==v&&b.update(v,34963);if(m){if(!1!==d.isWebGL2||!f.isInstancedMesh&&
|
|
|
-!k.isInstancedBufferGeometry||null!==a.get("ANGLE_instanced_arrays")){h();Ga=k.attributes;q=q.getAttributes();u=u.defaultAttributeValues;for(var F in q)if(m=q[F],0<=m){var p=Ga[F];if(void 0!==p){if(C=p.normalized,K=p.itemSize,y=b.get(p),void 0!==y){var x=y.buffer;A=y.type;y=y.bytesPerElement;if(p.isInterleavedBufferAttribute){var B=p.data,z=B.stride;p=p.offset;B&&B.isInstancedInterleavedBuffer?(n(m,B.meshPerAttribute),void 0===k._maxInstanceCount&&(k._maxInstanceCount=B.meshPerAttribute*B.count)):
|
|
|
-l(m);c.bindBuffer(34962,x);z*=y;y*=p;!0!==d.isWebGL2||5124!==A&&5125!==A?c.vertexAttribPointer(m,K,A,C,z,y):c.vertexAttribIPointer(m,K,A,z,y)}else p.isInstancedBufferAttribute?(n(m,p.meshPerAttribute),void 0===k._maxInstanceCount&&(k._maxInstanceCount=p.meshPerAttribute*p.count)):l(m),c.bindBuffer(34962,x),y=K,!0!==d.isWebGL2||5124!==A&&5125!==A?c.vertexAttribPointer(m,y,A,C,0,0):c.vertexAttribIPointer(m,y,A,0,0)}}else if("instanceMatrix"===F)A=b.get(f.instanceMatrix),void 0!==A&&(C=A.buffer,A=A.type,
|
|
|
-n(m+0,1),n(m+1,1),n(m+2,1),n(m+3,1),c.bindBuffer(34962,C),c.vertexAttribPointer(m+0,4,A,!1,64,0),c.vertexAttribPointer(m+1,4,A,!1,64,16),c.vertexAttribPointer(m+2,4,A,!1,64,32),c.vertexAttribPointer(m+3,4,A,!1,64,48));else if("instanceColor"===F)A=b.get(f.instanceColor),void 0!==A&&(C=A.buffer,A=A.type,n(m,1),c.bindBuffer(34962,C),c.vertexAttribPointer(m,3,A,!1,12,0));else if(void 0!==u&&(C=u[F],void 0!==C))switch(C.length){case 2:c.vertexAttrib2fv(m,C);break;case 3:c.vertexAttrib3fv(m,C);break;case 4:c.vertexAttrib4fv(m,
|
|
|
-C);break;default:c.vertexAttrib1fv(m,C)}}r()}null!==v&&c.bindBuffer(34963,b.get(v).buffer)}},reset:u,resetDefaultState:q,dispose:function(){u();for(var a in E){var b=E[a],c;for(c in b){var d=b[c],e;for(e in d)f(d[e].object),delete d[e];delete b[c]}delete E[a]}},releaseStatesOfGeometry:function(a){if(void 0!==E[a.id]){var b=E[a.id],c;for(c in b){var d=b[c],e;for(e in d)f(d[e].object),delete d[e];delete b[c]}delete E[a.id]}},releaseStatesOfProgram:function(a){for(var b in E){var c=E[b];if(void 0!==
|
|
|
+e,u=e.version,q=c.toneMapping;b.unshift(l,l.geometry,l.material,0,0,null)}}}}function nj(c,a,b,d){function e(a){return d.isWebGL2?c.bindVertexArray(a):t.bindVertexArrayOES(a)}function f(a){return d.isWebGL2?c.deleteVertexArray(a):t.deleteVertexArrayOES(a)}function g(a){for(var b=[],c=[],d=[],e=0;e<k;e++)b[e]=0,c[e]=0,d[e]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:b,enabledAttributes:c,attributeDivisors:d,object:a,attributes:{},index:null}}function h(){for(var a=E.newAttributes,
|
|
|
+b=0,c=a.length;b<c;b++)a[b]=0}function l(a){n(a,0)}function n(b,e){var f=E.enabledAttributes,g=E.attributeDivisors;E.newAttributes[b]=1;0===f[b]&&(c.enableVertexAttribArray(b),f[b]=1);g[b]!==e&&((d.isWebGL2?c:a.get("ANGLE_instanced_arrays"))[d.isWebGL2?"vertexAttribDivisor":"vertexAttribDivisorANGLE"](b,e),g[b]=e)}function r(){for(var a=E.newAttributes,b=E.enabledAttributes,d=0,e=b.length;d<e;d++)b[d]!==a[d]&&(c.disableVertexAttribArray(d),b[d]=0)}function u(){q();E!==m&&(E=m,e(E.object))}function q(){m.geometry=
|
|
|
+null;m.program=null;m.wireframe=!1}var k=c.getParameter(34921),t=d.isWebGL2?null:a.get("OES_vertex_array_object"),w=d.isWebGL2||null!==t,C={},m=g(null),E=m;return{setup:function(f,u,q,k,v){var m=!1;if(w){m=!0===u.wireframe;var y=C[k.id];void 0===y&&(y={},C[k.id]=y);var A=y[q.id];void 0===A&&(A={},y[q.id]=A);y=A[m];void 0===y&&(y=g(d.isWebGL2?c.createVertexArray():t.createVertexArrayOES()),A[m]=y);m=y;E!==m&&(E=m,e(E.object));a:if(m=E.attributes,A=k.attributes,Object.keys(m).length!==Object.keys(A).length)m=
|
|
|
+!0;else{for(var D in A){y=m[D];var M=A[D];if(M.isGLBufferAttribute||void 0===y||y.attribute!==M||y.data!==M.data){m=!0;break a}}m=E.index!==v?!0:!1}if(m){D={};A=k.attributes;for(var Ga in A)y=A[Ga],M={},M.attribute=y,y.data&&(M.data=y.data),D[Ga]=M;E.attributes=D;E.index=v}}else if(Ga=!0===u.wireframe,E.geometry!==k.id||E.program!==q.id||E.wireframe!==Ga)E.geometry=k.id,E.program=q.id,E.wireframe=Ga,m=!0;!0===f.isInstancedMesh&&(m=!0);null!==v&&b.update(v,34963);if(m){if(!1!==d.isWebGL2||!f.isInstancedMesh&&
|
|
|
+!k.isInstancedBufferGeometry||null!==a.get("ANGLE_instanced_arrays")){h();Ga=k.attributes;q=q.getAttributes();u=u.defaultAttributeValues;for(var H in q)if(m=q[H],0<=m){var p=Ga[H];if(void 0!==p){if(D=p.normalized,M=p.itemSize,y=b.get(p),void 0!==y){var x=y.buffer;A=y.type;y=y.bytesPerElement;if(p.isInterleavedBufferAttribute){var B=p.data,z=B.stride;p=p.offset;B&&B.isInstancedInterleavedBuffer?(n(m,B.meshPerAttribute),void 0===k._maxInstanceCount&&(k._maxInstanceCount=B.meshPerAttribute*B.count)):
|
|
|
+l(m);c.bindBuffer(34962,x);z*=y;y*=p;!0!==d.isWebGL2||5124!==A&&5125!==A?c.vertexAttribPointer(m,M,A,D,z,y):c.vertexAttribIPointer(m,M,A,z,y)}else p.isInstancedBufferAttribute?(n(m,p.meshPerAttribute),void 0===k._maxInstanceCount&&(k._maxInstanceCount=p.meshPerAttribute*p.count)):l(m),c.bindBuffer(34962,x),y=M,!0!==d.isWebGL2||5124!==A&&5125!==A?c.vertexAttribPointer(m,y,A,D,0,0):c.vertexAttribIPointer(m,y,A,0,0)}}else if("instanceMatrix"===H)A=b.get(f.instanceMatrix),void 0!==A&&(D=A.buffer,A=A.type,
|
|
|
+n(m+0,1),n(m+1,1),n(m+2,1),n(m+3,1),c.bindBuffer(34962,D),c.vertexAttribPointer(m+0,4,A,!1,64,0),c.vertexAttribPointer(m+1,4,A,!1,64,16),c.vertexAttribPointer(m+2,4,A,!1,64,32),c.vertexAttribPointer(m+3,4,A,!1,64,48));else if("instanceColor"===H)A=b.get(f.instanceColor),void 0!==A&&(D=A.buffer,A=A.type,n(m,1),c.bindBuffer(34962,D),c.vertexAttribPointer(m,3,A,!1,12,0));else if(void 0!==u&&(D=u[H],void 0!==D))switch(D.length){case 2:c.vertexAttrib2fv(m,D);break;case 3:c.vertexAttrib3fv(m,D);break;case 4:c.vertexAttrib4fv(m,
|
|
|
+D);break;default:c.vertexAttrib1fv(m,D)}}r()}null!==v&&c.bindBuffer(34963,b.get(v).buffer)}},reset:u,resetDefaultState:q,dispose:function(){u();for(var a in C){var b=C[a],c;for(c in b){var d=b[c],e;for(e in d)f(d[e].object),delete d[e];delete b[c]}delete C[a]}},releaseStatesOfGeometry:function(a){if(void 0!==C[a.id]){var b=C[a.id],c;for(c in b){var d=b[c],e;for(e in d)f(d[e].object),delete d[e];delete b[c]}delete C[a.id]}},releaseStatesOfProgram:function(a){for(var b in C){var c=C[b];if(void 0!==
|
|
|
c[a.id]){var d=c[a.id],e;for(e in d)f(d[e].object),delete d[e];delete c[a.id]}}},initAttributes:h,enableAttribute:l,disableUnusedAttributes:r}}function oj(c,a,b,d){var e=d.isWebGL2,f;this.setMode=function(a){f=a};this.render=function(a,d){c.drawArrays(f,a,d);b.update(d,f,1)};this.renderInstances=function(d,h,l){if(0!==l){if(e){var g=c;var r="drawArraysInstanced"}else if(g=a.get("ANGLE_instanced_arrays"),r="drawArraysInstancedANGLE",null===g){console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");
|
|
|
return}g[r](f,d,h,l);b.update(h,f,l)}}}function pj(c,a,b){function d(a){if("highp"===a){if(0<c.getShaderPrecisionFormat(35633,36338).precision&&0<c.getShaderPrecisionFormat(35632,36338).precision)return"highp";a="mediump"}return"mediump"===a&&0<c.getShaderPrecisionFormat(35633,36337).precision&&0<c.getShaderPrecisionFormat(35632,36337).precision?"mediump":"lowp"}var e,f="undefined"!==typeof WebGL2RenderingContext&&c instanceof WebGL2RenderingContext||"undefined"!==typeof WebGL2ComputeRenderingContext&&
|
|
|
-c instanceof WebGL2ComputeRenderingContext,g=void 0!==b.precision?b.precision:"highp",h=d(g);h!==g&&(console.warn("THREE.WebGLRenderer:",g,"not supported, using",h,"instead."),g=h);b=!0===b.logarithmicDepthBuffer;h=c.getParameter(34930);var l=c.getParameter(35660),n=c.getParameter(3379),r=c.getParameter(34076),u=c.getParameter(34921),q=c.getParameter(36347),k=c.getParameter(36348),t=c.getParameter(36349),m=0<l,E=f||!!a.get("OES_texture_float"),y=m&&E,J=f?c.getParameter(36183):0;return{isWebGL2:f,
|
|
|
-getMaxAnisotropy:function(){if(void 0!==e)return e;var b=a.get("EXT_texture_filter_anisotropic");return e=null!==b?c.getParameter(b.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0},getMaxPrecision:d,precision:g,logarithmicDepthBuffer:b,maxTextures:h,maxVertexTextures:l,maxTextureSize:n,maxCubemapSize:r,maxAttributes:u,maxVertexUniforms:q,maxVaryings:k,maxFragmentUniforms:t,vertexTextures:m,floatFragmentTextures:E,floatVertexTextures:y,maxSamples:J}}function qj(c){function a(){r.value!==e&&(r.value=e,r.needsUpdate=
|
|
|
+c instanceof WebGL2ComputeRenderingContext,g=void 0!==b.precision?b.precision:"highp",h=d(g);h!==g&&(console.warn("THREE.WebGLRenderer:",g,"not supported, using",h,"instead."),g=h);b=!0===b.logarithmicDepthBuffer;h=c.getParameter(34930);var l=c.getParameter(35660),n=c.getParameter(3379),r=c.getParameter(34076),u=c.getParameter(34921),q=c.getParameter(36347),k=c.getParameter(36348),t=c.getParameter(36349),m=0<l,C=f||!!a.get("OES_texture_float"),y=m&&C,E=f?c.getParameter(36183):0;return{isWebGL2:f,
|
|
|
+getMaxAnisotropy:function(){if(void 0!==e)return e;var b=a.get("EXT_texture_filter_anisotropic");return e=null!==b?c.getParameter(b.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0},getMaxPrecision:d,precision:g,logarithmicDepthBuffer:b,maxTextures:h,maxVertexTextures:l,maxTextureSize:n,maxCubemapSize:r,maxAttributes:u,maxVertexUniforms:q,maxVaryings:k,maxFragmentUniforms:t,vertexTextures:m,floatFragmentTextures:C,floatVertexTextures:y,maxSamples:E}}function qj(c){function a(){r.value!==e&&(r.value=e,r.needsUpdate=
|
|
|
0<f);d.numPlanes=f;d.numIntersection=0}function b(a,b,c,e){var f=null!==a?a.length:0,g=null;if(0!==f){g=r.value;if(!0!==e||null===g){e=c+4*f;b=b.matrixWorldInverse;n.getNormalMatrix(b);if(null===g||g.length<e)g=new Float32Array(e);for(e=0;e!==f;++e,c+=4)l.copy(a[e]).applyMatrix4(b,n),l.normal.toArray(g,c),g[c+3]=l.constant}r.value=g;r.needsUpdate=!0}d.numPlanes=f;d.numIntersection=0;return g}var d=this,e=null,f=0,g=!1,h=!1,l=new W,n=new X,r={value:null,needsUpdate:!1};this.uniform=r;this.numIntersection=
|
|
|
this.numPlanes=0;this.init=function(a,c,d){var h=0!==a.length||c||0!==f||g;g=c;e=b(a,d,0);f=a.length;return h};this.beginShadows=function(){h=!0;b(null)};this.endShadows=function(){h=!1;a()};this.setState=function(d,l,n){var u=d.clippingPlanes,q=d.clipIntersection,k=d.clipShadows;d=c.get(d);if(!g||null===u||0===u.length||h&&!k)h?b(null):a();else{k=h?0:f;var v=4*k,m=d.clippingState||null;r.value=m;m=b(u,l,v,n);for(l=0;l!==v;++l)m[l]=e[l];d.clippingState=m;this.numIntersection=q?this.numPlanes:0;this.numPlanes+=
|
|
|
k}}}function rj(c){function a(a,b){303===b?a.mapping=301:304===b&&(a.mapping=302);return a}var b=new WeakMap;return{get:function(d){if(d&&d.isTexture){var e=d.mapping;if(303===e||304===e)return b.has(d)?(e=b.get(d).texture,a(e,d.mapping)):(e=d.image)&&0<e.height?(e=new Qb(e.height/2),e.fromEquirectangularTexture(c,d),b.set(d,e),a(e.texture,d.mapping)):null}return d},dispose:function(){b=new WeakMap}}}function sj(c){var a={};return{has:function(b){if(void 0!==a[b])return a[b];switch(b){case "WEBGL_depth_texture":var d=
|
|
@@ -75,108 +75,108 @@ a.numPointLightShadows)}function Ph(c,a){return c.replace(/NUM_CLIPPING_PLANES/g
|
|
|
parseInt(b);a++)c+=d.replace(/\[ i \]/g,"[ "+a+" ]").replace(/UNROLLED_LOOP_INDEX/g,a);return c}function Rh(c){var a="precision "+c.precision+" float;\nprecision "+c.precision+" int;";"highp"===c.precision?a+="\n#define HIGH_PRECISION":"mediump"===c.precision?a+="\n#define MEDIUM_PRECISION":"lowp"===c.precision&&(a+="\n#define LOW_PRECISION");return a}function lk(c){var a="SHADOWMAP_TYPE_BASIC";1===c.shadowMapType?a="SHADOWMAP_TYPE_PCF":2===c.shadowMapType?a="SHADOWMAP_TYPE_PCF_SOFT":3===c.shadowMapType&&
|
|
|
(a="SHADOWMAP_TYPE_VSM");return a}function mk(c){var a="ENVMAP_TYPE_CUBE";if(c.envMap)switch(c.envMapMode){case 301:case 302:a="ENVMAP_TYPE_CUBE";break;case 306:case 307:a="ENVMAP_TYPE_CUBE_UV"}return a}function nk(c){var a="ENVMAP_MODE_REFLECTION";if(c.envMap)switch(c.envMapMode){case 302:case 307:a="ENVMAP_MODE_REFRACTION"}return a}function ok(c){var a="ENVMAP_BLENDING_NONE";if(c.envMap)switch(c.combine){case 0:a="ENVMAP_BLENDING_MULTIPLY";break;case 1:a="ENVMAP_BLENDING_MIX";break;case 2:a="ENVMAP_BLENDING_ADD"}return a}
|
|
|
function pk(c,a,b,d){var e=c.getContext(),f=b.defines,g=b.vertexShader,h=b.fragmentShader,l=lk(b),n=mk(b),r=nk(b),u=ok(b),q=0<c.gammaFactor?c.gammaFactor:1,k=b.isWebGL2?"":[b.extensionDerivatives||b.envMapCubeUV||b.bumpMap||b.tangentSpaceNormalMap||b.clearcoatNormalMap||b.flatShading||"physical"===b.shaderID?"#extension GL_OES_standard_derivatives : enable":"",(b.extensionFragDepth||b.logarithmicDepthBuffer)&&b.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",b.extensionDrawBuffers&&
|
|
|
-b.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(b.extensionShaderTextureLOD||b.envMap)&&b.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(Wd).join("\n"),m=kk(f),w=e.createProgram();b.isRawShaderMaterial?(f=[m].filter(Wd).join("\n"),0<f.length&&(f+="\n"),l=[k,m].filter(Wd).join("\n"),0<l.length&&(l+="\n")):(f=[Rh(b),"#define SHADER_NAME "+b.shaderName,m,b.instancing?"#define USE_INSTANCING":"",b.instancingColor?"#define USE_INSTANCING_COLOR":
|
|
|
-"",b.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+q,"#define MAX_BONES "+b.maxBones,b.useFog&&b.fog?"#define USE_FOG":"",b.useFog&&b.fogExp2?"#define FOG_EXP2":"",b.map?"#define USE_MAP":"",b.envMap?"#define USE_ENVMAP":"",b.envMap?"#define "+r:"",b.lightMap?"#define USE_LIGHTMAP":"",b.aoMap?"#define USE_AOMAP":"",b.emissiveMap?"#define USE_EMISSIVEMAP":"",b.bumpMap?"#define USE_BUMPMAP":"",b.normalMap?"#define USE_NORMALMAP":"",b.normalMap&&b.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":
|
|
|
-"",b.normalMap&&b.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",b.clearcoatMap?"#define USE_CLEARCOATMAP":"",b.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",b.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",b.displacementMap&&b.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",b.specularMap?"#define USE_SPECULARMAP":"",b.roughnessMap?"#define USE_ROUGHNESSMAP":"",b.metalnessMap?"#define USE_METALNESSMAP":"",b.alphaMap?"#define USE_ALPHAMAP":"",b.transmissionMap?
|
|
|
-"#define USE_TRANSMISSIONMAP":"",b.vertexTangents?"#define USE_TANGENT":"",b.vertexColors?"#define USE_COLOR":"",b.vertexUvs?"#define USE_UV":"",b.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",b.flatShading?"#define FLAT_SHADED":"",b.skinning?"#define USE_SKINNING":"",b.useVertexTexture?"#define BONE_TEXTURE":"",b.morphTargets?"#define USE_MORPHTARGETS":"",b.morphNormals&&!1===b.flatShading?"#define USE_MORPHNORMALS":"",b.doubleSided?"#define DOUBLE_SIDED":"",b.flipSided?"#define FLIP_SIDED":"",b.shadowMapEnabled?
|
|
|
-"#define USE_SHADOWMAP":"",b.shadowMapEnabled?"#define "+l:"",b.sizeAttenuation?"#define USE_SIZEATTENUATION":"",b.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",b.logarithmicDepthBuffer&&b.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING","\tattribute mat4 instanceMatrix;",
|
|
|
-"#endif","#ifdef USE_INSTANCING_COLOR","\tattribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_TANGENT","\tattribute vec4 tangent;","#endif","#ifdef USE_COLOR","\tattribute vec3 color;","#endif","#ifdef USE_MORPHTARGETS","\tattribute vec3 morphTarget0;","\tattribute vec3 morphTarget1;","\tattribute vec3 morphTarget2;","\tattribute vec3 morphTarget3;","\t#ifdef USE_MORPHNORMALS","\t\tattribute vec3 morphNormal0;","\t\tattribute vec3 morphNormal1;",
|
|
|
-"\t\tattribute vec3 morphNormal2;","\t\tattribute vec3 morphNormal3;","\t#else","\t\tattribute vec3 morphTarget4;","\t\tattribute vec3 morphTarget5;","\t\tattribute vec3 morphTarget6;","\t\tattribute vec3 morphTarget7;","\t#endif","#endif","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(Wd).join("\n"),l=[k,Rh(b),"#define SHADER_NAME "+b.shaderName,m,b.alphaTest?"#define ALPHATEST "+b.alphaTest+(b.alphaTest%1?"":".0"):"","#define GAMMA_FACTOR "+
|
|
|
-q,b.useFog&&b.fog?"#define USE_FOG":"",b.useFog&&b.fogExp2?"#define FOG_EXP2":"",b.map?"#define USE_MAP":"",b.matcap?"#define USE_MATCAP":"",b.envMap?"#define USE_ENVMAP":"",b.envMap?"#define "+n:"",b.envMap?"#define "+r:"",b.envMap?"#define "+u:"",b.lightMap?"#define USE_LIGHTMAP":"",b.aoMap?"#define USE_AOMAP":"",b.emissiveMap?"#define USE_EMISSIVEMAP":"",b.bumpMap?"#define USE_BUMPMAP":"",b.normalMap?"#define USE_NORMALMAP":"",b.normalMap&&b.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":
|
|
|
-"",b.normalMap&&b.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",b.clearcoatMap?"#define USE_CLEARCOATMAP":"",b.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",b.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",b.specularMap?"#define USE_SPECULARMAP":"",b.roughnessMap?"#define USE_ROUGHNESSMAP":"",b.metalnessMap?"#define USE_METALNESSMAP":"",b.alphaMap?"#define USE_ALPHAMAP":"",b.sheen?"#define USE_SHEEN":"",b.transmissionMap?"#define USE_TRANSMISSIONMAP":"",b.vertexTangents?
|
|
|
-"#define USE_TANGENT":"",b.vertexColors||b.instancingColor?"#define USE_COLOR":"",b.vertexUvs?"#define USE_UV":"",b.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",b.gradientMap?"#define USE_GRADIENTMAP":"",b.flatShading?"#define FLAT_SHADED":"",b.doubleSided?"#define DOUBLE_SIDED":"",b.flipSided?"#define FLIP_SIDED":"",b.shadowMapEnabled?"#define USE_SHADOWMAP":"",b.shadowMapEnabled?"#define "+l:"",b.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",b.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":
|
|
|
-"",b.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",b.logarithmicDepthBuffer&&b.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"",(b.extensionShaderTextureLOD||b.envMap)&&b.rendererExtensionShaderTextureLod?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",0!==b.toneMapping?"#define TONE_MAPPING":"",0!==b.toneMapping?U.tonemapping_pars_fragment:"",0!==b.toneMapping?jk("toneMapping",b.toneMapping):"",b.dithering?"#define DITHERING":
|
|
|
-"",U.encodings_pars_fragment,b.map?Vd("mapTexelToLinear",b.mapEncoding):"",b.matcap?Vd("matcapTexelToLinear",b.matcapEncoding):"",b.envMap?Vd("envMapTexelToLinear",b.envMapEncoding):"",b.emissiveMap?Vd("emissiveMapTexelToLinear",b.emissiveMapEncoding):"",b.lightMap?Vd("lightMapTexelToLinear",b.lightMapEncoding):"",ik("linearToOutputTexel",b.outputEncoding),b.depthPacking?"#define DEPTH_PACKING "+b.depthPacking:"","\n"].filter(Wd).join("\n"));g=g.replace(vg,ug);g=Oh(g,b);g=Ph(g,b);h=h.replace(vg,ug);
|
|
|
-h=Oh(h,b);h=Ph(h,b);g=g.replace(Sh,wg).replace(Th,Qh);h=h.replace(Sh,wg).replace(Th,Qh);b.isWebGL2&&!b.isRawShaderMaterial&&(f="#version 300 es\n\n#define attribute in\n#define varying out\n#define texture2D texture\n"+f,l="#version 300 es\n\n#define varying in\nout highp vec4 pc_fragColor;\n#define gl_FragColor pc_fragColor\n#define gl_FragDepthEXT gl_FragDepth\n#define texture2D texture\n#define textureCube texture\n#define texture2DProj textureProj\n#define texture2DLodEXT textureLod\n#define texture2DProjLodEXT textureProjLod\n#define textureCubeLodEXT textureLod\n#define texture2DGradEXT textureGrad\n#define texture2DProjGradEXT textureProjGrad\n#define textureCubeGradEXT textureGrad\n"+
|
|
|
-l);h=l+h;g=Lh(e,35633,f+g);h=Lh(e,35632,h);e.attachShader(w,g);e.attachShader(w,h);void 0!==b.index0AttributeName?e.bindAttribLocation(w,0,b.index0AttributeName):!0===b.morphTargets&&e.bindAttribLocation(w,0,"position");e.linkProgram(w);if(c.debug.checkShaderErrors){c=e.getProgramInfoLog(w).trim();n=e.getShaderInfoLog(g).trim();r=e.getShaderInfoLog(h).trim();q=u=!0;if(!1===e.getProgramParameter(w,35714))u=!1,k=Nh(e,g,"vertex"),m=Nh(e,h,"fragment"),console.error("THREE.WebGLProgram: shader error: ",
|
|
|
-e.getError(),"35715",e.getProgramParameter(w,35715),"gl.getProgramInfoLog",c,k,m);else if(""!==c)console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()",c);else if(""===n||""===r)q=!1;q&&(this.diagnostics={runnable:u,programLog:c,vertexShader:{log:n,prefix:f},fragmentShader:{log:r,prefix:l}})}e.deleteShader(g);e.deleteShader(h);var E;this.getUniforms=function(){void 0===E&&(E=new Rb(e,w));return E};var y;this.getAttributes=function(){if(void 0===y){for(var a={},b=e.getProgramParameter(w,35721),
|
|
|
-c=0;c<b;c++){var d=e.getActiveAttrib(w,c).name;a[d]=e.getAttribLocation(w,d)}y=a}return y};this.destroy=function(){d.releaseStatesOfProgram(this);e.deleteProgram(w);this.program=void 0};this.name=b.shaderName;this.id=qk++;this.cacheKey=a;this.usedTimes=1;this.program=w;this.vertexShader=g;this.fragmentShader=h;return this}function rk(c,a,b,d,e,f){function g(a){if(a)a.isTexture?b=a.encoding:a.isWebGLRenderTarget&&(console.warn("THREE.WebGLPrograms.getTextureEncodingFromMap: don't use render targets as textures. Use their .texture property instead."),
|
|
|
+b.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(b.extensionShaderTextureLOD||b.envMap)&&b.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(Wd).join("\n"),m=kk(f),w=e.createProgram(),C=b.glslVersion?"#version "+b.glslVersion+"\n":"";b.isRawShaderMaterial?(f=[m].filter(Wd).join("\n"),0<f.length&&(f+="\n"),l=[k,m].filter(Wd).join("\n"),0<l.length&&(l+="\n")):(f=[Rh(b),"#define SHADER_NAME "+b.shaderName,m,b.instancing?"#define USE_INSTANCING":
|
|
|
+"",b.instancingColor?"#define USE_INSTANCING_COLOR":"",b.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+q,"#define MAX_BONES "+b.maxBones,b.useFog&&b.fog?"#define USE_FOG":"",b.useFog&&b.fogExp2?"#define FOG_EXP2":"",b.map?"#define USE_MAP":"",b.envMap?"#define USE_ENVMAP":"",b.envMap?"#define "+r:"",b.lightMap?"#define USE_LIGHTMAP":"",b.aoMap?"#define USE_AOMAP":"",b.emissiveMap?"#define USE_EMISSIVEMAP":"",b.bumpMap?"#define USE_BUMPMAP":"",b.normalMap?"#define USE_NORMALMAP":
|
|
|
+"",b.normalMap&&b.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",b.normalMap&&b.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",b.clearcoatMap?"#define USE_CLEARCOATMAP":"",b.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",b.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",b.displacementMap&&b.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",b.specularMap?"#define USE_SPECULARMAP":"",b.roughnessMap?"#define USE_ROUGHNESSMAP":"",b.metalnessMap?"#define USE_METALNESSMAP":
|
|
|
+"",b.alphaMap?"#define USE_ALPHAMAP":"",b.transmissionMap?"#define USE_TRANSMISSIONMAP":"",b.vertexTangents?"#define USE_TANGENT":"",b.vertexColors?"#define USE_COLOR":"",b.vertexUvs?"#define USE_UV":"",b.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",b.flatShading?"#define FLAT_SHADED":"",b.skinning?"#define USE_SKINNING":"",b.useVertexTexture?"#define BONE_TEXTURE":"",b.morphTargets?"#define USE_MORPHTARGETS":"",b.morphNormals&&!1===b.flatShading?"#define USE_MORPHNORMALS":"",b.doubleSided?"#define DOUBLE_SIDED":
|
|
|
+"",b.flipSided?"#define FLIP_SIDED":"",b.shadowMapEnabled?"#define USE_SHADOWMAP":"",b.shadowMapEnabled?"#define "+l:"",b.sizeAttenuation?"#define USE_SIZEATTENUATION":"",b.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",b.logarithmicDepthBuffer&&b.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",
|
|
|
+"#ifdef USE_INSTANCING","\tattribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR","\tattribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_TANGENT","\tattribute vec4 tangent;","#endif","#ifdef USE_COLOR","\tattribute vec3 color;","#endif","#ifdef USE_MORPHTARGETS","\tattribute vec3 morphTarget0;","\tattribute vec3 morphTarget1;","\tattribute vec3 morphTarget2;","\tattribute vec3 morphTarget3;","\t#ifdef USE_MORPHNORMALS",
|
|
|
+"\t\tattribute vec3 morphNormal0;","\t\tattribute vec3 morphNormal1;","\t\tattribute vec3 morphNormal2;","\t\tattribute vec3 morphNormal3;","\t#else","\t\tattribute vec3 morphTarget4;","\t\tattribute vec3 morphTarget5;","\t\tattribute vec3 morphTarget6;","\t\tattribute vec3 morphTarget7;","\t#endif","#endif","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(Wd).join("\n"),l=[k,Rh(b),"#define SHADER_NAME "+b.shaderName,m,b.alphaTest?"#define ALPHATEST "+
|
|
|
+b.alphaTest+(b.alphaTest%1?"":".0"):"","#define GAMMA_FACTOR "+q,b.useFog&&b.fog?"#define USE_FOG":"",b.useFog&&b.fogExp2?"#define FOG_EXP2":"",b.map?"#define USE_MAP":"",b.matcap?"#define USE_MATCAP":"",b.envMap?"#define USE_ENVMAP":"",b.envMap?"#define "+n:"",b.envMap?"#define "+r:"",b.envMap?"#define "+u:"",b.lightMap?"#define USE_LIGHTMAP":"",b.aoMap?"#define USE_AOMAP":"",b.emissiveMap?"#define USE_EMISSIVEMAP":"",b.bumpMap?"#define USE_BUMPMAP":"",b.normalMap?"#define USE_NORMALMAP":"",b.normalMap&&
|
|
|
+b.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",b.normalMap&&b.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",b.clearcoatMap?"#define USE_CLEARCOATMAP":"",b.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",b.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",b.specularMap?"#define USE_SPECULARMAP":"",b.roughnessMap?"#define USE_ROUGHNESSMAP":"",b.metalnessMap?"#define USE_METALNESSMAP":"",b.alphaMap?"#define USE_ALPHAMAP":"",b.sheen?"#define USE_SHEEN":"",b.transmissionMap?
|
|
|
+"#define USE_TRANSMISSIONMAP":"",b.vertexTangents?"#define USE_TANGENT":"",b.vertexColors||b.instancingColor?"#define USE_COLOR":"",b.vertexUvs?"#define USE_UV":"",b.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",b.gradientMap?"#define USE_GRADIENTMAP":"",b.flatShading?"#define FLAT_SHADED":"",b.doubleSided?"#define DOUBLE_SIDED":"",b.flipSided?"#define FLIP_SIDED":"",b.shadowMapEnabled?"#define USE_SHADOWMAP":"",b.shadowMapEnabled?"#define "+l:"",b.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",
|
|
|
+b.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",b.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",b.logarithmicDepthBuffer&&b.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"",(b.extensionShaderTextureLOD||b.envMap)&&b.rendererExtensionShaderTextureLod?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",0!==b.toneMapping?"#define TONE_MAPPING":"",0!==b.toneMapping?U.tonemapping_pars_fragment:"",0!==b.toneMapping?
|
|
|
+jk("toneMapping",b.toneMapping):"",b.dithering?"#define DITHERING":"",U.encodings_pars_fragment,b.map?Vd("mapTexelToLinear",b.mapEncoding):"",b.matcap?Vd("matcapTexelToLinear",b.matcapEncoding):"",b.envMap?Vd("envMapTexelToLinear",b.envMapEncoding):"",b.emissiveMap?Vd("emissiveMapTexelToLinear",b.emissiveMapEncoding):"",b.lightMap?Vd("lightMapTexelToLinear",b.lightMapEncoding):"",ik("linearToOutputTexel",b.outputEncoding),b.depthPacking?"#define DEPTH_PACKING "+b.depthPacking:"","\n"].filter(Wd).join("\n"));
|
|
|
+g=g.replace(vg,ug);g=Oh(g,b);g=Ph(g,b);h=h.replace(vg,ug);h=Oh(h,b);h=Ph(h,b);g=g.replace(Sh,wg).replace(Th,Qh);h=h.replace(Sh,wg).replace(Th,Qh);b.isWebGL2&&!b.isRawShaderMaterial&&(C="#version 300 es\n",f="#define attribute in\n#define varying out\n#define texture2D texture\n"+f,l=["#define varying in","300 es"===b.glslVersion?"":"out highp vec4 pc_fragColor;","300 es"===b.glslVersion?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth\n#define texture2D texture\n#define textureCube texture\n#define texture2DProj textureProj\n#define texture2DLodEXT textureLod\n#define texture2DProjLodEXT textureProjLod\n#define textureCubeLodEXT textureLod\n#define texture2DGradEXT textureGrad\n#define texture2DProjGradEXT textureProjGrad\n#define textureCubeGradEXT textureGrad"].join("\n")+
|
|
|
+"\n"+l);h=C+l+h;g=Lh(e,35633,C+f+g);h=Lh(e,35632,h);e.attachShader(w,g);e.attachShader(w,h);void 0!==b.index0AttributeName?e.bindAttribLocation(w,0,b.index0AttributeName):!0===b.morphTargets&&e.bindAttribLocation(w,0,"position");e.linkProgram(w);if(c.debug.checkShaderErrors){c=e.getProgramInfoLog(w).trim();C=e.getShaderInfoLog(g).trim();n=e.getShaderInfoLog(h).trim();u=r=!0;if(!1===e.getProgramParameter(w,35714))r=!1,q=Nh(e,g,"vertex"),k=Nh(e,h,"fragment"),console.error("THREE.WebGLProgram: shader error: ",
|
|
|
+e.getError(),"35715",e.getProgramParameter(w,35715),"gl.getProgramInfoLog",c,q,k);else if(""!==c)console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()",c);else if(""===C||""===n)u=!1;u&&(this.diagnostics={runnable:r,programLog:c,vertexShader:{log:C,prefix:f},fragmentShader:{log:n,prefix:l}})}e.deleteShader(g);e.deleteShader(h);var y;this.getUniforms=function(){void 0===y&&(y=new Rb(e,w));return y};var E;this.getAttributes=function(){if(void 0===E){for(var a={},b=e.getProgramParameter(w,35721),
|
|
|
+c=0;c<b;c++){var d=e.getActiveAttrib(w,c).name;a[d]=e.getAttribLocation(w,d)}E=a}return E};this.destroy=function(){d.releaseStatesOfProgram(this);e.deleteProgram(w);this.program=void 0};this.name=b.shaderName;this.id=qk++;this.cacheKey=a;this.usedTimes=1;this.program=w;this.vertexShader=g;this.fragmentShader=h;return this}function rk(c,a,b,d,e,f){function g(a){if(a)a.isTexture?b=a.encoding:a.isWebGLRenderTarget&&(console.warn("THREE.WebGLPrograms.getTextureEncodingFromMap: don't use render targets as textures. Use their .texture property instead."),
|
|
|
b=a.texture.encoding);else var b=3E3;return b}var h=[],l=d.isWebGL2,n=d.logarithmicDepthBuffer,r=d.floatVertexTextures,u=d.maxVertexUniforms,q=d.vertexTextures,k=d.precision,m={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",
|
|
|
PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"},w="precision isWebGL2 supportsVertexTextures outputEncoding instancing instancingColor map mapEncoding matcap matcapEncoding envMap envMapMode envMapEncoding envMapCubeUV lightMap lightMapEncoding aoMap emissiveMap emissiveMapEncoding bumpMap normalMap objectSpaceNormalMap tangentSpaceNormalMap clearcoatMap clearcoatRoughnessMap clearcoatNormalMap displacementMap specularMap roughnessMap metalnessMap gradientMap alphaMap combine vertexColors vertexTangents vertexUvs uvsVertexOnly fog useFog fogExp2 flatShading sizeAttenuation logarithmicDepthBuffer skinning maxBones useVertexTexture morphTargets morphNormals maxMorphTargets maxMorphNormals premultipliedAlpha numDirLights numPointLights numSpotLights numHemiLights numRectAreaLights numDirLightShadows numPointLightShadows numSpotLightShadows shadowMapEnabled shadowMapType toneMapping physicallyCorrectLights alphaTest doubleSided flipSided numClippingPlanes numClipIntersection depthPacking dithering sheen transmissionMap".split(" ");
|
|
|
-return{getParameters:function(e,h,v,t,w){var E=t.fog;t=e.isMeshStandardMaterial?t.environment:null;t=a.get(e.envMap||t);var y=m[e.type];if(w.isSkinnedMesh){var J=w.skeleton.bones;if(r)J=1024;else{var p=Math.min(Math.floor((u-20)/4),J.length);p<J.length?(console.warn("THREE.WebGLRenderer: Skeleton has "+J.length+" bones. This GPU supports "+p+"."),J=0):J=p}}else J=0;null!==e.precision&&(k=d.getMaxPrecision(e.precision),k!==e.precision&&console.warn("THREE.WebGLProgram.getParameters:",e.precision,"not supported, using",
|
|
|
-k,"instead."));if(y){var C=db[y];p=C.vertexShader;C=C.fragmentShader}else p=e.vertexShader,C=e.fragmentShader;var Ga=c.getRenderTarget();return{isWebGL2:l,shaderID:y,shaderName:e.type,vertexShader:p,fragmentShader:C,defines:e.defines,isRawShaderMaterial:e.isRawShaderMaterial,isShaderMaterial:e.isShaderMaterial,precision:k,instancing:!0===w.isInstancedMesh,instancingColor:!0===w.isInstancedMesh&&null!==w.instanceColor,supportsVertexTextures:q,outputEncoding:null!==Ga?g(Ga.texture):c.outputEncoding,
|
|
|
+return{getParameters:function(e,h,v,t,w){var C=t.fog;t=e.isMeshStandardMaterial?t.environment:null;t=a.get(e.envMap||t);var y=m[e.type];if(w.isSkinnedMesh){var E=w.skeleton.bones;if(r)E=1024;else{var p=Math.min(Math.floor((u-20)/4),E.length);p<E.length?(console.warn("THREE.WebGLRenderer: Skeleton has "+E.length+" bones. This GPU supports "+p+"."),E=0):E=p}}else E=0;null!==e.precision&&(k=d.getMaxPrecision(e.precision),k!==e.precision&&console.warn("THREE.WebGLProgram.getParameters:",e.precision,"not supported, using",
|
|
|
+k,"instead."));if(y){var D=db[y];p=D.vertexShader;D=D.fragmentShader}else p=e.vertexShader,D=e.fragmentShader;var Ga=c.getRenderTarget();return{isWebGL2:l,shaderID:y,shaderName:e.type,vertexShader:p,fragmentShader:D,defines:e.defines,isRawShaderMaterial:e.isRawShaderMaterial,isShaderMaterial:e.isShaderMaterial,precision:k,instancing:!0===w.isInstancedMesh,instancingColor:!0===w.isInstancedMesh&&null!==w.instanceColor,supportsVertexTextures:q,outputEncoding:null!==Ga?g(Ga.texture):c.outputEncoding,
|
|
|
map:!!e.map,mapEncoding:g(e.map),matcap:!!e.matcap,matcapEncoding:g(e.matcap),envMap:!!t,envMapMode:t&&t.mapping,envMapEncoding:g(t),envMapCubeUV:!!t&&(306===t.mapping||307===t.mapping),lightMap:!!e.lightMap,lightMapEncoding:g(e.lightMap),aoMap:!!e.aoMap,emissiveMap:!!e.emissiveMap,emissiveMapEncoding:g(e.emissiveMap),bumpMap:!!e.bumpMap,normalMap:!!e.normalMap,objectSpaceNormalMap:1===e.normalMapType,tangentSpaceNormalMap:0===e.normalMapType,clearcoatMap:!!e.clearcoatMap,clearcoatRoughnessMap:!!e.clearcoatRoughnessMap,
|
|
|
clearcoatNormalMap:!!e.clearcoatNormalMap,displacementMap:!!e.displacementMap,roughnessMap:!!e.roughnessMap,metalnessMap:!!e.metalnessMap,specularMap:!!e.specularMap,alphaMap:!!e.alphaMap,gradientMap:!!e.gradientMap,sheen:!!e.sheen,transmissionMap:!!e.transmissionMap,combine:e.combine,vertexTangents:e.normalMap&&e.vertexTangents,vertexColors:e.vertexColors,vertexUvs:!!e.map||!!e.bumpMap||!!e.normalMap||!!e.specularMap||!!e.alphaMap||!!e.emissiveMap||!!e.roughnessMap||!!e.metalnessMap||!!e.clearcoatMap||
|
|
|
-!!e.clearcoatRoughnessMap||!!e.clearcoatNormalMap||!!e.displacementMap||!!e.transmissionMap,uvsVertexOnly:!(e.map||e.bumpMap||e.normalMap||e.specularMap||e.alphaMap||e.emissiveMap||e.roughnessMap||e.metalnessMap||e.clearcoatNormalMap||e.transmissionMap)&&!!e.displacementMap,fog:!!E,useFog:e.fog,fogExp2:E&&E.isFogExp2,flatShading:e.flatShading,sizeAttenuation:e.sizeAttenuation,logarithmicDepthBuffer:n,skinning:e.skinning&&0<J,maxBones:J,useVertexTexture:r,morphTargets:e.morphTargets,morphNormals:e.morphNormals,
|
|
|
+!!e.clearcoatRoughnessMap||!!e.clearcoatNormalMap||!!e.displacementMap||!!e.transmissionMap,uvsVertexOnly:!(e.map||e.bumpMap||e.normalMap||e.specularMap||e.alphaMap||e.emissiveMap||e.roughnessMap||e.metalnessMap||e.clearcoatNormalMap||e.transmissionMap)&&!!e.displacementMap,fog:!!C,useFog:e.fog,fogExp2:C&&C.isFogExp2,flatShading:e.flatShading,sizeAttenuation:e.sizeAttenuation,logarithmicDepthBuffer:n,skinning:e.skinning&&0<E,maxBones:E,useVertexTexture:r,morphTargets:e.morphTargets,morphNormals:e.morphNormals,
|
|
|
maxMorphTargets:c.maxMorphTargets,maxMorphNormals:c.maxMorphNormals,numDirLights:h.directional.length,numPointLights:h.point.length,numSpotLights:h.spot.length,numRectAreaLights:h.rectArea.length,numHemiLights:h.hemi.length,numDirLightShadows:h.directionalShadowMap.length,numPointLightShadows:h.pointShadowMap.length,numSpotLightShadows:h.spotShadowMap.length,numClippingPlanes:f.numPlanes,numClipIntersection:f.numIntersection,dithering:e.dithering,shadowMapEnabled:c.shadowMap.enabled&&0<v.length,shadowMapType:c.shadowMap.type,
|
|
|
toneMapping:e.toneMapped?c.toneMapping:0,physicallyCorrectLights:c.physicallyCorrectLights,premultipliedAlpha:e.premultipliedAlpha,alphaTest:e.alphaTest,doubleSided:2===e.side,flipSided:1===e.side,depthPacking:void 0!==e.depthPacking?e.depthPacking:!1,index0AttributeName:e.index0AttributeName,extensionDerivatives:e.extensions&&e.extensions.derivatives,extensionFragDepth:e.extensions&&e.extensions.fragDepth,extensionDrawBuffers:e.extensions&&e.extensions.drawBuffers,extensionShaderTextureLOD:e.extensions&&
|
|
|
-e.extensions.shaderTextureLOD,rendererExtensionFragDepth:l||null!==b.get("EXT_frag_depth"),rendererExtensionDrawBuffers:l||null!==b.get("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:l||null!==b.get("EXT_shader_texture_lod"),customProgramCacheKey:e.customProgramCacheKey()}},getProgramCacheKey:function(a){var b=[];a.shaderID?b.push(a.shaderID):(b.push(a.fragmentShader),b.push(a.vertexShader));if(void 0!==a.defines)for(var d in a.defines)b.push(d),b.push(a.defines[d]);if(void 0===a.isRawShaderMaterial){for(d=
|
|
|
-0;d<w.length;d++)b.push(a[w[d]]);b.push(c.outputEncoding);b.push(c.gammaFactor)}b.push(a.customProgramCacheKey);return b.join()},getUniforms:function(a){var b=m[a.type];return b?Uh.clone(db[b].uniforms):a.uniforms},acquireProgram:function(a,b){for(var d,f=0,g=h.length;f<g;f++){var l=h[f];if(l.cacheKey===b){d=l;++d.usedTimes;break}}void 0===d&&(d=new pk(c,b,a,e),h.push(d));return d},releaseProgram:function(a){if(0===--a.usedTimes){var b=h.indexOf(a);h[b]=h[h.length-1];h.pop();a.destroy()}},programs:h}}
|
|
|
-function sk(){var c=new WeakMap;return{get:function(a){var b=c.get(a);void 0===b&&(b={},c.set(a,b));return b},remove:function(a){c.delete(a)},update:function(a,b,d){c.get(a)[b]=d},dispose:function(){c=new WeakMap}}}function tk(c,a){return c.groupOrder!==a.groupOrder?c.groupOrder-a.groupOrder:c.renderOrder!==a.renderOrder?c.renderOrder-a.renderOrder:c.program!==a.program?c.program.id-a.program.id:c.material.id!==a.material.id?c.material.id-a.material.id:c.z!==a.z?c.z-a.z:c.id-a.id}function uk(c,a){return c.groupOrder!==
|
|
|
-a.groupOrder?c.groupOrder-a.groupOrder:c.renderOrder!==a.renderOrder?c.renderOrder-a.renderOrder:c.z!==a.z?a.z-c.z:c.id-a.id}function Vh(c){function a(a,e,f,r,u,k){var h=b[d],l=c.get(f);void 0===h?(h={id:a.id,object:a,geometry:e,material:f,program:l.program||g,groupOrder:r,renderOrder:a.renderOrder,z:u,group:k},b[d]=h):(h.id=a.id,h.object=a,h.geometry=e,h.material=f,h.program=l.program||g,h.groupOrder=r,h.renderOrder=a.renderOrder,h.z=u,h.group=k);d++;return h}var b=[],d=0,e=[],f=[],g={id:-1};return{opaque:e,
|
|
|
-transparent:f,init:function(){d=0;e.length=0;f.length=0},push:function(b,c,d,g,u,k){b=a(b,c,d,g,u,k);(!0===d.transparent?f:e).push(b)},unshift:function(b,c,d,g,u,k){b=a(b,c,d,g,u,k);(!0===d.transparent?f:e).unshift(b)},finish:function(){for(var a=d,c=b.length;a<c;a++){var e=b[a];if(null===e.id)break;e.id=null;e.object=null;e.geometry=null;e.material=null;e.program=null;e.group=null}},sort:function(a,b){1<e.length&&e.sort(a||tk);1<f.length&&f.sort(b||uk)}}}function vk(c){var a=new WeakMap;return{get:function(b,
|
|
|
-d){var e=a.get(b);if(void 0===e){var f=new Vh(c);a.set(b,new WeakMap);a.get(b).set(d,f)}else f=e.get(d),void 0===f&&(f=new Vh(c),e.set(d,f));return f},dispose:function(){a=new WeakMap}}}function wk(){var c={};return{get:function(a){if(void 0!==c[a.id])return c[a.id];switch(a.type){case "DirectionalLight":var b={direction:new m,color:new x};break;case "SpotLight":b={position:new m,direction:new m,color:new x,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case "PointLight":b={position:new m,color:new x,
|
|
|
-distance:0,decay:0};break;case "HemisphereLight":b={direction:new m,skyColor:new x,groundColor:new x};break;case "RectAreaLight":b={color:new x,position:new m,halfWidth:new m,halfHeight:new m}}return c[a.id]=b}}}function xk(){var c={};return{get:function(a){if(void 0!==c[a.id])return c[a.id];switch(a.type){case "DirectionalLight":var b={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new p};break;case "SpotLight":b={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new p};
|
|
|
-break;case "PointLight":b={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new p,shadowCameraNear:1,shadowCameraFar:1E3}}return c[a.id]=b}}}function yk(c,a){return(a.castShadow?1:0)-(c.castShadow?1:0)}function zk(){for(var c=new wk,a=xk(),b={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],
|
|
|
-directionalShadowMatrix:[],spot:[],spotShadow:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[]},d=0;9>d;d++)b.probe.push(new m);var e=new m,f=new z,g=new z;return{setup:function(d,l,n){for(var h=l=0,u=0,k=0;9>k;k++)b.probe[k].set(0,0,0);var m=k=0,t=0,w=0,E=0,y=0,J=0,p=0;n=n.matrixWorldInverse;d.sort(yk);for(var Ga=0,F=d.length;Ga<F;Ga++){var A=d[Ga],K=A.color,Q=A.intensity,ca=A.distance,ja=
|
|
|
-A.shadow&&A.shadow.map?A.shadow.map.texture:null;if(A.isAmbientLight)l+=K.r*Q,h+=K.g*Q,u+=K.b*Q;else if(A.isLightProbe)for(ja=0;9>ja;ja++)b.probe[ja].addScaledVector(A.sh.coefficients[ja],Q);else if(A.isDirectionalLight){Q=c.get(A);Q.color.copy(A.color).multiplyScalar(A.intensity);Q.direction.setFromMatrixPosition(A.matrixWorld);e.setFromMatrixPosition(A.target.matrixWorld);Q.direction.sub(e);Q.direction.transformDirection(n);if(A.castShadow){var x=A.shadow;K=a.get(A);K.shadowBias=x.bias;K.shadowNormalBias=
|
|
|
-x.normalBias;K.shadowRadius=x.radius;K.shadowMapSize=x.mapSize;b.directionalShadow[k]=K;b.directionalShadowMap[k]=ja;b.directionalShadowMatrix[k]=A.shadow.matrix;y++}b.directional[k]=Q;k++}else A.isSpotLight?(x=c.get(A),x.position.setFromMatrixPosition(A.matrixWorld),x.position.applyMatrix4(n),x.color.copy(K).multiplyScalar(Q),x.distance=ca,x.direction.setFromMatrixPosition(A.matrixWorld),e.setFromMatrixPosition(A.target.matrixWorld),x.direction.sub(e),x.direction.transformDirection(n),x.coneCos=
|
|
|
-Math.cos(A.angle),x.penumbraCos=Math.cos(A.angle*(1-A.penumbra)),x.decay=A.decay,A.castShadow&&(Q=A.shadow,K=a.get(A),K.shadowBias=Q.bias,K.shadowNormalBias=Q.normalBias,K.shadowRadius=Q.radius,K.shadowMapSize=Q.mapSize,b.spotShadow[t]=K,b.spotShadowMap[t]=ja,b.spotShadowMatrix[t]=A.shadow.matrix,p++),b.spot[t]=x,t++):A.isRectAreaLight?(ja=c.get(A),ja.color.copy(K).multiplyScalar(Q),ja.position.setFromMatrixPosition(A.matrixWorld),ja.position.applyMatrix4(n),g.identity(),f.copy(A.matrixWorld),f.premultiply(n),
|
|
|
-g.extractRotation(f),ja.halfWidth.set(.5*A.width,0,0),ja.halfHeight.set(0,.5*A.height,0),ja.halfWidth.applyMatrix4(g),ja.halfHeight.applyMatrix4(g),b.rectArea[w]=ja,w++):A.isPointLight?(Q=c.get(A),Q.position.setFromMatrixPosition(A.matrixWorld),Q.position.applyMatrix4(n),Q.color.copy(A.color).multiplyScalar(A.intensity),Q.distance=A.distance,Q.decay=A.decay,A.castShadow&&(x=A.shadow,K=a.get(A),K.shadowBias=x.bias,K.shadowNormalBias=x.normalBias,K.shadowRadius=x.radius,K.shadowMapSize=x.mapSize,K.shadowCameraNear=
|
|
|
-x.camera.near,K.shadowCameraFar=x.camera.far,b.pointShadow[m]=K,b.pointShadowMap[m]=ja,b.pointShadowMatrix[m]=A.shadow.matrix,J++),b.point[m]=Q,m++):A.isHemisphereLight&&(ja=c.get(A),ja.direction.setFromMatrixPosition(A.matrixWorld),ja.direction.transformDirection(n),ja.direction.normalize(),ja.skyColor.copy(A.color).multiplyScalar(Q),ja.groundColor.copy(A.groundColor).multiplyScalar(Q),b.hemi[E]=ja,E++)}0<w&&(b.rectAreaLTC1=I.LTC_1,b.rectAreaLTC2=I.LTC_2);b.ambient[0]=l;b.ambient[1]=h;b.ambient[2]=
|
|
|
-u;d=b.hash;if(d.directionalLength!==k||d.pointLength!==m||d.spotLength!==t||d.rectAreaLength!==w||d.hemiLength!==E||d.numDirectionalShadows!==y||d.numPointShadows!==J||d.numSpotShadows!==p)b.directional.length=k,b.spot.length=t,b.rectArea.length=w,b.point.length=m,b.hemi.length=E,b.directionalShadow.length=y,b.directionalShadowMap.length=y,b.pointShadow.length=J,b.pointShadowMap.length=J,b.spotShadow.length=p,b.spotShadowMap.length=p,b.directionalShadowMatrix.length=y,b.pointShadowMatrix.length=J,
|
|
|
-b.spotShadowMatrix.length=p,d.directionalLength=k,d.pointLength=m,d.spotLength=t,d.rectAreaLength=w,d.hemiLength=E,d.numDirectionalShadows=y,d.numPointShadows=J,d.numSpotShadows=p,b.version=Ak++},state:b}}function Wh(){var c=new zk,a=[],b=[];return{init:function(){a.length=0;b.length=0},state:{lightsArray:a,shadowsArray:b,lights:c},setupLights:function(d){c.setup(a,b,d)},pushLight:function(b){a.push(b)},pushShadow:function(a){b.push(a)}}}function Bk(){var c=new WeakMap;return{get:function(a,b){if(!1===
|
|
|
-c.has(a)){var d=new Wh;c.set(a,new WeakMap);c.get(a).set(b,d)}else!1===c.get(a).has(b)?(d=new Wh,c.get(a).set(b,d)):d=c.get(a).get(b);return d},dispose:function(){c=new WeakMap}}}function Sb(c){M.call(this);this.type="MeshDepthMaterial";this.depthPacking=3200;this.morphTargets=this.skinning=!1;this.displacementMap=this.alphaMap=this.map=null;this.displacementScale=1;this.displacementBias=0;this.wireframe=!1;this.wireframeLinewidth=1;this.fog=!1;this.setValues(c)}function Tb(c){M.call(this);this.type=
|
|
|
-"MeshDistanceMaterial";this.referencePosition=new m;this.nearDistance=1;this.farDistance=1E3;this.morphTargets=this.skinning=!1;this.displacementMap=this.alphaMap=this.map=null;this.displacementScale=1;this.displacementBias=0;this.fog=!1;this.setValues(c)}function Xh(c,a,b){function d(a,b,c){c=a<<0|b<<1|c<<2;var d=u[c];void 0===d&&(d=new Sb({depthPacking:3201,morphTargets:a,skinning:b}),u[c]=d);return d}function e(a,b,c){c=a<<0|b<<1|c<<2;var d=k[c];void 0===d&&(d=new Tb({morphTargets:a,skinning:b}),
|
|
|
-k[c]=d);return d}function f(a,b,f,g,h,l,n){var r=d,u=a.customDepthMaterial;!0===g.isPointLight&&(r=e,u=a.customDistanceMaterial);void 0===u?(u=!1,!0===f.morphTargets&&(u=b.morphAttributes&&b.morphAttributes.position&&0<b.morphAttributes.position.length),b=!1,!0===a.isSkinnedMesh&&(!0===f.skinning?b=!0:console.warn("THREE.WebGLShadowMap: THREE.SkinnedMesh with material.skinning set to false:",a)),a=r(u,b,!0===a.isInstancedMesh)):a=u;c.localClippingEnabled&&!0===f.clipShadows&&0!==f.clippingPlanes.length&&
|
|
|
-(u=a.uuid,r=f.uuid,b=m[u],void 0===b&&(b={},m[u]=b),u=b[r],void 0===u&&(u=a.clone(),b[r]=u),a=u);a.visible=f.visible;a.wireframe=f.wireframe;a.side=3===n?null!==f.shadowSide?f.shadowSide:f.side:null!==f.shadowSide?f.shadowSide:t[f.side];a.clipShadows=f.clipShadows;a.clippingPlanes=f.clippingPlanes;a.clipIntersection=f.clipIntersection;a.wireframeLinewidth=f.wireframeLinewidth;a.linewidth=f.linewidth;!0===g.isPointLight&&!0===a.isMeshDistanceMaterial&&(a.referencePosition.setFromMatrixPosition(g.matrixWorld),
|
|
|
-a.nearDistance=h,a.farDistance=l);return a}function g(b,d,e,l,n){if(!1!==b.visible){if(b.layers.test(d.layers)&&(b.isMesh||b.isLine||b.isPoints)&&(b.castShadow||b.receiveShadow&&3===n)&&(!b.frustumCulled||h.intersectsObject(b))){b.modelViewMatrix.multiplyMatrices(e.matrixWorldInverse,b.matrixWorld);var r=a.update(b),u=b.material;if(Array.isArray(u))for(var k=r.groups,q=0,m=k.length;q<m;q++){var t=k[q],v=u[t.materialIndex];v&&v.visible&&(v=f(b,r,v,l,e.near,e.far,n),c.renderBufferDirect(e,null,r,v,
|
|
|
-b,t))}else u.visible&&(u=f(b,r,u,l,e.near,e.far,n),c.renderBufferDirect(e,null,r,u,b,null))}b=b.children;r=0;for(u=b.length;r<u;r++)g(b[r],d,e,l,n)}}var h=new Ma,l=new p,n=new p,r=new B,u=[],k=[],m={},t={0:1,1:0,2:2},w=new Aa({defines:{SAMPLE_RATE:.25,HALF_SAMPLE_RATE:.125},uniforms:{shadow_pass:{value:null},resolution:{value:new p},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\tfloat mean = 0.0;\n\tfloat squared_mean = 0.0;\n\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy ) / resolution ) );\n\tfor ( float i = -1.0; i < 1.0 ; i += SAMPLE_RATE) {\n\t\t#ifdef HORIZONAL_PASS\n\t\t\tvec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( i, 0.0 ) * radius ) / resolution ) );\n\t\t\tmean += distribution.x;\n\t\t\tsquared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n\t\t#else\n\t\t\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, i ) * radius ) / resolution ) );\n\t\t\tmean += depth;\n\t\t\tsquared_mean += depth * depth;\n\t\t#endif\n\t}\n\tmean = mean * HALF_SAMPLE_RATE;\n\tsquared_mean = squared_mean * HALF_SAMPLE_RATE;\n\tfloat std_dev = sqrt( squared_mean - mean * mean );\n\tgl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}"}),
|
|
|
-E=w.clone();E.defines.HORIZONAL_PASS=1;var y=new G;y.setAttribute("position",new N(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));var J=new na(y,w),C=this;this.enabled=!1;this.autoUpdate=!0;this.needsUpdate=!1;this.type=1;this.render=function(d,e,f){if(!1!==C.enabled&&(!1!==C.autoUpdate||!1!==C.needsUpdate)&&0!==d.length){var u=c.getRenderTarget(),k=c.getActiveCubeFace(),q=c.getActiveMipmapLevel(),m=c.state;m.setBlending(0);m.buffers.color.setClear(1,1,1,1);m.buffers.depth.setTest(!0);m.setScissorTest(!1);
|
|
|
+e.extensions.shaderTextureLOD,rendererExtensionFragDepth:l||null!==b.get("EXT_frag_depth"),rendererExtensionDrawBuffers:l||null!==b.get("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:l||null!==b.get("EXT_shader_texture_lod"),customProgramCacheKey:e.customProgramCacheKey(),glslVersion:e.glslVersion}},getProgramCacheKey:function(a){var b=[];a.shaderID?b.push(a.shaderID):(b.push(a.fragmentShader),b.push(a.vertexShader));if(void 0!==a.defines)for(var d in a.defines)b.push(d),b.push(a.defines[d]);
|
|
|
+if(void 0===a.isRawShaderMaterial){for(d=0;d<w.length;d++)b.push(a[w[d]]);b.push(c.outputEncoding);b.push(c.gammaFactor)}b.push(a.customProgramCacheKey);return b.join()},getUniforms:function(a){var b=m[a.type];return b?Uh.clone(db[b].uniforms):a.uniforms},acquireProgram:function(a,b){for(var d,f=0,g=h.length;f<g;f++){var l=h[f];if(l.cacheKey===b){d=l;++d.usedTimes;break}}void 0===d&&(d=new pk(c,b,a,e),h.push(d));return d},releaseProgram:function(a){if(0===--a.usedTimes){var b=h.indexOf(a);h[b]=h[h.length-
|
|
|
+1];h.pop();a.destroy()}},programs:h}}function sk(){var c=new WeakMap;return{get:function(a){var b=c.get(a);void 0===b&&(b={},c.set(a,b));return b},remove:function(a){c.delete(a)},update:function(a,b,d){c.get(a)[b]=d},dispose:function(){c=new WeakMap}}}function tk(c,a){return c.groupOrder!==a.groupOrder?c.groupOrder-a.groupOrder:c.renderOrder!==a.renderOrder?c.renderOrder-a.renderOrder:c.program!==a.program?c.program.id-a.program.id:c.material.id!==a.material.id?c.material.id-a.material.id:c.z!==a.z?
|
|
|
+c.z-a.z:c.id-a.id}function uk(c,a){return c.groupOrder!==a.groupOrder?c.groupOrder-a.groupOrder:c.renderOrder!==a.renderOrder?c.renderOrder-a.renderOrder:c.z!==a.z?a.z-c.z:c.id-a.id}function Vh(c){function a(a,e,f,r,u,k){var h=b[d],l=c.get(f);void 0===h?(h={id:a.id,object:a,geometry:e,material:f,program:l.program||g,groupOrder:r,renderOrder:a.renderOrder,z:u,group:k},b[d]=h):(h.id=a.id,h.object=a,h.geometry=e,h.material=f,h.program=l.program||g,h.groupOrder=r,h.renderOrder=a.renderOrder,h.z=u,h.group=
|
|
|
+k);d++;return h}var b=[],d=0,e=[],f=[],g={id:-1};return{opaque:e,transparent:f,init:function(){d=0;e.length=0;f.length=0},push:function(b,c,d,g,u,k){b=a(b,c,d,g,u,k);(!0===d.transparent?f:e).push(b)},unshift:function(b,c,d,g,u,k){b=a(b,c,d,g,u,k);(!0===d.transparent?f:e).unshift(b)},finish:function(){for(var a=d,c=b.length;a<c;a++){var e=b[a];if(null===e.id)break;e.id=null;e.object=null;e.geometry=null;e.material=null;e.program=null;e.group=null}},sort:function(a,b){1<e.length&&e.sort(a||tk);1<f.length&&
|
|
|
+f.sort(b||uk)}}}function vk(c){var a=new WeakMap;return{get:function(b,d){var e=a.get(b);if(void 0===e){var f=new Vh(c);a.set(b,new WeakMap);a.get(b).set(d,f)}else f=e.get(d),void 0===f&&(f=new Vh(c),e.set(d,f));return f},dispose:function(){a=new WeakMap}}}function wk(){var c={};return{get:function(a){if(void 0!==c[a.id])return c[a.id];switch(a.type){case "DirectionalLight":var b={direction:new m,color:new x};break;case "SpotLight":b={position:new m,direction:new m,color:new x,distance:0,coneCos:0,
|
|
|
+penumbraCos:0,decay:0};break;case "PointLight":b={position:new m,color:new x,distance:0,decay:0};break;case "HemisphereLight":b={direction:new m,skyColor:new x,groundColor:new x};break;case "RectAreaLight":b={color:new x,position:new m,halfWidth:new m,halfHeight:new m}}return c[a.id]=b}}}function xk(){var c={};return{get:function(a){if(void 0!==c[a.id])return c[a.id];switch(a.type){case "DirectionalLight":var b={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new p};break;case "SpotLight":b=
|
|
|
+{shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new p};break;case "PointLight":b={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new p,shadowCameraNear:1,shadowCameraFar:1E3}}return c[a.id]=b}}}function yk(c,a){return(a.castShadow?1:0)-(c.castShadow?1:0)}function zk(){for(var c=new wk,a=xk(),b={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1},ambient:[0,0,0],
|
|
|
+probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadow:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[]},d=0;9>d;d++)b.probe.push(new m);var e=new m,f=new z,g=new z;return{setup:function(d,l,n){for(var h=l=0,u=0,k=0;9>k;k++)b.probe[k].set(0,0,0);var m=k=0,t=0,w=0,C=0,y=0,E=0,p=0;n=n.matrixWorldInverse;d.sort(yk);for(var Ga=0,H=d.length;Ga<
|
|
|
+H;Ga++){var A=d[Ga],M=A.color,Q=A.intensity,ca=A.distance,ja=A.shadow&&A.shadow.map?A.shadow.map.texture:null;if(A.isAmbientLight)l+=M.r*Q,h+=M.g*Q,u+=M.b*Q;else if(A.isLightProbe)for(ja=0;9>ja;ja++)b.probe[ja].addScaledVector(A.sh.coefficients[ja],Q);else if(A.isDirectionalLight){Q=c.get(A);Q.color.copy(A.color).multiplyScalar(A.intensity);Q.direction.setFromMatrixPosition(A.matrixWorld);e.setFromMatrixPosition(A.target.matrixWorld);Q.direction.sub(e);Q.direction.transformDirection(n);if(A.castShadow){var x=
|
|
|
+A.shadow;M=a.get(A);M.shadowBias=x.bias;M.shadowNormalBias=x.normalBias;M.shadowRadius=x.radius;M.shadowMapSize=x.mapSize;b.directionalShadow[k]=M;b.directionalShadowMap[k]=ja;b.directionalShadowMatrix[k]=A.shadow.matrix;y++}b.directional[k]=Q;k++}else A.isSpotLight?(x=c.get(A),x.position.setFromMatrixPosition(A.matrixWorld),x.position.applyMatrix4(n),x.color.copy(M).multiplyScalar(Q),x.distance=ca,x.direction.setFromMatrixPosition(A.matrixWorld),e.setFromMatrixPosition(A.target.matrixWorld),x.direction.sub(e),
|
|
|
+x.direction.transformDirection(n),x.coneCos=Math.cos(A.angle),x.penumbraCos=Math.cos(A.angle*(1-A.penumbra)),x.decay=A.decay,A.castShadow&&(Q=A.shadow,M=a.get(A),M.shadowBias=Q.bias,M.shadowNormalBias=Q.normalBias,M.shadowRadius=Q.radius,M.shadowMapSize=Q.mapSize,b.spotShadow[t]=M,b.spotShadowMap[t]=ja,b.spotShadowMatrix[t]=A.shadow.matrix,p++),b.spot[t]=x,t++):A.isRectAreaLight?(ja=c.get(A),ja.color.copy(M).multiplyScalar(Q),ja.position.setFromMatrixPosition(A.matrixWorld),ja.position.applyMatrix4(n),
|
|
|
+g.identity(),f.copy(A.matrixWorld),f.premultiply(n),g.extractRotation(f),ja.halfWidth.set(.5*A.width,0,0),ja.halfHeight.set(0,.5*A.height,0),ja.halfWidth.applyMatrix4(g),ja.halfHeight.applyMatrix4(g),b.rectArea[w]=ja,w++):A.isPointLight?(Q=c.get(A),Q.position.setFromMatrixPosition(A.matrixWorld),Q.position.applyMatrix4(n),Q.color.copy(A.color).multiplyScalar(A.intensity),Q.distance=A.distance,Q.decay=A.decay,A.castShadow&&(x=A.shadow,M=a.get(A),M.shadowBias=x.bias,M.shadowNormalBias=x.normalBias,
|
|
|
+M.shadowRadius=x.radius,M.shadowMapSize=x.mapSize,M.shadowCameraNear=x.camera.near,M.shadowCameraFar=x.camera.far,b.pointShadow[m]=M,b.pointShadowMap[m]=ja,b.pointShadowMatrix[m]=A.shadow.matrix,E++),b.point[m]=Q,m++):A.isHemisphereLight&&(ja=c.get(A),ja.direction.setFromMatrixPosition(A.matrixWorld),ja.direction.transformDirection(n),ja.direction.normalize(),ja.skyColor.copy(A.color).multiplyScalar(Q),ja.groundColor.copy(A.groundColor).multiplyScalar(Q),b.hemi[C]=ja,C++)}0<w&&(b.rectAreaLTC1=J.LTC_1,
|
|
|
+b.rectAreaLTC2=J.LTC_2);b.ambient[0]=l;b.ambient[1]=h;b.ambient[2]=u;d=b.hash;if(d.directionalLength!==k||d.pointLength!==m||d.spotLength!==t||d.rectAreaLength!==w||d.hemiLength!==C||d.numDirectionalShadows!==y||d.numPointShadows!==E||d.numSpotShadows!==p)b.directional.length=k,b.spot.length=t,b.rectArea.length=w,b.point.length=m,b.hemi.length=C,b.directionalShadow.length=y,b.directionalShadowMap.length=y,b.pointShadow.length=E,b.pointShadowMap.length=E,b.spotShadow.length=p,b.spotShadowMap.length=
|
|
|
+p,b.directionalShadowMatrix.length=y,b.pointShadowMatrix.length=E,b.spotShadowMatrix.length=p,d.directionalLength=k,d.pointLength=m,d.spotLength=t,d.rectAreaLength=w,d.hemiLength=C,d.numDirectionalShadows=y,d.numPointShadows=E,d.numSpotShadows=p,b.version=Ak++},state:b}}function Wh(){var c=new zk,a=[],b=[];return{init:function(){a.length=0;b.length=0},state:{lightsArray:a,shadowsArray:b,lights:c},setupLights:function(d){c.setup(a,b,d)},pushLight:function(b){a.push(b)},pushShadow:function(a){b.push(a)}}}
|
|
|
+function Bk(){var c=new WeakMap;return{get:function(a,b){if(!1===c.has(a)){var d=new Wh;c.set(a,new WeakMap);c.get(a).set(b,d)}else!1===c.get(a).has(b)?(d=new Wh,c.get(a).set(b,d)):d=c.get(a).get(b);return d},dispose:function(){c=new WeakMap}}}function Sb(c){L.call(this);this.type="MeshDepthMaterial";this.depthPacking=3200;this.morphTargets=this.skinning=!1;this.displacementMap=this.alphaMap=this.map=null;this.displacementScale=1;this.displacementBias=0;this.wireframe=!1;this.wireframeLinewidth=1;
|
|
|
+this.fog=!1;this.setValues(c)}function Tb(c){L.call(this);this.type="MeshDistanceMaterial";this.referencePosition=new m;this.nearDistance=1;this.farDistance=1E3;this.morphTargets=this.skinning=!1;this.displacementMap=this.alphaMap=this.map=null;this.displacementScale=1;this.displacementBias=0;this.fog=!1;this.setValues(c)}function Xh(c,a,b){function d(a,b,c){c=a<<0|b<<1|c<<2;var d=u[c];void 0===d&&(d=new Sb({depthPacking:3201,morphTargets:a,skinning:b}),u[c]=d);return d}function e(a,b,c){c=a<<0|b<<
|
|
|
+1|c<<2;var d=k[c];void 0===d&&(d=new Tb({morphTargets:a,skinning:b}),k[c]=d);return d}function f(a,b,f,g,h,l,n){var r=d,u=a.customDepthMaterial;!0===g.isPointLight&&(r=e,u=a.customDistanceMaterial);void 0===u?(u=!1,!0===f.morphTargets&&(u=b.morphAttributes&&b.morphAttributes.position&&0<b.morphAttributes.position.length),b=!1,!0===a.isSkinnedMesh&&(!0===f.skinning?b=!0:console.warn("THREE.WebGLShadowMap: THREE.SkinnedMesh with material.skinning set to false:",a)),a=r(u,b,!0===a.isInstancedMesh)):
|
|
|
+a=u;c.localClippingEnabled&&!0===f.clipShadows&&0!==f.clippingPlanes.length&&(u=a.uuid,r=f.uuid,b=m[u],void 0===b&&(b={},m[u]=b),u=b[r],void 0===u&&(u=a.clone(),b[r]=u),a=u);a.visible=f.visible;a.wireframe=f.wireframe;a.side=3===n?null!==f.shadowSide?f.shadowSide:f.side:null!==f.shadowSide?f.shadowSide:t[f.side];a.clipShadows=f.clipShadows;a.clippingPlanes=f.clippingPlanes;a.clipIntersection=f.clipIntersection;a.wireframeLinewidth=f.wireframeLinewidth;a.linewidth=f.linewidth;!0===g.isPointLight&&
|
|
|
+!0===a.isMeshDistanceMaterial&&(a.referencePosition.setFromMatrixPosition(g.matrixWorld),a.nearDistance=h,a.farDistance=l);return a}function g(b,d,e,l,n){if(!1!==b.visible){if(b.layers.test(d.layers)&&(b.isMesh||b.isLine||b.isPoints)&&(b.castShadow||b.receiveShadow&&3===n)&&(!b.frustumCulled||h.intersectsObject(b))){b.modelViewMatrix.multiplyMatrices(e.matrixWorldInverse,b.matrixWorld);var r=a.update(b),u=b.material;if(Array.isArray(u))for(var k=r.groups,q=0,m=k.length;q<m;q++){var t=k[q],v=u[t.materialIndex];
|
|
|
+v&&v.visible&&(v=f(b,r,v,l,e.near,e.far,n),c.renderBufferDirect(e,null,r,v,b,t))}else u.visible&&(u=f(b,r,u,l,e.near,e.far,n),c.renderBufferDirect(e,null,r,u,b,null))}b=b.children;r=0;for(u=b.length;r<u;r++)g(b[r],d,e,l,n)}}var h=new Ma,l=new p,n=new p,r=new B,u=[],k=[],m={},t={0:1,1:0,2:2},w=new Aa({defines:{SAMPLE_RATE:.25,HALF_SAMPLE_RATE:.125},uniforms:{shadow_pass:{value:null},resolution:{value:new p},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\tfloat mean = 0.0;\n\tfloat squared_mean = 0.0;\n\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy ) / resolution ) );\n\tfor ( float i = -1.0; i < 1.0 ; i += SAMPLE_RATE) {\n\t\t#ifdef HORIZONAL_PASS\n\t\t\tvec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( i, 0.0 ) * radius ) / resolution ) );\n\t\t\tmean += distribution.x;\n\t\t\tsquared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n\t\t#else\n\t\t\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, i ) * radius ) / resolution ) );\n\t\t\tmean += depth;\n\t\t\tsquared_mean += depth * depth;\n\t\t#endif\n\t}\n\tmean = mean * HALF_SAMPLE_RATE;\n\tsquared_mean = squared_mean * HALF_SAMPLE_RATE;\n\tfloat std_dev = sqrt( squared_mean - mean * mean );\n\tgl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}"}),
|
|
|
+C=w.clone();C.defines.HORIZONAL_PASS=1;var y=new G;y.setAttribute("position",new N(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));var E=new na(y,w),D=this;this.enabled=!1;this.autoUpdate=!0;this.needsUpdate=!1;this.type=1;this.render=function(d,e,f){if(!1!==D.enabled&&(!1!==D.autoUpdate||!1!==D.needsUpdate)&&0!==d.length){var u=c.getRenderTarget(),k=c.getActiveCubeFace(),q=c.getActiveMipmapLevel(),m=c.state;m.setBlending(0);m.buffers.color.setClear(1,1,1,1);m.buffers.depth.setTest(!0);m.setScissorTest(!1);
|
|
|
for(var t=0,v=d.length;t<v;t++){var y=d[t],p=y.shadow;if(!1!==p.autoUpdate||!1!==p.needsUpdate)if(void 0===p)console.warn("THREE.WebGLShadowMap:",y,"has no shadow.");else{l.copy(p.mapSize);var A=p.getFrameExtents();l.multiply(A);n.copy(p.mapSize);if(l.x>b||l.y>b)l.x>b&&(n.x=Math.floor(b/A.x),l.x=n.x*A.x,p.mapSize.x=n.x),l.y>b&&(n.y=Math.floor(b/A.y),l.y=n.y*A.y,p.mapSize.y=n.y);null!==p.map||p.isPointLightShadow||3!==this.type||(A={minFilter:1006,magFilter:1006,format:1023,stencilBuffer:!1},p.map=
|
|
|
-new Sa(l.x,l.y,A),p.map.texture.name=y.name+".shadowMap",p.mapPass=new Sa(l.x,l.y,A),p.camera.updateProjectionMatrix());null===p.map&&(p.map=new Sa(l.x,l.y,{minFilter:1003,magFilter:1003,format:1023,stencilBuffer:!1}),p.map.texture.name=y.name+".shadowMap",p.camera.updateProjectionMatrix());c.setRenderTarget(p.map);c.clear();A=p.getViewportCount();for(var x=0;x<A;x++){var F=p.getViewport(x);r.set(n.x*F.x,n.y*F.y,n.x*F.z,n.y*F.w);m.viewport(r);p.updateMatrices(y,x);h=p.getFrustum();g(e,f,p.camera,
|
|
|
-y,this.type)}p.isPointLightShadow||3!==this.type||(y=p,A=f,x=a.update(J),w.uniforms.shadow_pass.value=y.map.texture,w.uniforms.resolution.value=y.mapSize,w.uniforms.radius.value=y.radius,c.setRenderTarget(y.mapPass),c.clear(),c.renderBufferDirect(A,null,x,w,J,null),E.uniforms.shadow_pass.value=y.mapPass.texture,E.uniforms.resolution.value=y.mapSize,E.uniforms.radius.value=y.radius,c.setRenderTarget(y.map),c.clear(),c.renderBufferDirect(A,null,x,E,J,null));p.needsUpdate=!1}}C.needsUpdate=!1;c.setRenderTarget(u,
|
|
|
-k,q)}}}function Ck(c,a,b){function d(a,b,d){var e=new Uint8Array(4),f=c.createTexture();c.bindTexture(a,f);c.texParameteri(a,10241,9728);c.texParameteri(a,10240,9728);for(a=0;a<d;a++)c.texImage2D(b+a,0,6408,1,1,0,6408,5121,e);return f}function e(a){!0!==t[a]&&(c.enable(a),t[a]=!0)}function f(a){!1!==t[a]&&(c.disable(a),t[a]=!1)}function g(a,b,d,g,h,l,n,r){if(0===a)E&&(f(3042),E=!1);else if(E||(e(3042),E=!0),5!==a){if(a!==y||r!==Q){if(100!==p||100!==F)c.blendEquation(32774),F=p=100;if(r)switch(a){case 1:c.blendFuncSeparate(1,
|
|
|
-771,1,771);break;case 2:c.blendFunc(1,1);break;case 3:c.blendFuncSeparate(0,0,769,771);break;case 4:c.blendFuncSeparate(0,768,0,770);break;default:console.error("THREE.WebGLState: Invalid blending: ",a)}else switch(a){case 1:c.blendFuncSeparate(770,771,1,771);break;case 2:c.blendFunc(770,1);break;case 3:c.blendFunc(0,769);break;case 4:c.blendFunc(0,768);break;default:console.error("THREE.WebGLState: Invalid blending: ",a)}K=A=x=C=null;y=a;Q=r}}else{h=h||b;l=l||d;n=n||g;if(b!==p||h!==F)c.blendEquationSeparate(pc[b],
|
|
|
-pc[h]),p=b,F=h;if(d!==C||g!==x||l!==A||n!==K)c.blendFuncSeparate(Ua[d],Ua[g],Ua[l],Ua[n]),C=d,x=g,A=l,K=n;y=a;Q=null}}function h(a){ca!==a&&(a?c.frontFace(2304):c.frontFace(2305),ca=a)}function l(a){0!==a?(e(2884),a!==ja&&(1===a?c.cullFace(1029):2===a?c.cullFace(1028):c.cullFace(1032))):f(2884);ja=a}function n(a,b,d){if(a){if(e(32823),H!==b||I!==d)c.polygonOffset(b,d),H=b,I=d}else f(32823)}function r(a){void 0===a&&(a=33984+D-1);N!==a&&(c.activeTexture(a),N=a)}b=b.isWebGL2;var u=new function(){var a=
|
|
|
+new Sa(l.x,l.y,A),p.map.texture.name=y.name+".shadowMap",p.mapPass=new Sa(l.x,l.y,A),p.camera.updateProjectionMatrix());null===p.map&&(p.map=new Sa(l.x,l.y,{minFilter:1003,magFilter:1003,format:1023,stencilBuffer:!1}),p.map.texture.name=y.name+".shadowMap",p.camera.updateProjectionMatrix());c.setRenderTarget(p.map);c.clear();A=p.getViewportCount();for(var x=0;x<A;x++){var H=p.getViewport(x);r.set(n.x*H.x,n.y*H.y,n.x*H.z,n.y*H.w);m.viewport(r);p.updateMatrices(y,x);h=p.getFrustum();g(e,f,p.camera,
|
|
|
+y,this.type)}p.isPointLightShadow||3!==this.type||(y=p,A=f,x=a.update(E),w.uniforms.shadow_pass.value=y.map.texture,w.uniforms.resolution.value=y.mapSize,w.uniforms.radius.value=y.radius,c.setRenderTarget(y.mapPass),c.clear(),c.renderBufferDirect(A,null,x,w,E,null),C.uniforms.shadow_pass.value=y.mapPass.texture,C.uniforms.resolution.value=y.mapSize,C.uniforms.radius.value=y.radius,c.setRenderTarget(y.map),c.clear(),c.renderBufferDirect(A,null,x,C,E,null));p.needsUpdate=!1}}D.needsUpdate=!1;c.setRenderTarget(u,
|
|
|
+k,q)}}}function Ck(c,a,b){function d(a,b,d){var e=new Uint8Array(4),f=c.createTexture();c.bindTexture(a,f);c.texParameteri(a,10241,9728);c.texParameteri(a,10240,9728);for(a=0;a<d;a++)c.texImage2D(b+a,0,6408,1,1,0,6408,5121,e);return f}function e(a){!0!==t[a]&&(c.enable(a),t[a]=!0)}function f(a){!1!==t[a]&&(c.disable(a),t[a]=!1)}function g(a,b,d,g,h,l,n,r){if(0===a)C&&(f(3042),C=!1);else if(C||(e(3042),C=!0),5!==a){if(a!==y||r!==Q){if(100!==E||100!==H)c.blendEquation(32774),H=E=100;if(r)switch(a){case 1:c.blendFuncSeparate(1,
|
|
|
+771,1,771);break;case 2:c.blendFunc(1,1);break;case 3:c.blendFuncSeparate(0,0,769,771);break;case 4:c.blendFuncSeparate(0,768,0,770);break;default:console.error("THREE.WebGLState: Invalid blending: ",a)}else switch(a){case 1:c.blendFuncSeparate(770,771,1,771);break;case 2:c.blendFunc(770,1);break;case 3:c.blendFunc(0,769);break;case 4:c.blendFunc(0,768);break;default:console.error("THREE.WebGLState: Invalid blending: ",a)}M=A=x=p=null;y=a;Q=r}}else{h=h||b;l=l||d;n=n||g;if(b!==E||h!==H)c.blendEquationSeparate(pc[b],
|
|
|
+pc[h]),E=b,H=h;if(d!==p||g!==x||l!==A||n!==M)c.blendFuncSeparate(Ua[d],Ua[g],Ua[l],Ua[n]),p=d,x=g,A=l,M=n;y=a;Q=null}}function h(a){ca!==a&&(a?c.frontFace(2304):c.frontFace(2305),ca=a)}function l(a){0!==a?(e(2884),a!==ja&&(1===a?c.cullFace(1029):2===a?c.cullFace(1028):c.cullFace(1032))):f(2884);ja=a}function n(a,b,d){if(a){if(e(32823),I!==b||J!==d)c.polygonOffset(b,d),I=b,J=d}else f(32823)}function r(a){void 0===a&&(a=33984+F-1);N!==a&&(c.activeTexture(a),N=a)}b=b.isWebGL2;var u=new function(){var a=
|
|
|
!1,b=new B,d=null,e=new B(0,0,0,0);return{setMask:function(b){d===b||a||(c.colorMask(b,b,b,b),d=b)},setLocked:function(b){a=b},setClear:function(a,d,f,g,h){!0===h&&(a*=g,d*=g,f*=g);b.set(a,d,f,g);!1===e.equals(b)&&(c.clearColor(a,d,f,g),e.copy(b))},reset:function(){a=!1;d=null;e.set(-1,0,0,0)}}},k=new function(){var a=!1,b=null,d=null,g=null;return{setTest:function(a){a?e(2929):f(2929)},setMask:function(d){b===d||a||(c.depthMask(d),b=d)},setFunc:function(a){if(d!==a){if(a)switch(a){case 0:c.depthFunc(512);
|
|
|
break;case 1:c.depthFunc(519);break;case 2:c.depthFunc(513);break;case 3:c.depthFunc(515);break;case 4:c.depthFunc(514);break;case 5:c.depthFunc(518);break;case 6:c.depthFunc(516);break;case 7:c.depthFunc(517);break;default:c.depthFunc(515)}else c.depthFunc(515);d=a}},setLocked:function(b){a=b},setClear:function(a){g!==a&&(c.clearDepth(a),g=a)},reset:function(){a=!1;g=d=b=null}}},m=new function(){var a=!1,b=null,d=null,g=null,h=null,l=null,n=null,r=null,u=null;return{setTest:function(b){a||(b?e(2960):
|
|
|
-f(2960))},setMask:function(d){b===d||a||(c.stencilMask(d),b=d)},setFunc:function(a,b,e){if(d!==a||g!==b||h!==e)c.stencilFunc(a,b,e),d=a,g=b,h=e},setOp:function(a,b,d){if(l!==a||n!==b||r!==d)c.stencilOp(a,b,d),l=a,n=b,r=d},setLocked:function(b){a=b},setClear:function(a){u!==a&&(c.clearStencil(a),u=a)},reset:function(){a=!1;u=r=n=l=h=g=d=b=null}}},t={},w=null,E=null,y=null,p=null,C=null,x=null,F=null,A=null,K=null,Q=!1,ca=null,ja=null,z=null,H=null,I=null,D=c.getParameter(35661),G=!1,L=0;L=c.getParameter(7938);
|
|
|
--1!==L.indexOf("WebGL")?(L=parseFloat(/^WebGL ([0-9])/.exec(L)[1]),G=1<=L):-1!==L.indexOf("OpenGL ES")&&(L=parseFloat(/^OpenGL ES ([0-9])/.exec(L)[1]),G=2<=L);var N=null,M={},P=new B,O=new B,T={};T[3553]=d(3553,3553,1);T[34067]=d(34067,34069,6);u.setClear(0,0,0,1);k.setClear(1);m.setClear(0);e(2929);k.setFunc(3);h(!1);l(1);e(2884);g(0);var pc={100:32774,101:32778,102:32779};b?(pc[103]=32775,pc[104]=32776):(a=a.get("EXT_blend_minmax"),null!==a&&(pc[103]=a.MIN_EXT,pc[104]=a.MAX_EXT));var Ua={200:0,
|
|
|
+f(2960))},setMask:function(d){b===d||a||(c.stencilMask(d),b=d)},setFunc:function(a,b,e){if(d!==a||g!==b||h!==e)c.stencilFunc(a,b,e),d=a,g=b,h=e},setOp:function(a,b,d){if(l!==a||n!==b||r!==d)c.stencilOp(a,b,d),l=a,n=b,r=d},setLocked:function(b){a=b},setClear:function(a){u!==a&&(c.clearStencil(a),u=a)},reset:function(){a=!1;u=r=n=l=h=g=d=b=null}}},t={},w=null,C=null,y=null,E=null,p=null,x=null,H=null,A=null,M=null,Q=!1,ca=null,ja=null,z=null,I=null,J=null,F=c.getParameter(35661),G=!1,K=0;K=c.getParameter(7938);
|
|
|
+-1!==K.indexOf("WebGL")?(K=parseFloat(/^WebGL ([0-9])/.exec(K)[1]),G=1<=K):-1!==K.indexOf("OpenGL ES")&&(K=parseFloat(/^OpenGL ES ([0-9])/.exec(K)[1]),G=2<=K);var N=null,L={},P=new B,O=new B,T={};T[3553]=d(3553,3553,1);T[34067]=d(34067,34069,6);u.setClear(0,0,0,1);k.setClear(1);m.setClear(0);e(2929);k.setFunc(3);h(!1);l(1);e(2884);g(0);var pc={100:32774,101:32778,102:32779};b?(pc[103]=32775,pc[104]=32776):(a=a.get("EXT_blend_minmax"),null!==a&&(pc[103]=a.MIN_EXT,pc[104]=a.MAX_EXT));var Ua={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:u,depth:k,stencil:m},enable:e,disable:f,useProgram:function(a){return w!==a?(c.useProgram(a),w=a,!0):!1},setBlending:g,setMaterial:function(a,b){2===a.side?f(2884):e(2884);var c=1===a.side;b&&(c=!c);h(c);1===a.blending&&!1===a.transparent?g(0):g(a.blending,a.blendEquation,a.blendSrc,a.blendDst,a.blendEquationAlpha,a.blendSrcAlpha,a.blendDstAlpha,a.premultipliedAlpha);k.setFunc(a.depthFunc);k.setTest(a.depthTest);
|
|
|
-k.setMask(a.depthWrite);u.setMask(a.colorWrite);b=a.stencilWrite;m.setTest(b);b&&(m.setMask(a.stencilWriteMask),m.setFunc(a.stencilFunc,a.stencilRef,a.stencilFuncMask),m.setOp(a.stencilFail,a.stencilZFail,a.stencilZPass));n(a.polygonOffset,a.polygonOffsetFactor,a.polygonOffsetUnits)},setFlipSided:h,setCullFace:l,setLineWidth:function(a){a!==z&&(G&&c.lineWidth(a),z=a)},setPolygonOffset:n,setScissorTest:function(a){a?e(3089):f(3089)},activeTexture:r,bindTexture:function(a,b){null===N&&r();var d=M[N];
|
|
|
-void 0===d&&(d={type:void 0,texture:void 0},M[N]=d);if(d.type!==a||d.texture!==b)c.bindTexture(a,b||T[a]),d.type=a,d.texture=b},unbindTexture:function(){var a=M[N];void 0!==a&&void 0!==a.type&&(c.bindTexture(a.type,null),a.type=void 0,a.texture=void 0)},compressedTexImage2D:function(){try{c.compressedTexImage2D.apply(c,arguments)}catch(Y){console.error("THREE.WebGLState:",Y)}},texImage2D:function(){try{c.texImage2D.apply(c,arguments)}catch(Y){console.error("THREE.WebGLState:",Y)}},texImage3D:function(){try{c.texImage3D.apply(c,
|
|
|
-arguments)}catch(Y){console.error("THREE.WebGLState:",Y)}},scissor:function(a){!1===P.equals(a)&&(c.scissor(a.x,a.y,a.z,a.w),P.copy(a))},viewport:function(a){!1===O.equals(a)&&(c.viewport(a.x,a.y,a.z,a.w),O.copy(a))},reset:function(){t={};N=null;M={};ja=ca=y=w=null;u.reset();k.reset();m.reset()}}}function Dk(c,a,b,d,e,f,g){function h(a,b){return G?new OffscreenCanvas(a,b):document.createElementNS("http://www.w3.org/1999/xhtml","canvas")}function l(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?T.floorPowerOfTwo:Math.floor,b=d(e*a.width),e=d(e*a.height),void 0===D&&(D=h(b,e)),c=c?h(b,e):D,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"+
|
|
|
+k.setMask(a.depthWrite);u.setMask(a.colorWrite);b=a.stencilWrite;m.setTest(b);b&&(m.setMask(a.stencilWriteMask),m.setFunc(a.stencilFunc,a.stencilRef,a.stencilFuncMask),m.setOp(a.stencilFail,a.stencilZFail,a.stencilZPass));n(a.polygonOffset,a.polygonOffsetFactor,a.polygonOffsetUnits)},setFlipSided:h,setCullFace:l,setLineWidth:function(a){a!==z&&(G&&c.lineWidth(a),z=a)},setPolygonOffset:n,setScissorTest:function(a){a?e(3089):f(3089)},activeTexture:r,bindTexture:function(a,b){null===N&&r();var d=L[N];
|
|
|
+void 0===d&&(d={type:void 0,texture:void 0},L[N]=d);if(d.type!==a||d.texture!==b)c.bindTexture(a,b||T[a]),d.type=a,d.texture=b},unbindTexture:function(){var a=L[N];void 0!==a&&void 0!==a.type&&(c.bindTexture(a.type,null),a.type=void 0,a.texture=void 0)},compressedTexImage2D:function(){try{c.compressedTexImage2D.apply(c,arguments)}catch(Y){console.error("THREE.WebGLState:",Y)}},texImage2D:function(){try{c.texImage2D.apply(c,arguments)}catch(Y){console.error("THREE.WebGLState:",Y)}},texImage3D:function(){try{c.texImage3D.apply(c,
|
|
|
+arguments)}catch(Y){console.error("THREE.WebGLState:",Y)}},scissor:function(a){!1===P.equals(a)&&(c.scissor(a.x,a.y,a.z,a.w),P.copy(a))},viewport:function(a){!1===O.equals(a)&&(c.viewport(a.x,a.y,a.z,a.w),O.copy(a))},reset:function(){t={};N=null;L={};ja=ca=y=w=null;u.reset();k.reset();m.reset()}}}function Dk(c,a,b,d,e,f,g){function h(a,b){return G?new OffscreenCanvas(a,b):document.createElementNS("http://www.w3.org/1999/xhtml","canvas")}function l(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?T.floorPowerOfTwo:Math.floor,b=d(e*a.width),e=d(e*a.height),void 0===F&&(F=h(b,e)),c=c?h(b,e):F,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 n(a){return T.isPowerOfTwo(a.width)&&T.isPowerOfTwo(a.height)}function r(a,b){return a.generateMipmaps&&b&&1003!==a.minFilter&&1006!==a.minFilter}function u(a,b,e,f){c.generateMipmap(a);d.get(b).__maxMipLevel=Math.log(Math.max(e,f))*Math.LOG2E}function k(b,d,e){if(!1===ca)return d;if(null!==b){if(void 0!==c[b])return c[b];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+
|
|
|
b+"'")}b=d;6403===d&&(5126===e&&(b=33326),5131===e&&(b=33325),5121===e&&(b=33321));6407===d&&(5126===e&&(b=34837),5131===e&&(b=34843),5121===e&&(b=32849));6408===d&&(5126===e&&(b=34836),5131===e&&(b=34842),5121===e&&(b=32856));33325!==b&&33326!==b&&34842!==b&&34836!==b||a.get("EXT_color_buffer_float");return b}function m(a){return 1003===a||1004===a||1005===a?9728:9729}function t(a){a=a.target;a.removeEventListener("dispose",t);var b=d.get(a);void 0!==b.__webglInit&&(c.deleteTexture(b.__webglTexture),
|
|
|
-d.remove(a));a.isVideoTexture&&I.delete(a);g.memory.textures--}function w(a){a=a.target;a.removeEventListener("dispose",w);var b=d.get(a),e=d.get(a.texture);if(a){void 0!==e.__webglTexture&&c.deleteTexture(e.__webglTexture);a.depthTexture&&a.depthTexture.dispose();if(a.isWebGLCubeRenderTarget)for(e=0;6>e;e++)c.deleteFramebuffer(b.__webglFramebuffer[e]),b.__webglDepthbuffer&&c.deleteRenderbuffer(b.__webglDepthbuffer[e]);else c.deleteFramebuffer(b.__webglFramebuffer),b.__webglDepthbuffer&&c.deleteRenderbuffer(b.__webglDepthbuffer),
|
|
|
-b.__webglMultisampledFramebuffer&&c.deleteFramebuffer(b.__webglMultisampledFramebuffer),b.__webglColorRenderbuffer&&c.deleteRenderbuffer(b.__webglColorRenderbuffer),b.__webglDepthRenderbuffer&&c.deleteRenderbuffer(b.__webglDepthRenderbuffer);d.remove(a.texture);d.remove(a)}g.memory.textures--}function E(a,c){var e=d.get(a);if(a.isVideoTexture){var f=g.render.frame;I.get(a)!==f&&(I.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{F(e,a,c);return}b.activeTexture(33984+c);b.bindTexture(3553,e.__webglTexture)}function y(a,e){if(6===a.image.length){var g=d.get(a);if(0<a.version&&g.__version!==a.version){x(g,a);b.activeTexture(33984+e);b.bindTexture(34067,g.__webglTexture);c.pixelStorei(37440,a.flipY);var h=a&&(a.isCompressedTexture||a.image[0].isCompressedTexture),q=a.image[0]&&a.image[0].isDataTexture;e=[];for(var m=
|
|
|
-0;6>m;m++)e[m]=h||q?q?a.image[m].image:a.image[m]:l(a.image[m],!1,!0,B);m=e[0];var t=n(m)||ca,v=f.convert(a.format),w=f.convert(a.type),E=k(a.internalFormat,v,w);C(34067,a,t);if(h){for(q=0;6>q;q++){var y=e[q].mipmaps;for(h=0;h<y.length;h++){var p=y[h];1023!==a.format&&1022!==a.format?null!==v?b.compressedTexImage2D(34069+q,h,E,p.width,p.height,0,p.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):b.texImage2D(34069+q,h,E,p.width,
|
|
|
-p.height,0,v,w,p.data)}}g.__maxMipLevel=y.length-1}else{y=a.mipmaps;for(h=0;6>h;h++)if(q)for(b.texImage2D(34069+h,0,E,e[h].width,e[h].height,0,v,w,e[h].data),p=0;p<y.length;p++){var J=y[p].image[h].image;b.texImage2D(34069+h,p+1,E,J.width,J.height,0,v,w,J.data)}else for(b.texImage2D(34069+h,0,E,v,w,e[h]),p=0;p<y.length;p++)b.texImage2D(34069+h,p+1,E,v,w,y[p].image[h]);g.__maxMipLevel=y.length}r(a,t)&&u(34067,a,m.width,m.height);g.__version=a.version;if(a.onUpdate)a.onUpdate(a)}else b.activeTexture(33984+
|
|
|
-e),b.bindTexture(34067,g.__webglTexture)}}function p(a,c){b.activeTexture(33984+c);b.bindTexture(34067,d.get(a).__webglTexture)}function C(b,f,g){g?(c.texParameteri(b,10242,N[f.wrapS]),c.texParameteri(b,10243,N[f.wrapT]),32879!==b&&35866!==b||c.texParameteri(b,32882,N[f.wrapR]),c.texParameteri(b,10240,M[f.magFilter]),c.texParameteri(b,10241,M[f.minFilter])):(c.texParameteri(b,10242,33071),c.texParameteri(b,10243,33071),32879!==b&&35866!==b||c.texParameteri(b,32882,33071),1001===f.wrapS&&1001===f.wrapT||
|
|
|
+d.remove(a));a.isVideoTexture&&J.delete(a);g.memory.textures--}function w(a){a=a.target;a.removeEventListener("dispose",w);var b=d.get(a),e=d.get(a.texture);if(a){void 0!==e.__webglTexture&&c.deleteTexture(e.__webglTexture);a.depthTexture&&a.depthTexture.dispose();if(a.isWebGLCubeRenderTarget)for(e=0;6>e;e++)c.deleteFramebuffer(b.__webglFramebuffer[e]),b.__webglDepthbuffer&&c.deleteRenderbuffer(b.__webglDepthbuffer[e]);else c.deleteFramebuffer(b.__webglFramebuffer),b.__webglDepthbuffer&&c.deleteRenderbuffer(b.__webglDepthbuffer),
|
|
|
+b.__webglMultisampledFramebuffer&&c.deleteFramebuffer(b.__webglMultisampledFramebuffer),b.__webglColorRenderbuffer&&c.deleteRenderbuffer(b.__webglColorRenderbuffer),b.__webglDepthRenderbuffer&&c.deleteRenderbuffer(b.__webglDepthRenderbuffer);d.remove(a.texture);d.remove(a)}g.memory.textures--}function C(a,c){var e=d.get(a);if(a.isVideoTexture){var f=g.render.frame;J.get(a)!==f&&(J.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{H(e,a,c);return}b.activeTexture(33984+c);b.bindTexture(3553,e.__webglTexture)}function y(a,e){if(6===a.image.length){var g=d.get(a);if(0<a.version&&g.__version!==a.version){x(g,a);b.activeTexture(33984+e);b.bindTexture(34067,g.__webglTexture);c.pixelStorei(37440,a.flipY);var h=a&&(a.isCompressedTexture||a.image[0].isCompressedTexture),q=a.image[0]&&a.image[0].isDataTexture;e=[];for(var m=
|
|
|
+0;6>m;m++)e[m]=h||q?q?a.image[m].image:a.image[m]:l(a.image[m],!1,!0,B);m=e[0];var t=n(m)||ca,v=f.convert(a.format),w=f.convert(a.type),C=k(a.internalFormat,v,w);D(34067,a,t);if(h){for(q=0;6>q;q++){var y=e[q].mipmaps;for(h=0;h<y.length;h++){var p=y[h];1023!==a.format&&1022!==a.format?null!==v?b.compressedTexImage2D(34069+q,h,C,p.width,p.height,0,p.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):b.texImage2D(34069+q,h,C,p.width,
|
|
|
+p.height,0,v,w,p.data)}}g.__maxMipLevel=y.length-1}else{y=a.mipmaps;for(h=0;6>h;h++)if(q)for(b.texImage2D(34069+h,0,C,e[h].width,e[h].height,0,v,w,e[h].data),p=0;p<y.length;p++){var E=y[p].image[h].image;b.texImage2D(34069+h,p+1,C,E.width,E.height,0,v,w,E.data)}else for(b.texImage2D(34069+h,0,C,v,w,e[h]),p=0;p<y.length;p++)b.texImage2D(34069+h,p+1,C,v,w,y[p].image[h]);g.__maxMipLevel=y.length}r(a,t)&&u(34067,a,m.width,m.height);g.__version=a.version;if(a.onUpdate)a.onUpdate(a)}else b.activeTexture(33984+
|
|
|
+e),b.bindTexture(34067,g.__webglTexture)}}function p(a,c){b.activeTexture(33984+c);b.bindTexture(34067,d.get(a).__webglTexture)}function D(b,f,g){g?(c.texParameteri(b,10242,N[f.wrapS]),c.texParameteri(b,10243,N[f.wrapT]),32879!==b&&35866!==b||c.texParameteri(b,32882,N[f.wrapR]),c.texParameteri(b,10240,L[f.magFilter]),c.texParameteri(b,10241,L[f.minFilter])):(c.texParameteri(b,10242,33071),c.texParameteri(b,10243,33071),32879!==b&&35866!==b||c.texParameteri(b,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."),c.texParameteri(b,10240,m(f.magFilter)),c.texParameteri(b,10241,m(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=a.get("EXT_texture_filter_anisotropic"))||1015===f.type&&null===a.get("OES_texture_float_linear")||
|
|
|
-1016===f.type&&null===(ca||a.get("OES_texture_half_float_linear"))||!(1<f.anisotropy||d.get(f).__currentAnisotropy)||(c.texParameterf(b,g.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(f.anisotropy,e.getMaxAnisotropy())),d.get(f).__currentAnisotropy=f.anisotropy)}function x(a,b){void 0===a.__webglInit&&(a.__webglInit=!0,b.addEventListener("dispose",t),a.__webglTexture=c.createTexture(),g.memory.textures++)}function F(a,d,e){var g=3553;d.isDataTexture2DArray&&(g=35866);d.isDataTexture3D&&(g=32879);x(a,d);b.activeTexture(33984+
|
|
|
-e);b.bindTexture(g,a.__webglTexture);c.pixelStorei(37440,d.flipY);c.pixelStorei(37441,d.premultiplyAlpha);c.pixelStorei(3317,d.unpackAlignment);e=ca?!1:1001!==d.wrapS||1001!==d.wrapT||1003!==d.minFilter&&1006!==d.minFilter;e=e&&!1===n(d.image);e=l(d.image,e,!1,z);var h=n(e)||ca,q=f.convert(d.format),m=f.convert(d.type),t=k(d.internalFormat,q,m);C(g,d,h);var v=d.mipmaps;if(d.isDepthTexture)t=6402,ca?t=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===t&&1012!==d.type&&1014!==d.type&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),d.type=1012,m=f.convert(d.type)),1027===d.format&&6402===t&&(t=34041,1020!==d.type&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),d.type=1020,m=f.convert(d.type))),b.texImage2D(3553,0,t,e.width,e.height,0,q,m,null);else if(d.isDataTexture)if(0<v.length&&h){for(var w=0,E=v.length;w<E;w++){var y=
|
|
|
-v[w];b.texImage2D(3553,w,t,y.width,y.height,0,q,m,y.data)}d.generateMipmaps=!1;a.__maxMipLevel=v.length-1}else b.texImage2D(3553,0,t,e.width,e.height,0,q,m,e.data),a.__maxMipLevel=0;else if(d.isCompressedTexture){w=0;for(E=v.length;w<E;w++)y=v[w],1023!==d.format&&1022!==d.format?null!==q?b.compressedTexImage2D(3553,w,t,y.width,y.height,0,y.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):b.texImage2D(3553,w,t,y.width,y.height,0,q,
|
|
|
-m,y.data);a.__maxMipLevel=v.length-1}else if(d.isDataTexture2DArray)b.texImage3D(35866,0,t,e.width,e.height,e.depth,0,q,m,e.data),a.__maxMipLevel=0;else if(d.isDataTexture3D)b.texImage3D(32879,0,t,e.width,e.height,e.depth,0,q,m,e.data),a.__maxMipLevel=0;else if(0<v.length&&h){w=0;for(E=v.length;w<E;w++)y=v[w],b.texImage2D(3553,w,t,q,m,y);d.generateMipmaps=!1;a.__maxMipLevel=v.length-1}else b.texImage2D(3553,0,t,q,m,e),a.__maxMipLevel=0;r(d,h)&&u(g,d,e.width,e.height);a.__version=d.version;if(d.onUpdate)d.onUpdate(d)}
|
|
|
-function A(a,e,g,h){var l=f.convert(e.texture.format),n=f.convert(e.texture.type),r=k(e.texture.internalFormat,l,n);b.texImage2D(h,0,r,e.width,e.height,0,l,n,null);c.bindFramebuffer(36160,a);c.framebufferTexture2D(36160,g,h,d.get(e.texture).__webglTexture,0);c.bindFramebuffer(36160,null)}function K(a,b,d){c.bindRenderbuffer(36161,a);if(b.depthBuffer&&!b.stencilBuffer){var e=33189;d?((d=b.depthTexture)&&d.isDepthTexture&&(1015===d.type?e=36012:1014===d.type&&(e=33190)),d=Q(b),c.renderbufferStorageMultisample(36161,
|
|
|
+1016===f.type&&null===(ca||a.get("OES_texture_half_float_linear"))||!(1<f.anisotropy||d.get(f).__currentAnisotropy)||(c.texParameterf(b,g.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(f.anisotropy,e.getMaxAnisotropy())),d.get(f).__currentAnisotropy=f.anisotropy)}function x(a,b){void 0===a.__webglInit&&(a.__webglInit=!0,b.addEventListener("dispose",t),a.__webglTexture=c.createTexture(),g.memory.textures++)}function H(a,d,e){var g=3553;d.isDataTexture2DArray&&(g=35866);d.isDataTexture3D&&(g=32879);x(a,d);b.activeTexture(33984+
|
|
|
+e);b.bindTexture(g,a.__webglTexture);c.pixelStorei(37440,d.flipY);c.pixelStorei(37441,d.premultiplyAlpha);c.pixelStorei(3317,d.unpackAlignment);e=ca?!1:1001!==d.wrapS||1001!==d.wrapT||1003!==d.minFilter&&1006!==d.minFilter;e=e&&!1===n(d.image);e=l(d.image,e,!1,z);var h=n(e)||ca,q=f.convert(d.format),m=f.convert(d.type),t=k(d.internalFormat,q,m);D(g,d,h);var v=d.mipmaps;if(d.isDepthTexture)t=6402,ca?t=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===t&&1012!==d.type&&1014!==d.type&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),d.type=1012,m=f.convert(d.type)),1027===d.format&&6402===t&&(t=34041,1020!==d.type&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),d.type=1020,m=f.convert(d.type))),b.texImage2D(3553,0,t,e.width,e.height,0,q,m,null);else if(d.isDataTexture)if(0<v.length&&h){for(var w=0,C=v.length;w<C;w++){var y=
|
|
|
+v[w];b.texImage2D(3553,w,t,y.width,y.height,0,q,m,y.data)}d.generateMipmaps=!1;a.__maxMipLevel=v.length-1}else b.texImage2D(3553,0,t,e.width,e.height,0,q,m,e.data),a.__maxMipLevel=0;else if(d.isCompressedTexture){w=0;for(C=v.length;w<C;w++)y=v[w],1023!==d.format&&1022!==d.format?null!==q?b.compressedTexImage2D(3553,w,t,y.width,y.height,0,y.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):b.texImage2D(3553,w,t,y.width,y.height,0,q,
|
|
|
+m,y.data);a.__maxMipLevel=v.length-1}else if(d.isDataTexture2DArray)b.texImage3D(35866,0,t,e.width,e.height,e.depth,0,q,m,e.data),a.__maxMipLevel=0;else if(d.isDataTexture3D)b.texImage3D(32879,0,t,e.width,e.height,e.depth,0,q,m,e.data),a.__maxMipLevel=0;else if(0<v.length&&h){w=0;for(C=v.length;w<C;w++)y=v[w],b.texImage2D(3553,w,t,q,m,y);d.generateMipmaps=!1;a.__maxMipLevel=v.length-1}else b.texImage2D(3553,0,t,q,m,e),a.__maxMipLevel=0;r(d,h)&&u(g,d,e.width,e.height);a.__version=d.version;if(d.onUpdate)d.onUpdate(d)}
|
|
|
+function A(a,e,g,h){var l=f.convert(e.texture.format),n=f.convert(e.texture.type),r=k(e.texture.internalFormat,l,n);b.texImage2D(h,0,r,e.width,e.height,0,l,n,null);c.bindFramebuffer(36160,a);c.framebufferTexture2D(36160,g,h,d.get(e.texture).__webglTexture,0);c.bindFramebuffer(36160,null)}function M(a,b,d){c.bindRenderbuffer(36161,a);if(b.depthBuffer&&!b.stencilBuffer){var e=33189;d?((d=b.depthTexture)&&d.isDepthTexture&&(1015===d.type?e=36012:1014===d.type&&(e=33190)),d=Q(b),c.renderbufferStorageMultisample(36161,
|
|
|
d,e,b.width,b.height)):c.renderbufferStorage(36161,e,b.width,b.height);c.framebufferRenderbuffer(36160,36096,36161,a)}else b.depthBuffer&&b.stencilBuffer?(d?(d=Q(b),c.renderbufferStorageMultisample(36161,d,35056,b.width,b.height)):c.renderbufferStorage(36161,34041,b.width,b.height),c.framebufferRenderbuffer(36160,33306,36161,a)):(a=f.convert(b.texture.format),e=f.convert(b.texture.type),a=k(b.texture.internalFormat,a,e),d?(d=Q(b),c.renderbufferStorageMultisample(36161,d,a,b.width,b.height)):c.renderbufferStorage(36161,
|
|
|
-a,b.width,b.height));c.bindRenderbuffer(36161,null)}function Q(a){return ca&&a.isWebGLMultisampleRenderTarget?Math.min(H,a.samples):0}var ca=e.isWebGL2,ja=e.maxTextures,B=e.maxCubemapSize,z=e.maxTextureSize,H=e.maxSamples,I=new WeakMap,D,G=!1;try{G="undefined"!==typeof OffscreenCanvas&&null!==(new OffscreenCanvas(1,1)).getContext("2d")}catch(pc){}var L=0,N={1E3:10497,1001:33071,1002:33648},M={1003:9728,1004:9984,1005:9986,1006:9729,1007:9985,1008:9987},P=!1,O=!1;this.allocateTextureUnit=function(){var a=
|
|
|
-L;a>=ja&&console.warn("THREE.WebGLTextures: Trying to use "+a+" texture units while this GPU supports only "+ja);L+=1;return a};this.resetTextureUnits=function(){L=0};this.setTexture2D=E;this.setTexture2DArray=function(a,c){var e=d.get(a);0<a.version&&e.__version!==a.version?F(e,a,c):(b.activeTexture(33984+c),b.bindTexture(35866,e.__webglTexture))};this.setTexture3D=function(a,c){var e=d.get(a);0<a.version&&e.__version!==a.version?F(e,a,c):(b.activeTexture(33984+c),b.bindTexture(32879,e.__webglTexture))};
|
|
|
+a,b.width,b.height));c.bindRenderbuffer(36161,null)}function Q(a){return ca&&a.isWebGLMultisampleRenderTarget?Math.min(I,a.samples):0}var ca=e.isWebGL2,ja=e.maxTextures,B=e.maxCubemapSize,z=e.maxTextureSize,I=e.maxSamples,J=new WeakMap,F,G=!1;try{G="undefined"!==typeof OffscreenCanvas&&null!==(new OffscreenCanvas(1,1)).getContext("2d")}catch(pc){}var K=0,N={1E3:10497,1001:33071,1002:33648},L={1003:9728,1004:9984,1005:9986,1006:9729,1007:9985,1008:9987},P=!1,O=!1;this.allocateTextureUnit=function(){var a=
|
|
|
+K;a>=ja&&console.warn("THREE.WebGLTextures: Trying to use "+a+" texture units while this GPU supports only "+ja);K+=1;return a};this.resetTextureUnits=function(){K=0};this.setTexture2D=C;this.setTexture2DArray=function(a,c){var e=d.get(a);0<a.version&&e.__version!==a.version?H(e,a,c):(b.activeTexture(33984+c),b.bindTexture(35866,e.__webglTexture))};this.setTexture3D=function(a,c){var e=d.get(a);0<a.version&&e.__version!==a.version?H(e,a,c):(b.activeTexture(33984+c),b.bindTexture(32879,e.__webglTexture))};
|
|
|
this.setTextureCube=y;this.setTextureCubeDynamic=p;this.setupRenderTarget=function(a){var e=d.get(a),h=d.get(a.texture);a.addEventListener("dispose",w);h.__webglTexture=c.createTexture();g.memory.textures++;var l=!0===a.isWebGLCubeRenderTarget,q=!0===a.isWebGLMultisampleRenderTarget,m=n(a)||ca;!ca||1022!==a.texture.format||1015!==a.texture.type&&1016!==a.texture.type||(a.texture.format=1023,console.warn("THREE.WebGLRenderer: Rendering to textures with RGB format is not supported. Using RGBA format instead."));
|
|
|
if(l)for(e.__webglFramebuffer=[],q=0;6>q;q++)e.__webglFramebuffer[q]=c.createFramebuffer();else if(e.__webglFramebuffer=c.createFramebuffer(),q)if(ca){e.__webglMultisampledFramebuffer=c.createFramebuffer();e.__webglColorRenderbuffer=c.createRenderbuffer();c.bindRenderbuffer(36161,e.__webglColorRenderbuffer);q=f.convert(a.texture.format);var t=f.convert(a.texture.type);q=k(a.texture.internalFormat,q,t);t=Q(a);c.renderbufferStorageMultisample(36161,t,q,a.width,a.height);c.bindFramebuffer(36160,e.__webglMultisampledFramebuffer);
|
|
|
-c.framebufferRenderbuffer(36160,36064,36161,e.__webglColorRenderbuffer);c.bindRenderbuffer(36161,null);a.depthBuffer&&(e.__webglDepthRenderbuffer=c.createRenderbuffer(),K(e.__webglDepthRenderbuffer,a,!0));c.bindFramebuffer(36160,null)}else console.warn("THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.");if(l){b.bindTexture(34067,h.__webglTexture);C(34067,a.texture,m);for(h=0;6>h;h++)A(e.__webglFramebuffer[h],a,36064,34069+h);r(a.texture,m)&&u(34067,a.texture,a.width,
|
|
|
-a.height);b.bindTexture(34067,null)}else b.bindTexture(3553,h.__webglTexture),C(3553,a.texture,m),A(e.__webglFramebuffer,a,36064,3553),r(a.texture,m)&&u(3553,a.texture,a.width,a.height),b.bindTexture(3553,null);if(a.depthBuffer){e=d.get(a);m=!0===a.isWebGLCubeRenderTarget;if(a.depthTexture){if(m)throw Error("target.depthTexture not supported in Cube render targets");if(a&&a.isWebGLCubeRenderTarget)throw Error("Depth Texture with cube render targets is not supported");c.bindFramebuffer(36160,e.__webglFramebuffer);
|
|
|
-if(!a.depthTexture||!a.depthTexture.isDepthTexture)throw Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");d.get(a.depthTexture).__webglTexture&&a.depthTexture.image.width===a.width&&a.depthTexture.image.height===a.height||(a.depthTexture.image.width=a.width,a.depthTexture.image.height=a.height,a.depthTexture.needsUpdate=!0);E(a.depthTexture,0);e=d.get(a.depthTexture).__webglTexture;if(1026===a.depthTexture.format)c.framebufferTexture2D(36160,36096,3553,e,0);else if(1027===
|
|
|
-a.depthTexture.format)c.framebufferTexture2D(36160,33306,3553,e,0);else throw Error("Unknown depthTexture format");}else if(m)for(e.__webglDepthbuffer=[],m=0;6>m;m++)c.bindFramebuffer(36160,e.__webglFramebuffer[m]),e.__webglDepthbuffer[m]=c.createRenderbuffer(),K(e.__webglDepthbuffer[m],a,!1);else c.bindFramebuffer(36160,e.__webglFramebuffer),e.__webglDepthbuffer=c.createRenderbuffer(),K(e.__webglDepthbuffer,a,!1);c.bindFramebuffer(36160,null)}};this.updateRenderTargetMipmap=function(a){var c=a.texture,
|
|
|
+c.framebufferRenderbuffer(36160,36064,36161,e.__webglColorRenderbuffer);c.bindRenderbuffer(36161,null);a.depthBuffer&&(e.__webglDepthRenderbuffer=c.createRenderbuffer(),M(e.__webglDepthRenderbuffer,a,!0));c.bindFramebuffer(36160,null)}else console.warn("THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.");if(l){b.bindTexture(34067,h.__webglTexture);D(34067,a.texture,m);for(h=0;6>h;h++)A(e.__webglFramebuffer[h],a,36064,34069+h);r(a.texture,m)&&u(34067,a.texture,a.width,
|
|
|
+a.height);b.bindTexture(34067,null)}else b.bindTexture(3553,h.__webglTexture),D(3553,a.texture,m),A(e.__webglFramebuffer,a,36064,3553),r(a.texture,m)&&u(3553,a.texture,a.width,a.height),b.bindTexture(3553,null);if(a.depthBuffer){e=d.get(a);m=!0===a.isWebGLCubeRenderTarget;if(a.depthTexture){if(m)throw Error("target.depthTexture not supported in Cube render targets");if(a&&a.isWebGLCubeRenderTarget)throw Error("Depth Texture with cube render targets is not supported");c.bindFramebuffer(36160,e.__webglFramebuffer);
|
|
|
+if(!a.depthTexture||!a.depthTexture.isDepthTexture)throw Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");d.get(a.depthTexture).__webglTexture&&a.depthTexture.image.width===a.width&&a.depthTexture.image.height===a.height||(a.depthTexture.image.width=a.width,a.depthTexture.image.height=a.height,a.depthTexture.needsUpdate=!0);C(a.depthTexture,0);e=d.get(a.depthTexture).__webglTexture;if(1026===a.depthTexture.format)c.framebufferTexture2D(36160,36096,3553,e,0);else if(1027===
|
|
|
+a.depthTexture.format)c.framebufferTexture2D(36160,33306,3553,e,0);else throw Error("Unknown depthTexture format");}else if(m)for(e.__webglDepthbuffer=[],m=0;6>m;m++)c.bindFramebuffer(36160,e.__webglFramebuffer[m]),e.__webglDepthbuffer[m]=c.createRenderbuffer(),M(e.__webglDepthbuffer[m],a,!1);else c.bindFramebuffer(36160,e.__webglFramebuffer),e.__webglDepthbuffer=c.createRenderbuffer(),M(e.__webglDepthbuffer,a,!1);c.bindFramebuffer(36160,null)}};this.updateRenderTargetMipmap=function(a){var c=a.texture,
|
|
|
e=n(a)||ca;if(r(c,e)){e=a.isWebGLCubeRenderTarget?34067:3553;var f=d.get(c).__webglTexture;b.bindTexture(e,f);u(e,c,a.width,a.height);b.bindTexture(e,null)}};this.updateMultisampleRenderTarget=function(a){if(a.isWebGLMultisampleRenderTarget)if(ca){var b=d.get(a);c.bindFramebuffer(36008,b.__webglMultisampledFramebuffer);c.bindFramebuffer(36009,b.__webglFramebuffer);var e=a.width,f=a.height,g=16384;a.depthBuffer&&(g|=256);a.stencilBuffer&&(g|=1024);c.blitFramebuffer(0,0,e,f,0,0,e,f,g,9728);c.bindFramebuffer(36160,
|
|
|
-b.__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);E(a,b)};this.safeSetTextureCube=function(a,b){a&&a.isWebGLCubeRenderTarget&&(!1===O&&(console.warn("THREE.WebGLTextures.safeSetTextureCube: don't use cube render targets as textures. Use their .texture property instead."),
|
|
|
+b.__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);C(a,b)};this.safeSetTextureCube=function(a,b){a&&a.isWebGLCubeRenderTarget&&(!1===O&&(console.warn("THREE.WebGLTextures.safeSetTextureCube: don't use cube render targets as textures. Use their .texture property instead."),
|
|
|
O=!0),a=a.texture);a&&a.isCubeTexture||Array.isArray(a.image)&&6===a.image.length?y(a,b):p(a,b)}}function Yh(c,a,b){var d=b.isWebGL2;return{convert:function(b){if(1009===b)return 5121;if(1017===b)return 32819;if(1018===b)return 32820;if(1019===b)return 33635;if(1010===b)return 5120;if(1011===b)return 5122;if(1012===b)return 5123;if(1013===b)return 5124;if(1014===b)return 5125;if(1015===b)return 5126;if(1016===b){if(d)return 5131;var c=a.get("OES_texture_half_float");return null!==c?c.HALF_FLOAT_OES:
|
|
|
null}if(1021===b)return 6406;if(1022===b)return 6407;if(1023===b)return 6408;if(1024===b)return 6409;if(1025===b)return 6410;if(1026===b)return 6402;if(1027===b)return 34041;if(1028===b)return 6403;if(1029===b)return 36244;if(1030===b)return 33319;if(1031===b)return 33320;if(1032===b)return 36248;if(1033===b)return 36249;if(33776===b||33777===b||33778===b||33779===b)if(c=a.get("WEBGL_compressed_texture_s3tc"),null!==c){if(33776===b)return c.COMPRESSED_RGB_S3TC_DXT1_EXT;if(33777===b)return c.COMPRESSED_RGBA_S3TC_DXT1_EXT;
|
|
|
if(33778===b)return c.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(33779===b)return c.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(35840===b||35841===b||35842===b||35843===b)if(c=a.get("WEBGL_compressed_texture_pvrtc"),null!==c){if(35840===b)return c.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(35841===b)return c.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(35842===b)return c.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(35843===b)return c.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(36196===b)return c=a.get("WEBGL_compressed_texture_etc1"),
|
|
|
null!==c?c.COMPRESSED_RGB_ETC1_WEBGL:null;if(37492===b||37496===b)if(c=a.get("WEBGL_compressed_texture_etc"),null!==c){if(37492===b)return c.COMPRESSED_RGB8_ETC2;if(37496===b)return c.COMPRESSED_RGBA8_ETC2_EAC}if(37808===b||37809===b||37810===b||37811===b||37812===b||37813===b||37814===b||37815===b||37816===b||37817===b||37818===b||37819===b||37820===b||37821===b||37840===b||37841===b||37842===b||37843===b||37844===b||37845===b||37846===b||37847===b||37848===b||37849===b||37850===b||37851===b||37852===
|
|
|
-b||37853===b)return c=a.get("WEBGL_compressed_texture_astc"),null!==c?b:null;if(36492===b)return c=a.get("EXT_texture_compression_bptc"),null!==c?b:null;if(1020===b){if(d)return 34042;c=a.get("WEBGL_depth_texture");return null!==c?c.UNSIGNED_INT_24_8_WEBGL:null}}}}function $e(c){ta.call(this);this.cameras=c||[]}function Vb(){D.call(this);this.type="Group"}function Yd(){this._hand=this._grip=this._targetRay=null}function Zh(c,a){function b(a){var b=t.get(a.inputSource);b&&b.dispatchEvent({type:a.type})}
|
|
|
+b||37853===b)return c=a.get("WEBGL_compressed_texture_astc"),null!==c?b:null;if(36492===b)return c=a.get("EXT_texture_compression_bptc"),null!==c?b:null;if(1020===b){if(d)return 34042;c=a.get("WEBGL_depth_texture");return null!==c?c.UNSIGNED_INT_24_8_WEBGL:null}}}}function $e(c){ta.call(this);this.cameras=c||[]}function Vb(){F.call(this);this.type="Group"}function Yd(){this._hand=this._grip=this._targetRay=null}function Zh(c,a){function b(a){var b=t.get(a.inputSource);b&&b.dispatchEvent({type:a.type})}
|
|
|
function d(){t.forEach(function(a,b){a.disconnect(b)});t.clear();c.setFramebuffer(null);c.setRenderTarget(c.getRenderTarget());Q.stop();h.isPresenting=!1;h.dispatchEvent({type:"sessionend"})}function e(a){r=a;Q.setContext(l);Q.start();h.isPresenting=!0;h.dispatchEvent({type:"sessionstart"})}function f(a){for(var b=l.inputSources,c=0;c<v.length;c++)t.set(b[c],v[c]);for(b=0;b<a.removed.length;b++){c=a.removed[b];var d=t.get(c);d&&(d.dispatchEvent({type:"disconnected",data:c}),t.delete(c))}for(b=0;b<
|
|
|
-a.added.length;b++)c=a.added[b],(d=t.get(c))&&d.dispatchEvent({type:"connected",data:c})}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,l=null,n=1,r=null,u="local-floor",k=null,v=[],t=new Map,w=new ta;w.layers.enable(1);w.viewport=new B;var E=new ta;E.layers.enable(2);E.viewport=new B;var y=[w,E],p=new $e;p.layers.enable(1);p.layers.enable(2);var C=null,x=null;this.isPresenting=
|
|
|
+a.added.length;b++)c=a.added[b],(d=t.get(c))&&d.dispatchEvent({type:"connected",data:c})}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,l=null,n=1,r=null,u="local-floor",k=null,v=[],t=new Map,w=new ta;w.layers.enable(1);w.viewport=new B;var C=new ta;C.layers.enable(2);C.viewport=new B;var y=[w,C],p=new $e;p.layers.enable(1);p.layers.enable(2);var D=null,x=null;this.isPresenting=
|
|
|
this.enabled=!1;this.getController=function(a){var b=v[a];void 0===b&&(b=new Yd,v[a]=b);return b.getTargetRaySpace()};this.getControllerGrip=function(a){var b=v[a];void 0===b&&(b=new Yd,v[a]=b);return b.getGripSpace()};this.getHand=function(a){var b=v[a];void 0===b&&(b=new Yd,v[a]=b);return b.getHandSpace()};this.setFramebufferScaleFactor=function(a){n=a;!0===h.isPresenting&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")};this.setReferenceSpaceType=function(a){u=
|
|
|
a;!0===h.isPresenting&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")};this.getReferenceSpace=function(){return r};this.getSession=function(){return l};this.setSession=function(c){l=c;null!==l&&(l.addEventListener("select",b),l.addEventListener("selectstart",b),l.addEventListener("selectend",b),l.addEventListener("squeeze",b),l.addEventListener("squeezestart",b),l.addEventListener("squeezeend",b),l.addEventListener("end",d),c=a.getContextAttributes(),!0!==
|
|
|
-c.xrCompatible&&a.makeXRCompatible(),c=new XRWebGLLayer(l,a,{antialias:c.antialias,alpha:c.alpha,depth:c.depth,stencil:c.stencil,framebufferScaleFactor:n}),l.updateRenderState({baseLayer:c}),l.requestReferenceSpace(u).then(e),l.addEventListener("inputsourceschange",f))};var F=new m,A=new m;this.getCamera=function(a){p.near=E.near=w.near=a.near;p.far=E.far=w.far=a.far;if(C!==p.near||x!==p.far)l.updateRenderState({depthNear:p.near,depthFar:p.far}),C=p.near,x=p.far;var b=a.parent,c=p.cameras;g(p,b);
|
|
|
-for(var d=0;d<c.length;d++)g(c[d],b);a.matrixWorld.copy(p.matrixWorld);a=a.children;b=0;for(d=a.length;b<d;b++)a[b].updateMatrixWorld(!0);if(2===c.length){F.setFromMatrixPosition(w.matrixWorld);A.setFromMatrixPosition(E.matrixWorld);c=F.distanceTo(A);var e=w.projectionMatrix.elements,f=E.projectionMatrix.elements,h=e[14]/(e[10]-1);a=e[14]/(e[10]+1);b=(e[9]+1)/e[5];d=(e[9]-1)/e[5];var n=(e[8]-1)/e[0],r=(f[8]+1)/f[0];f=h*n;e=h*r;r=c/(-n+r);n=r*-n;w.matrixWorld.decompose(p.position,p.quaternion,p.scale);
|
|
|
-p.translateX(n);p.translateZ(r);p.matrixWorld.compose(p.position,p.quaternion,p.scale);p.matrixWorldInverse.getInverse(p.matrixWorld);h+=r;r=a+r;p.projectionMatrix.makePerspective(f-n,e+(c-n),b*a/r*h,d*a/r*h,h,r)}else p.projectionMatrix.copy(w.projectionMatrix);return p};var K=null,Q=new Ah;Q.setAnimationLoop(function(a,b){k=b.getViewerPose(r);if(null!==k){var d=k.views,e=l.renderState.baseLayer;c.setFramebuffer(e.framebuffer);var f=!1;d.length!==p.cameras.length&&(p.cameras.length=0,f=!0);for(var g=
|
|
|
-0;g<d.length;g++){var h=d[g],n=e.getViewport(h),u=y[g];u.matrix.fromArray(h.transform.matrix);u.projectionMatrix.fromArray(h.projectionMatrix);u.viewport.set(n.x,n.y,n.width,n.height);0===g&&p.matrix.copy(u.matrix);!0===f&&p.cameras.push(u)}}d=l.inputSources;for(e=0;e<v.length;e++)v[e].update(d[e],b,r);K&&K(a,b)});this.setAnimationLoop=function(a){K=a};this.dispose=function(){}}function Ek(c){function a(a,b){a.opacity.value=b.opacity;b.color&&a.diffuse.value.copy(b.color);b.emissive&&a.emissive.value.copy(b.emissive).multiplyScalar(b.emissiveIntensity);
|
|
|
+c.xrCompatible&&a.makeXRCompatible(),c=new XRWebGLLayer(l,a,{antialias:c.antialias,alpha:c.alpha,depth:c.depth,stencil:c.stencil,framebufferScaleFactor:n}),l.updateRenderState({baseLayer:c}),l.requestReferenceSpace(u).then(e),l.addEventListener("inputsourceschange",f))};var H=new m,A=new m;this.getCamera=function(a){p.near=C.near=w.near=a.near;p.far=C.far=w.far=a.far;if(D!==p.near||x!==p.far)l.updateRenderState({depthNear:p.near,depthFar:p.far}),D=p.near,x=p.far;var b=a.parent,c=p.cameras;g(p,b);
|
|
|
+for(var d=0;d<c.length;d++)g(c[d],b);a.matrixWorld.copy(p.matrixWorld);a=a.children;b=0;for(d=a.length;b<d;b++)a[b].updateMatrixWorld(!0);if(2===c.length){H.setFromMatrixPosition(w.matrixWorld);A.setFromMatrixPosition(C.matrixWorld);c=H.distanceTo(A);var e=w.projectionMatrix.elements,f=C.projectionMatrix.elements,h=e[14]/(e[10]-1);a=e[14]/(e[10]+1);b=(e[9]+1)/e[5];d=(e[9]-1)/e[5];var n=(e[8]-1)/e[0],r=(f[8]+1)/f[0];f=h*n;e=h*r;r=c/(-n+r);n=r*-n;w.matrixWorld.decompose(p.position,p.quaternion,p.scale);
|
|
|
+p.translateX(n);p.translateZ(r);p.matrixWorld.compose(p.position,p.quaternion,p.scale);p.matrixWorldInverse.getInverse(p.matrixWorld);h+=r;r=a+r;p.projectionMatrix.makePerspective(f-n,e+(c-n),b*a/r*h,d*a/r*h,h,r)}else p.projectionMatrix.copy(w.projectionMatrix);return p};var M=null,Q=new Ah;Q.setAnimationLoop(function(a,b){k=b.getViewerPose(r);if(null!==k){var d=k.views,e=l.renderState.baseLayer;c.setFramebuffer(e.framebuffer);var f=!1;d.length!==p.cameras.length&&(p.cameras.length=0,f=!0);for(var g=
|
|
|
+0;g<d.length;g++){var h=d[g],n=e.getViewport(h),u=y[g];u.matrix.fromArray(h.transform.matrix);u.projectionMatrix.fromArray(h.projectionMatrix);u.viewport.set(n.x,n.y,n.width,n.height);0===g&&p.matrix.copy(u.matrix);!0===f&&p.cameras.push(u)}}d=l.inputSources;for(e=0;e<v.length;e++)v[e].update(d[e],b,r);M&&M(a,b)});this.setAnimationLoop=function(a){M=a};this.dispose=function(){}}function Ek(c){function a(a,b){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);var d=c.get(b).envMap;d&&(a.envMap.value=d,a.flipEnvMap.value=d.isCubeTexture?-1:1,a.reflectivity.value=b.reflectivity,a.refractionRatio.value=b.refractionRatio,d=c.get(d).__maxMipLevel,void 0!==d&&(a.maxMipLevel.value=d));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 e=b.map;else b.specularMap?e=b.specularMap:b.displacementMap?e=b.displacementMap:b.normalMap?e=b.normalMap:b.bumpMap?e=b.bumpMap:b.roughnessMap?e=b.roughnessMap:b.metalnessMap?e=b.metalnessMap:b.alphaMap?e=b.alphaMap:b.emissiveMap&&(e=b.emissiveMap);void 0!==e&&(e.isWebGLRenderTarget&&(e=e.texture),!0===e.matrixAutoUpdate&&e.updateMatrix(),a.uvTransform.value.copy(e.matrix));if(b.aoMap)var h=b.aoMap;else b.lightMap&&(h=b.lightMap);void 0!==h&&(h.isWebGLRenderTarget&&(h=h.texture),!0===
|
|
|
h.matrixAutoUpdate&&h.updateMatrix(),a.uv2Transform.value.copy(h.matrix))}function b(a,b){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===
|
|
@@ -190,25 +190,25 @@ e.displacementBias),c.referencePosition.value.copy(e.referencePosition),c.nearDi
|
|
|
c.displacementBias.value=e.displacementBias);else if(e.isLineBasicMaterial)c.diffuse.value.copy(e.color),c.opacity.value=e.opacity,e.isLineDashedMaterial&&(c.dashSize.value=e.dashSize,c.totalSize.value=e.dashSize+e.gapSize,c.scale.value=e.scale);else if(e.isPointsMaterial){c.diffuse.value.copy(e.color);c.opacity.value=e.opacity;c.size.value=e.size*f;c.scale.value=.5*g;e.map&&(c.map.value=e.map);e.alphaMap&&(c.alphaMap.value=e.alphaMap);if(e.map)var d=e.map;else e.alphaMap&&(d=e.alphaMap);void 0!==
|
|
|
d&&(!0===d.matrixAutoUpdate&&d.updateMatrix(),c.uvTransform.value.copy(d.matrix))}else if(e.isSpriteMaterial){c.diffuse.value.copy(e.color);c.opacity.value=e.opacity;c.rotation.value=e.rotation;e.map&&(c.map.value=e.map);e.alphaMap&&(c.alphaMap.value=e.alphaMap);if(e.map)var l=e.map;else e.alphaMap&&(l=e.alphaMap);void 0!==l&&(!0===l.matrixAutoUpdate&&l.updateMatrix(),c.uvTransform.value.copy(l.matrix))}else e.isShadowMaterial?(c.color.value.copy(e.color),c.opacity.value=e.opacity):e.isShaderMaterial&&
|
|
|
(e.uniformsNeedUpdate=!1)}}}function Zd(c){function a(a,b){for(var c=0;c<a.length;c++){var d=v.getContext(a[c],b);if(null!==d)return d}return null}function b(){xa=new sj(R);Ha=new pj(R,xa,c);!1===Ha.isWebGL2&&(xa.get("WEBGL_depth_texture"),xa.get("OES_texture_float"),xa.get("OES_texture_half_float"),xa.get("OES_texture_half_float_linear"),xa.get("OES_standard_derivatives"),xa.get("OES_element_index_uint"),xa.get("OES_vertex_array_object"),xa.get("ANGLE_instanced_arrays"));xa.get("OES_texture_float_linear");
|
|
|
-ua=new Yh(R,xa,Ha);ya=new Ck(R,xa,Ha);ya.scissor(X.copy(ba).multiplyScalar(Y).floor());ya.viewport(V.copy(W).multiplyScalar(Y).floor());pb=new vj(R);aa=new sk;Z=new Dk(R,xa,ya,aa,Ha,ua,pb);ha=new rj(ca);pa=new lj(R,Ha);oa=new nj(R,xa,pa,Ha);sa=new tj(R,pa,pb,oa);ma=new zj(R,sa,pa,pb);Ba=new yj(R);ia=new qj(aa);ka=new rk(ca,ha,xa,Ha,oa,ia);wa=new Ek(aa);va=new vk(aa);ta=new Bk;ra=new mj(ca,ha,ya,ma,C);Ca=new oj(R,xa,pb,Ha);Da=new uj(R,xa,pb,Ha);pb.programs=ka.programs;ca.capabilities=Ha;ca.extensions=
|
|
|
-xa;ca.properties=aa;ca.renderLists=va;ca.state=ya;ca.info=pb}function d(a){a.preventDefault();console.log("THREE.WebGLRenderer: Context Lost.");I=!0}function e(){console.log("THREE.WebGLRenderer: Context Restored.");I=!1;b()}function f(a){a=a.target;a.removeEventListener("dispose",f);g(a);aa.remove(a)}function g(a){a=aa.get(a).program;void 0!==a&&ka.releaseProgram(a)}function h(a,b){a.render(function(a){ca.renderBufferImmediate(a,b)})}function l(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)Q.pushLight(a),a.castShadow&&Q.pushShadow(a);else if(a.isSprite){if(!a.frustumCulled||na.intersectsSprite(a)){d&&Ub.setFromMatrixPosition(a.matrixWorld).applyMatrix4(Xd);var e=ma.update(a),f=a.material;f.visible&&K.push(a,e,f,c,Ub.z,null)}}else if(a.isImmediateRenderObject)d&&Ub.setFromMatrixPosition(a.matrixWorld).applyMatrix4(Xd),K.push(a,null,a.material,c,Ub.z,null);else if(a.isMesh||a.isLine||a.isPoints)if(a.isSkinnedMesh&&
|
|
|
-a.skeleton.frame!==pb.render.frame&&(a.skeleton.update(),a.skeleton.frame=pb.render.frame),!a.frustumCulled||na.intersectsObject(a))if(d&&Ub.setFromMatrixPosition(a.matrixWorld).applyMatrix4(Xd),e=ma.update(a),f=a.material,Array.isArray(f))for(var g=e.groups,h=0,n=g.length;h<n;h++){var r=g[h],u=f[r.materialIndex];u&&u.visible&&K.push(a,e,u,c,Ub.z,r)}else f.visible&&K.push(a,e,f,c,Ub.z,null);a=a.children;e=0;for(f=a.length;e<f;e++)l(a[e],b,c,d)}}function n(a,b,c){for(var d=!0===b.isScene?b.overrideMaterial:
|
|
|
+ua=new Yh(R,xa,Ha);ya=new Ck(R,xa,Ha);ya.scissor(X.copy(ba).multiplyScalar(Y).floor());ya.viewport(V.copy(W).multiplyScalar(Y).floor());pb=new vj(R);aa=new sk;Z=new Dk(R,xa,ya,aa,Ha,ua,pb);ha=new rj(ca);pa=new lj(R,Ha);oa=new nj(R,xa,pa,Ha);sa=new tj(R,pa,pb,oa);ma=new zj(R,sa,pa,pb);Ba=new yj(R);ia=new qj(aa);ka=new rk(ca,ha,xa,Ha,oa,ia);wa=new Ek(aa);va=new vk(aa);ta=new Bk;ra=new mj(ca,ha,ya,ma,D);Ca=new oj(R,xa,pb,Ha);Da=new uj(R,xa,pb,Ha);pb.programs=ka.programs;ca.capabilities=Ha;ca.extensions=
|
|
|
+xa;ca.properties=aa;ca.renderLists=va;ca.state=ya;ca.info=pb}function d(a){a.preventDefault();console.log("THREE.WebGLRenderer: Context Lost.");J=!0}function e(){console.log("THREE.WebGLRenderer: Context Restored.");J=!1;b()}function f(a){a=a.target;a.removeEventListener("dispose",f);g(a);aa.remove(a)}function g(a){a=aa.get(a).program;void 0!==a&&ka.releaseProgram(a)}function h(a,b){a.render(function(a){ca.renderBufferImmediate(a,b)})}function l(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)Q.pushLight(a),a.castShadow&&Q.pushShadow(a);else if(a.isSprite){if(!a.frustumCulled||na.intersectsSprite(a)){d&&Ub.setFromMatrixPosition(a.matrixWorld).applyMatrix4(Xd);var e=ma.update(a),f=a.material;f.visible&&M.push(a,e,f,c,Ub.z,null)}}else if(a.isImmediateRenderObject)d&&Ub.setFromMatrixPosition(a.matrixWorld).applyMatrix4(Xd),M.push(a,null,a.material,c,Ub.z,null);else if(a.isMesh||a.isLine||a.isPoints)if(a.isSkinnedMesh&&
|
|
|
+a.skeleton.frame!==pb.render.frame&&(a.skeleton.update(),a.skeleton.frame=pb.render.frame),!a.frustumCulled||na.intersectsObject(a))if(d&&Ub.setFromMatrixPosition(a.matrixWorld).applyMatrix4(Xd),e=ma.update(a),f=a.material,Array.isArray(f))for(var g=e.groups,h=0,n=g.length;h<n;h++){var r=g[h],u=f[r.materialIndex];u&&u.visible&&M.push(a,e,u,c,Ub.z,r)}else f.visible&&M.push(a,e,f,c,Ub.z,null);a=a.children;e=0;for(f=a.length;e<f;e++)l(a[e],b,c,d)}}function n(a,b,c){for(var d=!0===b.isScene?b.overrideMaterial:
|
|
|
null,e=0,f=a.length;e<f;e++){var g=a[e],h=g.object,l=g.geometry,n=null===d?g.material:d;g=g.group;if(c.isArrayCamera){O=c;for(var u=c.cameras,k=0,q=u.length;k<q;k++){var m=u[k];h.layers.test(m.layers)&&(ya.viewport(V.copy(m.viewport)),Q.setupLights(m),r(h,b,m,l,n,g))}}else O=null,r(h,b,c,l,n,g)}}function r(a,b,c,d,e,f){a.onBeforeRender(ca,b,c,d,e,f);Q=ta.get(b,O||c);a.modelViewMatrix.multiplyMatrices(c.matrixWorldInverse,a.matrixWorld);a.normalMatrix.getNormalMatrix(a.modelViewMatrix);if(a.isImmediateRenderObject){var g=
|
|
|
k(c,b,e,a);ya.setMaterial(e);oa.reset();h(a,g)}else ca.renderBufferDirect(c,b,d,e,a,f);a.onAfterRender(ca,b,c,d,e,f);Q=ta.get(b,O||c)}function u(a,b,c){!0!==b.isScene&&(b=xg);var d=aa.get(a),e=Q.state.lights,h=e.state.version;c=ka.getParameters(a,e.state,Q.state.shadowsArray,b,c);var l=ka.getProgramCacheKey(c),n=d.program,r=!0;if(void 0===n)a.addEventListener("dispose",f);else if(n.cacheKey!==l)g(a);else{if(d.lightsStateVersion!==h)d.lightsStateVersion=h;else if(void 0!==c.shaderID){b=a.isMeshStandardMaterial?
|
|
|
b.environment:null;d.envMap=ha.get(a.envMap||b);return}r=!1}r&&(c.uniforms=ka.getUniforms(a,c),a.onBeforeCompile(c,ca),n=ka.acquireProgram(c,l),d.program=n,d.uniforms=c.uniforms,d.outputEncoding=c.outputEncoding);c=n.getAttributes();if(a.morphTargets)for(l=a.numSupportedMorphTargets=0;l<ca.maxMorphTargets;l++)0<=c["morphTarget"+l]&&a.numSupportedMorphTargets++;if(a.morphNormals)for(l=a.numSupportedMorphNormals=0;l<ca.maxMorphNormals;l++)0<=c["morphNormal"+l]&&a.numSupportedMorphNormals++;c=d.uniforms;
|
|
|
if(!a.isShaderMaterial&&!a.isRawShaderMaterial||!0===a.clipping)d.numClippingPlanes=ia.numPlanes,d.numIntersection=ia.numIntersection,c.clippingPlanes=ia.uniform;d.environment=a.isMeshStandardMaterial?b.environment:null;d.fog=b.fog;d.envMap=ha.get(a.envMap||d.environment);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.ltc_1.value=e.state.rectAreaLTC1,c.ltc_2.value=e.state.rectAreaLTC2,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=Rb.seqWithValue(a.seq,c);d.uniformsList=a}function k(a,b,c,d){!0!==b.isScene&&(b=xg);Z.resetTextureUnits();var e=b.fog,f=c.isMeshStandardMaterial?b.environment:null,g=null===L?ca.outputEncoding:L.texture.encoding,h=ha.get(c.envMap||
|
|
|
-f),l=aa.get(c),n=Q.state.lights;!0!==la||!0!==qa&&a===P||ia.setState(c,a,a===P&&c.id===M);c.version===l.__version?void 0===l.program?u(c,b,d):c.fog&&l.fog!==e?u(c,b,d):l.environment!==f?u(c,b,d):l.needsLights&&l.lightsStateVersion!==n.state.version?u(c,b,d):void 0===l.numClippingPlanes||l.numClippingPlanes===ia.numPlanes&&l.numIntersection===ia.numIntersection?l.outputEncoding!==g?u(c,b,d):l.envMap!==h&&u(c,b,d):u(c,b,d):(u(c,b,d),l.__version=c.version);var r=!1;n=h=!1;b=l.program;f=b.getUniforms();
|
|
|
-g=l.uniforms;ya.useProgram(b.program)&&(n=h=r=!0);c.id!==M&&(M=c.id,h=!0);if(r||P!==a){f.setValue(R,"projectionMatrix",a.projectionMatrix);Ha.logarithmicDepthBuffer&&f.setValue(R,"logDepthBufFC",2/(Math.log(a.far+1)/Math.LN2));P!==a&&(P=a,n=h=!0);if(c.isShaderMaterial||c.isMeshPhongMaterial||c.isMeshToonMaterial||c.isMeshStandardMaterial||c.envMap)r=f.map.cameraPosition,void 0!==r&&r.setValue(R,Ub.setFromMatrixPosition(a.matrixWorld));(c.isMeshPhongMaterial||c.isMeshToonMaterial||c.isMeshLambertMaterial||
|
|
|
+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=Rb.seqWithValue(a.seq,c);d.uniformsList=a}function k(a,b,c,d){!0!==b.isScene&&(b=xg);Z.resetTextureUnits();var e=b.fog,f=c.isMeshStandardMaterial?b.environment:null,g=null===K?ca.outputEncoding:K.texture.encoding,h=ha.get(c.envMap||
|
|
|
+f),l=aa.get(c),n=Q.state.lights;!0!==la||!0!==qa&&a===P||ia.setState(c,a,a===P&&c.id===L);c.version===l.__version?void 0===l.program?u(c,b,d):c.fog&&l.fog!==e?u(c,b,d):l.environment!==f?u(c,b,d):l.needsLights&&l.lightsStateVersion!==n.state.version?u(c,b,d):void 0===l.numClippingPlanes||l.numClippingPlanes===ia.numPlanes&&l.numIntersection===ia.numIntersection?l.outputEncoding!==g?u(c,b,d):l.envMap!==h&&u(c,b,d):u(c,b,d):(u(c,b,d),l.__version=c.version);var r=!1;n=h=!1;b=l.program;f=b.getUniforms();
|
|
|
+g=l.uniforms;ya.useProgram(b.program)&&(n=h=r=!0);c.id!==L&&(L=c.id,h=!0);if(r||P!==a){f.setValue(R,"projectionMatrix",a.projectionMatrix);Ha.logarithmicDepthBuffer&&f.setValue(R,"logDepthBufFC",2/(Math.log(a.far+1)/Math.LN2));P!==a&&(P=a,n=h=!0);if(c.isShaderMaterial||c.isMeshPhongMaterial||c.isMeshToonMaterial||c.isMeshStandardMaterial||c.envMap)r=f.map.cameraPosition,void 0!==r&&r.setValue(R,Ub.setFromMatrixPosition(a.matrixWorld));(c.isMeshPhongMaterial||c.isMeshToonMaterial||c.isMeshLambertMaterial||
|
|
|
c.isMeshBasicMaterial||c.isMeshStandardMaterial||c.isShaderMaterial)&&f.setValue(R,"isOrthographic",!0===a.isOrthographicCamera);(c.isMeshPhongMaterial||c.isMeshToonMaterial||c.isMeshLambertMaterial||c.isMeshBasicMaterial||c.isMeshStandardMaterial||c.isShaderMaterial||c.isShadowMaterial||c.skinning)&&f.setValue(R,"viewMatrix",a.matrixWorldInverse)}if(c.skinning&&(f.setOptional(R,d,"bindMatrix"),f.setOptional(R,d,"bindMatrixInverse"),a=d.skeleton))if(r=a.bones,Ha.floatVertexTextures){if(void 0===a.boneTexture){r=
|
|
|
Math.sqrt(4*r.length);r=T.ceilPowerOfTwo(r);r=Math.max(r,4);var k=new Float32Array(r*r*4);k.set(a.boneMatrices);var q=new nc(k,r,r,1023,1015);a.boneMatrices=k;a.boneTexture=q;a.boneTextureSize=r}f.setValue(R,"boneTexture",a.boneTexture,Z);f.setValue(R,"boneTextureSize",a.boneTextureSize)}else f.setOptional(R,a,"boneMatrices");if(h||l.receiveShadow!==d.receiveShadow)l.receiveShadow=d.receiveShadow,f.setValue(R,"receiveShadow",d.receiveShadow);h&&(f.setValue(R,"toneMappingExposure",ca.toneMappingExposure),
|
|
|
l.needsLights&&(a=n,g.ambientLightColor.needsUpdate=a,g.lightProbe.needsUpdate=a,g.directionalLights.needsUpdate=a,g.directionalLightShadows.needsUpdate=a,g.pointLights.needsUpdate=a,g.pointLightShadows.needsUpdate=a,g.spotLights.needsUpdate=a,g.spotLightShadows.needsUpdate=a,g.rectAreaLights.needsUpdate=a,g.hemisphereLights.needsUpdate=a),e&&c.fog&&wa.refreshFogUniforms(g,e),wa.refreshMaterialUniforms(g,c,Y,Ua),Rb.upload(R,l.uniformsList,g,Z));c.isShaderMaterial&&!0===c.uniformsNeedUpdate&&(Rb.upload(R,
|
|
|
-l.uniformsList,g,Z),c.uniformsNeedUpdate=!1);c.isSpriteMaterial&&f.setValue(R,"center",d.center);f.setValue(R,"modelViewMatrix",d.modelViewMatrix);f.setValue(R,"normalMatrix",d.normalMatrix);f.setValue(R,"modelMatrix",d.matrixWorld);return b}c=c||{};var v=void 0!==c.canvas?c.canvas:document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),t=void 0!==c.context?c.context:null,w=void 0!==c.alpha?c.alpha:!1,E=void 0!==c.depth?c.depth:!0,y=void 0!==c.stencil?c.stencil:!0,J=void 0!==c.antialias?
|
|
|
-c.antialias:!1,C=void 0!==c.premultipliedAlpha?c.premultipliedAlpha:!0,x=void 0!==c.preserveDrawingBuffer?c.preserveDrawingBuffer:!1,F=void 0!==c.powerPreference?c.powerPreference:"default",A=void 0!==c.failIfMajorPerformanceCaveat?c.failIfMajorPerformanceCaveat:!1,K=null,Q=null;this.domElement=v;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.toneMappingExposure=1;this.maxMorphTargets=8;this.maxMorphNormals=4;var ca=this,I=!1,H=null,D=0,G=0,L=null,N=null,M=-1,P=null,O=null,V=new B,X=new B,U=null,S=v.width,Ua=v.height,Y=1,da=null,ea=null,W=new B(0,0,S,Ua),ba=new B(0,0,S,Ua),fa=!1,na=new Ma,la=!1,qa=!1,Xd=new z,Ub=new m,xg={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0},R=t;try{t={alpha:w,depth:E,stencil:y,antialias:J,premultipliedAlpha:C,preserveDrawingBuffer:x,
|
|
|
-powerPreference:F,failIfMajorPerformanceCaveat:A};v.addEventListener("webglcontextlost",d,!1);v.addEventListener("webglcontextrestored",e,!1);if(null===R&&(w=["webgl2","webgl","experimental-webgl"],!0===ca.isWebGL1Renderer&&w.shift(),R=a(w,t),null===R)){if(a(w))throw Error("Error creating WebGL context with your selected attributes.");throw Error("Error creating WebGL context.");}void 0===R.getShaderPrecisionFormat&&(R.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch($h){throw console.error("THREE.WebGLRenderer: "+
|
|
|
+l.uniformsList,g,Z),c.uniformsNeedUpdate=!1);c.isSpriteMaterial&&f.setValue(R,"center",d.center);f.setValue(R,"modelViewMatrix",d.modelViewMatrix);f.setValue(R,"normalMatrix",d.normalMatrix);f.setValue(R,"modelMatrix",d.matrixWorld);return b}c=c||{};var v=void 0!==c.canvas?c.canvas:document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),t=void 0!==c.context?c.context:null,w=void 0!==c.alpha?c.alpha:!1,C=void 0!==c.depth?c.depth:!0,y=void 0!==c.stencil?c.stencil:!0,E=void 0!==c.antialias?
|
|
|
+c.antialias:!1,D=void 0!==c.premultipliedAlpha?c.premultipliedAlpha:!0,x=void 0!==c.preserveDrawingBuffer?c.preserveDrawingBuffer:!1,H=void 0!==c.powerPreference?c.powerPreference:"default",A=void 0!==c.failIfMajorPerformanceCaveat?c.failIfMajorPerformanceCaveat:!1,M=null,Q=null;this.domElement=v;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.toneMappingExposure=1;this.maxMorphTargets=8;this.maxMorphNormals=4;var ca=this,J=!1,I=null,F=0,G=0,K=null,N=null,L=-1,P=null,O=null,V=new B,X=new B,U=null,S=v.width,Ua=v.height,Y=1,da=null,ea=null,W=new B(0,0,S,Ua),ba=new B(0,0,S,Ua),fa=!1,na=new Ma,la=!1,qa=!1,Xd=new z,Ub=new m,xg={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0},R=t;try{t={alpha:w,depth:C,stencil:y,antialias:E,premultipliedAlpha:D,preserveDrawingBuffer:x,
|
|
|
+powerPreference:H,failIfMajorPerformanceCaveat:A};v.addEventListener("webglcontextlost",d,!1);v.addEventListener("webglcontextrestored",e,!1);if(null===R&&(w=["webgl2","webgl","experimental-webgl"],!0===ca.isWebGL1Renderer&&w.shift(),R=a(w,t),null===R)){if(a(w))throw Error("Error creating WebGL context with your selected attributes.");throw Error("Error creating WebGL context.");}void 0===R.getShaderPrecisionFormat&&(R.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch($h){throw console.error("THREE.WebGLRenderer: "+
|
|
|
$h.message),$h;}var xa,Ha,ya,pb,aa,Z,ha,pa,sa,ma,ka,wa,va,ta,ia,ra,Ba,Ca,Da,ua,oa;b();var za=new Zh(ca,R);this.xr=za;var Fa=new Xh(ca,ma,Ha.maxTextureSize);this.shadowMap=Fa;this.getContext=function(){return R};this.getContextAttributes=function(){return R.getContextAttributes()};this.forceContextLoss=function(){var a=xa.get("WEBGL_lose_context");a&&a.loseContext()};this.forceContextRestore=function(){var a=xa.get("WEBGL_lose_context");a&&a.restoreContext()};this.getPixelRatio=function(){return Y};
|
|
|
this.setPixelRatio=function(a){void 0!==a&&(Y=a,this.setSize(S,Ua,!1))};this.getSize=function(a){void 0===a&&(console.warn("WebGLRenderer: .getsize() now requires a Vector2 as an argument"),a=new p);return a.set(S,Ua)};this.setSize=function(a,b,c){za.isPresenting?console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting."):(S=a,Ua=b,v.width=Math.floor(a*Y),v.height=Math.floor(b*Y),!1!==c&&(v.style.width=a+"px",v.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 p);return a.set(S*Y,Ua*Y).floor()};this.setDrawingBufferSize=function(a,b,c){S=a;Ua=b;Y=c;v.width=Math.floor(a*c);v.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 B);return a.copy(V)};this.getViewport=function(a){return a.copy(W)};
|
|
@@ -217,46 +217,46 @@ function(){return ra.getClearColor()};this.setClearColor=function(){ra.setClearC
|
|
|
this.dispose=function(){v.removeEventListener("webglcontextlost",d,!1);v.removeEventListener("webglcontextrestored",e,!1);va.dispose();ta.dispose();aa.dispose();ha.dispose();ma.dispose();oa.dispose();za.dispose();Aa.stop()};this.renderBufferImmediate=function(a,b){oa.initAttributes();var c=aa.get(a);a.hasPositions&&!c.position&&(c.position=R.createBuffer());a.hasNormals&&!c.normal&&(c.normal=R.createBuffer());a.hasUvs&&!c.uv&&(c.uv=R.createBuffer());a.hasColors&&!c.color&&(c.color=R.createBuffer());
|
|
|
b=b.getAttributes();a.hasPositions&&(R.bindBuffer(34962,c.position),R.bufferData(34962,a.positionArray,35048),oa.enableAttribute(b.position),R.vertexAttribPointer(b.position,3,5126,!1,0,0));a.hasNormals&&(R.bindBuffer(34962,c.normal),R.bufferData(34962,a.normalArray,35048),oa.enableAttribute(b.normal),R.vertexAttribPointer(b.normal,3,5126,!1,0,0));a.hasUvs&&(R.bindBuffer(34962,c.uv),R.bufferData(34962,a.uvArray,35048),oa.enableAttribute(b.uv),R.vertexAttribPointer(b.uv,2,5126,!1,0,0));a.hasColors&&
|
|
|
(R.bindBuffer(34962,c.color),R.bufferData(34962,a.colorArray,35048),oa.enableAttribute(b.color),R.vertexAttribPointer(b.color,3,5126,!1,0,0));oa.disableUnusedAttributes();R.drawArrays(4,0,a.count);a.count=0};this.renderBufferDirect=function(a,b,c,d,e,f){null===b&&(b=xg);var g=e.isMesh&&0>e.matrixWorld.determinant();a=k(a,b,d,e);ya.setMaterial(d,g);g=c.index;b=c.attributes.position;if(null===g){if(void 0===b||0===b.count)return}else if(0===g.count)return;var h=1;!0===d.wireframe&&(g=sa.getWireframeAttribute(c),
|
|
|
-h=2);(d.morphTargets||d.morphNormals)&&Ba.update(e,c,d,a);oa.setup(e,d,a,c,g);a=Ca;if(null!==g){var l=pa.get(g);a=Da;a.setIndex(l)}var n=c.drawRange.start*h,r=null!==f?f.start*h:0;l=Math.max(n,r);f=Math.max(0,Math.min(null!==g?g.count:b.count,n+c.drawRange.count*h,r+(null!==f?f.count*h:Infinity))-1-l+1);0!==f&&(e.isMesh?!0===d.wireframe?(ya.setLineWidth(d.wireframeLinewidth*(null===L?Y:1)),a.setMode(1)):a.setMode(4):e.isLine?(d=d.linewidth,void 0===d&&(d=1),ya.setLineWidth(d*(null===L?Y:1)),e.isLineSegments?
|
|
|
+h=2);(d.morphTargets||d.morphNormals)&&Ba.update(e,c,d,a);oa.setup(e,d,a,c,g);a=Ca;if(null!==g){var l=pa.get(g);a=Da;a.setIndex(l)}var n=c.drawRange.start*h,r=null!==f?f.start*h:0;l=Math.max(n,r);f=Math.max(0,Math.min(null!==g?g.count:b.count,n+c.drawRange.count*h,r+(null!==f?f.count*h:Infinity))-1-l+1);0!==f&&(e.isMesh?!0===d.wireframe?(ya.setLineWidth(d.wireframeLinewidth*(null===K?Y:1)),a.setMode(1)):a.setMode(4):e.isLine?(d=d.linewidth,void 0===d&&(d=1),ya.setLineWidth(d*(null===K?Y:1)),e.isLineSegments?
|
|
|
a.setMode(1):e.isLineLoop?a.setMode(2):a.setMode(3)):e.isPoints?a.setMode(0):e.isSprite&&a.setMode(4),e.isInstancedMesh?a.renderInstances(l,f,e.count):c.isInstancedBufferGeometry?a.renderInstances(l,f,Math.min(c.instanceCount,c._maxInstanceCount)):a.render(l,f))};this.compile=function(a,b){Q=ta.get(a,b);Q.init();a.traverse(function(a){a.isLight&&(Q.pushLight(a),a.castShadow&&Q.pushShadow(a))});Q.setupLights(b);var c=new WeakMap;a.traverse(function(b){var d=b.material;if(d)if(Array.isArray(d))for(var e=
|
|
|
0;e<d.length;e++){var f=d[e];!1===c.has(f)&&(u(f,a,b),c.set(f))}else!1===c.has(d)&&(u(d,a,b),c.set(d))})};var Ea=null,Aa=new Ah;Aa.setAnimationLoop(function(a){za.isPresenting||Ea&&Ea(a)});"undefined"!==typeof window&&Aa.setContext(window);this.setAnimationLoop=function(a){Ea=a;za.setAnimationLoop(a);null===a?Aa.stop():Aa.start()};this.render=function(a,b,c,d){if(void 0!==c){console.warn("THREE.WebGLRenderer.render(): the renderTarget argument has been removed. Use .setRenderTarget() instead.");var e=
|
|
|
-c}if(void 0!==d){console.warn("THREE.WebGLRenderer.render(): the forceClear argument has been removed. Use .clear() instead.");var f=d}if(void 0!==b&&!0!==b.isCamera)console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");else if(!0!==I){oa.resetDefaultState();M=-1;P=null;!0===a.autoUpdate&&a.updateMatrixWorld();null===b.parent&&b.updateMatrixWorld();!0===za.enabled&&!0===za.isPresenting&&(b=za.getCamera(b));if(!0===a.isScene)a.onBeforeRender(ca,a,b,e||L);Q=ta.get(a,
|
|
|
-b);Q.init();Xd.multiplyMatrices(b.projectionMatrix,b.matrixWorldInverse);na.setFromProjectionMatrix(Xd);qa=this.localClippingEnabled;la=ia.init(this.clippingPlanes,qa,b);K=va.get(a,b);K.init();l(a,b,0,ca.sortObjects);K.finish();!0===ca.sortObjects&&K.sort(da,ea);!0===la&&ia.beginShadows();Fa.render(Q.state.shadowsArray,a,b);Q.setupLights(b);!0===la&&ia.endShadows();!0===this.info.autoReset&&this.info.reset();void 0!==e&&this.setRenderTarget(e);ra.render(K,a,b,f);c=K.opaque;d=K.transparent;0<c.length&&
|
|
|
-n(c,a,b);0<d.length&&n(d,a,b);if(!0===a.isScene)a.onAfterRender(ca,a,b);null!==L&&(Z.updateRenderTargetMipmap(L),Z.updateMultisampleRenderTarget(L));ya.buffers.depth.setTest(!0);ya.buffers.depth.setMask(!0);ya.buffers.color.setMask(!0);ya.setPolygonOffset(!1);Q=K=null}};this.setFramebuffer=function(a){H!==a&&null===L&&R.bindFramebuffer(36160,a);H=a};this.getActiveCubeFace=function(){return D};this.getActiveMipmapLevel=function(){return G};this.getRenderList=function(){return K};this.setRenderList=
|
|
|
-function(a){K=a};this.getRenderState=function(){return Q};this.setRenderState=function(a){Q=a};this.getRenderTarget=function(){return L};this.setRenderTarget=function(a,b,c){L=a;D=b;G=c;a&&void 0===aa.get(a).__webglFramebuffer&&Z.setupRenderTarget(a);var d=H,e=!1;a?(d=aa.get(a).__webglFramebuffer,a.isWebGLCubeRenderTarget?(d=d[b||0],e=!0):d=a.isWebGLMultisampleRenderTarget?aa.get(a).__webglMultisampledFramebuffer:d,V.copy(a.viewport),X.copy(a.scissor),U=a.scissorTest):(V.copy(W).multiplyScalar(Y).floor(),
|
|
|
+c}if(void 0!==d){console.warn("THREE.WebGLRenderer.render(): the forceClear argument has been removed. Use .clear() instead.");var f=d}if(void 0!==b&&!0!==b.isCamera)console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");else if(!0!==J){oa.resetDefaultState();L=-1;P=null;!0===a.autoUpdate&&a.updateMatrixWorld();null===b.parent&&b.updateMatrixWorld();!0===za.enabled&&!0===za.isPresenting&&(b=za.getCamera(b));if(!0===a.isScene)a.onBeforeRender(ca,a,b,e||K);Q=ta.get(a,
|
|
|
+b);Q.init();Xd.multiplyMatrices(b.projectionMatrix,b.matrixWorldInverse);na.setFromProjectionMatrix(Xd);qa=this.localClippingEnabled;la=ia.init(this.clippingPlanes,qa,b);M=va.get(a,b);M.init();l(a,b,0,ca.sortObjects);M.finish();!0===ca.sortObjects&&M.sort(da,ea);!0===la&&ia.beginShadows();Fa.render(Q.state.shadowsArray,a,b);Q.setupLights(b);!0===la&&ia.endShadows();!0===this.info.autoReset&&this.info.reset();void 0!==e&&this.setRenderTarget(e);ra.render(M,a,b,f);c=M.opaque;d=M.transparent;0<c.length&&
|
|
|
+n(c,a,b);0<d.length&&n(d,a,b);if(!0===a.isScene)a.onAfterRender(ca,a,b);null!==K&&(Z.updateRenderTargetMipmap(K),Z.updateMultisampleRenderTarget(K));ya.buffers.depth.setTest(!0);ya.buffers.depth.setMask(!0);ya.buffers.color.setMask(!0);ya.setPolygonOffset(!1);Q=M=null}};this.setFramebuffer=function(a){I!==a&&null===K&&R.bindFramebuffer(36160,a);I=a};this.getActiveCubeFace=function(){return F};this.getActiveMipmapLevel=function(){return G};this.getRenderList=function(){return M};this.setRenderList=
|
|
|
+function(a){M=a};this.getRenderState=function(){return Q};this.setRenderState=function(a){Q=a};this.getRenderTarget=function(){return K};this.setRenderTarget=function(a,b,c){K=a;F=b;G=c;a&&void 0===aa.get(a).__webglFramebuffer&&Z.setupRenderTarget(a);var d=I,e=!1;a?(d=aa.get(a).__webglFramebuffer,a.isWebGLCubeRenderTarget?(d=d[b||0],e=!0):d=a.isWebGLMultisampleRenderTarget?aa.get(a).__webglMultisampledFramebuffer:d,V.copy(a.viewport),X.copy(a.scissor),U=a.scissorTest):(V.copy(W).multiplyScalar(Y).floor(),
|
|
|
X.copy(ba).multiplyScalar(Y).floor(),U=fa);N!==d&&(R.bindFramebuffer(36160,d),N=d);ya.viewport(V);ya.scissor(X);ya.setScissorTest(U);e&&(a=aa.get(a.texture),R.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!==N&&(R.bindFramebuffer(36160,h),g=!0);try{var l=a.texture,n=l.format,r=l.type;1023!==n&&ua.convert(n)!==
|
|
|
R.getParameter(35739)?console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format."):1009===r||ua.convert(r)===R.getParameter(35738)||1015===r&&(Ha.isWebGL2||xa.get("OES_texture_float")||xa.get("WEBGL_color_buffer_float"))||1016===r&&(Ha.isWebGL2?xa.get("EXT_color_buffer_float"):xa.get("EXT_color_buffer_half_float"))?36053===R.checkFramebufferStatus(36160)?0<=b&&b<=a.width-d&&0<=c&&c<=a.height-e&&R.readPixels(b,c,d,e,ua.convert(n),ua.convert(r),
|
|
|
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&&R.bindFramebuffer(36160,N)}}}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=ua.convert(b.format);Z.setTexture2D(b,0);R.copyTexImage2D(3553,c,f,a.x,a.y,e,d,0);ya.unbindTexture()};this.copyTextureToTexture=function(a,b,c,d){void 0===d&&(d=0);var e=b.image.width,f=b.image.height,g=ua.convert(c.format),h=ua.convert(c.type);Z.setTexture2D(c,0);R.pixelStorei(37440,c.flipY);R.pixelStorei(37441,c.premultiplyAlpha);R.pixelStorei(3317,c.unpackAlignment);b.isDataTexture?R.texSubImage2D(3553,d,a.x,a.y,e,f,g,h,b.image.data):b.isCompressedTexture?
|
|
|
-R.compressedTexSubImage2D(3553,d,a.x,a.y,b.mipmaps[0].width,b.mipmaps[0].height,g,b.mipmaps[0].data):R.texSubImage2D(3553,d,a.x,a.y,g,h,b.image);0===d&&c.generateMipmaps&&R.generateMipmap(3553);ya.unbindTexture()};this.initTexture=function(a){Z.setTexture2D(a,0);ya.unbindTexture()};"undefined"!==typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}function yg(c){Zd.call(this,c)}function Ab(){D.call(this);this.type="Scene";this.overrideMaterial=this.fog=
|
|
|
-this.environment=this.background=null;this.autoUpdate=!0;"undefined"!==typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}function Va(c,a){this.array=c;this.stride=a;this.count=void 0!==c?c.length/a:0;this.usage=35044;this.updateRange={offset:0,count:-1};this.version=0;this.uuid=T.generateUUID()}function Wb(c,a,b,d){this.name="";this.data=c;this.itemSize=a;this.offset=b;this.normalized=!0===d}function Xb(c){M.call(this);this.type="SpriteMaterial";
|
|
|
-this.color=new x(16777215);this.alphaMap=this.map=null;this.rotation=0;this.transparent=this.sizeAttenuation=!0;this.setValues(c)}function $d(c){D.call(this);this.type="Sprite";if(void 0===Wc){Wc=new G;var a=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]);a=new Va(a,5);Wc.setIndex([0,1,2,0,2,3]);Wc.setAttribute("position",new Wb(a,3,0,!1));Wc.setAttribute("uv",new Wb(a,2,3,!1))}this.geometry=Wc;this.material=void 0!==c?c:new Xb;this.center=new p(.5,.5)}function af(c,a,b,d,
|
|
|
-e,f){Xc.subVectors(c,b).addScalar(.5).multiply(d);void 0!==e?(ae.x=f*Xc.x-e*Xc.y,ae.y=e*Xc.x+f*Xc.y):ae.copy(Xc);c.copy(a);c.x+=ae.x;c.y+=ae.y;c.applyMatrix4(ai)}function be(){D.call(this);this._currentLevel=0;this.type="LOD";Object.defineProperties(this,{levels:{enumerable:!0,value:[]}});this.autoUpdate=!0}function bf(c,a){c&&c.isGeometry&&console.error("THREE.SkinnedMesh no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");na.call(this,c,a);this.type="SkinnedMesh";this.bindMode=
|
|
|
-"attached";this.bindMatrix=new z;this.bindMatrixInverse=new z}function cf(c,a){c=c||[];this.bones=c.slice(0);this.boneMatrices=new Float32Array(16*this.bones.length);this.frame=-1;if(void 0===a)this.calculateInverses();else if(this.bones.length===a.length)this.boneInverses=a.slice(0);else for(console.warn("THREE.Skeleton boneInverses is the wrong length."),this.boneInverses=[],c=0,a=this.bones.length;c<a;c++)this.boneInverses.push(new z)}function zg(){D.call(this);this.type="Bone"}function df(c,a,
|
|
|
-b){na.call(this,c,a);this.instanceMatrix=new N(new Float32Array(16*b),16);this.instanceColor=null;this.count=b;this.frustumCulled=!1}function pa(c){M.call(this);this.type="LineBasicMaterial";this.color=new x(16777215);this.linewidth=1;this.linejoin=this.linecap="round";this.morphTargets=!1;this.setValues(c)}function Na(c,a,b){1===b&&console.error("THREE.Line: parameter THREE.LinePieces no longer supported. Use THREE.LineSegments instead.");D.call(this);this.type="Line";this.geometry=void 0!==c?c:
|
|
|
-new G;this.material=void 0!==a?a:new pa;this.updateMorphTargets()}function sa(c,a){Na.call(this,c,a);this.type="LineSegments"}function ef(c,a){Na.call(this,c,a);this.type="LineLoop"}function eb(c){M.call(this);this.type="PointsMaterial";this.color=new x(16777215);this.alphaMap=this.map=null;this.size=1;this.sizeAttenuation=!0;this.morphTargets=!1;this.setValues(c)}function Yc(c,a){D.call(this);this.type="Points";this.geometry=void 0!==c?c:new G;this.material=void 0!==a?a:new eb;this.updateMorphTargets()}
|
|
|
+R.compressedTexSubImage2D(3553,d,a.x,a.y,b.mipmaps[0].width,b.mipmaps[0].height,g,b.mipmaps[0].data):R.texSubImage2D(3553,d,a.x,a.y,g,h,b.image);0===d&&c.generateMipmaps&&R.generateMipmap(3553);ya.unbindTexture()};this.initTexture=function(a){Z.setTexture2D(a,0);ya.unbindTexture()};"undefined"!==typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}function yg(c){Zd.call(this,c)}function Ab(){F.call(this);this.type="Scene";this.overrideMaterial=this.fog=
|
|
|
+this.environment=this.background=null;this.autoUpdate=!0;"undefined"!==typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}function Va(c,a){this.array=c;this.stride=a;this.count=void 0!==c?c.length/a:0;this.usage=35044;this.updateRange={offset:0,count:-1};this.version=0;this.uuid=T.generateUUID()}function Wb(c,a,b,d){this.name="";this.data=c;this.itemSize=a;this.offset=b;this.normalized=!0===d}function Xb(c){L.call(this);this.type="SpriteMaterial";
|
|
|
+this.color=new x(16777215);this.alphaMap=this.map=null;this.rotation=0;this.transparent=this.sizeAttenuation=!0;this.setValues(c)}function $d(c){F.call(this);this.type="Sprite";if(void 0===Wc){Wc=new G;var a=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]);a=new Va(a,5);Wc.setIndex([0,1,2,0,2,3]);Wc.setAttribute("position",new Wb(a,3,0,!1));Wc.setAttribute("uv",new Wb(a,2,3,!1))}this.geometry=Wc;this.material=void 0!==c?c:new Xb;this.center=new p(.5,.5)}function af(c,a,b,d,
|
|
|
+e,f){Xc.subVectors(c,b).addScalar(.5).multiply(d);void 0!==e?(ae.x=f*Xc.x-e*Xc.y,ae.y=e*Xc.x+f*Xc.y):ae.copy(Xc);c.copy(a);c.x+=ae.x;c.y+=ae.y;c.applyMatrix4(ai)}function be(){F.call(this);this._currentLevel=0;this.type="LOD";Object.defineProperties(this,{levels:{enumerable:!0,value:[]}});this.autoUpdate=!0}function bf(c,a){c&&c.isGeometry&&console.error("THREE.SkinnedMesh no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");na.call(this,c,a);this.type="SkinnedMesh";this.bindMode=
|
|
|
+"attached";this.bindMatrix=new z;this.bindMatrixInverse=new z}function cf(c,a){c=c||[];this.bones=c.slice(0);this.boneMatrices=new Float32Array(16*this.bones.length);this.frame=-1;if(void 0===a)this.calculateInverses();else if(this.bones.length===a.length)this.boneInverses=a.slice(0);else for(console.warn("THREE.Skeleton boneInverses is the wrong length."),this.boneInverses=[],c=0,a=this.bones.length;c<a;c++)this.boneInverses.push(new z)}function zg(){F.call(this);this.type="Bone"}function df(c,a,
|
|
|
+b){na.call(this,c,a);this.instanceMatrix=new N(new Float32Array(16*b),16);this.instanceColor=null;this.count=b;this.frustumCulled=!1}function pa(c){L.call(this);this.type="LineBasicMaterial";this.color=new x(16777215);this.linewidth=1;this.linejoin=this.linecap="round";this.morphTargets=!1;this.setValues(c)}function Na(c,a,b){1===b&&console.error("THREE.Line: parameter THREE.LinePieces no longer supported. Use THREE.LineSegments instead.");F.call(this);this.type="Line";this.geometry=void 0!==c?c:
|
|
|
+new G;this.material=void 0!==a?a:new pa;this.updateMorphTargets()}function sa(c,a){Na.call(this,c,a);this.type="LineSegments"}function ef(c,a){Na.call(this,c,a);this.type="LineLoop"}function eb(c){L.call(this);this.type="PointsMaterial";this.color=new x(16777215);this.alphaMap=this.map=null;this.size=1;this.sizeAttenuation=!0;this.morphTargets=!1;this.setValues(c)}function Yc(c,a){F.call(this);this.type="Points";this.geometry=void 0!==c?c:new G;this.material=void 0!==a?a:new eb;this.updateMorphTargets()}
|
|
|
function Ag(c,a,b,d,e,f,g){var h=Bg.distanceSqToPoint(c);h<b&&(b=new m,Bg.closestPointToPoint(c,b),b.applyMatrix4(d),c=e.ray.origin.distanceTo(b),c<e.near||c>e.far||f.push({distance:c,distanceToRay:Math.sqrt(h),point:b,index:a,face:null,object:g}))}function Cg(c,a,b,d,e,f,g,h,l){function n(){r.needsUpdate=!0;c.requestVideoFrameCallback(n)}fa.call(this,c,a,b,d,e,f,g,h,l);this.format=void 0!==g?g:1022;this.minFilter=void 0!==f?f:1006;this.magFilter=void 0!==e?e:1006;this.generateMipmaps=!1;var r=this;
|
|
|
"requestVideoFrameCallback"in c&&c.requestVideoFrameCallback(n)}function Zc(c,a,b,d,e,f,g,h,l,n,r,u){fa.call(this,null,f,g,h,l,n,d,e,r,u);this.image={width:a,height:b};this.mipmaps=c;this.generateMipmaps=this.flipY=!1}function ce(c,a,b,d,e,f,g,h,l){fa.call(this,c,a,b,d,e,f,g,h,l);this.needsUpdate=!0}function de(c,a,b,d,e,f,g,h,l,n){n=void 0!==n?n:1026;if(1026!==n&&1027!==n)throw Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===b&&1026===n&&(b=1012);
|
|
|
void 0===b&&1027===n&&(b=1020);fa.call(this,null,d,e,f,g,h,n,b,l);this.image={width:c,height:a};this.magFilter=void 0!==g?g:1003;this.minFilter=void 0!==h?h:1003;this.generateMipmaps=this.flipY=!1}function $c(c){G.call(this);this.type="WireframeGeometry";var a=[],b=[0,0],d={},e=["a","b","c"];if(c&&c.isGeometry){for(var f=c.faces,g=0,h=f.length;g<h;g++)for(var l=f[g],n=0;3>n;n++){var r=l[e[n]],u=l[e[(n+1)%3]];b[0]=Math.min(r,u);b[1]=Math.max(r,u);r=b[0]+","+b[1];void 0===d[r]&&(d[r]={index1:b[0],index2:b[1]})}for(var k in d)b=
|
|
|
d[k],f=c.vertices[b.index1],a.push(f.x,f.y,f.z),f=c.vertices[b.index2],a.push(f.x,f.y,f.z)}else if(c&&c.isBufferGeometry)if(k=new m,null!==c.index){e=c.attributes.position;g=c.index;c=c.groups;0===c.length&&(c=[{start:0,count:g.count,materialIndex:0}]);h=0;for(l=c.length;h<l;++h)for(r=c[h],n=u=r.start,r=u+r.count;n<r;n+=3)for(u=0;3>u;u++){var v=g.getX(n+u),t=g.getX(n+(u+1)%3);b[0]=Math.min(v,t);b[1]=Math.max(v,t);v=b[0]+","+b[1];void 0===d[v]&&(d[v]={index1:b[0],index2:b[1]})}for(f in d)b=d[f],k.fromBufferAttribute(e,
|
|
|
-b.index1),a.push(k.x,k.y,k.z),k.fromBufferAttribute(e,b.index2),a.push(k.x,k.y,k.z)}else for(d=c.attributes.position,b=0,f=d.count/3;b<f;b++)for(c=0;3>c;c++)k.fromBufferAttribute(d,3*b+c),a.push(k.x,k.y,k.z),k.fromBufferAttribute(d,3*b+(c+1)%3),a.push(k.x,k.y,k.z);this.setAttribute("position",new H(a,3))}function ee(c,a,b){P.call(this);this.type="ParametricGeometry";this.parameters={func:c,slices:a,stacks:b};this.fromBufferGeometry(new ad(c,a,b));this.mergeVertices()}function ad(c,a,b){G.call(this);
|
|
|
-this.type="ParametricBufferGeometry";this.parameters={func:c,slices:a,stacks:b};var d=[],e=[],f=[],g=[],h=new m,l=new m,n=new m,r=new m,u=new m;3>c.length&&console.error("THREE.ParametricGeometry: Function must now modify a Vector3 as third parameter.");for(var k=a+1,v=0;v<=b;v++)for(var t=v/b,w=0;w<=a;w++){var E=w/a;c(E,t,l);e.push(l.x,l.y,l.z);0<=E-1E-5?(c(E-1E-5,t,n),r.subVectors(l,n)):(c(E+1E-5,t,n),r.subVectors(n,l));0<=t-1E-5?(c(E,t-1E-5,n),u.subVectors(l,n)):(c(E,t+1E-5,n),u.subVectors(n,l));
|
|
|
-h.crossVectors(r,u).normalize();f.push(h.x,h.y,h.z);g.push(E,t)}for(c=0;c<b;c++)for(h=0;h<a;h++)l=c*k+h+1,n=(c+1)*k+h+1,r=(c+1)*k+h,d.push(c*k+h,l,r),d.push(l,n,r);this.setIndex(d);this.setAttribute("position",new H(e,3));this.setAttribute("normal",new H(f,3));this.setAttribute("uv",new H(g,2))}function fe(c,a,b,d){P.call(this);this.type="PolyhedronGeometry";this.parameters={vertices:c,indices:a,radius:b,detail:d};this.fromBufferGeometry(new Oa(c,a,b,d));this.mergeVertices()}function Oa(c,a,b,d){function e(a){h.push(a.x,
|
|
|
-a.y,a.z)}function f(a,b){a*=3;b.x=c[a+0];b.y=c[a+1];b.z=c[a+2]}function g(a,b,c,d){0>d&&1===a.x&&(l[b]=a.x-1);0===c.x&&0===c.z&&(l[b]=d/2/Math.PI+.5)}G.call(this);this.type="PolyhedronBufferGeometry";this.parameters={vertices:c,indices:a,radius:b,detail:d};b=b||1;d=d||0;var h=[],l=[];(function(b){for(var c=new m,d=new m,g=new m,h=0;h<a.length;h+=3){f(a[h+0],c);f(a[h+1],d);f(a[h+2],g);for(var l=c,n=d,k=g,p=Math.pow(2,b),J=[],C=0;C<=p;C++){J[C]=[];for(var x=l.clone().lerp(k,C/p),F=n.clone().lerp(k,
|
|
|
-C/p),A=p-C,K=0;K<=A;K++)J[C][K]=0===K&&C===p?x:x.clone().lerp(F,K/A)}for(l=0;l<p;l++)for(n=0;n<2*(p-l)-1;n++)k=Math.floor(n/2),0===n%2?(e(J[l][k+1]),e(J[l+1][k]),e(J[l][k])):(e(J[l][k+1]),e(J[l+1][k+1]),e(J[l+1][k]))}})(d);(function(a){for(var b=new m,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})(b);(function(){for(var a=new m,b=0;b<h.length;b+=3)a.x=h[b+0],a.y=h[b+1],a.z=h[b+2],l.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 m;b=new m;for(var c=new m,d=new m,e=new p,f=new p,k=new p,E=0,y=0;E<h.length;E+=9,y+=6){a.set(h[E+0],h[E+1],h[E+2]);b.set(h[E+3],h[E+4],h[E+5]);c.set(h[E+6],h[E+7],h[E+8]);e.set(l[y+0],l[y+1]);f.set(l[y+2],l[y+3]);k.set(l[y+4],l[y+5]);d.copy(a).add(b).add(c).divideScalar(3);var J=Math.atan2(d.z,-d.x);g(e,y+0,a,J);g(f,y+2,b,J);g(k,y+4,c,J)}for(a=0;a<l.length;a+=6)b=l[a+0],c=l[a+2],d=l[a+4],e=Math.min(b,c,d),.9<Math.max(b,c,d)&&.1>e&&(.2>b&&(l[a+0]+=1),
|
|
|
-.2>c&&(l[a+2]+=1),.2>d&&(l[a+4]+=1))})();this.setAttribute("position",new H(h,3));this.setAttribute("normal",new H(h.slice(),3));this.setAttribute("uv",new H(l,2));0===d?this.computeVertexNormals():this.normalizeNormals()}function ge(c,a){P.call(this);this.type="TetrahedronGeometry";this.parameters={radius:c,detail:a};this.fromBufferGeometry(new bd(c,a));this.mergeVertices()}function bd(c,a){Oa.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],c,a);this.type="TetrahedronBufferGeometry";
|
|
|
+b.index1),a.push(k.x,k.y,k.z),k.fromBufferAttribute(e,b.index2),a.push(k.x,k.y,k.z)}else for(d=c.attributes.position,b=0,f=d.count/3;b<f;b++)for(c=0;3>c;c++)k.fromBufferAttribute(d,3*b+c),a.push(k.x,k.y,k.z),k.fromBufferAttribute(d,3*b+(c+1)%3),a.push(k.x,k.y,k.z);this.setAttribute("position",new I(a,3))}function ee(c,a,b){P.call(this);this.type="ParametricGeometry";this.parameters={func:c,slices:a,stacks:b};this.fromBufferGeometry(new ad(c,a,b));this.mergeVertices()}function ad(c,a,b){G.call(this);
|
|
|
+this.type="ParametricBufferGeometry";this.parameters={func:c,slices:a,stacks:b};var d=[],e=[],f=[],g=[],h=new m,l=new m,n=new m,r=new m,u=new m;3>c.length&&console.error("THREE.ParametricGeometry: Function must now modify a Vector3 as third parameter.");for(var k=a+1,v=0;v<=b;v++)for(var t=v/b,w=0;w<=a;w++){var C=w/a;c(C,t,l);e.push(l.x,l.y,l.z);0<=C-1E-5?(c(C-1E-5,t,n),r.subVectors(l,n)):(c(C+1E-5,t,n),r.subVectors(n,l));0<=t-1E-5?(c(C,t-1E-5,n),u.subVectors(l,n)):(c(C,t+1E-5,n),u.subVectors(n,l));
|
|
|
+h.crossVectors(r,u).normalize();f.push(h.x,h.y,h.z);g.push(C,t)}for(c=0;c<b;c++)for(h=0;h<a;h++)l=c*k+h+1,n=(c+1)*k+h+1,r=(c+1)*k+h,d.push(c*k+h,l,r),d.push(l,n,r);this.setIndex(d);this.setAttribute("position",new I(e,3));this.setAttribute("normal",new I(f,3));this.setAttribute("uv",new I(g,2))}function fe(c,a,b,d){P.call(this);this.type="PolyhedronGeometry";this.parameters={vertices:c,indices:a,radius:b,detail:d};this.fromBufferGeometry(new Oa(c,a,b,d));this.mergeVertices()}function Oa(c,a,b,d){function e(a){h.push(a.x,
|
|
|
+a.y,a.z)}function f(a,b){a*=3;b.x=c[a+0];b.y=c[a+1];b.z=c[a+2]}function g(a,b,c,d){0>d&&1===a.x&&(l[b]=a.x-1);0===c.x&&0===c.z&&(l[b]=d/2/Math.PI+.5)}G.call(this);this.type="PolyhedronBufferGeometry";this.parameters={vertices:c,indices:a,radius:b,detail:d};b=b||1;d=d||0;var h=[],l=[];(function(b){for(var c=new m,d=new m,g=new m,h=0;h<a.length;h+=3){f(a[h+0],c);f(a[h+1],d);f(a[h+2],g);for(var l=c,n=d,k=g,p=Math.pow(2,b),E=[],D=0;D<=p;D++){E[D]=[];for(var x=l.clone().lerp(k,D/p),H=n.clone().lerp(k,
|
|
|
+D/p),A=p-D,M=0;M<=A;M++)E[D][M]=0===M&&D===p?x:x.clone().lerp(H,M/A)}for(l=0;l<p;l++)for(n=0;n<2*(p-l)-1;n++)k=Math.floor(n/2),0===n%2?(e(E[l][k+1]),e(E[l+1][k]),e(E[l][k])):(e(E[l][k+1]),e(E[l+1][k+1]),e(E[l+1][k]))}})(d);(function(a){for(var b=new m,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})(b);(function(){for(var a=new m,b=0;b<h.length;b+=3)a.x=h[b+0],a.y=h[b+1],a.z=h[b+2],l.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 m;b=new m;for(var c=new m,d=new m,e=new p,f=new p,k=new p,C=0,y=0;C<h.length;C+=9,y+=6){a.set(h[C+0],h[C+1],h[C+2]);b.set(h[C+3],h[C+4],h[C+5]);c.set(h[C+6],h[C+7],h[C+8]);e.set(l[y+0],l[y+1]);f.set(l[y+2],l[y+3]);k.set(l[y+4],l[y+5]);d.copy(a).add(b).add(c).divideScalar(3);var E=Math.atan2(d.z,-d.x);g(e,y+0,a,E);g(f,y+2,b,E);g(k,y+4,c,E)}for(a=0;a<l.length;a+=6)b=l[a+0],c=l[a+2],d=l[a+4],e=Math.min(b,c,d),.9<Math.max(b,c,d)&&.1>e&&(.2>b&&(l[a+0]+=1),
|
|
|
+.2>c&&(l[a+2]+=1),.2>d&&(l[a+4]+=1))})();this.setAttribute("position",new I(h,3));this.setAttribute("normal",new I(h.slice(),3));this.setAttribute("uv",new I(l,2));0===d?this.computeVertexNormals():this.normalizeNormals()}function ge(c,a){P.call(this);this.type="TetrahedronGeometry";this.parameters={radius:c,detail:a};this.fromBufferGeometry(new bd(c,a));this.mergeVertices()}function bd(c,a){Oa.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],c,a);this.type="TetrahedronBufferGeometry";
|
|
|
this.parameters={radius:c,detail:a}}function he(c,a){P.call(this);this.type="OctahedronGeometry";this.parameters={radius:c,detail:a};this.fromBufferGeometry(new qc(c,a));this.mergeVertices()}function qc(c,a){Oa.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],c,a);this.type="OctahedronBufferGeometry";this.parameters={radius:c,detail:a}}function ie(c,a){P.call(this);this.type="IcosahedronGeometry";this.parameters={radius:c,detail:a};this.fromBufferGeometry(new cd(c,
|
|
|
a));this.mergeVertices()}function cd(c,a){var b=(1+Math.sqrt(5))/2;Oa.call(this,[-1,b,0,1,b,0,-1,-b,0,1,-b,0,0,-1,b,0,1,b,0,-1,-b,0,1,-b,b,0,-1,b,0,1,-b,0,-1,-b,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],c,a);this.type="IcosahedronBufferGeometry";this.parameters={radius:c,detail:a}}function je(c,a){P.call(this);this.type="DodecahedronGeometry";this.parameters={radius:c,detail:a};this.fromBufferGeometry(new dd(c,
|
|
|
a));this.mergeVertices()}function dd(c,a){var b=(1+Math.sqrt(5))/2,d=1/b;Oa.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,-b,0,-d,b,0,d,-b,0,d,b,-d,-b,0,-d,b,0,d,-b,0,d,b,0,-b,0,-d,b,0,-d,-b,0,d,b,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],c,
|
|
|
a);this.type="DodecahedronBufferGeometry";this.parameters={radius:c,detail:a}}function ke(c,a,b,d,e,f){P.call(this);this.type="TubeGeometry";this.parameters={path:c,tubularSegments:a,radius:b,radialSegments:d,closed:e};void 0!==f&&console.warn("THREE.TubeGeometry: taper has been removed.");c=new rc(c,a,b,d,e);this.tangents=c.tangents;this.normals=c.normals;this.binormals=c.binormals;this.fromBufferGeometry(c);this.mergeVertices()}function rc(c,a,b,d,e){function f(e){r=c.getPointAt(e/a,r);var f=g.normals[e];
|
|
|
e=g.binormals[e];for(var n=0;n<=d;n++){var u=n/d*Math.PI*2,m=Math.sin(u);u=-Math.cos(u);l.x=u*f.x+m*e.x;l.y=u*f.y+m*e.y;l.z=u*f.z+m*e.z;l.normalize();q.push(l.x,l.y,l.z);h.x=r.x+b*l.x;h.y=r.y+b*l.y;h.z=r.z+b*l.z;k.push(h.x,h.y,h.z)}}G.call(this);this.type="TubeBufferGeometry";this.parameters={path:c,tubularSegments:a,radius:b,radialSegments:d,closed:e};a=a||64;b=b||1;d=d||8;e=e||!1;var g=c.computeFrenetFrames(a,e);this.tangents=g.tangents;this.normals=g.normals;this.binormals=g.binormals;var h=new m,
|
|
|
-l=new m,n=new p,r=new m,k=[],q=[],v=[],t=[];(function(){for(var b=0;b<a;b++)f(b);f(!1===e?a:0);for(b=0;b<=a;b++)for(var c=0;c<=d;c++)n.x=b/a,n.y=c/d,v.push(n.x,n.y);for(b=1;b<=a;b++)for(c=1;c<=d;c++){var g=(d+1)*b+(c-1),h=(d+1)*b+c,l=(d+1)*(b-1)+c;t.push((d+1)*(b-1)+(c-1),g,l);t.push(g,h,l)}})();this.setIndex(t);this.setAttribute("position",new H(k,3));this.setAttribute("normal",new H(q,3));this.setAttribute("uv",new H(v,2))}function le(c,a,b,d,e,f,g){P.call(this);this.type="TorusKnotGeometry";this.parameters=
|
|
|
+l=new m,n=new p,r=new m,k=[],q=[],v=[],t=[];(function(){for(var b=0;b<a;b++)f(b);f(!1===e?a:0);for(b=0;b<=a;b++)for(var c=0;c<=d;c++)n.x=b/a,n.y=c/d,v.push(n.x,n.y);for(b=1;b<=a;b++)for(c=1;c<=d;c++){var g=(d+1)*b+(c-1),h=(d+1)*b+c,l=(d+1)*(b-1)+c;t.push((d+1)*(b-1)+(c-1),g,l);t.push(g,h,l)}})();this.setIndex(t);this.setAttribute("position",new I(k,3));this.setAttribute("normal",new I(q,3));this.setAttribute("uv",new I(v,2))}function le(c,a,b,d,e,f,g){P.call(this);this.type="TorusKnotGeometry";this.parameters=
|
|
|
{radius:c,tube:a,tubularSegments:b,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 ed(c,a,b,d,e,f));this.mergeVertices()}function ed(c,a,b,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}G.call(this);this.type="TorusKnotBufferGeometry";this.parameters={radius:c,tube:a,tubularSegments:b,radialSegments:d,
|
|
|
-p:e,q:f};c=c||1;a=a||.4;b=Math.floor(b)||64;d=Math.floor(d)||8;e=e||2;f=f||3;for(var h=[],l=[],n=[],r=[],k=new m,q=new m,v=new m,t=new m,w=new m,p=new m,y=new m,J=0;J<=b;++J){var C=J/b*e*Math.PI*2;g(C,e,f,c,v);g(C+.01,e,f,c,t);p.subVectors(t,v);y.addVectors(t,v);w.crossVectors(p,y);y.crossVectors(w,p);w.normalize();y.normalize();for(C=0;C<=d;++C){var x=C/d*Math.PI*2,F=-a*Math.cos(x);x=a*Math.sin(x);k.x=v.x+(F*y.x+x*w.x);k.y=v.y+(F*y.y+x*w.y);k.z=v.z+(F*y.z+x*w.z);l.push(k.x,k.y,k.z);q.subVectors(k,
|
|
|
-v).normalize();n.push(q.x,q.y,q.z);r.push(J/b);r.push(C/d)}}for(c=1;c<=b;c++)for(a=1;a<=d;a++)e=(d+1)*c+(a-1),f=(d+1)*c+a,k=(d+1)*(c-1)+a,h.push((d+1)*(c-1)+(a-1),e,k),h.push(e,f,k);this.setIndex(h);this.setAttribute("position",new H(l,3));this.setAttribute("normal",new H(n,3));this.setAttribute("uv",new H(r,2))}function me(c,a,b,d,e){P.call(this);this.type="TorusGeometry";this.parameters={radius:c,tube:a,radialSegments:b,tubularSegments:d,arc:e};this.fromBufferGeometry(new fd(c,a,b,d,e));this.mergeVertices()}
|
|
|
+p:e,q:f};c=c||1;a=a||.4;b=Math.floor(b)||64;d=Math.floor(d)||8;e=e||2;f=f||3;for(var h=[],l=[],n=[],r=[],k=new m,q=new m,v=new m,t=new m,w=new m,p=new m,y=new m,E=0;E<=b;++E){var D=E/b*e*Math.PI*2;g(D,e,f,c,v);g(D+.01,e,f,c,t);p.subVectors(t,v);y.addVectors(t,v);w.crossVectors(p,y);y.crossVectors(w,p);w.normalize();y.normalize();for(D=0;D<=d;++D){var x=D/d*Math.PI*2,H=-a*Math.cos(x);x=a*Math.sin(x);k.x=v.x+(H*y.x+x*w.x);k.y=v.y+(H*y.y+x*w.y);k.z=v.z+(H*y.z+x*w.z);l.push(k.x,k.y,k.z);q.subVectors(k,
|
|
|
+v).normalize();n.push(q.x,q.y,q.z);r.push(E/b);r.push(D/d)}}for(c=1;c<=b;c++)for(a=1;a<=d;a++)e=(d+1)*c+(a-1),f=(d+1)*c+a,k=(d+1)*(c-1)+a,h.push((d+1)*(c-1)+(a-1),e,k),h.push(e,f,k);this.setIndex(h);this.setAttribute("position",new I(l,3));this.setAttribute("normal",new I(n,3));this.setAttribute("uv",new I(r,2))}function me(c,a,b,d,e){P.call(this);this.type="TorusGeometry";this.parameters={radius:c,tube:a,radialSegments:b,tubularSegments:d,arc:e};this.fromBufferGeometry(new fd(c,a,b,d,e));this.mergeVertices()}
|
|
|
function fd(c,a,b,d,e){G.call(this);this.type="TorusBufferGeometry";this.parameters={radius:c,tube:a,radialSegments:b,tubularSegments:d,arc:e};c=c||1;a=a||.4;b=Math.floor(b)||8;d=Math.floor(d)||6;e=e||2*Math.PI;for(var f=[],g=[],h=[],l=[],n=new m,r=new m,k=new m,q=0;q<=b;q++)for(var v=0;v<=d;v++){var t=v/d*e,w=q/b*Math.PI*2;r.x=(c+a*Math.cos(w))*Math.cos(t);r.y=(c+a*Math.cos(w))*Math.sin(t);r.z=a*Math.sin(w);g.push(r.x,r.y,r.z);n.x=c*Math.cos(t);n.y=c*Math.sin(t);k.subVectors(r,n).normalize();h.push(k.x,
|
|
|
-k.y,k.z);l.push(v/d);l.push(q/b)}for(c=1;c<=b;c++)for(a=1;a<=d;a++)e=(d+1)*(c-1)+a-1,n=(d+1)*(c-1)+a,r=(d+1)*c+a,f.push((d+1)*c+a-1,e,r),f.push(e,n,r);this.setIndex(f);this.setAttribute("position",new H(g,3));this.setAttribute("normal",new H(h,3));this.setAttribute("uv",new H(l,2))}function bi(c,a,b,d,e){for(var f,g=0,h=a,l=b-d;h<b;h+=d)g+=(c[l]-c[h])*(c[h+1]+c[l+1]),l=h;if(e===0<g)for(e=a;e<b;e+=d)f=ci(e,c[e],c[e+1],f);else for(e=b-d;e>=a;e-=d)f=ci(e,c[e],c[e+1],f);f&&ff(f,f.next)&&(ne(f),f=f.next);
|
|
|
+k.y,k.z);l.push(v/d);l.push(q/b)}for(c=1;c<=b;c++)for(a=1;a<=d;a++)e=(d+1)*(c-1)+a-1,n=(d+1)*(c-1)+a,r=(d+1)*c+a,f.push((d+1)*c+a-1,e,r),f.push(e,n,r);this.setIndex(f);this.setAttribute("position",new I(g,3));this.setAttribute("normal",new I(h,3));this.setAttribute("uv",new I(l,2))}function bi(c,a,b,d,e){for(var f,g=0,h=a,l=b-d;h<b;h+=d)g+=(c[l]-c[h])*(c[h+1]+c[l+1]),l=h;if(e===0<g)for(e=a;e<b;e+=d)f=ci(e,c[e],c[e+1],f);else for(e=b-d;e>=a;e-=d)f=ci(e,c[e],c[e+1],f);f&&ff(f,f.next)&&(ne(f),f=f.next);
|
|
|
return f}function Yb(c,a){if(!c)return c;a||(a=c);do{var b=!1;if(c.steiner||!ff(c,c.next)&&0!==ka(c.prev,c,c.next))c=c.next;else{ne(c);c=a=c.prev;if(c===c.next)break;b=!0}}while(b||c!==a);return a}function oe(c,a,b,d,e,f,g){if(c){if(!g&&f){var h=c,l=h;do null===l.z&&(l.z=Dg(l.x,l.y,d,e,f)),l.prevZ=l.prev,l=l.nextZ=l.next;while(l!==h);l.prevZ.nextZ=null;l.prevZ=null;h=l;var n,r,k,m,v=1;do{l=h;var t=h=null;for(r=0;l;){r++;var w=l;for(n=k=0;n<v&&(k++,w=w.nextZ,w);n++);for(m=v;0<k||0<m&&w;)0!==k&&(0===
|
|
|
m||!w||l.z<=w.z)?(n=l,l=l.nextZ,k--):(n=w,w=w.nextZ,m--),t?t.nextZ=n:h=n,n.prevZ=t,t=n;l=w}t.nextZ=null;v*=2}while(1<r)}for(h=c;c.prev!==c.next;){l=c.prev;w=c.next;if(f)t=Fk(c,d,e,f);else a:if(t=c,r=t.prev,k=t,v=t.next,0<=ka(r,k,v))t=!1;else{for(n=t.next.next;n!==t.prev;){if(gd(r.x,r.y,k.x,k.y,v.x,v.y,n.x,n.y)&&0<=ka(n.prev,n,n.next)){t=!1;break a}n=n.next}t=!0}if(t)a.push(l.i/b),a.push(c.i/b),a.push(w.i/b),ne(c),h=c=w.next;else if(c=w,c===h){if(!g)oe(Yb(c),a,b,d,e,f,1);else if(1===g){c=Yb(c);g=a;
|
|
|
h=b;l=c;do w=l.prev,t=l.next.next,!ff(w,t)&&di(w,l,l.next,t)&&pe(w,t)&&pe(t,w)&&(g.push(w.i/h),g.push(l.i/h),g.push(t.i/h),ne(l),ne(l.next),l=c=t),l=l.next;while(l!==c);c=Yb(l);oe(c,a,b,d,e,f,2)}else if(2===g)a:{g=c;do{for(h=g.next.next;h!==g.prev;){if(l=g.i!==h.i){l=g;w=h;if(t=l.next.i!==w.i&&l.prev.i!==w.i){b:{t=l;do{if(t.i!==l.i&&t.next.i!==l.i&&t.i!==w.i&&t.next.i!==w.i&&di(t,t.next,l,w)){t=!0;break b}t=t.next}while(t!==l);t=!1}t=!t}if(t){if(t=pe(l,w)&&pe(w,l)){t=l;r=!1;k=(l.x+w.x)/2;v=(l.y+w.y)/
|
|
@@ -268,76 +268,76 @@ c,b=c;do{if(a.x<b.x||a.x===b.x&&a.y<b.y)b=a;a=a.next}while(a!==c);return b}funct
|
|
|
a,b){return a.x<=Math.max(c.x,b.x)&&a.x>=Math.min(c.x,b.x)&&a.y<=Math.max(c.y,b.y)&&a.y>=Math.min(c.y,b.y)}function gf(c){return 0<c?1:0>c?-1:0}function pe(c,a){return 0>ka(c.prev,c,c.next)?0<=ka(c,a,c.next)&&0<=ka(c,c.prev,a):0>ka(c,a,c.prev)||0>ka(c,c.next,a)}function ei(c,a){var b=new Eg(c.i,c.x,c.y),d=new Eg(a.i,a.x,a.y),e=c.next,f=a.prev;c.next=a;a.prev=c;b.next=e;e.prev=b;d.next=b;b.prev=d;f.next=d;d.prev=f;return d}function ci(c,a,b,d){c=new Eg(c,a,b);d?(c.next=d.next,c.prev=d,d.next.prev=
|
|
|
c,d.next=c):(c.prev=c,c.next=c);return c}function ne(c){c.next.prev=c.prev;c.prev.next=c.next;c.prevZ&&(c.prevZ.nextZ=c.nextZ);c.nextZ&&(c.nextZ.prevZ=c.prevZ)}function Eg(c,a,b){this.i=c;this.x=a;this.y=b;this.nextZ=this.prevZ=this.z=this.next=this.prev=null;this.steiner=!1}function fi(c){var a=c.length;2<a&&c[a-1].equals(c[0])&&c.pop()}function gi(c,a){for(var b=0;b<a.length;b++)c.push(a[b].x),c.push(a[b].y)}function sc(c,a){P.call(this);this.type="ExtrudeGeometry";this.parameters={shapes:c,options:a};
|
|
|
this.fromBufferGeometry(new qb(c,a));this.mergeVertices()}function qb(c,a){function b(b){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 l=Math.sqrt(h),n=Math.sqrt(f*f+g*g);h=b.x-e/l;b=b.y+d/l;g=((c.x-g/n-h)*g-(c.y+f/n-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 p(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 p(f/e,d/e)}function h(a,b){for(var c=a.length;0<=--c;){var f=c,g=c-1;0>g&&(g=a.length-1);for(var h=0,l=J+2*Q;h<l;h++){var n=X*h,r=X*(h+1),k=b+g+n,u=b+g+r;r=b+f+r;t(b+f+n);t(k);t(r);t(k);t(u);t(r);n=e.length/3;n=I.generateSideWallUV(d,e,n-6,n-3,n-2,n-1);w(n[0]);w(n[1]);w(n[3]);w(n[1]);w(n[2]);w(n[3])}}}function l(a,
|
|
|
-b,c){E.push(a);E.push(b);E.push(c)}function k(a,b,c){t(a);t(b);t(c);a=e.length/3;a=I.generateTopUV(d,e,a-3,a-2,a-1);w(a[0]);w(a[1]);w(a[2])}function t(a){e.push(E[3*a]);e.push(E[3*a+1]);e.push(E[3*a+2])}function w(a){f.push(a.x);f.push(a.y)}var E=[],y=void 0!==a.curveSegments?a.curveSegments:12,J=void 0!==a.steps?a.steps:1,x=void 0!==a.depth?a.depth:100,B=void 0!==a.bevelEnabled?a.bevelEnabled:!0,F=void 0!==a.bevelThickness?a.bevelThickness:6,A=void 0!==a.bevelSize?a.bevelSize:F-2,K=void 0!==a.bevelOffset?
|
|
|
-a.bevelOffset:0,Q=void 0!==a.bevelSegments?a.bevelSegments:3,z=a.extrudePath,I=void 0!==a.UVGenerator?a.UVGenerator:Jk;void 0!==a.amount&&(console.warn("THREE.ExtrudeBufferGeometry: amount has been renamed to depth."),x=a.amount);var H=!1;if(z){var L=z.getSpacedPoints(J);H=!0;B=!1;var D=z.computeFrenetFrames(J,!1);var G=new m;var N=new m;var M=new m}B||(K=A=F=Q=0);b=b.extractPoints(y);z=b.shape;var P=b.holes;if(!Bb.isClockWise(z))for(z=z.reverse(),b=0,y=P.length;b<y;b++){var O=P[b];Bb.isClockWise(O)&&
|
|
|
-(P[b]=O.reverse())}var V=Bb.triangulateShape(z,P),T=z;b=0;for(y=P.length;b<y;b++)z=z.concat(P[b]);var X=z.length,aa=V.length;b=[];y=0;O=T.length;for(var S=O-1,Y=y+1;y<O;y++,S++,Y++)S===O&&(S=0),Y===O&&(Y=0),b[y]=g(T[y],T[S],T[Y]);y=[];O=b.concat();Y=0;for(var U=P.length;Y<U;Y++){var W=P[Y];S=[];for(var Z=0,ba=W.length,da=ba-1,ea=Z+1;Z<ba;Z++,da++,ea++)da===ba&&(da=0),ea===ba&&(ea=0),S[Z]=g(W[Z],W[da],W[ea]);y.push(S);O=O.concat(S)}for(Y=0;Y<Q;Y++){S=Y/Q;U=F*Math.cos(S*Math.PI/2);W=A*Math.sin(S*Math.PI/
|
|
|
-2)+K;S=0;for(Z=T.length;S<Z;S++)ba=c(T[S],b[S],W),l(ba.x,ba.y,-U);Z=0;for(ba=P.length;Z<ba;Z++){da=P[Z];S=y[Z];ea=0;for(var ha=da.length;ea<ha;ea++){var fa=c(da[ea],S[ea],W);l(fa.x,fa.y,-U)}}}S=A+K;for(Y=0;Y<X;Y++)U=B?c(z[Y],O[Y],S):z[Y],H?(N.copy(D.normals[0]).multiplyScalar(U.x),G.copy(D.binormals[0]).multiplyScalar(U.y),M.copy(L[0]).add(N).add(G),l(M.x,M.y,M.z)):l(U.x,U.y,0);for(Y=1;Y<=J;Y++)for(U=0;U<X;U++)W=B?c(z[U],O[U],S):z[U],H?(N.copy(D.normals[Y]).multiplyScalar(W.x),G.copy(D.binormals[Y]).multiplyScalar(W.y),
|
|
|
-M.copy(L[Y]).add(N).add(G),l(M.x,M.y,M.z)):l(W.x,W.y,x/J*Y);for(D=Q-1;0<=D;D--){N=D/Q;G=F*Math.cos(N*Math.PI/2);N=A*Math.sin(N*Math.PI/2)+K;M=0;for(z=T.length;M<z;M++)O=c(T[M],b[M],N),l(O.x,O.y,x+G);M=0;for(z=P.length;M<z;M++)for(O=P[M],S=y[M],Y=0,U=O.length;Y<U;Y++)W=c(O[Y],S[Y],N),H?l(W.x,W.y+L[J-1].y,L[J-1].x+G):l(W.x,W.y,x+G)}(function(){var a=e.length/3;if(B){for(var b=0*X,c=0;c<aa;c++){var f=V[c];k(f[2]+b,f[1]+b,f[0]+b)}b=X*(J+2*Q);for(c=0;c<aa;c++)f=V[c],k(f[0]+b,f[1]+b,f[2]+b)}else{for(b=
|
|
|
-0;b<aa;b++)c=V[b],k(c[2],c[1],c[0]);for(b=0;b<aa;b++)c=V[b],k(c[0]+X*J,c[1]+X*J,c[2]+X*J)}d.addGroup(a,e.length/3-a,0)})();(function(){var a=e.length/3,b=0;h(T,b);b+=T.length;for(var c=0,f=P.length;c<f;c++){var g=P[c];h(g,b);b+=g.length}d.addGroup(a,e.length/3-a,1)})()}G.call(this);this.type="ExtrudeBufferGeometry";this.parameters={shapes:c,options:a};c=Array.isArray(c)?c:[c];for(var d=this,e=[],f=[],g=0,h=c.length;g<h;g++)b(c[g]);this.setAttribute("position",new H(e,3));this.setAttribute("uv",new H(f,
|
|
|
+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 p(f/e,d/e)}function h(a,b){for(var c=a.length;0<=--c;){var f=c,g=c-1;0>g&&(g=a.length-1);for(var h=0,l=E+2*Q;h<l;h++){var n=X*h,r=X*(h+1),k=b+g+n,u=b+g+r;r=b+f+r;t(b+f+n);t(k);t(r);t(k);t(u);t(r);n=e.length/3;n=J.generateSideWallUV(d,e,n-6,n-3,n-2,n-1);w(n[0]);w(n[1]);w(n[3]);w(n[1]);w(n[2]);w(n[3])}}}function l(a,
|
|
|
+b,c){C.push(a);C.push(b);C.push(c)}function k(a,b,c){t(a);t(b);t(c);a=e.length/3;a=J.generateTopUV(d,e,a-3,a-2,a-1);w(a[0]);w(a[1]);w(a[2])}function t(a){e.push(C[3*a]);e.push(C[3*a+1]);e.push(C[3*a+2])}function w(a){f.push(a.x);f.push(a.y)}var C=[],y=void 0!==a.curveSegments?a.curveSegments:12,E=void 0!==a.steps?a.steps:1,x=void 0!==a.depth?a.depth:100,B=void 0!==a.bevelEnabled?a.bevelEnabled:!0,H=void 0!==a.bevelThickness?a.bevelThickness:6,A=void 0!==a.bevelSize?a.bevelSize:H-2,M=void 0!==a.bevelOffset?
|
|
|
+a.bevelOffset:0,Q=void 0!==a.bevelSegments?a.bevelSegments:3,z=a.extrudePath,J=void 0!==a.UVGenerator?a.UVGenerator:Jk;void 0!==a.amount&&(console.warn("THREE.ExtrudeBufferGeometry: amount has been renamed to depth."),x=a.amount);var I=!1;if(z){var K=z.getSpacedPoints(E);I=!0;B=!1;var F=z.computeFrenetFrames(E,!1);var G=new m;var N=new m;var L=new m}B||(M=A=H=Q=0);b=b.extractPoints(y);z=b.shape;var P=b.holes;if(!Bb.isClockWise(z))for(z=z.reverse(),b=0,y=P.length;b<y;b++){var O=P[b];Bb.isClockWise(O)&&
|
|
|
+(P[b]=O.reverse())}var V=Bb.triangulateShape(z,P),T=z;b=0;for(y=P.length;b<y;b++)z=z.concat(P[b]);var X=z.length,aa=V.length;b=[];y=0;O=T.length;for(var S=O-1,Y=y+1;y<O;y++,S++,Y++)S===O&&(S=0),Y===O&&(Y=0),b[y]=g(T[y],T[S],T[Y]);y=[];O=b.concat();Y=0;for(var U=P.length;Y<U;Y++){var W=P[Y];S=[];for(var Z=0,ba=W.length,da=ba-1,ea=Z+1;Z<ba;Z++,da++,ea++)da===ba&&(da=0),ea===ba&&(ea=0),S[Z]=g(W[Z],W[da],W[ea]);y.push(S);O=O.concat(S)}for(Y=0;Y<Q;Y++){S=Y/Q;U=H*Math.cos(S*Math.PI/2);W=A*Math.sin(S*Math.PI/
|
|
|
+2)+M;S=0;for(Z=T.length;S<Z;S++)ba=c(T[S],b[S],W),l(ba.x,ba.y,-U);Z=0;for(ba=P.length;Z<ba;Z++){da=P[Z];S=y[Z];ea=0;for(var ha=da.length;ea<ha;ea++){var fa=c(da[ea],S[ea],W);l(fa.x,fa.y,-U)}}}S=A+M;for(Y=0;Y<X;Y++)U=B?c(z[Y],O[Y],S):z[Y],I?(N.copy(F.normals[0]).multiplyScalar(U.x),G.copy(F.binormals[0]).multiplyScalar(U.y),L.copy(K[0]).add(N).add(G),l(L.x,L.y,L.z)):l(U.x,U.y,0);for(Y=1;Y<=E;Y++)for(U=0;U<X;U++)W=B?c(z[U],O[U],S):z[U],I?(N.copy(F.normals[Y]).multiplyScalar(W.x),G.copy(F.binormals[Y]).multiplyScalar(W.y),
|
|
|
+L.copy(K[Y]).add(N).add(G),l(L.x,L.y,L.z)):l(W.x,W.y,x/E*Y);for(F=Q-1;0<=F;F--){N=F/Q;G=H*Math.cos(N*Math.PI/2);N=A*Math.sin(N*Math.PI/2)+M;L=0;for(z=T.length;L<z;L++)O=c(T[L],b[L],N),l(O.x,O.y,x+G);L=0;for(z=P.length;L<z;L++)for(O=P[L],S=y[L],Y=0,U=O.length;Y<U;Y++)W=c(O[Y],S[Y],N),I?l(W.x,W.y+K[E-1].y,K[E-1].x+G):l(W.x,W.y,x+G)}(function(){var a=e.length/3;if(B){for(var b=0*X,c=0;c<aa;c++){var f=V[c];k(f[2]+b,f[1]+b,f[0]+b)}b=X*(E+2*Q);for(c=0;c<aa;c++)f=V[c],k(f[0]+b,f[1]+b,f[2]+b)}else{for(b=
|
|
|
+0;b<aa;b++)c=V[b],k(c[2],c[1],c[0]);for(b=0;b<aa;b++)c=V[b],k(c[0]+X*E,c[1]+X*E,c[2]+X*E)}d.addGroup(a,e.length/3-a,0)})();(function(){var a=e.length/3,b=0;h(T,b);b+=T.length;for(var c=0,f=P.length;c<f;c++){var g=P[c];h(g,b);b+=g.length}d.addGroup(a,e.length/3-a,1)})()}G.call(this);this.type="ExtrudeBufferGeometry";this.parameters={shapes:c,options:a};c=Array.isArray(c)?c:[c];for(var d=this,e=[],f=[],g=0,h=c.length;g<h;g++)b(c[g]);this.setAttribute("position",new I(e,3));this.setAttribute("uv",new I(f,
|
|
|
2));this.computeVertexNormals()}function hi(c,a,b){b.shapes=[];if(Array.isArray(c))for(var d=0,e=c.length;d<e;d++)b.shapes.push(c[d].uuid);else b.shapes.push(c.uuid);void 0!==a.extrudePath&&(b.options.extrudePath=a.extrudePath.toJSON());return b}function qe(c,a){P.call(this);this.type="TextGeometry";this.parameters={text:c,parameters:a};this.fromBufferGeometry(new hd(c,a));this.mergeVertices()}function hd(c,a){a=a||{};var b=a.font;if(!b||!b.isFont)return console.error("THREE.TextGeometry: font parameter is not an instance of THREE.Font."),
|
|
|
new P;c=b.generateShapes(c,a.size);a.depth=void 0!==a.height?a.height:50;void 0===a.bevelThickness&&(a.bevelThickness=10);void 0===a.bevelSize&&(a.bevelSize=8);void 0===a.bevelEnabled&&(a.bevelEnabled=!1);qb.call(this,c,a);this.type="TextBufferGeometry"}function re(c,a,b,d,e,f,g){P.call(this);this.type="SphereGeometry";this.parameters={radius:c,widthSegments:a,heightSegments:b,phiStart:d,phiLength:e,thetaStart:f,thetaLength:g};this.fromBufferGeometry(new tc(c,a,b,d,e,f,g));this.mergeVertices()}function tc(c,
|
|
|
-a,b,d,e,f,g){G.call(this);this.type="SphereBufferGeometry";this.parameters={radius:c,widthSegments:a,heightSegments:b,phiStart:d,phiLength:e,thetaStart:f,thetaLength:g};c=c||1;a=Math.max(3,Math.floor(a)||8);b=Math.max(2,Math.floor(b)||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;for(var h=Math.min(f+g,Math.PI),l=0,n=[],r=new m,k=new m,q=[],v=[],t=[],w=[],p=0;p<=b;p++){var y=[],J=p/b,x=0;0==p&&0==f?x=.5/a:p==b&&h==Math.PI&&(x=-.5/a);for(var z=0;z<=a;z++){var F=
|
|
|
-z/a;r.x=-c*Math.cos(d+F*e)*Math.sin(f+J*g);r.y=c*Math.cos(f+J*g);r.z=c*Math.sin(d+F*e)*Math.sin(f+J*g);v.push(r.x,r.y,r.z);k.copy(r).normalize();t.push(k.x,k.y,k.z);w.push(F+x,1-J);y.push(l++)}n.push(y)}for(c=0;c<b;c++)for(d=0;d<a;d++)e=n[c][d+1],g=n[c][d],l=n[c+1][d],r=n[c+1][d+1],(0!==c||0<f)&&q.push(e,g,r),(c!==b-1||h<Math.PI)&&q.push(g,l,r);this.setIndex(q);this.setAttribute("position",new H(v,3));this.setAttribute("normal",new H(t,3));this.setAttribute("uv",new H(w,2))}function se(c,a,b,d,e,
|
|
|
+a,b,d,e,f,g){G.call(this);this.type="SphereBufferGeometry";this.parameters={radius:c,widthSegments:a,heightSegments:b,phiStart:d,phiLength:e,thetaStart:f,thetaLength:g};c=c||1;a=Math.max(3,Math.floor(a)||8);b=Math.max(2,Math.floor(b)||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;for(var h=Math.min(f+g,Math.PI),l=0,n=[],r=new m,k=new m,q=[],v=[],t=[],w=[],p=0;p<=b;p++){var y=[],E=p/b,x=0;0==p&&0==f?x=.5/a:p==b&&h==Math.PI&&(x=-.5/a);for(var z=0;z<=a;z++){var H=
|
|
|
+z/a;r.x=-c*Math.cos(d+H*e)*Math.sin(f+E*g);r.y=c*Math.cos(f+E*g);r.z=c*Math.sin(d+H*e)*Math.sin(f+E*g);v.push(r.x,r.y,r.z);k.copy(r).normalize();t.push(k.x,k.y,k.z);w.push(H+x,1-E);y.push(l++)}n.push(y)}for(c=0;c<b;c++)for(d=0;d<a;d++)e=n[c][d+1],g=n[c][d],l=n[c+1][d],r=n[c+1][d+1],(0!==c||0<f)&&q.push(e,g,r),(c!==b-1||h<Math.PI)&&q.push(g,l,r);this.setIndex(q);this.setAttribute("position",new I(v,3));this.setAttribute("normal",new I(t,3));this.setAttribute("uv",new I(w,2))}function se(c,a,b,d,e,
|
|
|
f){P.call(this);this.type="RingGeometry";this.parameters={innerRadius:c,outerRadius:a,thetaSegments:b,phiSegments:d,thetaStart:e,thetaLength:f};this.fromBufferGeometry(new id(c,a,b,d,e,f));this.mergeVertices()}function id(c,a,b,d,e,f){G.call(this);this.type="RingBufferGeometry";this.parameters={innerRadius:c,outerRadius:a,thetaSegments:b,phiSegments:d,thetaStart:e,thetaLength:f};c=c||.5;a=a||1;e=void 0!==e?e:0;f=void 0!==f?f:2*Math.PI;b=void 0!==b?Math.max(3,b):8;d=void 0!==d?Math.max(1,d):1;var g=
|
|
|
-[],h=[],l=[],n=[],r=c;c=(a-c)/d;for(var k=new m,q=new p,v=0;v<=d;v++){for(var t=0;t<=b;t++){var w=e+t/b*f;k.x=r*Math.cos(w);k.y=r*Math.sin(w);h.push(k.x,k.y,k.z);l.push(0,0,1);q.x=(k.x/a+1)/2;q.y=(k.y/a+1)/2;n.push(q.x,q.y)}r+=c}for(a=0;a<d;a++)for(e=a*(b+1),f=0;f<b;f++)r=f+e,c=r+b+1,k=r+b+2,q=r+1,g.push(r,c,q),g.push(c,k,q);this.setIndex(g);this.setAttribute("position",new H(h,3));this.setAttribute("normal",new H(l,3));this.setAttribute("uv",new H(n,2))}function te(c,a,b,d){P.call(this);this.type=
|
|
|
+[],h=[],l=[],n=[],r=c;c=(a-c)/d;for(var k=new m,q=new p,v=0;v<=d;v++){for(var t=0;t<=b;t++){var w=e+t/b*f;k.x=r*Math.cos(w);k.y=r*Math.sin(w);h.push(k.x,k.y,k.z);l.push(0,0,1);q.x=(k.x/a+1)/2;q.y=(k.y/a+1)/2;n.push(q.x,q.y)}r+=c}for(a=0;a<d;a++)for(e=a*(b+1),f=0;f<b;f++)r=f+e,c=r+b+1,k=r+b+2,q=r+1,g.push(r,c,q),g.push(c,k,q);this.setIndex(g);this.setAttribute("position",new I(h,3));this.setAttribute("normal",new I(l,3));this.setAttribute("uv",new I(n,2))}function te(c,a,b,d){P.call(this);this.type=
|
|
|
"LatheGeometry";this.parameters={points:c,segments:a,phiStart:b,phiLength:d};this.fromBufferGeometry(new jd(c,a,b,d));this.mergeVertices()}function jd(c,a,b,d){G.call(this);this.type="LatheBufferGeometry";this.parameters={points:c,segments:a,phiStart:b,phiLength:d};a=Math.floor(a)||12;b=b||0;d=d||2*Math.PI;d=T.clamp(d,0,2*Math.PI);for(var e=[],f=[],g=[],h=1/a,l=new m,n=new p,r=0;r<=a;r++){var k=b+r*h*d,q=Math.sin(k);k=Math.cos(k);for(var v=0;v<=c.length-1;v++)l.x=c[v].x*q,l.y=c[v].y,l.z=c[v].x*k,
|
|
|
-f.push(l.x,l.y,l.z),n.x=r/a,n.y=v/(c.length-1),g.push(n.x,n.y)}for(b=0;b<a;b++)for(h=0;h<c.length-1;h++)l=h+b*c.length,n=l+c.length,r=l+c.length+1,q=l+1,e.push(l,n,q),e.push(n,r,q);this.setIndex(e);this.setAttribute("position",new H(f,3));this.setAttribute("uv",new H(g,2));this.computeVertexNormals();if(d===2*Math.PI)for(d=this.attributes.normal.array,e=new m,f=new m,g=new m,a=a*c.length*3,h=b=0;b<c.length;b++,h+=3)e.x=d[h+0],e.y=d[h+1],e.z=d[h+2],f.x=d[a+h+0],f.y=d[a+h+1],f.z=d[a+h+2],g.addVectors(e,
|
|
|
+f.push(l.x,l.y,l.z),n.x=r/a,n.y=v/(c.length-1),g.push(n.x,n.y)}for(b=0;b<a;b++)for(h=0;h<c.length-1;h++)l=h+b*c.length,n=l+c.length,r=l+c.length+1,q=l+1,e.push(l,n,q),e.push(n,r,q);this.setIndex(e);this.setAttribute("position",new I(f,3));this.setAttribute("uv",new I(g,2));this.computeVertexNormals();if(d===2*Math.PI)for(d=this.attributes.normal.array,e=new m,f=new m,g=new m,a=a*c.length*3,h=b=0;b<c.length;b++,h+=3)e.x=d[h+0],e.y=d[h+1],e.z=d[h+2],f.x=d[a+h+0],f.y=d[a+h+1],f.z=d[a+h+2],g.addVectors(e,
|
|
|
f).normalize(),d[h+0]=d[a+h+0]=g.x,d[h+1]=d[a+h+1]=g.y,d[h+2]=d[a+h+2]=g.z}function uc(c,a){P.call(this);this.type="ShapeGeometry";"object"===typeof a&&(console.warn("THREE.ShapeGeometry: Options parameter has been removed."),a=a.curveSegments);this.parameters={shapes:c,curveSegments:a};this.fromBufferGeometry(new vc(c,a));this.mergeVertices()}function vc(c,a){function b(b){var c=e.length/3,h=b.extractPoints(a);b=h.shape;var n=h.holes;!1===Bb.isClockWise(b)&&(b=b.reverse());h=0;for(var r=n.length;h<
|
|
|
r;h++){var k=n[h];!0===Bb.isClockWise(k)&&(n[h]=k.reverse())}h=Bb.triangulateShape(b,n);r=0;for(k=n.length;r<k;r++)b=b.concat(n[r]);n=0;for(r=b.length;n<r;n++)k=b[n],e.push(k.x,k.y,0),f.push(0,0,1),g.push(k.x,k.y);b=0;for(n=h.length;b<n;b++)r=h[b],d.push(r[0]+c,r[1]+c,r[2]+c),l+=3}G.call(this);this.type="ShapeBufferGeometry";this.parameters={shapes:c,curveSegments:a};a=a||12;var d=[],e=[],f=[],g=[],h=0,l=0;if(!1===Array.isArray(c))b(c);else for(var n=0;n<c.length;n++)b(c[n]),this.addGroup(h,l,n),
|
|
|
-h+=l,l=0;this.setIndex(d);this.setAttribute("position",new H(e,3));this.setAttribute("normal",new H(f,3));this.setAttribute("uv",new H(g,2))}function ii(c,a){a.shapes=[];if(Array.isArray(c))for(var b=0,d=c.length;b<d;b++)a.shapes.push(c[b].uuid);else a.shapes.push(c.uuid);return a}function kd(c,a){G.call(this);this.type="EdgesGeometry";this.parameters={thresholdAngle:a};var b=[];a=Math.cos(T.DEG2RAD*(void 0!==a?a:1));var d=[0,0],e={},f=["a","b","c"];if(c.isBufferGeometry){var g=new P;g.fromBufferGeometry(c)}else g=
|
|
|
-c.clone();g.mergeVertices();g.computeFaceNormals();c=g.vertices;g=g.faces;for(var h=0,l=g.length;h<l;h++)for(var n=g[h],r=0;3>r;r++){var k=n[f[r]];var m=n[f[(r+1)%3]];d[0]=Math.min(k,m);d[1]=Math.max(k,m);k=d[0]+","+d[1];void 0===e[k]?e[k]={index1:d[0],index2:d[1],face1:h,face2:void 0}:e[k].face2=h}for(k in e)if(d=e[k],void 0===d.face2||g[d.face1].normal.dot(g[d.face2].normal)<=a)f=c[d.index1],b.push(f.x,f.y,f.z),f=c[d.index2],b.push(f.x,f.y,f.z);this.setAttribute("position",new H(b,3))}function wc(c,
|
|
|
-a,b,d,e,f,g,h){P.call(this);this.type="CylinderGeometry";this.parameters={radiusTop:c,radiusBottom:a,height:b,radialSegments:d,heightSegments:e,openEnded:f,thetaStart:g,thetaLength:h};this.fromBufferGeometry(new Cb(c,a,b,d,e,f,g,h));this.mergeVertices()}function Cb(c,a,b,d,e,f,g,h){function l(b){for(var e=t,f=new p,l=new m,u=0,w=!0===b?c:a,x=!0===b?1:-1,J=1;J<=d;J++)k.push(0,E*x,0),q.push(0,x,0),v.push(.5,.5),t++;J=t;for(var z=0;z<=d;z++){var B=z/d*h+g,D=Math.cos(B);B=Math.sin(B);l.x=w*B;l.y=E*x;
|
|
|
-l.z=w*D;k.push(l.x,l.y,l.z);q.push(0,x,0);f.x=.5*D+.5;f.y=.5*B*x+.5;v.push(f.x,f.y);t++}for(f=0;f<d;f++)l=e+f,w=J+f,!0===b?r.push(w,w+1,l):r.push(w+1,w,l),u+=3;n.addGroup(y,u,!0===b?1:2);y+=u}G.call(this);this.type="CylinderBufferGeometry";this.parameters={radiusTop:c,radiusBottom:a,height:b,radialSegments:d,heightSegments:e,openEnded:f,thetaStart:g,thetaLength:h};var n=this;c=void 0!==c?c:1;a=void 0!==a?a:1;b=b||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 r=[],k=[],q=[],v=[],t=0,w=[],E=b/2,y=0;(function(){for(var f=new m,l=new m,u=0,p=(a-c)/b,x=0;x<=e;x++){for(var K=[],z=x/e,B=z*(a-c)+c,D=0;D<=d;D++){var H=D/d,G=H*h+g,I=Math.sin(G);G=Math.cos(G);l.x=B*I;l.y=-z*b+E;l.z=B*G;k.push(l.x,l.y,l.z);f.set(I,p,G).normalize();q.push(f.x,f.y,f.z);v.push(H,1-z);K.push(t++)}w.push(K)}for(f=0;f<d;f++)for(l=0;l<e;l++)p=w[l+1][f],x=w[l+1][f+1],K=w[l][f+1],r.push(w[l][f],p,K),r.push(p,x,K),u+=6;n.addGroup(y,u,0);y+=u})();!1===f&&(0<c&&l(!0),0<a&&
|
|
|
-l(!1));this.setIndex(r);this.setAttribute("position",new H(k,3));this.setAttribute("normal",new H(q,3));this.setAttribute("uv",new H(v,2))}function ue(c,a,b,d,e,f,g){wc.call(this,0,c,a,b,d,e,f,g);this.type="ConeGeometry";this.parameters={radius:c,height:a,radialSegments:b,heightSegments:d,openEnded:e,thetaStart:f,thetaLength:g}}function ve(c,a,b,d,e,f,g){Cb.call(this,0,c,a,b,d,e,f,g);this.type="ConeBufferGeometry";this.parameters={radius:c,height:a,radialSegments:b,heightSegments:d,openEnded:e,thetaStart:f,
|
|
|
-thetaLength:g}}function we(c,a,b,d){P.call(this);this.type="CircleGeometry";this.parameters={radius:c,segments:a,thetaStart:b,thetaLength:d};this.fromBufferGeometry(new ld(c,a,b,d));this.mergeVertices()}function ld(c,a,b,d){G.call(this);this.type="CircleBufferGeometry";this.parameters={radius:c,segments:a,thetaStart:b,thetaLength:d};c=c||1;a=void 0!==a?Math.max(3,a):8;b=void 0!==b?b:0;d=void 0!==d?d:2*Math.PI;var e=[],f=[],g=[],h=[],l=new m,n=new p;f.push(0,0,0);g.push(0,0,1);h.push(.5,.5);for(var r=
|
|
|
-0,k=3;r<=a;r++,k+=3){var q=b+r/a*d;l.x=c*Math.cos(q);l.y=c*Math.sin(q);f.push(l.x,l.y,l.z);g.push(0,0,1);n.x=(f[k]/c+1)/2;n.y=(f[k+1]/c+1)/2;h.push(n.x,n.y)}for(c=1;c<=a;c++)e.push(c,c+1,0);this.setIndex(e);this.setAttribute("position",new H(f,3));this.setAttribute("normal",new H(g,3));this.setAttribute("uv",new H(h,2))}function xc(c){M.call(this);this.type="ShadowMaterial";this.color=new x(0);this.transparent=!0;this.setValues(c)}function Db(c){Aa.call(this,c);this.type="RawShaderMaterial"}function rb(c){M.call(this);
|
|
|
+h+=l,l=0;this.setIndex(d);this.setAttribute("position",new I(e,3));this.setAttribute("normal",new I(f,3));this.setAttribute("uv",new I(g,2))}function ii(c,a){a.shapes=[];if(Array.isArray(c))for(var b=0,d=c.length;b<d;b++)a.shapes.push(c[b].uuid);else a.shapes.push(c.uuid);return a}function kd(c,a){G.call(this);this.type="EdgesGeometry";this.parameters={thresholdAngle:a};var b=[];a=Math.cos(T.DEG2RAD*(void 0!==a?a:1));var d=[0,0],e={},f=["a","b","c"];if(c.isBufferGeometry){var g=new P;g.fromBufferGeometry(c)}else g=
|
|
|
+c.clone();g.mergeVertices();g.computeFaceNormals();c=g.vertices;g=g.faces;for(var h=0,l=g.length;h<l;h++)for(var n=g[h],r=0;3>r;r++){var k=n[f[r]];var m=n[f[(r+1)%3]];d[0]=Math.min(k,m);d[1]=Math.max(k,m);k=d[0]+","+d[1];void 0===e[k]?e[k]={index1:d[0],index2:d[1],face1:h,face2:void 0}:e[k].face2=h}for(k in e)if(d=e[k],void 0===d.face2||g[d.face1].normal.dot(g[d.face2].normal)<=a)f=c[d.index1],b.push(f.x,f.y,f.z),f=c[d.index2],b.push(f.x,f.y,f.z);this.setAttribute("position",new I(b,3))}function wc(c,
|
|
|
+a,b,d,e,f,g,h){P.call(this);this.type="CylinderGeometry";this.parameters={radiusTop:c,radiusBottom:a,height:b,radialSegments:d,heightSegments:e,openEnded:f,thetaStart:g,thetaLength:h};this.fromBufferGeometry(new Cb(c,a,b,d,e,f,g,h));this.mergeVertices()}function Cb(c,a,b,d,e,f,g,h){function l(b){for(var e=t,f=new p,l=new m,u=0,w=!0===b?c:a,E=!0===b?1:-1,x=1;x<=d;x++)k.push(0,C*E,0),q.push(0,E,0),v.push(.5,.5),t++;x=t;for(var z=0;z<=d;z++){var B=z/d*h+g,F=Math.cos(B);B=Math.sin(B);l.x=w*B;l.y=C*E;
|
|
|
+l.z=w*F;k.push(l.x,l.y,l.z);q.push(0,E,0);f.x=.5*F+.5;f.y=.5*B*E+.5;v.push(f.x,f.y);t++}for(f=0;f<d;f++)l=e+f,w=x+f,!0===b?r.push(w,w+1,l):r.push(w+1,w,l),u+=3;n.addGroup(y,u,!0===b?1:2);y+=u}G.call(this);this.type="CylinderBufferGeometry";this.parameters={radiusTop:c,radiusBottom:a,height:b,radialSegments:d,heightSegments:e,openEnded:f,thetaStart:g,thetaLength:h};var n=this;c=void 0!==c?c:1;a=void 0!==a?a:1;b=b||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 r=[],k=[],q=[],v=[],t=0,w=[],C=b/2,y=0;(function(){for(var f=new m,l=new m,u=0,p=(a-c)/b,A=0;A<=e;A++){for(var x=[],z=A/e,B=z*(a-c)+c,F=0;F<=d;F++){var I=F/d,G=I*h+g,J=Math.sin(G);G=Math.cos(G);l.x=B*J;l.y=-z*b+C;l.z=B*G;k.push(l.x,l.y,l.z);f.set(J,p,G).normalize();q.push(f.x,f.y,f.z);v.push(I,1-z);x.push(t++)}w.push(x)}for(f=0;f<d;f++)for(l=0;l<e;l++)p=w[l+1][f],A=w[l+1][f+1],x=w[l][f+1],r.push(w[l][f],p,x),r.push(p,A,x),u+=6;n.addGroup(y,u,0);y+=u})();!1===f&&(0<c&&l(!0),0<a&&
|
|
|
+l(!1));this.setIndex(r);this.setAttribute("position",new I(k,3));this.setAttribute("normal",new I(q,3));this.setAttribute("uv",new I(v,2))}function ue(c,a,b,d,e,f,g){wc.call(this,0,c,a,b,d,e,f,g);this.type="ConeGeometry";this.parameters={radius:c,height:a,radialSegments:b,heightSegments:d,openEnded:e,thetaStart:f,thetaLength:g}}function ve(c,a,b,d,e,f,g){Cb.call(this,0,c,a,b,d,e,f,g);this.type="ConeBufferGeometry";this.parameters={radius:c,height:a,radialSegments:b,heightSegments:d,openEnded:e,thetaStart:f,
|
|
|
+thetaLength:g}}function we(c,a,b,d){P.call(this);this.type="CircleGeometry";this.parameters={radius:c,segments:a,thetaStart:b,thetaLength:d};this.fromBufferGeometry(new ld(c,a,b,d));this.mergeVertices()}function ld(c,a,b,d){G.call(this);this.type="CircleBufferGeometry";this.parameters={radius:c,segments:a,thetaStart:b,thetaLength:d};c=c||1;a=void 0!==a?Math.max(3,a):8;b=void 0!==b?b:0;d=void 0!==d?d:2*Math.PI;var e=[],f=[],g=[],h=[],l=new m,n=new p;f.push(0,0,0);g.push(0,0,1);h.push(.5,.5);for(var k=
|
|
|
+0,u=3;k<=a;k++,u+=3){var q=b+k/a*d;l.x=c*Math.cos(q);l.y=c*Math.sin(q);f.push(l.x,l.y,l.z);g.push(0,0,1);n.x=(f[u]/c+1)/2;n.y=(f[u+1]/c+1)/2;h.push(n.x,n.y)}for(c=1;c<=a;c++)e.push(c,c+1,0);this.setIndex(e);this.setAttribute("position",new I(f,3));this.setAttribute("normal",new I(g,3));this.setAttribute("uv",new I(h,2))}function xc(c){L.call(this);this.type="ShadowMaterial";this.color=new x(0);this.transparent=!0;this.setValues(c)}function Db(c){Aa.call(this,c);this.type="RawShaderMaterial"}function rb(c){L.call(this);
|
|
|
this.defines={STANDARD:""};this.type="MeshStandardMaterial";this.color=new x(16777215);this.roughness=1;this.metalness=0;this.lightMap=this.map=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.emissive=new x(0);this.emissiveIntensity=1;this.bumpMap=this.emissiveMap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=0;this.normalScale=new p(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(c)}function Zb(c){rb.call(this);this.defines={STANDARD:"",PHYSICAL:""};this.type="MeshPhysicalMaterial";this.clearcoat=0;this.clearcoatMap=null;this.clearcoatRoughness=0;this.clearcoatRoughnessMap=null;this.clearcoatNormalScale=new p(1,1);this.clearcoatNormalMap=
|
|
|
-null;this.reflectivity=.5;this.sheen=null;this.transmission=0;this.transmissionMap=null;this.setValues(c)}function $b(c){M.call(this);this.type="MeshPhongMaterial";this.color=new x(16777215);this.specular=new x(1118481);this.shininess=30;this.lightMap=this.map=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.emissive=new x(0);this.emissiveIntensity=1;this.bumpMap=this.emissiveMap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=0;this.normalScale=new p(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(c)}function yc(c){M.call(this);this.defines={TOON:""};this.type="MeshToonMaterial";this.color=new x(16777215);this.lightMap=this.gradientMap=this.map=null;this.lightMapIntensity=
|
|
|
-1;this.aoMap=null;this.aoMapIntensity=1;this.emissive=new x(0);this.emissiveIntensity=1;this.bumpMap=this.emissiveMap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=0;this.normalScale=new p(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.alphaMap=null;this.wireframe=!1;this.wireframeLinewidth=1;this.wireframeLinejoin=this.wireframeLinecap="round";this.morphNormals=this.morphTargets=this.skinning=!1;this.setValues(c)}function zc(c){M.call(this);this.type=
|
|
|
-"MeshNormalMaterial";this.bumpMap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=0;this.normalScale=new p(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(c)}function Ac(c){M.call(this);this.type="MeshLambertMaterial";this.color=new x(16777215);this.lightMap=this.map=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;
|
|
|
-this.emissive=new x(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(c)}function Bc(c){M.call(this);this.defines={MATCAP:""};this.type="MeshMatcapMaterial";this.color=new x(16777215);this.bumpMap=this.map=this.matcap=null;this.bumpScale=
|
|
|
+null;this.reflectivity=.5;this.sheen=null;this.transmission=0;this.transmissionMap=null;this.setValues(c)}function $b(c){L.call(this);this.type="MeshPhongMaterial";this.color=new x(16777215);this.specular=new x(1118481);this.shininess=30;this.lightMap=this.map=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.emissive=new x(0);this.emissiveIntensity=1;this.bumpMap=this.emissiveMap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=0;this.normalScale=new p(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(c)}function yc(c){L.call(this);this.defines={TOON:""};this.type="MeshToonMaterial";this.color=new x(16777215);this.lightMap=this.gradientMap=this.map=null;this.lightMapIntensity=
|
|
|
+1;this.aoMap=null;this.aoMapIntensity=1;this.emissive=new x(0);this.emissiveIntensity=1;this.bumpMap=this.emissiveMap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=0;this.normalScale=new p(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.alphaMap=null;this.wireframe=!1;this.wireframeLinewidth=1;this.wireframeLinejoin=this.wireframeLinecap="round";this.morphNormals=this.morphTargets=this.skinning=!1;this.setValues(c)}function zc(c){L.call(this);this.type=
|
|
|
+"MeshNormalMaterial";this.bumpMap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=0;this.normalScale=new p(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(c)}function Ac(c){L.call(this);this.type="MeshLambertMaterial";this.color=new x(16777215);this.lightMap=this.map=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;
|
|
|
+this.emissive=new x(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(c)}function Bc(c){L.call(this);this.defines={MATCAP:""};this.type="MeshMatcapMaterial";this.color=new x(16777215);this.bumpMap=this.map=this.matcap=null;this.bumpScale=
|
|
|
1;this.normalMap=null;this.normalMapType=0;this.normalScale=new p(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.alphaMap=null;this.morphNormals=this.morphTargets=this.skinning=!1;this.setValues(c)}function Cc(c){pa.call(this);this.type="LineDashedMaterial";this.scale=1;this.dashSize=3;this.gapSize=1;this.setValues(c)}function Wa(c,a,b,d){this.parameterPositions=c;this._cachedIndex=0;this.resultBuffer=void 0!==d?d:new a.constructor(b);this.sampleValues=a;this.valueSize=
|
|
|
b}function jf(c,a,b,d){Wa.call(this,c,a,b,d);this._offsetNext=this._weightNext=this._offsetPrev=this._weightPrev=-0}function xe(c,a,b,d){Wa.call(this,c,a,b,d)}function kf(c,a,b,d){Wa.call(this,c,a,b,d)}function Ca(c,a,b,d){if(void 0===c)throw Error("THREE.KeyframeTrack: track name is undefined");if(void 0===a||0===a.length)throw Error("THREE.KeyframeTrack: no keyframes in track named "+c);this.name=c;this.times=Z.convertArray(a,this.TimeBufferType);this.values=Z.convertArray(b,this.ValueBufferType);
|
|
|
this.setInterpolation(d||this.DefaultInterpolation)}function lf(c,a,b){Ca.call(this,c,a,b)}function mf(c,a,b,d){Ca.call(this,c,a,b,d)}function md(c,a,b,d){Ca.call(this,c,a,b,d)}function nf(c,a,b,d){Wa.call(this,c,a,b,d)}function ye(c,a,b,d){Ca.call(this,c,a,b,d)}function of(c,a,b,d){Ca.call(this,c,a,b,d)}function nd(c,a,b,d){Ca.call(this,c,a,b,d)}function ab(c,a,b,d){this.name=c;this.tracks=b;this.duration=void 0!==a?a:-1;this.blendMode=void 0!==d?d:2500;this.uuid=T.generateUUID();0>this.duration&&
|
|
|
this.resetDuration()}function Kk(c){switch(c.toLowerCase()){case "scalar":case "double":case "float":case "number":case "integer":return md;case "vector":case "vector2":case "vector3":case "vector4":return nd;case "color":return mf;case "quaternion":return ye;case "bool":case "boolean":return lf;case "string":return of}throw Error("THREE.KeyframeTrack: Unsupported typeName: "+c);}function Lk(c){if(void 0===c.type)throw Error("THREE.KeyframeTrack: track type undefined, can not parse");var a=Kk(c.type);
|
|
|
if(void 0===c.times){var b=[],d=[];Z.flattenJSON(c.keys,b,d,"value");c.times=b;c.values=d}return void 0!==a.parse?a.parse(c):new a(c.name,c.times,c.values,c.interpolation)}function Fg(c,a,b){var d=this,e=!1,f=0,g=0,h=void 0,l=[];this.onStart=void 0;this.onLoad=c;this.onProgress=a;this.onError=b;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){l.push(a,b);return this};this.removeHandler=function(a){a=l.indexOf(a);-1!==a&&l.splice(a,2);return this};this.getHandler=function(a){for(var b=0,c=l.length;b<c;b+=2){var d=l[b],e=l[b+1];d.global&&(d.lastIndex=0);if(d.test(a))return e}return null}}function ba(c){this.manager=void 0!==c?c:ji;this.crossOrigin="anonymous";
|
|
|
-this.resourcePath=this.path="";this.requestHeader={}}function bb(c){ba.call(this,c)}function Gg(c){ba.call(this,c)}function Hg(c){ba.call(this,c)}function od(c){ba.call(this,c)}function pf(c){ba.call(this,c)}function qf(c){ba.call(this,c)}function rf(c){ba.call(this,c)}function L(){this.type="Curve";this.arcLengthDivisions=200}function Xa(c,a,b,d,e,f,g,h){L.call(this);this.type="EllipseCurve";this.aX=c||0;this.aY=a||0;this.xRadius=b||1;this.yRadius=d||1;this.aStartAngle=e||0;this.aEndAngle=f||2*Math.PI;
|
|
|
-this.aClockwise=g||!1;this.aRotation=h||0}function pd(c,a,b,d,e,f){Xa.call(this,c,a,b,b,d,e,f);this.type="ArcCurve"}function Ig(){var c=0,a=0,b=0,d=0;return{initCatmullRom:function(e,f,g,h,l){e=l*(g-e);h=l*(h-f);c=f;a=e;b=-3*f+3*g-2*e-h;d=2*f-2*g+e+h},initNonuniformCatmullRom:function(e,f,g,h,l,n,k){e=((f-e)/l-(g-e)/(l+n)+(g-f)/n)*n;h=((g-f)/n-(h-f)/(n+k)+(h-g)/k)*n;c=f;a=e;b=-3*f+3*g-2*e-h;d=2*f-2*g+e+h},calc:function(e){var f=e*e;return c+a*e+b*f+d*f*e}}}function za(c,a,b,d){L.call(this);this.type=
|
|
|
-"CatmullRomCurve3";this.points=c||[];this.closed=a||!1;this.curveType=b||"centripetal";this.tension=void 0!==d?d:.5}function ki(c,a,b,d,e){a=.5*(d-a);e=.5*(e-b);var f=c*c;return(2*b-2*d+a+e)*c*f+(-3*b+3*d-2*a-e)*f+a*c+b}function ze(c,a,b,d){var e=1-c;return e*e*a+2*(1-c)*c*b+c*c*d}function Ae(c,a,b,d,e){var f=1-c,g=1-c;return f*f*f*a+3*g*g*c*b+3*(1-c)*c*c*d+c*c*c*e}function fb(c,a,b,d){L.call(this);this.type="CubicBezierCurve";this.v0=c||new p;this.v1=a||new p;this.v2=b||new p;this.v3=d||new p}function sb(c,
|
|
|
-a,b,d){L.call(this);this.type="CubicBezierCurve3";this.v0=c||new m;this.v1=a||new m;this.v2=b||new m;this.v3=d||new m}function Pa(c,a){L.call(this);this.type="LineCurve";this.v1=c||new p;this.v2=a||new p}function gb(c,a){L.call(this);this.type="LineCurve3";this.v1=c||new m;this.v2=a||new m}function hb(c,a,b){L.call(this);this.type="QuadraticBezierCurve";this.v0=c||new p;this.v1=a||new p;this.v2=b||new p}function tb(c,a,b){L.call(this);this.type="QuadraticBezierCurve3";this.v0=c||new m;this.v1=a||
|
|
|
-new m;this.v2=b||new m}function ib(c){L.call(this);this.type="SplineCurve";this.points=c||[]}function Eb(){L.call(this);this.type="CurvePath";this.curves=[];this.autoClose=!1}function jb(c){Eb.call(this);this.type="Path";this.currentPoint=new p;c&&this.setFromPoints(c)}function ac(c){jb.call(this,c);this.uuid=T.generateUUID();this.type="Shape";this.holes=[]}function la(c,a){D.call(this);this.type="Light";this.color=new x(c);this.intensity=void 0!==a?a:1;this.receiveShadow=void 0}function sf(c,a,b){la.call(this,
|
|
|
-c,b);this.type="HemisphereLight";this.castShadow=void 0;this.position.copy(D.DefaultUp);this.updateMatrix();this.groundColor=new x(a)}function ub(c){this.camera=c;this.normalBias=this.bias=0;this.radius=1;this.mapSize=new p(512,512);this.mapPass=this.map=null;this.matrix=new z;this.autoUpdate=!0;this.needsUpdate=!1;this._frustum=new Ma;this._frameExtents=new p(1,1);this._viewportCount=1;this._viewports=[new B(0,0,1,1)]}function tf(){ub.call(this,new ta(50,1,.5,500))}function uf(c,a,b,d,e,f){la.call(this,
|
|
|
-c,a);this.type="SpotLight";this.position.copy(D.DefaultUp);this.updateMatrix();this.target=new D;Object.defineProperty(this,"power",{get:function(){return this.intensity*Math.PI},set:function(a){this.intensity=a/Math.PI}});this.distance=void 0!==b?b: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 tf}function Jg(){ub.call(this,new ta(90,1,.5,500));this._frameExtents=new p(4,2);this._viewportCount=6;this._viewports=[new B(2,1,1,1),new B(0,1,
|
|
|
+this.resourcePath=this.path="";this.requestHeader={}}function bb(c){ba.call(this,c)}function Gg(c){ba.call(this,c)}function Hg(c){ba.call(this,c)}function od(c){ba.call(this,c)}function pf(c){ba.call(this,c)}function qf(c){ba.call(this,c)}function rf(c){ba.call(this,c)}function K(){this.type="Curve";this.arcLengthDivisions=200}function Xa(c,a,b,d,e,f,g,h){K.call(this);this.type="EllipseCurve";this.aX=c||0;this.aY=a||0;this.xRadius=b||1;this.yRadius=d||1;this.aStartAngle=e||0;this.aEndAngle=f||2*Math.PI;
|
|
|
+this.aClockwise=g||!1;this.aRotation=h||0}function pd(c,a,b,d,e,f){Xa.call(this,c,a,b,b,d,e,f);this.type="ArcCurve"}function Ig(){var c=0,a=0,b=0,d=0;return{initCatmullRom:function(e,f,g,h,l){e=l*(g-e);h=l*(h-f);c=f;a=e;b=-3*f+3*g-2*e-h;d=2*f-2*g+e+h},initNonuniformCatmullRom:function(e,f,g,h,l,n,k){e=((f-e)/l-(g-e)/(l+n)+(g-f)/n)*n;h=((g-f)/n-(h-f)/(n+k)+(h-g)/k)*n;c=f;a=e;b=-3*f+3*g-2*e-h;d=2*f-2*g+e+h},calc:function(e){var f=e*e;return c+a*e+b*f+d*f*e}}}function za(c,a,b,d){K.call(this);this.type=
|
|
|
+"CatmullRomCurve3";this.points=c||[];this.closed=a||!1;this.curveType=b||"centripetal";this.tension=void 0!==d?d:.5}function ki(c,a,b,d,e){a=.5*(d-a);e=.5*(e-b);var f=c*c;return(2*b-2*d+a+e)*c*f+(-3*b+3*d-2*a-e)*f+a*c+b}function ze(c,a,b,d){var e=1-c;return e*e*a+2*(1-c)*c*b+c*c*d}function Ae(c,a,b,d,e){var f=1-c,g=1-c;return f*f*f*a+3*g*g*c*b+3*(1-c)*c*c*d+c*c*c*e}function fb(c,a,b,d){K.call(this);this.type="CubicBezierCurve";this.v0=c||new p;this.v1=a||new p;this.v2=b||new p;this.v3=d||new p}function sb(c,
|
|
|
+a,b,d){K.call(this);this.type="CubicBezierCurve3";this.v0=c||new m;this.v1=a||new m;this.v2=b||new m;this.v3=d||new m}function Pa(c,a){K.call(this);this.type="LineCurve";this.v1=c||new p;this.v2=a||new p}function gb(c,a){K.call(this);this.type="LineCurve3";this.v1=c||new m;this.v2=a||new m}function hb(c,a,b){K.call(this);this.type="QuadraticBezierCurve";this.v0=c||new p;this.v1=a||new p;this.v2=b||new p}function tb(c,a,b){K.call(this);this.type="QuadraticBezierCurve3";this.v0=c||new m;this.v1=a||
|
|
|
+new m;this.v2=b||new m}function ib(c){K.call(this);this.type="SplineCurve";this.points=c||[]}function Eb(){K.call(this);this.type="CurvePath";this.curves=[];this.autoClose=!1}function jb(c){Eb.call(this);this.type="Path";this.currentPoint=new p;c&&this.setFromPoints(c)}function ac(c){jb.call(this,c);this.uuid=T.generateUUID();this.type="Shape";this.holes=[]}function la(c,a){F.call(this);this.type="Light";this.color=new x(c);this.intensity=void 0!==a?a:1;this.receiveShadow=void 0}function sf(c,a,b){la.call(this,
|
|
|
+c,b);this.type="HemisphereLight";this.castShadow=void 0;this.position.copy(F.DefaultUp);this.updateMatrix();this.groundColor=new x(a)}function ub(c){this.camera=c;this.normalBias=this.bias=0;this.radius=1;this.mapSize=new p(512,512);this.mapPass=this.map=null;this.matrix=new z;this.autoUpdate=!0;this.needsUpdate=!1;this._frustum=new Ma;this._frameExtents=new p(1,1);this._viewportCount=1;this._viewports=[new B(0,0,1,1)]}function tf(){ub.call(this,new ta(50,1,.5,500))}function uf(c,a,b,d,e,f){la.call(this,
|
|
|
+c,a);this.type="SpotLight";this.position.copy(F.DefaultUp);this.updateMatrix();this.target=new F;Object.defineProperty(this,"power",{get:function(){return this.intensity*Math.PI},set:function(a){this.intensity=a/Math.PI}});this.distance=void 0!==b?b: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 tf}function Jg(){ub.call(this,new ta(90,1,.5,500));this._frameExtents=new p(4,2);this._viewportCount=6;this._viewports=[new B(2,1,1,1),new B(0,1,
|
|
|
1,1),new B(3,1,1,1),new B(1,1,1,1),new B(3,0,1,1),new B(1,0,1,1)];this._cubeDirections=[new m(1,0,0),new m(-1,0,0),new m(0,0,1),new m(0,0,-1),new m(0,1,0),new m(0,-1,0)];this._cubeUps=[new m(0,1,0),new m(0,1,0),new m(0,1,0),new m(0,1,0),new m(0,0,1),new m(0,0,-1)]}function vf(c,a,b,d){la.call(this,c,a);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!==b?b:0;this.decay=void 0!==
|
|
|
-d?d:1;this.shadow=new Jg}function qd(c,a,b,d,e,f){ob.call(this);this.type="OrthographicCamera";this.zoom=1;this.view=null;this.left=void 0!==c?c:-1;this.right=void 0!==a?a:1;this.top=void 0!==b?b: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 wf(){ub.call(this,new qd(-5,5,5,-5,.5,500))}function xf(c,a){la.call(this,c,a);this.type="DirectionalLight";this.position.copy(D.DefaultUp);this.updateMatrix();this.target=new D;this.shadow=
|
|
|
+d?d:1;this.shadow=new Jg}function qd(c,a,b,d,e,f){ob.call(this);this.type="OrthographicCamera";this.zoom=1;this.view=null;this.left=void 0!==c?c:-1;this.right=void 0!==a?a:1;this.top=void 0!==b?b: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 wf(){ub.call(this,new qd(-5,5,5,-5,.5,500))}function xf(c,a){la.call(this,c,a);this.type="DirectionalLight";this.position.copy(F.DefaultUp);this.updateMatrix();this.target=new F;this.shadow=
|
|
|
new wf}function yf(c,a){la.call(this,c,a);this.type="AmbientLight";this.castShadow=void 0}function zf(c,a,b,d){la.call(this,c,a);this.type="RectAreaLight";this.width=void 0!==b?b:10;this.height=void 0!==d?d:10}function cb(c,a){la.call(this,void 0,a);this.type="LightProbe";this.sh=void 0!==c?c:new Da}function Af(c){ba.call(this,c);this.textures={}}function Be(){G.call(this);this.type="InstancedBufferGeometry";this.instanceCount=Infinity}function Bf(c,a,b,d){"number"===typeof b&&(d=b,b=!1,console.error("THREE.InstancedBufferAttribute: The constructor now expects normalized as the third argument."));
|
|
|
N.call(this,c,a,b);this.meshPerAttribute=d||1}function Cf(c){ba.call(this,c)}function Df(c){ba.call(this,c)}function Kg(c){"undefined"===typeof createImageBitmap&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported.");"undefined"===typeof fetch&&console.warn("THREE.ImageBitmapLoader: fetch() not supported.");ba.call(this,c);this.options={premultiplyAlpha:"none"}}function Lg(){this.type="ShapePath";this.color=new x;this.subPaths=[];this.currentPath=null}function Mg(c){this.type=
|
|
|
"Font";this.data=c}function Ng(c){ba.call(this,c)}function Ef(c){ba.call(this,c)}function Og(c,a,b){cb.call(this,void 0,b);c=(new x).set(c);b=(new x).set(a);a=new m(c.r,c.g,c.b);c=new m(b.r,b.g,b.b);b=Math.sqrt(Math.PI);var d=b*Math.sqrt(.75);this.sh.coefficients[0].copy(a).add(c).multiplyScalar(b);this.sh.coefficients[1].copy(a).sub(c).multiplyScalar(d)}function Pg(c,a){cb.call(this,void 0,a);c=(new x).set(c);this.sh.coefficients[0].set(c.r,c.g,c.b).multiplyScalar(2*Math.sqrt(Math.PI))}function li(){this.type=
|
|
|
-"StereoCamera";this.aspect=1;this.eyeSep=.064;this.cameraL=new ta;this.cameraL.layers.enable(1);this.cameraL.matrixAutoUpdate=!1;this.cameraR=new ta;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 kb(){D.call(this);this.type="AudioListener";this.context=Qg.getContext();this.gain=this.context.createGain();this.gain.connect(this.context.destination);this.filter=null;this.timeDelta=0;this._clock=
|
|
|
-new rd}function da(c){D.call(this);this.type="Audio";this.listener=c;this.context=c.context;this.gain=this.context.createGain();this.gain.connect(c.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.source=null;this.sourceType="empty";this._progress=this._startedAt=0;this.filters=[]}function Ia(c){da.call(this,c);this.panner=this.context.createPanner();
|
|
|
+"StereoCamera";this.aspect=1;this.eyeSep=.064;this.cameraL=new ta;this.cameraL.layers.enable(1);this.cameraL.matrixAutoUpdate=!1;this.cameraR=new ta;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 kb(){F.call(this);this.type="AudioListener";this.context=Qg.getContext();this.gain=this.context.createGain();this.gain.connect(this.context.destination);this.filter=null;this.timeDelta=0;this._clock=
|
|
|
+new rd}function da(c){F.call(this);this.type="Audio";this.listener=c;this.context=c.context;this.gain=this.context.createGain();this.gain.connect(c.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.source=null;this.sourceType="empty";this._progress=this._startedAt=0;this.filters=[]}function Ia(c){da.call(this,c);this.panner=this.context.createPanner();
|
|
|
this.panner.panningModel="HRTF";this.panner.connect(this.gain)}function Rg(c,a,b){this.binding=c;this.valueSize=b;switch(a){case "quaternion":c=this._slerp;a=this._slerpAdditive;var d=this._setAdditiveIdentityQuaternion;this.buffer=new Float64Array(6*b);this._workIndex=5;break;case "string":case "bool":a=c=this._select;d=this._setAdditiveIdentityOther;this.buffer=Array(5*b);break;default:c=this._lerp,a=this._lerpAdditive,d=this._setAdditiveIdentityNumeric,this.buffer=new Float64Array(5*b)}this._mixBufferRegion=
|
|
|
c;this._mixBufferRegionAdditive=a;this._setIdentity=d;this._origIndex=3;this._addIndex=4;this.referenceCount=this.useCount=this.cumulativeWeightAdditive=this.cumulativeWeight=0}function mi(c,a,b){b=b||Fa.parseTrackName(a);this._targetGroup=c;this._bindings=c.subscribe_(a,b)}function Fa(c,a,b){this.path=a;this.parsedPath=b||Fa.parseTrackName(a);this.node=Fa.findNode(c,this.parsedPath.nodeName)||c;this.rootNode=c}function ni(){this.uuid=T.generateUUID();this._objects=Array.prototype.slice.call(arguments);
|
|
|
this.nCachedObjects_=0;var c={};this._indicesByUUID=c;for(var a=0,b=arguments.length;a!==b;++a)c[arguments[a].uuid]=a;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 Sg(c){this._root=c;this._initMemoryManager();this.time=this._accuIndex=0;this.timeScale=1}function Tg(c,a,b){Va.call(this,
|
|
|
c,a);this.meshPerAttribute=b||1}function Ug(c,a,b,d,e){this.buffer=c;this.type=a;this.itemSize=b;this.elementSize=d;this.count=e;this.version=0}function Vg(c,a,b,d){this.ray=new qa(c,a);this.near=b||0;this.far=d||Infinity;this.camera=null;this.layers=new nb;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 oi(c,a){return c.distance-a.distance}function Wg(c,a,b,d){c.layers.test(a.layers)&&c.raycast(a,b);if(!0===d){c=c.children;d=0;for(var e=c.length;d<e;d++)Wg(c[d],a,b,!0)}}function Ce(c){D.call(this);this.material=c;this.render=function(){};this.hasUvs=this.hasColors=this.hasNormals=this.hasPositions=!1;this.uvArray=this.colorArray=this.normalArray=this.positionArray=null;this.count=0}function sd(c,a){D.call(this);this.light=c;this.light.updateMatrixWorld();this.matrix=c.matrixWorld;this.matrixAutoUpdate=
|
|
|
-!1;this.color=a;c=new G;a=[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 b=0,d=1;32>b;b++,d++){var e=b/32*Math.PI*2,f=d/32*Math.PI*2;a.push(Math.cos(e),Math.sin(e),1,Math.cos(f),Math.sin(f),1)}c.setAttribute("position",new H(a,3));a=new pa({fog:!1,toneMapped:!1});this.cone=new sa(c,a);this.add(this.cone);this.update()}function td(c){for(var a=pi(c),b=new G,d=[],e=[],f=new x(0,0,1),g=new x(0,1,0),h=0;h<a.length;h++){var l=a[h];l.parent&&l.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))}b.setAttribute("position",new H(d,3));b.setAttribute("color",new H(e,3));d=new pa({vertexColors:!0,depthTest:!1,depthWrite:!1,toneMapped:!1,transparent:!0});sa.call(this,b,d);this.type="SkeletonHelper";this.isSkeletonHelper=!0;this.root=c;this.bones=a;this.matrix=c.matrixWorld;this.matrixAutoUpdate=!1}function pi(c){var a=[];c&&c.isBone&&a.push(c);for(var b=0;b<c.children.length;b++)a.push.apply(a,pi(c.children[b]));return a}function ud(c,a,b){a=new tc(a,
|
|
|
-4,2);var d=new Za({wireframe:!0,fog:!1,toneMapped:!1});na.call(this,a,d);this.light=c;this.light.updateMatrixWorld();this.color=b;this.type="PointLightHelper";this.matrix=this.light.matrixWorld;this.matrixAutoUpdate=!1;this.update()}function vd(c,a,b){D.call(this);this.light=c;this.light.updateMatrixWorld();this.matrix=c.matrixWorld;this.matrixAutoUpdate=!1;this.color=b;c=new qc(a);c.rotateY(.5*Math.PI);this.material=new Za({wireframe:!0,fog:!1,toneMapped:!1});void 0===this.color&&(this.material.vertexColors=
|
|
|
-!0);a=c.getAttribute("position");a=new Float32Array(3*a.count);c.setAttribute("color",new N(a,3));this.add(new na(c,this.material));this.update()}function De(c,a,b,d){c=c||10;a=a||10;b=new x(void 0!==b?b:4473924);d=new x(void 0!==d?d:8947848);var e=a/2,f=c/a,g=c/2;c=[];for(var h=[],l=0,n=0,k=-g;l<=a;l++,k+=f){c.push(-g,0,k,g,0,k);c.push(k,0,-g,k,0,g);var m=l===e?b:d;m.toArray(h,n);n+=3;m.toArray(h,n);n+=3;m.toArray(h,n);n+=3;m.toArray(h,n);n+=3}a=new G;a.setAttribute("position",new H(c,3));a.setAttribute("color",
|
|
|
-new H(h,3));b=new pa({vertexColors:!0,toneMapped:!1});sa.call(this,a,b);this.type="GridHelper"}function Ff(c,a,b,d,e,f){c=c||10;a=a||16;b=b||8;d=d||64;e=new x(void 0!==e?e:4473924);f=new x(void 0!==f?f:8947848);for(var g=[],h=[],l=0;l<=a;l++){var n=l/a*2*Math.PI,k=Math.sin(n)*c;n=Math.cos(n)*c;g.push(0,0,0);g.push(k,0,n);k=l&1?e:f;h.push(k.r,k.g,k.b);h.push(k.r,k.g,k.b)}for(a=0;a<=b;a++)for(l=a&1?e:f,k=c-c/b*a,n=0;n<d;n++){var m=n/d*2*Math.PI,q=Math.sin(m)*k;m=Math.cos(m)*k;g.push(q,0,m);h.push(l.r,
|
|
|
-l.g,l.b);m=(n+1)/d*2*Math.PI;q=Math.sin(m)*k;m=Math.cos(m)*k;g.push(q,0,m);h.push(l.r,l.g,l.b)}c=new G;c.setAttribute("position",new H(g,3));c.setAttribute("color",new H(h,3));g=new pa({vertexColors:!0,toneMapped:!1});sa.call(this,c,g);this.type="PolarGridHelper"}function wd(c,a,b){D.call(this);this.light=c;this.light.updateMatrixWorld();this.matrix=c.matrixWorld;this.matrixAutoUpdate=!1;this.color=b;void 0===a&&(a=1);c=new G;c.setAttribute("position",new H([-a,a,0,a,a,0,a,-a,0,-a,-a,0,-a,a,0],3));
|
|
|
-a=new pa({fog:!1,toneMapped:!1});this.lightPlane=new Na(c,a);this.add(this.lightPlane);c=new G;c.setAttribute("position",new H([0,0,0,0,0,1],3));this.targetLine=new Na(c,a);this.add(this.targetLine);this.update()}function Ee(c){function a(a,c,d){b(a,d);b(c,d)}function b(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 G,e=new pa({color:16777215,vertexColors:!0,toneMapped:!1}),f=[],g=[],h={},l=new x(16755200),n=new x(16711680),k=new x(43775),m=new x(16777215),
|
|
|
-q=new x(3355443);a("n1","n2",l);a("n2","n4",l);a("n4","n3",l);a("n3","n1",l);a("f1","f2",l);a("f2","f4",l);a("f4","f3",l);a("f3","f1",l);a("n1","f1",l);a("n2","f2",l);a("n3","f3",l);a("n4","f4",l);a("p","n1",n);a("p","n2",n);a("p","n3",n);a("p","n4",n);a("u1","u2",k);a("u2","u3",k);a("u3","u1",k);a("c","t",m);a("p","c",q);a("cn1","cn2",q);a("cn3","cn4",q);a("cf1","cf2",q);a("cf3","cf4",q);d.setAttribute("position",new H(f,3));d.setAttribute("color",new H(g,3));sa.call(this,d,e);this.type="CameraHelper";
|
|
|
+function oi(c,a){return c.distance-a.distance}function Wg(c,a,b,d){c.layers.test(a.layers)&&c.raycast(a,b);if(!0===d){c=c.children;d=0;for(var e=c.length;d<e;d++)Wg(c[d],a,b,!0)}}function Ce(c){F.call(this);this.material=c;this.render=function(){};this.hasUvs=this.hasColors=this.hasNormals=this.hasPositions=!1;this.uvArray=this.colorArray=this.normalArray=this.positionArray=null;this.count=0}function sd(c,a){F.call(this);this.light=c;this.light.updateMatrixWorld();this.matrix=c.matrixWorld;this.matrixAutoUpdate=
|
|
|
+!1;this.color=a;c=new G;a=[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 b=0,d=1;32>b;b++,d++){var e=b/32*Math.PI*2,f=d/32*Math.PI*2;a.push(Math.cos(e),Math.sin(e),1,Math.cos(f),Math.sin(f),1)}c.setAttribute("position",new I(a,3));a=new pa({fog:!1,toneMapped:!1});this.cone=new sa(c,a);this.add(this.cone);this.update()}function td(c){for(var a=pi(c),b=new G,d=[],e=[],f=new x(0,0,1),g=new x(0,1,0),h=0;h<a.length;h++){var l=a[h];l.parent&&l.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))}b.setAttribute("position",new I(d,3));b.setAttribute("color",new I(e,3));d=new pa({vertexColors:!0,depthTest:!1,depthWrite:!1,toneMapped:!1,transparent:!0});sa.call(this,b,d);this.type="SkeletonHelper";this.isSkeletonHelper=!0;this.root=c;this.bones=a;this.matrix=c.matrixWorld;this.matrixAutoUpdate=!1}function pi(c){var a=[];c&&c.isBone&&a.push(c);for(var b=0;b<c.children.length;b++)a.push.apply(a,pi(c.children[b]));return a}function ud(c,a,b){a=new tc(a,
|
|
|
+4,2);var d=new Za({wireframe:!0,fog:!1,toneMapped:!1});na.call(this,a,d);this.light=c;this.light.updateMatrixWorld();this.color=b;this.type="PointLightHelper";this.matrix=this.light.matrixWorld;this.matrixAutoUpdate=!1;this.update()}function vd(c,a,b){F.call(this);this.light=c;this.light.updateMatrixWorld();this.matrix=c.matrixWorld;this.matrixAutoUpdate=!1;this.color=b;c=new qc(a);c.rotateY(.5*Math.PI);this.material=new Za({wireframe:!0,fog:!1,toneMapped:!1});void 0===this.color&&(this.material.vertexColors=
|
|
|
+!0);a=c.getAttribute("position");a=new Float32Array(3*a.count);c.setAttribute("color",new N(a,3));this.add(new na(c,this.material));this.update()}function De(c,a,b,d){c=c||10;a=a||10;b=new x(void 0!==b?b:4473924);d=new x(void 0!==d?d:8947848);var e=a/2,f=c/a,g=c/2;c=[];for(var h=[],l=0,n=0,k=-g;l<=a;l++,k+=f){c.push(-g,0,k,g,0,k);c.push(k,0,-g,k,0,g);var m=l===e?b:d;m.toArray(h,n);n+=3;m.toArray(h,n);n+=3;m.toArray(h,n);n+=3;m.toArray(h,n);n+=3}a=new G;a.setAttribute("position",new I(c,3));a.setAttribute("color",
|
|
|
+new I(h,3));b=new pa({vertexColors:!0,toneMapped:!1});sa.call(this,a,b);this.type="GridHelper"}function Ff(c,a,b,d,e,f){c=c||10;a=a||16;b=b||8;d=d||64;e=new x(void 0!==e?e:4473924);f=new x(void 0!==f?f:8947848);for(var g=[],h=[],l=0;l<=a;l++){var n=l/a*2*Math.PI,k=Math.sin(n)*c;n=Math.cos(n)*c;g.push(0,0,0);g.push(k,0,n);k=l&1?e:f;h.push(k.r,k.g,k.b);h.push(k.r,k.g,k.b)}for(a=0;a<=b;a++)for(l=a&1?e:f,k=c-c/b*a,n=0;n<d;n++){var m=n/d*2*Math.PI,q=Math.sin(m)*k;m=Math.cos(m)*k;g.push(q,0,m);h.push(l.r,
|
|
|
+l.g,l.b);m=(n+1)/d*2*Math.PI;q=Math.sin(m)*k;m=Math.cos(m)*k;g.push(q,0,m);h.push(l.r,l.g,l.b)}c=new G;c.setAttribute("position",new I(g,3));c.setAttribute("color",new I(h,3));g=new pa({vertexColors:!0,toneMapped:!1});sa.call(this,c,g);this.type="PolarGridHelper"}function wd(c,a,b){F.call(this);this.light=c;this.light.updateMatrixWorld();this.matrix=c.matrixWorld;this.matrixAutoUpdate=!1;this.color=b;void 0===a&&(a=1);c=new G;c.setAttribute("position",new I([-a,a,0,a,a,0,a,-a,0,-a,-a,0,-a,a,0],3));
|
|
|
+a=new pa({fog:!1,toneMapped:!1});this.lightPlane=new Na(c,a);this.add(this.lightPlane);c=new G;c.setAttribute("position",new I([0,0,0,0,0,1],3));this.targetLine=new Na(c,a);this.add(this.targetLine);this.update()}function Ee(c){function a(a,c,d){b(a,d);b(c,d)}function b(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 G,e=new pa({color:16777215,vertexColors:!0,toneMapped:!1}),f=[],g=[],h={},l=new x(16755200),n=new x(16711680),k=new x(43775),m=new x(16777215),
|
|
|
+q=new x(3355443);a("n1","n2",l);a("n2","n4",l);a("n4","n3",l);a("n3","n1",l);a("f1","f2",l);a("f2","f4",l);a("f4","f3",l);a("f3","f1",l);a("n1","f1",l);a("n2","f2",l);a("n3","f3",l);a("n4","f4",l);a("p","n1",n);a("p","n2",n);a("p","n3",n);a("p","n4",n);a("u1","u2",k);a("u2","u3",k);a("u3","u1",k);a("c","t",m);a("p","c",q);a("cn1","cn2",q);a("cn3","cn4",q);a("cf1","cf2",q);a("cf3","cf4",q);d.setAttribute("position",new I(f,3));d.setAttribute("color",new I(g,3));sa.call(this,d,e);this.type="CameraHelper";
|
|
|
this.camera=c;this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix();this.matrix=c.matrixWorld;this.matrixAutoUpdate=!1;this.pointMap=h;this.update()}function va(c,a,b,d,e,f,g){Gf.set(e,f,g).unproject(d);c=a[c];if(void 0!==c)for(b=b.getAttribute("position"),a=0,d=c.length;a<d;a++)b.setXYZ(c[a],Gf.x,Gf.y,Gf.z)}function bc(c,a){void 0===a&&(a=16776960);var b=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]),d=new Float32Array(24),e=new G;e.setIndex(new N(b,1));e.setAttribute("position",
|
|
|
-new N(d,3));sa.call(this,e,new pa({color:a,toneMapped:!1}));this.object=c;this.type="BoxHelper";this.matrixAutoUpdate=!1;this.update()}function Fe(c,a){void 0===a&&(a=16776960);var b=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]),d=new G;d.setIndex(new N(b,1));d.setAttribute("position",new H([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));sa.call(this,d,new pa({color:a,toneMapped:!1}));this.box=c;this.type="Box3Helper";this.geometry.computeBoundingSphere()}function Ge(c,
|
|
|
-a,b){b=void 0!==b?b:16776960;var d=new G;d.setAttribute("position",new H([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));d.computeBoundingSphere();Na.call(this,d,new pa({color:b,toneMapped:!1}));this.type="PlaneHelper";this.plane=c;this.size=void 0===a?1:a;c=new G;c.setAttribute("position",new H([1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1],3));c.computeBoundingSphere();this.add(new na(c,new Za({color:b,opacity:.2,transparent:!0,depthWrite:!1,toneMapped:!1})))}function cc(c,
|
|
|
-a,b,d,e,f){D.call(this);this.type="ArrowHelper";void 0===c&&(c=new m(0,0,1));void 0===a&&(a=new m(0,0,0));void 0===b&&(b=1);void 0===d&&(d=16776960);void 0===e&&(e=.2*b);void 0===f&&(f=.2*e);void 0===Hf&&(Hf=new G,Hf.setAttribute("position",new H([0,0,0,0,1,0],3)),Xg=new Cb(0,.5,1,5,1),Xg.translate(0,-.5,0));this.position.copy(a);this.line=new Na(Hf,new pa({color:d,toneMapped:!1}));this.line.matrixAutoUpdate=!1;this.add(this.line);this.cone=new na(Xg,new Za({color:d,toneMapped:!1}));this.cone.matrixAutoUpdate=
|
|
|
-!1;this.add(this.cone);this.setDirection(c);this.setLength(b,e,f)}function He(c){c=c||1;var a=[0,0,0,c,0,0,0,0,0,0,c,0,0,0,0,0,0,c];c=new G;c.setAttribute("position",new H(a,3));c.setAttribute("color",new H([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],3));a=new pa({vertexColors:!0,toneMapped:!1});sa.call(this,c,a);this.type="AxesHelper"}function qi(c){c=new Sa(3*vb,3*vb,c);c.texture.mapping=306;c.texture.name="PMREM.cubeUv";c.scissorTest=!0;return c}function If(c,a,b,d,e){c.viewport.set(a,b,d,e);c.scissor.set(a,
|
|
|
+new N(d,3));sa.call(this,e,new pa({color:a,toneMapped:!1}));this.object=c;this.type="BoxHelper";this.matrixAutoUpdate=!1;this.update()}function Fe(c,a){void 0===a&&(a=16776960);var b=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]),d=new G;d.setIndex(new N(b,1));d.setAttribute("position",new I([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));sa.call(this,d,new pa({color:a,toneMapped:!1}));this.box=c;this.type="Box3Helper";this.geometry.computeBoundingSphere()}function Ge(c,
|
|
|
+a,b){b=void 0!==b?b:16776960;var d=new G;d.setAttribute("position",new I([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));d.computeBoundingSphere();Na.call(this,d,new pa({color:b,toneMapped:!1}));this.type="PlaneHelper";this.plane=c;this.size=void 0===a?1:a;c=new G;c.setAttribute("position",new I([1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1],3));c.computeBoundingSphere();this.add(new na(c,new Za({color:b,opacity:.2,transparent:!0,depthWrite:!1,toneMapped:!1})))}function cc(c,
|
|
|
+a,b,d,e,f){F.call(this);this.type="ArrowHelper";void 0===c&&(c=new m(0,0,1));void 0===a&&(a=new m(0,0,0));void 0===b&&(b=1);void 0===d&&(d=16776960);void 0===e&&(e=.2*b);void 0===f&&(f=.2*e);void 0===Hf&&(Hf=new G,Hf.setAttribute("position",new I([0,0,0,0,1,0],3)),Xg=new Cb(0,.5,1,5,1),Xg.translate(0,-.5,0));this.position.copy(a);this.line=new Na(Hf,new pa({color:d,toneMapped:!1}));this.line.matrixAutoUpdate=!1;this.add(this.line);this.cone=new na(Xg,new Za({color:d,toneMapped:!1}));this.cone.matrixAutoUpdate=
|
|
|
+!1;this.add(this.cone);this.setDirection(c);this.setLength(b,e,f)}function He(c){c=c||1;var a=[0,0,0,c,0,0,0,0,0,0,c,0,0,0,0,0,0,c];c=new G;c.setAttribute("position",new I(a,3));c.setAttribute("color",new I([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],3));a=new pa({vertexColors:!0,toneMapped:!1});sa.call(this,c,a);this.type="AxesHelper"}function qi(c){c=new Sa(3*vb,3*vb,c);c.texture.mapping=306;c.texture.name="PMREM.cubeUv";c.scissorTest=!0;return c}function If(c,a,b,d,e){c.viewport.set(a,b,d,e);c.scissor.set(a,
|
|
|
b,d,e)}function ri(){var c=new p(1,1);return new Db({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null},texelSize:{value:c},inputEncoding:{value:wb[3E3]},outputEncoding:{value:wb[3E3]}},vertexShader:Yg(),fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\t\t\tuniform vec2 texelSize;\n\n\t\t\t"+Zg()+"\n\n\t\t\t#include <common>\n\n\t\t\tvoid main() {\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\n\t\t\t\tvec3 outputDirection = normalize( vOutputDirection );\n\t\t\t\tvec2 uv = equirectUv( outputDirection );\n\n\t\t\t\tvec2 f = fract( uv / texelSize - 0.5 );\n\t\t\t\tuv -= f * texelSize;\n\t\t\t\tvec3 tl = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb;\n\t\t\t\tuv.x += texelSize.x;\n\t\t\t\tvec3 tr = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb;\n\t\t\t\tuv.y += texelSize.y;\n\t\t\t\tvec3 br = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb;\n\t\t\t\tuv.x -= texelSize.x;\n\t\t\t\tvec3 bl = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb;\n\n\t\t\t\tvec3 tm = mix( tl, tr, f.x );\n\t\t\t\tvec3 bm = mix( bl, br, f.x );\n\t\t\t\tgl_FragColor.rgb = mix( tm, bm, f.y );\n\n\t\t\t\tgl_FragColor = linearToOutputTexel( gl_FragColor );\n\n\t\t\t}\n\t\t",
|
|
|
blending:0,depthTest:!1,depthWrite:!1})}function si(){return new Db({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},inputEncoding:{value:wb[3E3]},outputEncoding:{value:wb[3E3]}},vertexShader:Yg(),fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform samplerCube envMap;\n\n\t\t\t"+Zg()+"\n\n\t\t\tvoid main() {\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t\t\t\tgl_FragColor.rgb = envMapTexelToLinear( textureCube( envMap, vec3( - vOutputDirection.x, vOutputDirection.yz ) ) ).rgb;\n\t\t\t\tgl_FragColor = linearToOutputTexel( gl_FragColor );\n\n\t\t\t}\n\t\t",
|
|
|
blending:0,depthTest:!1,depthWrite:!1})}function Yg(){return"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute vec3 position;\n\t\tattribute vec2 uv;\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t"}
|
|
@@ -448,12 +448,12 @@ d=1/Bd.setFromMatrixColumn(c,0).length(),e=1/Bd.setFromMatrixColumn(c,1).length(
|
|
|
c.x,d=c.y,e=c.z,f=Math.cos(b);b=Math.sin(b);var g=Math.cos(d);d=Math.sin(d);var h=Math.cos(e);e=Math.sin(e);if("XYZ"===c.order){c=f*h;var l=f*e,n=b*h,k=b*e;a[0]=g*h;a[4]=-g*e;a[8]=d;a[1]=l+n*d;a[5]=c-k*d;a[9]=-b*g;a[2]=k-c*d;a[6]=n+l*d;a[10]=f*g}else"YXZ"===c.order?(c=g*h,l=g*e,n=d*h,k=d*e,a[0]=c+k*b,a[4]=n*b-l,a[8]=f*d,a[1]=f*e,a[5]=f*h,a[9]=-b,a[2]=l*b-n,a[6]=k+c*b,a[10]=f*g):"ZXY"===c.order?(c=g*h,l=g*e,n=d*h,k=d*e,a[0]=c-k*b,a[4]=-f*e,a[8]=n+l*b,a[1]=l+n*b,a[5]=f*h,a[9]=k-c*b,a[2]=-f*d,a[6]=b,
|
|
|
a[10]=f*g):"ZYX"===c.order?(c=f*h,l=f*e,n=b*h,k=b*e,a[0]=g*h,a[4]=n*d-l,a[8]=c*d+k,a[1]=g*e,a[5]=k*d+c,a[9]=l*d-n,a[2]=-d,a[6]=b*g,a[10]=f*g):"YZX"===c.order?(c=f*g,l=f*d,n=b*g,k=b*d,a[0]=g*h,a[4]=k-c*e,a[8]=n*e+l,a[1]=e,a[5]=f*h,a[9]=-b*h,a[2]=-d*h,a[6]=l*e+n,a[10]=c-k*e):"XZY"===c.order&&(c=f*g,l=f*d,n=b*g,k=b*d,a[0]=g*h,a[4]=-e,a[8]=d*h,a[1]=c*e+k,a[5]=f*h,a[9]=l*e-n,a[2]=n*e-l,a[6]=b*h,a[10]=k*e+c);a[3]=0;a[7]=0;a[11]=0;a[12]=0;a[13]=0;a[14]=0;a[15]=1;return this};z.prototype.makeRotationFromQuaternion=
|
|
|
function(c){return this.compose(Nk,c,Ok)};z.prototype.lookAt=function(c,a,b){var d=this.elements;Ja.subVectors(c,a);0===Ja.lengthSq()&&(Ja.z=1);Ja.normalize();hc.crossVectors(b,Ja);0===hc.lengthSq()&&(1===Math.abs(b.z)?Ja.x+=1E-4:Ja.z+=1E-4,Ja.normalize(),hc.crossVectors(b,Ja));hc.normalize();Of.crossVectors(Ja,hc);d[0]=hc.x;d[4]=Of.x;d[8]=Ja.x;d[1]=hc.y;d[5]=Of.y;d[9]=Ja.y;d[2]=hc.z;d[6]=Of.z;d[10]=Ja.z;return this};z.prototype.multiply=function(c,a){return void 0!==a?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),
|
|
|
-this.multiplyMatrices(c,a)):this.multiplyMatrices(this,c)};z.prototype.premultiply=function(c){return this.multiplyMatrices(c,this)};z.prototype.multiplyMatrices=function(c,a){var b=c.elements,d=a.elements;a=this.elements;c=b[0];var e=b[4],f=b[8],g=b[12],h=b[1],l=b[5],n=b[9],k=b[13],m=b[2],q=b[6],v=b[10],t=b[14],w=b[3],p=b[7],y=b[11];b=b[15];var x=d[0],C=d[4],z=d[8],F=d[12],A=d[1],K=d[5],B=d[9],D=d[13],G=d[2],H=d[6],I=d[10],L=d[14],M=d[3],N=d[7],O=d[11];d=d[15];a[0]=c*x+e*A+f*G+g*M;a[4]=c*C+e*K+f*
|
|
|
-H+g*N;a[8]=c*z+e*B+f*I+g*O;a[12]=c*F+e*D+f*L+g*d;a[1]=h*x+l*A+n*G+k*M;a[5]=h*C+l*K+n*H+k*N;a[9]=h*z+l*B+n*I+k*O;a[13]=h*F+l*D+n*L+k*d;a[2]=m*x+q*A+v*G+t*M;a[6]=m*C+q*K+v*H+t*N;a[10]=m*z+q*B+v*I+t*O;a[14]=m*F+q*D+v*L+t*d;a[3]=w*x+p*A+y*G+b*M;a[7]=w*C+p*K+y*H+b*N;a[11]=w*z+p*B+y*I+b*O;a[15]=w*F+p*D+y*L+b*d;return this};z.prototype.multiplyScalar=function(c){var a=this.elements;a[0]*=c;a[4]*=c;a[8]*=c;a[12]*=c;a[1]*=c;a[5]*=c;a[9]*=c;a[13]*=c;a[2]*=c;a[6]*=c;a[10]*=c;a[14]*=c;a[3]*=c;a[7]*=c;a[11]*=
|
|
|
+this.multiplyMatrices(c,a)):this.multiplyMatrices(this,c)};z.prototype.premultiply=function(c){return this.multiplyMatrices(c,this)};z.prototype.multiplyMatrices=function(c,a){var b=c.elements,d=a.elements;a=this.elements;c=b[0];var e=b[4],f=b[8],g=b[12],h=b[1],l=b[5],n=b[9],k=b[13],m=b[2],q=b[6],v=b[10],t=b[14],w=b[3],p=b[7],y=b[11];b=b[15];var x=d[0],D=d[4],z=d[8],H=d[12],A=d[1],M=d[5],B=d[9],F=d[13],G=d[2],I=d[6],J=d[10],K=d[14],L=d[3],N=d[7],O=d[11];d=d[15];a[0]=c*x+e*A+f*G+g*L;a[4]=c*D+e*M+f*
|
|
|
+I+g*N;a[8]=c*z+e*B+f*J+g*O;a[12]=c*H+e*F+f*K+g*d;a[1]=h*x+l*A+n*G+k*L;a[5]=h*D+l*M+n*I+k*N;a[9]=h*z+l*B+n*J+k*O;a[13]=h*H+l*F+n*K+k*d;a[2]=m*x+q*A+v*G+t*L;a[6]=m*D+q*M+v*I+t*N;a[10]=m*z+q*B+v*J+t*O;a[14]=m*H+q*F+v*K+t*d;a[3]=w*x+p*A+y*G+b*L;a[7]=w*D+p*M+y*I+b*N;a[11]=w*z+p*B+y*J+b*O;a[15]=w*H+p*F+y*K+b*d;return this};z.prototype.multiplyScalar=function(c){var a=this.elements;a[0]*=c;a[4]*=c;a[8]*=c;a[12]*=c;a[1]*=c;a[5]*=c;a[9]*=c;a[13]*=c;a[2]*=c;a[6]*=c;a[10]*=c;a[14]*=c;a[3]*=c;a[7]*=c;a[11]*=
|
|
|
c;a[15]*=c;return this};z.prototype.determinant=function(){var c=this.elements,a=c[0],b=c[4],d=c[8],e=c[12],f=c[1],g=c[5],h=c[9],l=c[13],n=c[2],k=c[6],m=c[10],q=c[14];return c[3]*(+e*h*k-d*l*k-e*g*m+b*l*m+d*g*q-b*h*q)+c[7]*(+a*h*q-a*l*m+e*f*m-d*f*q+d*l*n-e*h*n)+c[11]*(+a*l*k-a*g*q-e*f*k+b*f*q+e*g*n-b*l*n)+c[15]*(-d*g*n-a*h*k+a*g*m+d*f*k-b*f*m+b*h*n)};z.prototype.transpose=function(){var c=this.elements;var a=c[1];c[1]=c[4];c[4]=a;a=c[2];c[2]=c[8];c[8]=a;a=c[6];c[6]=c[9];c[9]=a;a=c[3];c[3]=c[12];c[12]=
|
|
|
a;a=c[7];c[7]=c[13];c[13]=a;a=c[11];c[11]=c[14];c[14]=a;return this};z.prototype.setPosition=function(c,a,b){var d=this.elements;c.isVector3?(d[12]=c.x,d[13]=c.y,d[14]=c.z):(d[12]=c,d[13]=a,d[14]=b);return this};z.prototype.getInverse=function(c,a){void 0!==a&&console.warn("THREE.Matrix4: .getInverse() can no longer be configured to throw on degenerate.");a=this.elements;var b=c.elements;c=b[0];var d=b[1],e=b[2],f=b[3],g=b[4],h=b[5],l=b[6],n=b[7],k=b[8],m=b[9],q=b[10],v=b[11],t=b[12],w=b[13],p=b[14];
|
|
|
-b=b[15];var y=m*p*n-w*q*n+w*l*v-h*p*v-m*l*b+h*q*b,x=t*q*n-k*p*n-t*l*v+g*p*v+k*l*b-g*q*b,C=k*w*n-t*m*n+t*h*v-g*w*v-k*h*b+g*m*b,z=t*m*l-k*w*l-t*h*q+g*w*q+k*h*p-g*m*p,F=c*y+d*x+e*C+f*z;if(0===F)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);F=1/F;a[0]=y*F;a[1]=(w*q*f-m*p*f-w*e*v+d*p*v+m*e*b-d*q*b)*F;a[2]=(h*p*f-w*l*f+w*e*n-d*p*n-h*e*b+d*l*b)*F;a[3]=(m*l*f-h*q*f-m*e*n+d*q*n+h*e*v-d*l*v)*F;a[4]=x*F;a[5]=(k*p*f-t*q*f+t*e*v-c*p*v-k*e*b+c*q*b)*F;a[6]=(t*l*f-g*p*f-t*e*n+c*p*n+g*e*b-c*l*b)*F;a[7]=(g*q*f-
|
|
|
-k*l*f+k*e*n-c*q*n-g*e*v+c*l*v)*F;a[8]=C*F;a[9]=(t*m*f-k*w*f-t*d*v+c*w*v+k*d*b-c*m*b)*F;a[10]=(g*w*f-t*h*f+t*d*n-c*w*n-g*d*b+c*h*b)*F;a[11]=(k*h*f-g*m*f-k*d*n+c*m*n+g*d*v-c*h*v)*F;a[12]=z*F;a[13]=(k*w*e-t*m*e+t*d*q-c*w*q-k*d*p+c*m*p)*F;a[14]=(t*h*e-g*w*e-t*d*l+c*w*l+g*d*p-c*h*p)*F;a[15]=(g*m*e-k*h*e+k*d*l-c*m*l-g*d*q+c*h*q)*F;return this};z.prototype.scale=function(c){var a=this.elements,b=c.x,d=c.y;c=c.z;a[0]*=b;a[4]*=d;a[8]*=c;a[1]*=b;a[5]*=d;a[9]*=c;a[2]*=b;a[6]*=d;a[10]*=c;a[3]*=b;a[7]*=d;a[11]*=
|
|
|
+b=b[15];var y=m*p*n-w*q*n+w*l*v-h*p*v-m*l*b+h*q*b,x=t*q*n-k*p*n-t*l*v+g*p*v+k*l*b-g*q*b,D=k*w*n-t*m*n+t*h*v-g*w*v-k*h*b+g*m*b,z=t*m*l-k*w*l-t*h*q+g*w*q+k*h*p-g*m*p,H=c*y+d*x+e*D+f*z;if(0===H)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);H=1/H;a[0]=y*H;a[1]=(w*q*f-m*p*f-w*e*v+d*p*v+m*e*b-d*q*b)*H;a[2]=(h*p*f-w*l*f+w*e*n-d*p*n-h*e*b+d*l*b)*H;a[3]=(m*l*f-h*q*f-m*e*n+d*q*n+h*e*v-d*l*v)*H;a[4]=x*H;a[5]=(k*p*f-t*q*f+t*e*v-c*p*v-k*e*b+c*q*b)*H;a[6]=(t*l*f-g*p*f-t*e*n+c*p*n+g*e*b-c*l*b)*H;a[7]=(g*q*f-
|
|
|
+k*l*f+k*e*n-c*q*n-g*e*v+c*l*v)*H;a[8]=D*H;a[9]=(t*m*f-k*w*f-t*d*v+c*w*v+k*d*b-c*m*b)*H;a[10]=(g*w*f-t*h*f+t*d*n-c*w*n-g*d*b+c*h*b)*H;a[11]=(k*h*f-g*m*f-k*d*n+c*m*n+g*d*v-c*h*v)*H;a[12]=z*H;a[13]=(k*w*e-t*m*e+t*d*q-c*w*q-k*d*p+c*m*p)*H;a[14]=(t*h*e-g*w*e-t*d*l+c*w*l+g*d*p-c*h*p)*H;a[15]=(g*m*e-k*h*e+k*d*l-c*m*l-g*d*q+c*h*q)*H;return this};z.prototype.scale=function(c){var a=this.elements,b=c.x,d=c.y;c=c.z;a[0]*=b;a[4]*=d;a[8]*=c;a[1]*=b;a[5]*=d;a[9]*=c;a[2]*=b;a[6]*=d;a[10]*=c;a[3]*=b;a[7]*=d;a[11]*=
|
|
|
c;return this};z.prototype.getMaxScaleOnAxis=function(){var c=this.elements;return Math.sqrt(Math.max(c[0]*c[0]+c[1]*c[1]+c[2]*c[2],c[4]*c[4]+c[5]*c[5]+c[6]*c[6],c[8]*c[8]+c[9]*c[9]+c[10]*c[10]))};z.prototype.makeTranslation=function(c,a,b){this.set(1,0,0,c,0,1,0,a,0,0,1,b,0,0,0,1);return this};z.prototype.makeRotationX=function(c){var a=Math.cos(c);c=Math.sin(c);this.set(1,0,0,0,0,a,-c,0,0,c,a,0,0,0,0,1);return this};z.prototype.makeRotationY=function(c){var a=Math.cos(c);c=Math.sin(c);this.set(a,
|
|
|
0,c,0,0,1,0,0,-c,0,a,0,0,0,0,1);return this};z.prototype.makeRotationZ=function(c){var a=Math.cos(c);c=Math.sin(c);this.set(a,-c,0,0,c,a,0,0,0,0,1,0,0,0,0,1);return this};z.prototype.makeRotationAxis=function(c,a){var b=Math.cos(a);a=Math.sin(a);var d=1-b,e=c.x,f=c.y;c=c.z;var g=d*e,h=d*f;this.set(g*e+b,g*f-a*c,g*c+a*f,0,g*f+a*c,h*f+b,h*c-a*e,0,g*c-a*f,h*c+a*e,d*c*c+b,0,0,0,0,1);return this};z.prototype.makeScale=function(c,a,b){this.set(c,0,0,0,0,a,0,0,0,0,b,0,0,0,0,1);return this};z.prototype.makeShear=
|
|
|
function(c,a,b){this.set(1,a,b,0,c,1,b,0,c,a,1,0,0,0,0,1);return this};z.prototype.compose=function(c,a,b){var d=this.elements,e=a._x,f=a._y,g=a._z,h=a._w,l=e+e,k=f+f,r=g+g;a=e*l;var m=e*k;e*=r;var q=f*k;f*=r;g*=r;l*=h;k*=h;h*=r;r=b.x;var v=b.y;b=b.z;d[0]=(1-(q+g))*r;d[1]=(m+h)*r;d[2]=(e-k)*r;d[3]=0;d[4]=(m-h)*v;d[5]=(1-(a+g))*v;d[6]=(f+l)*v;d[7]=0;d[8]=(e+k)*b;d[9]=(f-l)*b;d[10]=(1-(a+q))*b;d[11]=0;d[12]=c.x;d[13]=c.y;d[14]=c.z;d[15]=1;return this};z.prototype.decompose=function(c,a,b){var d=this.elements,
|
|
@@ -467,8 +467,8 @@ a),this._z=0);break;case "ZXY":this._x=Math.asin(e(q,-1,1));.9999999>Math.abs(q)
|
|
|
Math.asin(-e(g,-1,1));.9999999>Math.abs(g)?(this._x=Math.atan2(q,k),this._y=Math.atan2(h,a)):(this._x=Math.atan2(-r,f),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+b)}this._order=b;!1!==d&&this._onChangeCallback();return this};ra.prototype.setFromQuaternion=function(a,b,d){wi.makeRotationFromQuaternion(a);return this.setFromRotationMatrix(wi,b,d)};ra.prototype.setFromVector3=function(a,b){return this.set(a.x,a.y,a.z,b||this._order)};
|
|
|
ra.prototype.reorder=function(a){xi.setFromEuler(this);return this.setFromQuaternion(xi,a)};ra.prototype.equals=function(a){return a._x===this._x&&a._y===this._y&&a._z===this._z&&a._order===this._order};ra.prototype.fromArray=function(a){this._x=a[0];this._y=a[1];this._z=a[2];void 0!==a[3]&&(this._order=a[3]);this._onChangeCallback();return this};ra.prototype.toArray=function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);a[b]=this._x;a[b+1]=this._y;a[b+2]=this._z;a[b+3]=this._order;return a};ra.prototype.toVector3=
|
|
|
function(a){return a?a.set(this._x,this._y,this._z):new m(this._x,this._y,this._z)};ra.prototype._onChange=function(a){this._onChangeCallback=a;return this};ra.prototype._onChangeCallback=function(){};Object.defineProperties(ra.prototype,Ib);ra.DefaultOrder="XYZ";ra.RotationOrders="XYZ YZX ZXY XZY YXZ ZYX".split(" ");ra.prototype.isEuler=!0;var wi=new z,xi=new O,nb=function(){this.mask=1};nb.prototype.set=function(a){this.mask=1<<a|0};nb.prototype.enable=function(a){this.mask=this.mask|1<<a|0};nb.prototype.enableAll=
|
|
|
-function(){this.mask=-1};nb.prototype.toggle=function(a){this.mask^=1<<a|0};nb.prototype.disable=function(a){this.mask&=~(1<<a|0)};nb.prototype.disableAll=function(){this.mask=0};nb.prototype.test=function(a){return 0!==(this.mask&a.mask)};var hj=0,yi=new m,Cd=new O,Jb=new z,Pf=new m,Ne=new m,Pk=new m,Qk=new O,zi=new m(1,0,0),Ai=new m(0,1,0),Bi=new m(0,0,1),Rk={type:"added"},Sk={type:"removed"};D.DefaultUp=new m(0,1,0);D.DefaultMatrixAutoUpdate=!0;D.prototype=Object.assign(Object.create(La.prototype),
|
|
|
-{constructor:D,isObject3D:!0,onBeforeRender:function(){},onAfterRender:function(){},applyMatrix4:function(a){this.matrixAutoUpdate&&this.updateMatrix();this.matrix.premultiply(a);this.matrix.decompose(this.position,this.quaternion,this.scale)},applyQuaternion:function(a){this.quaternion.premultiply(a);return this},setRotationFromAxisAngle:function(a,b){this.quaternion.setFromAxisAngle(a,b)},setRotationFromEuler:function(a){this.quaternion.setFromEuler(a,!0)},setRotationFromMatrix:function(a){this.quaternion.setFromRotationMatrix(a)},
|
|
|
+function(){this.mask=-1};nb.prototype.toggle=function(a){this.mask^=1<<a|0};nb.prototype.disable=function(a){this.mask&=~(1<<a|0)};nb.prototype.disableAll=function(){this.mask=0};nb.prototype.test=function(a){return 0!==(this.mask&a.mask)};var hj=0,yi=new m,Cd=new O,Jb=new z,Pf=new m,Ne=new m,Pk=new m,Qk=new O,zi=new m(1,0,0),Ai=new m(0,1,0),Bi=new m(0,0,1),Rk={type:"added"},Sk={type:"removed"};F.DefaultUp=new m(0,1,0);F.DefaultMatrixAutoUpdate=!0;F.prototype=Object.assign(Object.create(La.prototype),
|
|
|
+{constructor:F,isObject3D:!0,onBeforeRender:function(){},onAfterRender:function(){},applyMatrix4:function(a){this.matrixAutoUpdate&&this.updateMatrix();this.matrix.premultiply(a);this.matrix.decompose(this.position,this.quaternion,this.scale)},applyQuaternion:function(a){this.quaternion.premultiply(a);return this},setRotationFromAxisAngle:function(a,b){this.quaternion.setFromAxisAngle(a,b)},setRotationFromEuler:function(a){this.quaternion.setFromEuler(a,!0)},setRotationFromMatrix:function(a){this.quaternion.setFromRotationMatrix(a)},
|
|
|
setRotationFromQuaternion:function(a){this.quaternion.copy(a)},rotateOnAxis:function(a,b){Cd.setFromAxisAngle(a,b);this.quaternion.multiply(Cd);return this},rotateOnWorldAxis:function(a,b){Cd.setFromAxisAngle(a,b);this.quaternion.premultiply(Cd);return this},rotateX:function(a){return this.rotateOnAxis(zi,a)},rotateY:function(a){return this.rotateOnAxis(Ai,a)},rotateZ:function(a){return this.rotateOnAxis(Bi,a)},translateOnAxis:function(a,b){yi.copy(a).applyQuaternion(this.quaternion);this.position.add(yi.multiplyScalar(b));
|
|
|
return this},translateX:function(a){return this.translateOnAxis(zi,a)},translateY:function(a){return this.translateOnAxis(Ai,a)},translateZ:function(a){return this.translateOnAxis(Bi,a)},localToWorld:function(a){return a.applyMatrix4(this.matrixWorld)},worldToLocal:function(a){return a.applyMatrix4(Jb.getInverse(this.matrixWorld))},lookAt:function(a,b,d){a.isVector3?Pf.copy(a):Pf.set(a,b,d);a=this.parent;this.updateWorldMatrix(!0,!1);Ne.setFromMatrixPosition(this.matrixWorld);this.isCamera||this.isLight?
|
|
|
Jb.lookAt(Ne,Pf,this.up):Jb.lookAt(Pf,Ne,this.up);this.quaternion.setFromRotationMatrix(Jb);a&&(Jb.extractRotation(a.matrixWorld),Cd.setFromRotationMatrix(Jb),this.quaternion.premultiply(Cd.inverse()))},add:function(a){if(1<arguments.length){for(var b=0;b<arguments.length;b++)this.add(arguments[b]);return this}if(a===this)return console.error("THREE.Object3D.add: object can't be added as a child of itself.",a),this;a&&a.isObject3D?(null!==a.parent&&a.parent.remove(a),a.parent=this,this.children.push(a),
|
|
@@ -511,7 +511,7 @@ this.b|0)+")"};x.prototype.offsetHSL=function(a,b,d){this.getHSL(Qa);Qa.h+=a;Qa.
|
|
|
x.prototype.multiply=function(a){this.r*=a.r;this.g*=a.g;this.b*=a.b;return this};x.prototype.multiplyScalar=function(a){this.r*=a;this.g*=a;this.b*=a;return this};x.prototype.lerp=function(a,b){this.r+=(a.r-this.r)*b;this.g+=(a.g-this.g)*b;this.b+=(a.b-this.b)*b;return this};x.prototype.lerpHSL=function(a,b){this.getHSL(Qa);a.getHSL(Qf);a=T.lerp(Qa.h,Qf.h,b);var d=T.lerp(Qa.s,Qf.s,b);b=T.lerp(Qa.l,Qf.l,b);this.setHSL(a,d,b);return this};x.prototype.equals=function(a){return a.r===this.r&&a.g===this.g&&
|
|
|
a.b===this.b};x.prototype.fromArray=function(a,b){void 0===b&&(b=0);this.r=a[b];this.g=a[b+1];this.b=a[b+2];return this};x.prototype.toArray=function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);a[b]=this.r;a[b+1]=this.g;a[b+2]=this.b;return a};x.prototype.fromBufferAttribute=function(a,b){this.r=a.getX(b);this.g=a.getY(b);this.b=a.getZ(b);!0===a.normalized&&(this.r/=255,this.g/=255,this.b/=255);return this};x.prototype.toJSON=function(){return this.getHex()};x.NAMES=Di;x.prototype.isColor=!0;x.prototype.r=
|
|
|
1;x.prototype.g=1;x.prototype.b=1;var mc=function(a,b,d,e,f,g){this.a=a;this.b=b;this.c=d;this.normal=e&&e.isVector3?e:new m;this.vertexNormals=Array.isArray(e)?e:[];this.color=f&&f.isColor?f:new x;this.vertexColors=Array.isArray(f)?f:[];this.materialIndex=void 0!==g?g:0};mc.prototype.clone=function(){return(new this.constructor).copy(this)};mc.prototype.copy=function(a){this.a=a.a;this.b=a.b;this.c=a.c;this.normal.copy(a.normal);this.color.copy(a.color);this.materialIndex=a.materialIndex;for(var b=
|
|
|
-0,d=a.vertexNormals.length;b<d;b++)this.vertexNormals[b]=a.vertexNormals[b].clone();b=0;for(d=a.vertexColors.length;b<d;b++)this.vertexColors[b]=a.vertexColors[b].clone();return this};var ij=0;M.prototype=Object.assign(Object.create(La.prototype),{constructor:M,isMaterial:!0,onBeforeCompile:function(){},customProgramCacheKey:function(){return this.onBeforeCompile.toString()},setValues:function(a){if(void 0!==a)for(var b in a){var d=a[b];if(void 0===d)console.warn("THREE.Material: '"+b+"' parameter is undefined.");
|
|
|
+0,d=a.vertexNormals.length;b<d;b++)this.vertexNormals[b]=a.vertexNormals[b].clone();b=0;for(d=a.vertexColors.length;b<d;b++)this.vertexColors[b]=a.vertexColors[b].clone();return this};var ij=0;L.prototype=Object.assign(Object.create(La.prototype),{constructor:L,isMaterial:!0,onBeforeCompile:function(){},customProgramCacheKey:function(){return this.onBeforeCompile.toString()},setValues:function(a){if(void 0!==a)for(var b in a){var d=a[b];if(void 0===d)console.warn("THREE.Material: '"+b+"' parameter is undefined.");
|
|
|
else if("shading"===b)console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=1===d?!0:!1;else{var e=this[b];void 0===e?console.warn("THREE."+this.type+": '"+b+"' is not a property of this material."):e&&e.isColor?e.set(d):e&&e.isVector3&&d&&d.isVector3?e.copy(d):this[b]=d}}},toJSON:function(a){function b(a){var b=[],d;for(d in a){var e=a[d];delete e.metadata;b.push(e)}return b}var d=void 0===a||"string"===typeof a;d&&(a={textures:{},
|
|
|
images:{}});var e={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};e.uuid=this.uuid;e.type=this.type;""!==this.name&&(e.name=this.name);this.color&&this.color.isColor&&(e.color=this.color.getHex());void 0!==this.roughness&&(e.roughness=this.roughness);void 0!==this.metalness&&(e.metalness=this.metalness);this.sheen&&this.sheen.isColor&&(e.sheen=this.sheen.getHex());this.emissive&&this.emissive.isColor&&(e.emissive=this.emissive.getHex());this.emissiveIntensity&&1!==this.emissiveIntensity&&
|
|
|
(e.emissiveIntensity=this.emissiveIntensity);this.specular&&this.specular.isColor&&(e.specular=this.specular.getHex());void 0!==this.shininess&&(e.shininess=this.shininess);void 0!==this.clearcoat&&(e.clearcoat=this.clearcoat);void 0!==this.clearcoatRoughness&&(e.clearcoatRoughness=this.clearcoatRoughness);this.clearcoatMap&&this.clearcoatMap.isTexture&&(e.clearcoatMap=this.clearcoatMap.toJSON(a).uuid);this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(e.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(a).uuid);
|
|
@@ -525,7 +525,7 @@ this.vertexColors&&(e.vertexColors=!0);1>this.opacity&&(e.opacity=this.opacity);
|
|
|
!0);!1===this.visible&&(e.visible=!1);!1===this.toneMapped&&(e.toneMapped=!1);"{}"!==JSON.stringify(this.userData)&&(e.userData=this.userData);d&&(d=b(a.textures),a=b(a.images),0<d.length&&(e.textures=d),0<a.length&&(e.images=a));return e},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.name=a.name;this.fog=a.fog;this.blending=a.blending;this.side=a.side;this.flatShading=a.flatShading;this.vertexColors=a.vertexColors;this.opacity=a.opacity;this.transparent=a.transparent;
|
|
|
this.blendSrc=a.blendSrc;this.blendDst=a.blendDst;this.blendEquation=a.blendEquation;this.blendSrcAlpha=a.blendSrcAlpha;this.blendDstAlpha=a.blendDstAlpha;this.blendEquationAlpha=a.blendEquationAlpha;this.depthFunc=a.depthFunc;this.depthTest=a.depthTest;this.depthWrite=a.depthWrite;this.stencilWriteMask=a.stencilWriteMask;this.stencilFunc=a.stencilFunc;this.stencilRef=a.stencilRef;this.stencilFuncMask=a.stencilFuncMask;this.stencilFail=a.stencilFail;this.stencilZFail=a.stencilZFail;this.stencilZPass=
|
|
|
a.stencilZPass;this.stencilWrite=a.stencilWrite;var b=a.clippingPlanes,d=null;if(null!==b){var e=b.length;d=Array(e);for(var f=0;f!==e;++f)d[f]=b[f].clone()}this.clippingPlanes=d;this.clipIntersection=a.clipIntersection;this.clipShadows=a.clipShadows;this.shadowSide=a.shadowSide;this.colorWrite=a.colorWrite;this.precision=a.precision;this.polygonOffset=a.polygonOffset;this.polygonOffsetFactor=a.polygonOffsetFactor;this.polygonOffsetUnits=a.polygonOffsetUnits;this.dithering=a.dithering;this.alphaTest=
|
|
|
-a.alphaTest;this.premultipliedAlpha=a.premultipliedAlpha;this.visible=a.visible;this.toneMapped=a.toneMapped;this.userData=JSON.parse(JSON.stringify(a.userData));return this},dispose:function(){this.dispatchEvent({type:"dispose"})}});Object.defineProperty(M.prototype,"needsUpdate",{set:function(a){!0===a&&this.version++}});Za.prototype=Object.create(M.prototype);Za.prototype.constructor=Za;Za.prototype.isMeshBasicMaterial=!0;Za.prototype.copy=function(a){M.prototype.copy.call(this,a);this.color.copy(a.color);
|
|
|
+a.alphaTest;this.premultipliedAlpha=a.premultipliedAlpha;this.visible=a.visible;this.toneMapped=a.toneMapped;this.userData=JSON.parse(JSON.stringify(a.userData));return this},dispose:function(){this.dispatchEvent({type:"dispose"})}});Object.defineProperty(L.prototype,"needsUpdate",{set:function(a){!0===a&&this.version++}});Za.prototype=Object.create(L.prototype);Za.prototype.constructor=Za;Za.prototype.isMeshBasicMaterial=!0;Za.prototype.copy=function(a){L.prototype.copy.call(this,a);this.color.copy(a.color);
|
|
|
this.map=a.map;this.lightMap=a.lightMap;this.lightMapIntensity=a.lightMapIntensity;this.aoMap=a.aoMap;this.aoMapIntensity=a.aoMapIntensity;this.specularMap=a.specularMap;this.alphaMap=a.alphaMap;this.envMap=a.envMap;this.combine=a.combine;this.reflectivity=a.reflectivity;this.refractionRatio=a.refractionRatio;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.wireframeLinecap=a.wireframeLinecap;this.wireframeLinejoin=a.wireframeLinejoin;this.skinning=a.skinning;this.morphTargets=
|
|
|
a.morphTargets;return this};var aa=new m,Rf=new p;Object.defineProperty(N.prototype,"needsUpdate",{set:function(a){!0===a&&this.version++}});Object.assign(N.prototype,{isBufferAttribute:!0,onUploadCallback:function(){},setUsage:function(a){this.usage=a;return this},copy:function(a){this.name=a.name;this.array=new a.array.constructor(a.array);this.itemSize=a.itemSize;this.count=a.count;this.normalized=a.normalized;this.usage=a.usage;return this},copyAt:function(a,b,d){a*=this.itemSize;d*=b.itemSize;
|
|
|
for(var e=0,f=this.itemSize;e<f;e++)this.array[a+e]=b.array[d+e];return this},copyArray:function(a){this.array.set(a);return this},copyColorsArray:function(a){for(var b=this.array,d=0,e=0,f=a.length;e<f;e++){var g=a[e];void 0===g&&(console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined",e),g=new x);b[d++]=g.r;b[d++]=g.g;b[d++]=g.b}return this},copyVector2sArray:function(a){for(var b=this.array,d=0,e=0,f=a.length;e<f;e++){var g=a[e];void 0===g&&(console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",
|
|
@@ -534,22 +534,22 @@ b[d++]=g.z;b[d++]=g.w}return this},applyMatrix3:function(a){if(2===this.itemSize
|
|
|
applyNormalMatrix:function(a){for(var b=0,d=this.count;b<d;b++)aa.x=this.getX(b),aa.y=this.getY(b),aa.z=this.getZ(b),aa.applyNormalMatrix(a),this.setXYZ(b,aa.x,aa.y,aa.z);return this},transformDirection:function(a){for(var b=0,d=this.count;b<d;b++)aa.x=this.getX(b),aa.y=this.getY(b),aa.z=this.getZ(b),aa.transformDirection(a),this.setXYZ(b,aa.x,aa.y,aa.z);return this},set:function(a,b){void 0===b&&(b=0);this.array.set(a,b);return this},getX:function(a){return this.array[a*this.itemSize]},setX:function(a,
|
|
|
b){this.array[a*this.itemSize]=b;return this},getY:function(a){return this.array[a*this.itemSize+1]},setY:function(a,b){this.array[a*this.itemSize+1]=b;return this},getZ:function(a){return this.array[a*this.itemSize+2]},setZ:function(a,b){this.array[a*this.itemSize+2]=b;return this},getW:function(a){return this.array[a*this.itemSize+3]},setW:function(a,b){this.array[a*this.itemSize+3]=b;return this},setXY:function(a,b,d){a*=this.itemSize;this.array[a+0]=b;this.array[a+1]=d;return this},setXYZ:function(a,
|
|
|
b,d,e){a*=this.itemSize;this.array[a+0]=b;this.array[a+1]=d;this.array[a+2]=e;return this},setXYZW:function(a,b,d,e,f){a*=this.itemSize;this.array[a+0]=b;this.array[a+1]=d;this.array[a+2]=e;this.array[a+3]=f;return this},onUpload:function(a){this.onUploadCallback=a;return this},clone:function(){return(new this.constructor(this.array,this.itemSize)).copy(this)},toJSON:function(){return{itemSize:this.itemSize,type:this.array.constructor.name,array:Array.prototype.slice.call(this.array),normalized:this.normalized}}});
|
|
|
-Nd.prototype=Object.create(N.prototype);Nd.prototype.constructor=Nd;Od.prototype=Object.create(N.prototype);Od.prototype.constructor=Od;Pd.prototype=Object.create(N.prototype);Pd.prototype.constructor=Pd;Qd.prototype=Object.create(N.prototype);Qd.prototype.constructor=Qd;kc.prototype=Object.create(N.prototype);kc.prototype.constructor=kc;Rd.prototype=Object.create(N.prototype);Rd.prototype.constructor=Rd;lc.prototype=Object.create(N.prototype);lc.prototype.constructor=lc;H.prototype=Object.create(N.prototype);
|
|
|
-H.prototype.constructor=H;Sd.prototype=Object.create(N.prototype);Sd.prototype.constructor=Sd;var kh=function(){this.vertices=[];this.normals=[];this.colors=[];this.uvs=[];this.uvs2=[];this.groups=[];this.morphTargets={};this.skinWeights=[];this.skinIndices=[];this.boundingSphere=this.boundingBox=null;this.groupsNeedUpdate=this.uvsNeedUpdate=this.colorsNeedUpdate=this.normalsNeedUpdate=this.verticesNeedUpdate=!1};kh.prototype.computeGroups=function(a){var b=[],d=void 0,e=a.faces;for(a=0;a<e.length;a++){var f=
|
|
|
+Nd.prototype=Object.create(N.prototype);Nd.prototype.constructor=Nd;Od.prototype=Object.create(N.prototype);Od.prototype.constructor=Od;Pd.prototype=Object.create(N.prototype);Pd.prototype.constructor=Pd;Qd.prototype=Object.create(N.prototype);Qd.prototype.constructor=Qd;kc.prototype=Object.create(N.prototype);kc.prototype.constructor=kc;Rd.prototype=Object.create(N.prototype);Rd.prototype.constructor=Rd;lc.prototype=Object.create(N.prototype);lc.prototype.constructor=lc;I.prototype=Object.create(N.prototype);
|
|
|
+I.prototype.constructor=I;Sd.prototype=Object.create(N.prototype);Sd.prototype.constructor=Sd;var kh=function(){this.vertices=[];this.normals=[];this.colors=[];this.uvs=[];this.uvs2=[];this.groups=[];this.morphTargets={};this.skinWeights=[];this.skinIndices=[];this.boundingSphere=this.boundingBox=null;this.groupsNeedUpdate=this.uvsNeedUpdate=this.colorsNeedUpdate=this.normalsNeedUpdate=this.verticesNeedUpdate=!1};kh.prototype.computeGroups=function(a){var b=[],d=void 0,e=a.faces;for(a=0;a<e.length;a++){var f=
|
|
|
e[a];if(f.materialIndex!==d){d=f.materialIndex;void 0!==g&&(g.count=3*a-g.start,b.push(g));var g={start:3*a,materialIndex:d}}}void 0!==g&&(g.count=3*a-g.start,b.push(g));this.groups=b};kh.prototype.fromGeometry=function(a){var b=a.faces,d=a.vertices,e=a.faceVertexUvs,f=e[0]&&0<e[0].length,g=e[1]&&0<e[1].length,h=a.morphTargets,l=h.length;if(0<l){var k=[];for(var r=0;r<l;r++)k[r]={name:h[r].name,data:[]};this.morphTargets.position=k}r=a.morphNormals;var m=r.length;if(0<m){var q=[];for(var v=0;v<m;v++)q[v]=
|
|
|
-{name:r[v].name,data:[]};this.morphTargets.normal=q}v=a.skinIndices;var t=a.skinWeights,w=v.length===d.length,E=t.length===d.length;0<d.length&&0===b.length&&console.error("THREE.DirectGeometry: Faceless geometries are not supported.");for(var y=0;y<b.length;y++){var x=b[y];this.vertices.push(d[x.a],d[x.b],d[x.c]);var C=x.vertexNormals;3===C.length?this.normals.push(C[0],C[1],C[2]):(C=x.normal,this.normals.push(C,C,C));C=x.vertexColors;3===C.length?this.colors.push(C[0],C[1],C[2]):(C=x.color,this.colors.push(C,
|
|
|
-C,C));!0===f&&(C=e[0][y],void 0!==C?this.uvs.push(C[0],C[1],C[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv ",y),this.uvs.push(new p,new p,new p)));!0===g&&(C=e[1][y],void 0!==C?this.uvs2.push(C[0],C[1],C[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 ",y),this.uvs2.push(new p,new p,new p)));for(C=0;C<l;C++){var z=h[C].vertices;k[C].data.push(z[x.a],z[x.b],z[x.c])}for(C=0;C<m;C++)z=r[C].vertexNormals[y],q[C].data.push(z.a,z.b,z.c);w&&this.skinIndices.push(v[x.a],
|
|
|
-v[x.b],v[x.c]);E&&this.skinWeights.push(t[x.a],t[x.b],t[x.c])}this.computeGroups(a);this.verticesNeedUpdate=a.verticesNeedUpdate;this.normalsNeedUpdate=a.normalsNeedUpdate;this.colorsNeedUpdate=a.colorsNeedUpdate;this.uvsNeedUpdate=a.uvsNeedUpdate;this.groupsNeedUpdate=a.groupsNeedUpdate;null!==a.boundingSphere&&(this.boundingSphere=a.boundingSphere.clone());null!==a.boundingBox&&(this.boundingBox=a.boundingBox.clone());return this};var jj=1,xb=new z,lh=new D,Fd=new m,Ya=new V,Oe=new V,Ba=new m;G.prototype=
|
|
|
+{name:r[v].name,data:[]};this.morphTargets.normal=q}v=a.skinIndices;var t=a.skinWeights,w=v.length===d.length,C=t.length===d.length;0<d.length&&0===b.length&&console.error("THREE.DirectGeometry: Faceless geometries are not supported.");for(var y=0;y<b.length;y++){var x=b[y];this.vertices.push(d[x.a],d[x.b],d[x.c]);var D=x.vertexNormals;3===D.length?this.normals.push(D[0],D[1],D[2]):(D=x.normal,this.normals.push(D,D,D));D=x.vertexColors;3===D.length?this.colors.push(D[0],D[1],D[2]):(D=x.color,this.colors.push(D,
|
|
|
+D,D));!0===f&&(D=e[0][y],void 0!==D?this.uvs.push(D[0],D[1],D[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv ",y),this.uvs.push(new p,new p,new p)));!0===g&&(D=e[1][y],void 0!==D?this.uvs2.push(D[0],D[1],D[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 ",y),this.uvs2.push(new p,new p,new p)));for(D=0;D<l;D++){var z=h[D].vertices;k[D].data.push(z[x.a],z[x.b],z[x.c])}for(D=0;D<m;D++)z=r[D].vertexNormals[y],q[D].data.push(z.a,z.b,z.c);w&&this.skinIndices.push(v[x.a],
|
|
|
+v[x.b],v[x.c]);C&&this.skinWeights.push(t[x.a],t[x.b],t[x.c])}this.computeGroups(a);this.verticesNeedUpdate=a.verticesNeedUpdate;this.normalsNeedUpdate=a.normalsNeedUpdate;this.colorsNeedUpdate=a.colorsNeedUpdate;this.uvsNeedUpdate=a.uvsNeedUpdate;this.groupsNeedUpdate=a.groupsNeedUpdate;null!==a.boundingSphere&&(this.boundingSphere=a.boundingSphere.clone());null!==a.boundingBox&&(this.boundingBox=a.boundingBox.clone());return this};var jj=1,xb=new z,lh=new F,Fd=new m,Ya=new V,Oe=new V,Ba=new m;G.prototype=
|
|
|
Object.assign(Object.create(La.prototype),{constructor:G,isBufferGeometry:!0,getIndex:function(){return this.index},setIndex:function(a){Array.isArray(a)?this.index=new (65535<yh(a)?lc:kc)(a,1):this.index=a},getAttribute:function(a){return this.attributes[a]},setAttribute:function(a,b){this.attributes[a]=b;return this},deleteAttribute:function(a){delete this.attributes[a];return this},addGroup:function(a,b,d){this.groups.push({start:a,count:b,materialIndex:void 0!==d?d:0})},clearGroups:function(){this.groups=
|
|
|
[]},setDrawRange:function(a,b){this.drawRange.start=a;this.drawRange.count=b},applyMatrix4:function(a){var b=this.attributes.position;void 0!==b&&(b.applyMatrix4(a),b.needsUpdate=!0);b=this.attributes.normal;if(void 0!==b){var d=(new X).getNormalMatrix(a);b.applyNormalMatrix(d);b.needsUpdate=!0}b=this.attributes.tangent;void 0!==b&&(b.transformDirection(a),b.needsUpdate=!0);null!==this.boundingBox&&this.computeBoundingBox();null!==this.boundingSphere&&this.computeBoundingSphere();return this},rotateX:function(a){xb.makeRotationX(a);
|
|
|
this.applyMatrix4(xb);return this},rotateY:function(a){xb.makeRotationY(a);this.applyMatrix4(xb);return this},rotateZ:function(a){xb.makeRotationZ(a);this.applyMatrix4(xb);return this},translate:function(a,b,d){xb.makeTranslation(a,b,d);this.applyMatrix4(xb);return this},scale:function(a,b,d){xb.makeScale(a,b,d);this.applyMatrix4(xb);return this},lookAt:function(a){lh.lookAt(a);lh.updateMatrix();this.applyMatrix4(lh.matrix);return this},center:function(){this.computeBoundingBox();this.boundingBox.getCenter(Fd).negate();
|
|
|
-this.translate(Fd.x,Fd.y,Fd.z);return this},setFromObject:function(a){var b=a.geometry;if(a.isPoints||a.isLine){a=new H(3*b.vertices.length,3);var d=new H(3*b.colors.length,3);this.setAttribute("position",a.copyVector3sArray(b.vertices));this.setAttribute("color",d.copyColorsArray(b.colors));b.lineDistances&&b.lineDistances.length===b.vertices.length&&(a=new H(b.lineDistances.length,1),this.setAttribute("lineDistance",a.copyArray(b.lineDistances)));null!==b.boundingSphere&&(this.boundingSphere=b.boundingSphere.clone());
|
|
|
-null!==b.boundingBox&&(this.boundingBox=b.boundingBox.clone())}else a.isMesh&&b&&b.isGeometry&&this.fromGeometry(b);return this},setFromPoints:function(a){for(var b=[],d=0,e=a.length;d<e;d++){var f=a[d];b.push(f.x,f.y,f.z||0)}this.setAttribute("position",new H(b,3));return this},updateFromObject:function(a){var b=a.geometry;if(a.isMesh){var d=b.__directGeometry;!0===b.elementsNeedUpdate&&(d=void 0,b.elementsNeedUpdate=!1);if(void 0===d)return this.fromGeometry(b);d.verticesNeedUpdate=b.verticesNeedUpdate;
|
|
|
+this.translate(Fd.x,Fd.y,Fd.z);return this},setFromObject:function(a){var b=a.geometry;if(a.isPoints||a.isLine){a=new I(3*b.vertices.length,3);var d=new I(3*b.colors.length,3);this.setAttribute("position",a.copyVector3sArray(b.vertices));this.setAttribute("color",d.copyColorsArray(b.colors));b.lineDistances&&b.lineDistances.length===b.vertices.length&&(a=new I(b.lineDistances.length,1),this.setAttribute("lineDistance",a.copyArray(b.lineDistances)));null!==b.boundingSphere&&(this.boundingSphere=b.boundingSphere.clone());
|
|
|
+null!==b.boundingBox&&(this.boundingBox=b.boundingBox.clone())}else a.isMesh&&b&&b.isGeometry&&this.fromGeometry(b);return this},setFromPoints:function(a){for(var b=[],d=0,e=a.length;d<e;d++){var f=a[d];b.push(f.x,f.y,f.z||0)}this.setAttribute("position",new I(b,3));return this},updateFromObject:function(a){var b=a.geometry;if(a.isMesh){var d=b.__directGeometry;!0===b.elementsNeedUpdate&&(d=void 0,b.elementsNeedUpdate=!1);if(void 0===d)return this.fromGeometry(b);d.verticesNeedUpdate=b.verticesNeedUpdate;
|
|
|
d.normalsNeedUpdate=b.normalsNeedUpdate;d.colorsNeedUpdate=b.colorsNeedUpdate;d.uvsNeedUpdate=b.uvsNeedUpdate;d.groupsNeedUpdate=b.groupsNeedUpdate;b.verticesNeedUpdate=!1;b.normalsNeedUpdate=!1;b.colorsNeedUpdate=!1;b.uvsNeedUpdate=!1;b.groupsNeedUpdate=!1;b=d}!0===b.verticesNeedUpdate&&(d=this.attributes.position,void 0!==d&&(d.copyVector3sArray(b.vertices),d.needsUpdate=!0),b.verticesNeedUpdate=!1);!0===b.normalsNeedUpdate&&(d=this.attributes.normal,void 0!==d&&(d.copyVector3sArray(b.normals),
|
|
|
d.needsUpdate=!0),b.normalsNeedUpdate=!1);!0===b.colorsNeedUpdate&&(d=this.attributes.color,void 0!==d&&(d.copyColorsArray(b.colors),d.needsUpdate=!0),b.colorsNeedUpdate=!1);b.uvsNeedUpdate&&(d=this.attributes.uv,void 0!==d&&(d.copyVector2sArray(b.uvs),d.needsUpdate=!0),b.uvsNeedUpdate=!1);b.lineDistancesNeedUpdate&&(d=this.attributes.lineDistance,void 0!==d&&(d.copyArray(b.lineDistances),d.needsUpdate=!0),b.lineDistancesNeedUpdate=!1);b.groupsNeedUpdate&&(b.computeGroups(a.geometry),this.groups=
|
|
|
b.groups,b.groupsNeedUpdate=!1);return this},fromGeometry:function(a){a.__directGeometry=(new kh).fromGeometry(a);return this.fromDirectGeometry(a.__directGeometry)},fromDirectGeometry:function(a){var b=new Float32Array(3*a.vertices.length);this.setAttribute("position",(new N(b,3)).copyVector3sArray(a.vertices));0<a.normals.length&&(b=new Float32Array(3*a.normals.length),this.setAttribute("normal",(new N(b,3)).copyVector3sArray(a.normals)));0<a.colors.length&&(b=new Float32Array(3*a.colors.length),
|
|
|
-this.setAttribute("color",(new N(b,3)).copyColorsArray(a.colors)));0<a.uvs.length&&(b=new Float32Array(2*a.uvs.length),this.setAttribute("uv",(new N(b,2)).copyVector2sArray(a.uvs)));0<a.uvs2.length&&(b=new Float32Array(2*a.uvs2.length),this.setAttribute("uv2",(new N(b,2)).copyVector2sArray(a.uvs2)));this.groups=a.groups;for(var d in a.morphTargets){b=[];for(var e=a.morphTargets[d],f=0,g=e.length;f<g;f++){var h=e[f],l=new H(3*h.data.length,3);l.name=h.name;b.push(l.copyVector3sArray(h.data))}this.morphAttributes[d]=
|
|
|
-b}0<a.skinIndices.length&&(d=new H(4*a.skinIndices.length,4),this.setAttribute("skinIndex",d.copyVector4sArray(a.skinIndices)));0<a.skinWeights.length&&(d=new H(4*a.skinWeights.length,4),this.setAttribute("skinWeight",d.copyVector4sArray(a.skinWeights)));null!==a.boundingSphere&&(this.boundingSphere=a.boundingSphere.clone());null!==a.boundingBox&&(this.boundingBox=a.boundingBox.clone());return this},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new V);var a=this.attributes.position,
|
|
|
+this.setAttribute("color",(new N(b,3)).copyColorsArray(a.colors)));0<a.uvs.length&&(b=new Float32Array(2*a.uvs.length),this.setAttribute("uv",(new N(b,2)).copyVector2sArray(a.uvs)));0<a.uvs2.length&&(b=new Float32Array(2*a.uvs2.length),this.setAttribute("uv2",(new N(b,2)).copyVector2sArray(a.uvs2)));this.groups=a.groups;for(var d in a.morphTargets){b=[];for(var e=a.morphTargets[d],f=0,g=e.length;f<g;f++){var h=e[f],l=new I(3*h.data.length,3);l.name=h.name;b.push(l.copyVector3sArray(h.data))}this.morphAttributes[d]=
|
|
|
+b}0<a.skinIndices.length&&(d=new I(4*a.skinIndices.length,4),this.setAttribute("skinIndex",d.copyVector4sArray(a.skinIndices)));0<a.skinWeights.length&&(d=new I(4*a.skinWeights.length,4),this.setAttribute("skinWeight",d.copyVector4sArray(a.skinWeights)));null!==a.boundingSphere&&(this.boundingSphere=a.boundingSphere.clone());null!==a.boundingBox&&(this.boundingBox=a.boundingBox.clone());return this},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new V);var a=this.attributes.position,
|
|
|
b=this.morphAttributes.position;if(a&&a.isGLBufferAttribute)console.error('THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box. Alternatively set "mesh.frustumCulled" to "false".',this),this.boundingBox.set(new m(-Infinity,-Infinity,-Infinity),new m(Infinity,Infinity,Infinity));else{if(void 0!==a){if(this.boundingBox.setFromBufferAttribute(a),b){a=0;for(var d=b.length;a<d;a++)Ya.setFromBufferAttribute(b[a]),this.morphTargetsRelative?(Ba.addVectors(this.boundingBox.min,
|
|
|
Ya.min),this.boundingBox.expandByPoint(Ba),Ba.addVectors(this.boundingBox.max,Ya.max),this.boundingBox.expandByPoint(Ba)):(this.boundingBox.expandByPoint(Ya.min),this.boundingBox.expandByPoint(Ya.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}},computeBoundingSphere:function(){null===
|
|
|
this.boundingSphere&&(this.boundingSphere=new ha);var a=this.attributes.position,b=this.morphAttributes.position;if(a&&a.isGLBufferAttribute)console.error('THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere. Alternatively set "mesh.frustumCulled" to "false".',this),this.boundingSphere.set(new m,Infinity);else if(a){var d=this.boundingSphere.center;Ya.setFromBufferAttribute(a);if(b)for(var e=0,f=b.length;e<f;e++)Oe.setFromBufferAttribute(b[e]),this.morphTargetsRelative?
|
|
@@ -563,12 +563,12 @@ d=this.groups;g=0;for(e=d.length;g<e;g++)h=d[g],b.addGroup(h.start,h.count,h.mat
|
|
|
{type:d.array.constructor.name,array:Array.prototype.slice.call(d.array)});d=this.attributes;for(var e in d){var f=d[e],g=f.toJSON(a.data);""!==f.name&&(g.name=f.name);a.data.attributes[e]=g}e={};d=!1;for(b in this.morphAttributes){f=this.morphAttributes[b];g=[];for(var h=0,l=f.length;h<l;h++){var k=f[h],r=k.toJSON(a.data);""!==k.name&&(r.name=k.name);g.push(r)}0<g.length&&(e[b]=g,d=!0)}d&&(a.data.morphAttributes=e,a.data.morphTargetsRelative=this.morphTargetsRelative);b=this.groups;0<b.length&&(a.data.groups=
|
|
|
JSON.parse(JSON.stringify(b)));b=this.boundingSphere;null!==b&&(a.data.boundingSphere={center:b.center.toArray(),radius:b.radius});return a},clone:function(){return(new G).copy(this)},copy:function(a){this.index=null;this.attributes={};this.morphAttributes={};this.groups=[];this.boundingSphere=this.boundingBox=null;var b={};this.name=a.name;var d=a.index;null!==d&&this.setIndex(d.clone(b));d=a.attributes;for(var e in d)this.setAttribute(e,d[e].clone(b));e=a.morphAttributes;for(var f in e){d=[];for(var g=
|
|
|
e[f],h=0,l=g.length;h<l;h++)d.push(g[h].clone(b));this.morphAttributes[f]=d}this.morphTargetsRelative=a.morphTargetsRelative;b=a.groups;f=0;for(e=b.length;f<e;f++)d=b[f],this.addGroup(d.start,d.count,d.materialIndex);b=a.boundingBox;null!==b&&(this.boundingBox=b.clone());b=a.boundingSphere;null!==b&&(this.boundingSphere=b.clone());this.drawRange.start=a.drawRange.start;this.drawRange.count=a.drawRange.count;this.userData=a.userData;return this},dispose:function(){this.dispatchEvent({type:"dispose"})}});
|
|
|
-var Ei=new z,Ec=new qa,mh=new ha,Mb=new m,Nb=new m,Ob=new m,qg=new m,rg=new m,sg=new m,Xe=new m,Ye=new m,Ze=new m,Nc=new p,Oc=new p,Pc=new p,Td=new m,Ve=new m;na.prototype=Object.assign(Object.create(D.prototype),{constructor:na,isMesh:!0,copy:function(a){D.prototype.copy.call(this,a);void 0!==a.morphTargetInfluences&&(this.morphTargetInfluences=a.morphTargetInfluences.slice());void 0!==a.morphTargetDictionary&&(this.morphTargetDictionary=Object.assign({},a.morphTargetDictionary));this.material=a.material;
|
|
|
+var Ei=new z,Ec=new qa,mh=new ha,Mb=new m,Nb=new m,Ob=new m,qg=new m,rg=new m,sg=new m,Xe=new m,Ye=new m,Ze=new m,Nc=new p,Oc=new p,Pc=new p,Td=new m,Ve=new m;na.prototype=Object.assign(Object.create(F.prototype),{constructor:na,isMesh:!0,copy:function(a){F.prototype.copy.call(this,a);void 0!==a.morphTargetInfluences&&(this.morphTargetInfluences=a.morphTargetInfluences.slice());void 0!==a.morphTargetDictionary&&(this.morphTargetDictionary=Object.assign({},a.morphTargetDictionary));this.material=a.material;
|
|
|
this.geometry=a.geometry;return this},updateMorphTargets:function(){var a=this.geometry;if(a.isBufferGeometry){a=a.morphAttributes;var b=Object.keys(a);if(0<b.length&&(a=a[b[0]],void 0!==a)){this.morphTargetInfluences=[];this.morphTargetDictionary={};b=0;for(var d=a.length;b<d;b++){var e=a[b].name||String(b);this.morphTargetInfluences.push(0);this.morphTargetDictionary[e]=b}}}else a=a.morphTargets,void 0!==a&&0<a.length&&console.error("THREE.Mesh.updateMorphTargets() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")},
|
|
|
raycast:function(a,b){var d=this.geometry,e=this.material,f=this.matrixWorld;if(void 0!==e&&(null===d.boundingSphere&&d.computeBoundingSphere(),mh.copy(d.boundingSphere),mh.applyMatrix4(f),!1!==a.ray.intersectsSphere(mh)&&(Ei.getInverse(f),Ec.copy(a.ray).applyMatrix4(Ei),null===d.boundingBox||!1!==Ec.intersectsBox(d.boundingBox))))if(d.isBufferGeometry){var g=d.index,h=d.attributes.position;f=d.morphAttributes.position;var l=d.morphTargetsRelative,k=d.attributes.uv,r=d.attributes.uv2,m=d.groups,q=
|
|
|
-d.drawRange;if(null!==g)if(Array.isArray(e))for(var v=0,t=m.length;v<t;v++)for(var w=m[v],x=e[w.materialIndex],y=Math.max(w.start,q.start),z=Math.min(w.start+w.count,q.start+q.count);y<z;y+=3){d=g.getX(y);var C=g.getX(y+1),B=g.getX(y+2);if(d=We(this,x,a,Ec,h,f,l,k,r,d,C,B))d.faceIndex=Math.floor(y/3),d.face.materialIndex=w.materialIndex,b.push(d)}else for(m=Math.max(0,q.start),q=Math.min(g.count,q.start+q.count);m<q;m+=3){if(d=g.getX(m),v=g.getX(m+1),t=g.getX(m+2),d=We(this,e,a,Ec,h,f,l,k,r,d,v,t))d.faceIndex=
|
|
|
+d.drawRange;if(null!==g)if(Array.isArray(e))for(var v=0,t=m.length;v<t;v++)for(var w=m[v],x=e[w.materialIndex],y=Math.max(w.start,q.start),E=Math.min(w.start+w.count,q.start+q.count);y<E;y+=3){d=g.getX(y);var z=g.getX(y+1),B=g.getX(y+2);if(d=We(this,x,a,Ec,h,f,l,k,r,d,z,B))d.faceIndex=Math.floor(y/3),d.face.materialIndex=w.materialIndex,b.push(d)}else for(m=Math.max(0,q.start),q=Math.min(g.count,q.start+q.count);m<q;m+=3){if(d=g.getX(m),v=g.getX(m+1),t=g.getX(m+2),d=We(this,e,a,Ec,h,f,l,k,r,d,v,t))d.faceIndex=
|
|
|
Math.floor(m/3),b.push(d)}else if(void 0!==h)if(Array.isArray(e))for(g=0,v=m.length;g<v;g++)for(t=m[g],w=e[t.materialIndex],x=Math.max(t.start,q.start),y=Math.min(t.start+t.count,q.start+q.count);x<y;x+=3){if(d=We(this,w,a,Ec,h,f,l,k,r,x,x+1,x+2))d.faceIndex=Math.floor(x/3),d.face.materialIndex=t.materialIndex,b.push(d)}else for(m=Math.max(0,q.start),q=Math.min(h.count,q.start+q.count);m<q;m+=3)if(d=We(this,e,a,Ec,h,f,l,k,r,m,m+1,m+2))d.faceIndex=Math.floor(m/3),b.push(d)}else if(d.isGeometry)for(f=
|
|
|
-Array.isArray(e),l=d.vertices,k=d.faces,d=d.faceVertexUvs[0],0<d.length&&(h=d),r=0,q=k.length;r<q;r++)if(m=k[r],d=f?e[m.materialIndex]:e,void 0!==d&&(g=l[m.a],v=l[m.b],t=l[m.c],d=zh(this,d,a,Ec,g,v,t,Td)))h&&h[r]&&(w=h[r],Nc.copy(w[0]),Oc.copy(w[1]),Pc.copy(w[2]),d.uv=S.getUV(Td,g,v,t,Nc,Oc,Pc,new p)),d.face=m,d.faceIndex=r,b.push(d)}});var kj=0,yb=new z,nh=new D,Sf=new m;P.prototype=Object.assign(Object.create(La.prototype),{constructor:P,isGeometry:!0,applyMatrix4:function(a){for(var b=(new X).getNormalMatrix(a),
|
|
|
+Array.isArray(e),l=d.vertices,k=d.faces,d=d.faceVertexUvs[0],0<d.length&&(h=d),r=0,q=k.length;r<q;r++)if(m=k[r],d=f?e[m.materialIndex]:e,void 0!==d&&(g=l[m.a],v=l[m.b],t=l[m.c],d=zh(this,d,a,Ec,g,v,t,Td)))h&&h[r]&&(w=h[r],Nc.copy(w[0]),Oc.copy(w[1]),Pc.copy(w[2]),d.uv=S.getUV(Td,g,v,t,Nc,Oc,Pc,new p)),d.face=m,d.faceIndex=r,b.push(d)}});var kj=0,yb=new z,nh=new F,Sf=new m;P.prototype=Object.assign(Object.create(La.prototype),{constructor:P,isGeometry:!0,applyMatrix4:function(a){for(var b=(new X).getNormalMatrix(a),
|
|
|
d=0,e=this.vertices.length;d<e;d++)this.vertices[d].applyMatrix4(a);a=0;for(d=this.faces.length;a<d;a++){e=this.faces[a];e.normal.applyMatrix3(b).normalize();for(var f=0,g=e.vertexNormals.length;f<g;f++)e.vertexNormals[f].applyMatrix3(b).normalize()}null!==this.boundingBox&&this.computeBoundingBox();null!==this.boundingSphere&&this.computeBoundingSphere();this.normalsNeedUpdate=this.verticesNeedUpdate=!0;return this},rotateX:function(a){yb.makeRotationX(a);this.applyMatrix4(yb);return this},rotateY:function(a){yb.makeRotationY(a);
|
|
|
this.applyMatrix4(yb);return this},rotateZ:function(a){yb.makeRotationZ(a);this.applyMatrix4(yb);return this},translate:function(a,b,d){yb.makeTranslation(a,b,d);this.applyMatrix4(yb);return this},scale:function(a,b,d){yb.makeScale(a,b,d);this.applyMatrix4(yb);return this},lookAt:function(a){nh.lookAt(a);nh.updateMatrix();this.applyMatrix4(nh.matrix);return this},fromBufferGeometry:function(a){function b(a,b,e,f){var g=void 0===l?[]:[d.colors[a].clone(),d.colors[b].clone(),d.colors[e].clone()],n=
|
|
|
void 0===h?[]:[(new m).fromBufferAttribute(h,a),(new m).fromBufferAttribute(h,b),(new m).fromBufferAttribute(h,e)];f=new mc(a,b,e,n,g,f);d.faces.push(f);void 0!==k&&d.faceVertexUvs[0].push([(new p).fromBufferAttribute(k,a),(new p).fromBufferAttribute(k,b),(new p).fromBufferAttribute(k,e)]);void 0!==r&&d.faceVertexUvs[1].push([(new p).fromBufferAttribute(r,a),(new p).fromBufferAttribute(r,b),(new p).fromBufferAttribute(r,e)])}var d=this,e=null!==a.index?a.index:void 0,f=a.attributes;if(void 0===f.position)return console.error("THREE.Geometry.fromBufferGeometry(): Position attribute required for conversion."),
|
|
@@ -586,22 +586,22 @@ a.updateMatrix(),this.merge(a.geometry,a.matrix)):console.error("THREE.Geometry.
|
|
|
g.c],h=0;3>h;h++)if(g[h]===g[(h+1)%3]){a.push(e);break}for(d=a.length-1;0<=d;d--)for(e=a[d],this.faces.splice(e,1),f=0,g=this.faceVertexUvs.length;f<g;f++)this.faceVertexUvs[f].splice(e,1);d=this.vertices.length-b.length;this.vertices=b;return d},setFromPoints:function(a){this.vertices=[];for(var b=0,d=a.length;b<d;b++){var e=a[b];this.vertices.push(new m(e.x,e.y,e.z||0))}return this},sortFacesByMaterialIndex:function(){for(var a=this.faces,b=a.length,d=0;d<b;d++)a[d]._id=d;a.sort(function(a,b){return a.materialIndex-
|
|
|
b.materialIndex});d=this.faceVertexUvs[0];var e=this.faceVertexUvs[1],f,g;d&&d.length===b&&(f=[]);e&&e.length===b&&(g=[]);for(var h=0;h<b;h++){var l=a[h]._id;f&&f.push(d[l]);g&&g.push(e[l])}f&&(this.faceVertexUvs[0]=f);g&&(this.faceVertexUvs[1]=g)},toJSON:function(){function a(a,b,d){return d?a|1<<b:a&~(1<<b)}function b(a){var b=a.x.toString()+a.y.toString()+a.z.toString();if(void 0!==m[b])return m[b];m[b]=k.length/3;k.push(a.x,a.y,a.z);return m[b]}function d(a){var b=a.r.toString()+a.g.toString()+
|
|
|
a.b.toString();if(void 0!==q[b])return q[b];q[b]=u.length;u.push(a.getHex());return q[b]}function e(a){var b=a.x.toString()+a.y.toString();if(void 0!==t[b])return t[b];t[b]=v.length/2;v.push(a.x,a.y);return t[b]}var f={metadata:{version:4.5,type:"Geometry",generator:"Geometry.toJSON"}};f.uuid=this.uuid;f.type=this.type;""!==this.name&&(f.name=this.name);if(void 0!==this.parameters){var g=this.parameters,h;for(h in g)void 0!==g[h]&&(f[h]=g[h]);return f}g=[];for(h=0;h<this.vertices.length;h++){var l=
|
|
|
-this.vertices[h];g.push(l.x,l.y,l.z)}h=[];var k=[],m={},u=[],q={},v=[],t={};for(l=0;l<this.faces.length;l++){var w=this.faces[l],p=void 0!==this.faceVertexUvs[0][l],y=0<w.normal.length(),x=0<w.vertexNormals.length,z=1!==w.color.r||1!==w.color.g||1!==w.color.b,B=0<w.vertexColors.length,F=0;F=a(F,0,0);F=a(F,1,!0);F=a(F,2,!1);F=a(F,3,p);F=a(F,4,y);F=a(F,5,x);F=a(F,6,z);F=a(F,7,B);h.push(F);h.push(w.a,w.b,w.c);h.push(w.materialIndex);p&&(p=this.faceVertexUvs[0][l],h.push(e(p[0]),e(p[1]),e(p[2])));y&&
|
|
|
+this.vertices[h];g.push(l.x,l.y,l.z)}h=[];var k=[],m={},u=[],q={},v=[],t={};for(l=0;l<this.faces.length;l++){var w=this.faces[l],p=void 0!==this.faceVertexUvs[0][l],y=0<w.normal.length(),x=0<w.vertexNormals.length,z=1!==w.color.r||1!==w.color.g||1!==w.color.b,B=0<w.vertexColors.length,H=0;H=a(H,0,0);H=a(H,1,!0);H=a(H,2,!1);H=a(H,3,p);H=a(H,4,y);H=a(H,5,x);H=a(H,6,z);H=a(H,7,B);h.push(H);h.push(w.a,w.b,w.c);h.push(w.materialIndex);p&&(p=this.faceVertexUvs[0][l],h.push(e(p[0]),e(p[1]),e(p[2])));y&&
|
|
|
h.push(b(w.normal));x&&(y=w.vertexNormals,h.push(b(y[0]),b(y[1]),b(y[2])));z&&h.push(d(w.color));B&&(w=w.vertexColors,h.push(d(w[0]),d(w[1]),d(w[2])))}f.data={};f.data.vertices=g;f.data.normals=k;0<u.length&&(f.data.colors=u);0<v.length&&(f.data.uvs=[v]);f.data.faces=h;return f},clone:function(){return(new P).copy(this)},copy:function(a){this.vertices=[];this.colors=[];this.faces=[];this.faceVertexUvs=[[]];this.morphTargets=[];this.morphNormals=[];this.skinWeights=[];this.skinIndices=[];this.lineDistances=
|
|
|
[];this.boundingSphere=this.boundingBox=null;this.name=a.name;for(var b=a.vertices,d=0,e=b.length;d<e;d++)this.vertices.push(b[d].clone());b=a.colors;d=0;for(e=b.length;d<e;d++)this.colors.push(b[d].clone());b=a.faces;d=0;for(e=b.length;d<e;d++)this.faces.push(b[d].clone());b=0;for(d=a.faceVertexUvs.length;b<d;b++){e=a.faceVertexUvs[b];void 0===this.faceVertexUvs[b]&&(this.faceVertexUvs[b]=[]);for(var f=0,g=e.length;f<g;f++){for(var h=e[f],l=[],k=0,m=h.length;k<m;k++)l.push(h[k].clone());this.faceVertexUvs[b].push(l)}}b=
|
|
|
a.morphTargets;d=0;for(e=b.length;d<e;d++){f={};f.name=b[d].name;if(void 0!==b[d].vertices)for(f.vertices=[],g=0,h=b[d].vertices.length;g<h;g++)f.vertices.push(b[d].vertices[g].clone());if(void 0!==b[d].normals)for(f.normals=[],g=0,h=b[d].normals.length;g<h;g++)f.normals.push(b[d].normals[g].clone());this.morphTargets.push(f)}b=a.morphNormals;d=0;for(e=b.length;d<e;d++){f={};if(void 0!==b[d].vertexNormals)for(f.vertexNormals=[],g=0,h=b[d].vertexNormals.length;g<h;g++)l=b[d].vertexNormals[g],k={},
|
|
|
k.a=l.a.clone(),k.b=l.b.clone(),k.c=l.c.clone(),f.vertexNormals.push(k);if(void 0!==b[d].faceNormals)for(f.faceNormals=[],g=0,h=b[d].faceNormals.length;g<h;g++)f.faceNormals.push(b[d].faceNormals[g].clone());this.morphNormals.push(f)}b=a.skinWeights;d=0;for(e=b.length;d<e;d++)this.skinWeights.push(b[d].clone());b=a.skinIndices;d=0;for(e=b.length;d<e;d++)this.skinIndices.push(b[d].clone());b=a.lineDistances;d=0;for(e=b.length;d<e;d++)this.lineDistances.push(b[d]);b=a.boundingBox;null!==b&&(this.boundingBox=
|
|
|
b.clone());b=a.boundingSphere;null!==b&&(this.boundingSphere=b.clone());this.elementsNeedUpdate=a.elementsNeedUpdate;this.verticesNeedUpdate=a.verticesNeedUpdate;this.uvsNeedUpdate=a.uvsNeedUpdate;this.normalsNeedUpdate=a.normalsNeedUpdate;this.colorsNeedUpdate=a.colorsNeedUpdate;this.lineDistancesNeedUpdate=a.lineDistancesNeedUpdate;this.groupsNeedUpdate=a.groupsNeedUpdate;return this},dispose:function(){this.dispatchEvent({type:"dispose"})}});Qc.prototype=Object.create(P.prototype);Qc.prototype.constructor=
|
|
|
-Qc;Pb.prototype=Object.create(G.prototype);Pb.prototype.constructor=Pb;var Uh={clone:Rc,merge:oa};Aa.prototype=Object.create(M.prototype);Aa.prototype.constructor=Aa;Aa.prototype.isShaderMaterial=!0;Aa.prototype.copy=function(a){M.prototype.copy.call(this,a);this.fragmentShader=a.fragmentShader;this.vertexShader=a.vertexShader;this.uniforms=Rc(a.uniforms);this.defines=Object.assign({},a.defines);this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.lights=a.lights;this.clipping=
|
|
|
-a.clipping;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;this.extensions=Object.assign({},a.extensions);return this};Aa.prototype.toJSON=function(a){var b=M.prototype.toJSON.call(this,a);b.uniforms={};for(var d in this.uniforms){var e=this.uniforms[d].value;b.uniforms[d]=e&&e.isTexture?{type:"t",value:e.toJSON(a).uuid}:e&&e.isColor?{type:"c",value:e.getHex()}:e&&e.isVector2?{type:"v2",value:e.toArray()}:e&&e.isVector3?{type:"v3",value:e.toArray()}:e&&e.isVector4?
|
|
|
-{type:"v4",value:e.toArray()}:e&&e.isMatrix3?{type:"m3",value:e.toArray()}:e&&e.isMatrix4?{type:"m4",value:e.toArray()}:{value:e}}0<Object.keys(this.defines).length&&(b.defines=this.defines);b.vertexShader=this.vertexShader;b.fragmentShader=this.fragmentShader;a={};for(var f in this.extensions)!0===this.extensions[f]&&(a[f]=!0);0<Object.keys(a).length&&(b.extensions=a);return b};ob.prototype=Object.assign(Object.create(D.prototype),{constructor:ob,isCamera:!0,copy:function(a,b){D.prototype.copy.call(this,
|
|
|
-a,b);this.matrixWorldInverse.copy(a.matrixWorldInverse);this.projectionMatrix.copy(a.projectionMatrix);this.projectionMatrixInverse.copy(a.projectionMatrixInverse);return this},getWorldDirection:function(a){void 0===a&&(console.warn("THREE.Camera: .getWorldDirection() target is now required"),a=new m);this.updateMatrixWorld(!0);var b=this.matrixWorld.elements;return a.set(-b[8],-b[9],-b[10]).normalize()},updateMatrixWorld:function(a){D.prototype.updateMatrixWorld.call(this,a);this.matrixWorldInverse.getInverse(this.matrixWorld)},
|
|
|
-updateWorldMatrix:function(a,b){D.prototype.updateWorldMatrix.call(this,a,b);this.matrixWorldInverse.getInverse(this.matrixWorld)},clone:function(){return(new this.constructor).copy(this)}});ta.prototype=Object.assign(Object.create(ob.prototype),{constructor:ta,isPerspectiveCamera:!0,copy:function(a,b){ob.prototype.copy.call(this,a,b);this.fov=a.fov;this.zoom=a.zoom;this.near=a.near;this.far=a.far;this.focus=a.focus;this.aspect=a.aspect;this.view=null===a.view?null:Object.assign({},a.view);this.filmGauge=
|
|
|
-a.filmGauge;this.filmOffset=a.filmOffset;return this},setFocalLength:function(a){a=.5*this.getFilmHeight()/a;this.fov=2*T.RAD2DEG*Math.atan(a);this.updateProjectionMatrix()},getFocalLength:function(){var a=Math.tan(.5*T.DEG2RAD*this.fov);return.5*this.getFilmHeight()/a},getEffectiveFOV:function(){return 2*T.RAD2DEG*Math.atan(Math.tan(.5*T.DEG2RAD*this.fov)/this.zoom)},getFilmWidth:function(){return this.filmGauge*Math.min(this.aspect,1)},getFilmHeight:function(){return this.filmGauge/Math.max(this.aspect,
|
|
|
-1)},setViewOffset:function(a,b,d,e,f,g){this.aspect=a/b;null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1});this.view.enabled=!0;this.view.fullWidth=a;this.view.fullHeight=b;this.view.offsetX=d;this.view.offsetY=e;this.view.width=f;this.view.height=g;this.updateProjectionMatrix()},clearViewOffset:function(){null!==this.view&&(this.view.enabled=!1);this.updateProjectionMatrix()},updateProjectionMatrix:function(){var a=this.near,b=a*Math.tan(.5*T.DEG2RAD*
|
|
|
-this.fov)/this.zoom,d=2*b,e=this.aspect*d,f=-.5*e,g=this.view;if(null!==this.view&&this.view.enabled){var h=g.fullWidth,l=g.fullHeight;f+=g.offsetX*e/h;b-=g.offsetY*d/l;e*=g.width/h;d*=g.height/l}g=this.filmOffset;0!==g&&(f+=a*g/this.getFilmWidth());this.projectionMatrix.makePerspective(f,f+e,b,b-d,a,this.far);this.projectionMatrixInverse.getInverse(this.projectionMatrix)},toJSON:function(a){a=D.prototype.toJSON.call(this,a);a.object.fov=this.fov;a.object.zoom=this.zoom;a.object.near=this.near;a.object.far=
|
|
|
-this.far;a.object.focus=this.focus;a.object.aspect=this.aspect;null!==this.view&&(a.object.view=Object.assign({},this.view));a.object.filmGauge=this.filmGauge;a.object.filmOffset=this.filmOffset;return a}});Sc.prototype=Object.create(D.prototype);Sc.prototype.constructor=Sc;Qb.prototype=Object.create(Sa.prototype);Qb.prototype.constructor=Qb;Qb.prototype.isWebGLCubeRenderTarget=!0;Qb.prototype.fromEquirectangularTexture=function(a,b){this.texture.type=b.type;this.texture.format=1023;this.texture.encoding=
|
|
|
-b.encoding;this.texture.generateMipmaps=b.generateMipmaps;this.texture.minFilter=b.minFilter;this.texture.magFilter=b.magFilter;var d=new Pb(5,5,5),e=new Aa({name:"CubemapFromEquirect",uniforms:Rc({tEquirect:{value:null}}),vertexShader:"\n\n\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\tvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\n\t\t\t\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n\n\t\t\t}\n\n\t\t\tvoid main() {\n\n\t\t\t\tvWorldDirection = transformDirection( position, modelMatrix );\n\n\t\t\t\t#include <begin_vertex>\n\t\t\t\t#include <project_vertex>\n\n\t\t\t}\n\t\t",
|
|
|
+Qc;Pb.prototype=Object.create(G.prototype);Pb.prototype.constructor=Pb;var Uh={clone:Rc,merge:oa};Aa.prototype=Object.create(L.prototype);Aa.prototype.constructor=Aa;Aa.prototype.isShaderMaterial=!0;Aa.prototype.copy=function(a){L.prototype.copy.call(this,a);this.fragmentShader=a.fragmentShader;this.vertexShader=a.vertexShader;this.uniforms=Rc(a.uniforms);this.defines=Object.assign({},a.defines);this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.lights=a.lights;this.clipping=
|
|
|
+a.clipping;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;this.extensions=Object.assign({},a.extensions);this.glslVersion=a.glslVersion;return this};Aa.prototype.toJSON=function(a){var b=L.prototype.toJSON.call(this,a);b.glslVersion=this.glslVersion;b.uniforms={};for(var d in this.uniforms){var e=this.uniforms[d].value;b.uniforms[d]=e&&e.isTexture?{type:"t",value:e.toJSON(a).uuid}:e&&e.isColor?{type:"c",value:e.getHex()}:e&&e.isVector2?{type:"v2",value:e.toArray()}:
|
|
|
+e&&e.isVector3?{type:"v3",value:e.toArray()}:e&&e.isVector4?{type:"v4",value:e.toArray()}:e&&e.isMatrix3?{type:"m3",value:e.toArray()}:e&&e.isMatrix4?{type:"m4",value:e.toArray()}:{value:e}}0<Object.keys(this.defines).length&&(b.defines=this.defines);b.vertexShader=this.vertexShader;b.fragmentShader=this.fragmentShader;a={};for(var f in this.extensions)!0===this.extensions[f]&&(a[f]=!0);0<Object.keys(a).length&&(b.extensions=a);return b};ob.prototype=Object.assign(Object.create(F.prototype),{constructor:ob,
|
|
|
+isCamera:!0,copy:function(a,b){F.prototype.copy.call(this,a,b);this.matrixWorldInverse.copy(a.matrixWorldInverse);this.projectionMatrix.copy(a.projectionMatrix);this.projectionMatrixInverse.copy(a.projectionMatrixInverse);return this},getWorldDirection:function(a){void 0===a&&(console.warn("THREE.Camera: .getWorldDirection() target is now required"),a=new m);this.updateMatrixWorld(!0);var b=this.matrixWorld.elements;return a.set(-b[8],-b[9],-b[10]).normalize()},updateMatrixWorld:function(a){F.prototype.updateMatrixWorld.call(this,
|
|
|
+a);this.matrixWorldInverse.getInverse(this.matrixWorld)},updateWorldMatrix:function(a,b){F.prototype.updateWorldMatrix.call(this,a,b);this.matrixWorldInverse.getInverse(this.matrixWorld)},clone:function(){return(new this.constructor).copy(this)}});ta.prototype=Object.assign(Object.create(ob.prototype),{constructor:ta,isPerspectiveCamera:!0,copy:function(a,b){ob.prototype.copy.call(this,a,b);this.fov=a.fov;this.zoom=a.zoom;this.near=a.near;this.far=a.far;this.focus=a.focus;this.aspect=a.aspect;this.view=
|
|
|
+null===a.view?null:Object.assign({},a.view);this.filmGauge=a.filmGauge;this.filmOffset=a.filmOffset;return this},setFocalLength:function(a){a=.5*this.getFilmHeight()/a;this.fov=2*T.RAD2DEG*Math.atan(a);this.updateProjectionMatrix()},getFocalLength:function(){var a=Math.tan(.5*T.DEG2RAD*this.fov);return.5*this.getFilmHeight()/a},getEffectiveFOV:function(){return 2*T.RAD2DEG*Math.atan(Math.tan(.5*T.DEG2RAD*this.fov)/this.zoom)},getFilmWidth:function(){return this.filmGauge*Math.min(this.aspect,1)},
|
|
|
+getFilmHeight:function(){return this.filmGauge/Math.max(this.aspect,1)},setViewOffset:function(a,b,d,e,f,g){this.aspect=a/b;null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1});this.view.enabled=!0;this.view.fullWidth=a;this.view.fullHeight=b;this.view.offsetX=d;this.view.offsetY=e;this.view.width=f;this.view.height=g;this.updateProjectionMatrix()},clearViewOffset:function(){null!==this.view&&(this.view.enabled=!1);this.updateProjectionMatrix()},
|
|
|
+updateProjectionMatrix:function(){var a=this.near,b=a*Math.tan(.5*T.DEG2RAD*this.fov)/this.zoom,d=2*b,e=this.aspect*d,f=-.5*e,g=this.view;if(null!==this.view&&this.view.enabled){var h=g.fullWidth,l=g.fullHeight;f+=g.offsetX*e/h;b-=g.offsetY*d/l;e*=g.width/h;d*=g.height/l}g=this.filmOffset;0!==g&&(f+=a*g/this.getFilmWidth());this.projectionMatrix.makePerspective(f,f+e,b,b-d,a,this.far);this.projectionMatrixInverse.getInverse(this.projectionMatrix)},toJSON:function(a){a=F.prototype.toJSON.call(this,
|
|
|
+a);a.object.fov=this.fov;a.object.zoom=this.zoom;a.object.near=this.near;a.object.far=this.far;a.object.focus=this.focus;a.object.aspect=this.aspect;null!==this.view&&(a.object.view=Object.assign({},this.view));a.object.filmGauge=this.filmGauge;a.object.filmOffset=this.filmOffset;return a}});Sc.prototype=Object.create(F.prototype);Sc.prototype.constructor=Sc;Qb.prototype=Object.create(Sa.prototype);Qb.prototype.constructor=Qb;Qb.prototype.isWebGLCubeRenderTarget=!0;Qb.prototype.fromEquirectangularTexture=
|
|
|
+function(a,b){this.texture.type=b.type;this.texture.format=1023;this.texture.encoding=b.encoding;this.texture.generateMipmaps=b.generateMipmaps;this.texture.minFilter=b.minFilter;this.texture.magFilter=b.magFilter;var d=new Pb(5,5,5),e=new Aa({name:"CubemapFromEquirect",uniforms:Rc({tEquirect:{value:null}}),vertexShader:"\n\n\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\tvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\n\t\t\t\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n\n\t\t\t}\n\n\t\t\tvoid main() {\n\n\t\t\t\tvWorldDirection = transformDirection( position, modelMatrix );\n\n\t\t\t\t#include <begin_vertex>\n\t\t\t\t#include <project_vertex>\n\n\t\t\t}\n\t\t",
|
|
|
fragmentShader:"\n\n\t\t\tuniform sampler2D tEquirect;\n\n\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t#include <common>\n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 direction = normalize( vWorldDirection );\n\n\t\t\t\tvec2 sampleUV = equirectUv( direction );\n\n\t\t\t\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\n\t\t\t}\n\t\t",side:1,blending:0});e.uniforms.tEquirect.value=b;d=new na(d,e);e=b.minFilter;var f=a.getRenderList(),g=a.getRenderTarget(),h=a.getRenderState();1008===b.minFilter&&(b.minFilter=
|
|
|
1006);(new Sc(1,10,this)).update(a,d);b.minFilter=e;a.setRenderTarget(g);a.setRenderList(f);a.setRenderState(h);d.geometry.dispose();d.material.dispose();return this};nc.prototype=Object.create(fa.prototype);nc.prototype.constructor=nc;nc.prototype.isDataTexture=!0;var Gd=new ha,Tf=new m,Ma=function(a,b,d,e,f,g){this.planes=[void 0!==a?a:new W,void 0!==b?b:new W,void 0!==d?d:new W,void 0!==e?e:new W,void 0!==f?f:new W,void 0!==g?g:new W]};Ma.prototype.set=function(a,b,d,e,f,g){var h=this.planes;h[0].copy(a);
|
|
|
h[1].copy(b);h[2].copy(d);h[3].copy(e);h[4].copy(f);h[5].copy(g);return this};Ma.prototype.clone=function(){return(new this.constructor).copy(this)};Ma.prototype.copy=function(a){for(var b=this.planes,d=0;6>d;d++)b[d].copy(a.planes[d]);return this};Ma.prototype.setFromProjectionMatrix=function(a){var b=this.planes,d=a.elements;a=d[0];var e=d[1],f=d[2],g=d[3],h=d[4],l=d[5],k=d[6],m=d[7],u=d[8],q=d[9],v=d[10],t=d[11],p=d[12],x=d[13],y=d[14];d=d[15];b[0].setComponents(g-a,m-h,t-u,d-p).normalize();b[1].setComponents(g+
|
|
@@ -679,29 +679,29 @@ points_vert:"uniform float size;\nuniform float scale;\n#include <common>\n#incl
|
|
|
shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\nvoid main() {\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}",shadow_vert:"#include <common>\n#include <fog_pars_vertex>\n#include <shadowmap_pars_vertex>\nvoid main() {\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",
|
|
|
sprite_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}",
|
|
|
sprite_vert:"uniform float rotation;\nuniform vec2 center;\n#include <common>\n#include <uv_pars_vertex>\n#include <fog_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n\tvec2 scale;\n\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\t#endif\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}"},
|
|
|
-I={common:{diffuse:{value:new x(15658734)},opacity:{value:1},map:{value:null},uvTransform:{value:new X},uv2Transform:{value:new X},alphaMap:{value:null}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},refractionRatio:{value:.98},maxMipLevel:{value:0}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},
|
|
|
+J={common:{diffuse:{value:new x(15658734)},opacity:{value:1},map:{value:null},uvTransform:{value:new X},uv2Transform:{value:new X},alphaMap:{value:null}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},refractionRatio:{value:.98},maxMipLevel:{value:0}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},
|
|
|
normalmap:{normalMap:{value:null},normalScale:{value:new p(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:2.5E-4},fogNear:{value:1},fogFar:{value:2E3},fogColor:{value:new x(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},
|
|
|
color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},
|
|
|
position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new x(15658734)},opacity:{value:1},size:{value:1},
|
|
|
-scale:{value:1},map:{value:null},alphaMap:{value:null},uvTransform:{value:new X}},sprite:{diffuse:{value:new x(15658734)},opacity:{value:1},center:{value:new p(.5,.5)},rotation:{value:0},map:{value:null},alphaMap:{value:null},uvTransform:{value:new X}}},db={basic:{uniforms:oa([I.common,I.specularmap,I.envmap,I.aomap,I.lightmap,I.fog]),vertexShader:U.meshbasic_vert,fragmentShader:U.meshbasic_frag},lambert:{uniforms:oa([I.common,I.specularmap,I.envmap,I.aomap,I.lightmap,I.emissivemap,I.fog,I.lights,
|
|
|
-{emissive:{value:new x(0)}}]),vertexShader:U.meshlambert_vert,fragmentShader:U.meshlambert_frag},phong:{uniforms:oa([I.common,I.specularmap,I.envmap,I.aomap,I.lightmap,I.emissivemap,I.bumpmap,I.normalmap,I.displacementmap,I.fog,I.lights,{emissive:{value:new x(0)},specular:{value:new x(1118481)},shininess:{value:30}}]),vertexShader:U.meshphong_vert,fragmentShader:U.meshphong_frag},standard:{uniforms:oa([I.common,I.envmap,I.aomap,I.lightmap,I.emissivemap,I.bumpmap,I.normalmap,I.displacementmap,I.roughnessmap,
|
|
|
-I.metalnessmap,I.fog,I.lights,{emissive:{value:new x(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:U.meshphysical_vert,fragmentShader:U.meshphysical_frag},toon:{uniforms:oa([I.common,I.aomap,I.lightmap,I.emissivemap,I.bumpmap,I.normalmap,I.displacementmap,I.gradientmap,I.fog,I.lights,{emissive:{value:new x(0)}}]),vertexShader:U.meshtoon_vert,fragmentShader:U.meshtoon_frag},matcap:{uniforms:oa([I.common,I.bumpmap,I.normalmap,I.displacementmap,I.fog,{matcap:{value:null}}]),
|
|
|
-vertexShader:U.meshmatcap_vert,fragmentShader:U.meshmatcap_frag},points:{uniforms:oa([I.points,I.fog]),vertexShader:U.points_vert,fragmentShader:U.points_frag},dashed:{uniforms:oa([I.common,I.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:U.linedashed_vert,fragmentShader:U.linedashed_frag},depth:{uniforms:oa([I.common,I.displacementmap]),vertexShader:U.depth_vert,fragmentShader:U.depth_frag},normal:{uniforms:oa([I.common,I.bumpmap,I.normalmap,I.displacementmap,{opacity:{value:1}}]),
|
|
|
-vertexShader:U.normal_vert,fragmentShader:U.normal_frag},sprite:{uniforms:oa([I.sprite,I.fog]),vertexShader:U.sprite_vert,fragmentShader:U.sprite_frag},background:{uniforms:{uvTransform:{value:new X},t2D:{value:null}},vertexShader:U.background_vert,fragmentShader:U.background_frag},cube:{uniforms:oa([I.envmap,{opacity:{value:1}}]),vertexShader:U.cube_vert,fragmentShader:U.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:U.equirect_vert,fragmentShader:U.equirect_frag},distanceRGBA:{uniforms:oa([I.common,
|
|
|
-I.displacementmap,{referencePosition:{value:new m},nearDistance:{value:1},farDistance:{value:1E3}}]),vertexShader:U.distanceRGBA_vert,fragmentShader:U.distanceRGBA_frag},shadow:{uniforms:oa([I.lights,I.fog,{color:{value:new x(0)},opacity:{value:1}}]),vertexShader:U.shadow_vert,fragmentShader:U.shadow_frag}};db.physical={uniforms:oa([db.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatNormalScale:{value:new p(1,
|
|
|
+scale:{value:1},map:{value:null},alphaMap:{value:null},uvTransform:{value:new X}},sprite:{diffuse:{value:new x(15658734)},opacity:{value:1},center:{value:new p(.5,.5)},rotation:{value:0},map:{value:null},alphaMap:{value:null},uvTransform:{value:new X}}},db={basic:{uniforms:oa([J.common,J.specularmap,J.envmap,J.aomap,J.lightmap,J.fog]),vertexShader:U.meshbasic_vert,fragmentShader:U.meshbasic_frag},lambert:{uniforms:oa([J.common,J.specularmap,J.envmap,J.aomap,J.lightmap,J.emissivemap,J.fog,J.lights,
|
|
|
+{emissive:{value:new x(0)}}]),vertexShader:U.meshlambert_vert,fragmentShader:U.meshlambert_frag},phong:{uniforms:oa([J.common,J.specularmap,J.envmap,J.aomap,J.lightmap,J.emissivemap,J.bumpmap,J.normalmap,J.displacementmap,J.fog,J.lights,{emissive:{value:new x(0)},specular:{value:new x(1118481)},shininess:{value:30}}]),vertexShader:U.meshphong_vert,fragmentShader:U.meshphong_frag},standard:{uniforms:oa([J.common,J.envmap,J.aomap,J.lightmap,J.emissivemap,J.bumpmap,J.normalmap,J.displacementmap,J.roughnessmap,
|
|
|
+J.metalnessmap,J.fog,J.lights,{emissive:{value:new x(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:U.meshphysical_vert,fragmentShader:U.meshphysical_frag},toon:{uniforms:oa([J.common,J.aomap,J.lightmap,J.emissivemap,J.bumpmap,J.normalmap,J.displacementmap,J.gradientmap,J.fog,J.lights,{emissive:{value:new x(0)}}]),vertexShader:U.meshtoon_vert,fragmentShader:U.meshtoon_frag},matcap:{uniforms:oa([J.common,J.bumpmap,J.normalmap,J.displacementmap,J.fog,{matcap:{value:null}}]),
|
|
|
+vertexShader:U.meshmatcap_vert,fragmentShader:U.meshmatcap_frag},points:{uniforms:oa([J.points,J.fog]),vertexShader:U.points_vert,fragmentShader:U.points_frag},dashed:{uniforms:oa([J.common,J.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:U.linedashed_vert,fragmentShader:U.linedashed_frag},depth:{uniforms:oa([J.common,J.displacementmap]),vertexShader:U.depth_vert,fragmentShader:U.depth_frag},normal:{uniforms:oa([J.common,J.bumpmap,J.normalmap,J.displacementmap,{opacity:{value:1}}]),
|
|
|
+vertexShader:U.normal_vert,fragmentShader:U.normal_frag},sprite:{uniforms:oa([J.sprite,J.fog]),vertexShader:U.sprite_vert,fragmentShader:U.sprite_frag},background:{uniforms:{uvTransform:{value:new X},t2D:{value:null}},vertexShader:U.background_vert,fragmentShader:U.background_frag},cube:{uniforms:oa([J.envmap,{opacity:{value:1}}]),vertexShader:U.cube_vert,fragmentShader:U.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:U.equirect_vert,fragmentShader:U.equirect_frag},distanceRGBA:{uniforms:oa([J.common,
|
|
|
+J.displacementmap,{referencePosition:{value:new m},nearDistance:{value:1},farDistance:{value:1E3}}]),vertexShader:U.distanceRGBA_vert,fragmentShader:U.distanceRGBA_frag},shadow:{uniforms:oa([J.lights,J.fog,{color:{value:new x(0)},opacity:{value:1}}]),vertexShader:U.shadow_vert,fragmentShader:U.shadow_frag}};db.physical={uniforms:oa([db.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatNormalScale:{value:new p(1,
|
|
|
1)},clearcoatNormalMap:{value:null},sheen:{value:new x(0)},transmission:{value:0},transmissionMap:{value:null}}]),vertexShader:U.meshphysical_vert,fragmentShader:U.meshphysical_frag};zb.prototype=Object.create(fa.prototype);zb.prototype.constructor=zb;zb.prototype.isCubeTexture=!0;Object.defineProperty(zb.prototype,"images",{get:function(){return this.image},set:function(a){this.image=a}});Tc.prototype=Object.create(fa.prototype);Tc.prototype.constructor=Tc;Tc.prototype.isDataTexture2DArray=!0;Uc.prototype=
|
|
|
Object.create(fa.prototype);Uc.prototype.constructor=Uc;Uc.prototype.isDataTexture3D=!0;var Hh=new fa,Jj=new Tc,Lj=new Uc,Ih=new zb,Bh=[],Dh=[],Gh=new Float32Array(16),Fh=new Float32Array(9),Eh=new Float32Array(4);Jh.prototype.updateCache=function(a){var b=this.cache;a instanceof Float32Array&&b.length!==a.length&&(this.cache=new Float32Array(a.length));Ta(b,a)};Kh.prototype.setValue=function(a,b,d){for(var e=this.seq,f=0,g=e.length;f!==g;++f){var h=e[f];h.setValue(a,b[h.id],d)}};var tg=/([\w\d_]+)(\])?(\[|\.)?/g;
|
|
|
Rb.prototype.setValue=function(a,b,d,e){b=this.map[b];void 0!==b&&b.setValue(a,d,e)};Rb.prototype.setOptional=function(a,b,d){b=b[d];void 0!==b&&this.setValue(a,d,b)};Rb.upload=function(a,b,d,e){for(var f=0,g=b.length;f!==g;++f){var h=b[f],l=d[h.id];!1!==l.needsUpdate&&h.setValue(a,l.value,e)}};Rb.seqWithValue=function(a,b){for(var d=[],e=0,f=a.length;e!==f;++e){var g=a[e];g.id in b&&d.push(g)}return d};var qk=0,vg=/^[ \t]*#include +<([\w\d./]+)>/gm,Th=/#pragma unroll_loop[\s]+?for \( int i = (\d+); i < (\d+); i \+\+ \) \{([\s\S]+?)(?=\})\}/g,
|
|
|
-Sh=/#pragma unroll_loop_start[\s]+?for \( int i = (\d+); i < (\d+); i \+\+ \) \{([\s\S]+?)(?=\})\}[\s]+?#pragma unroll_loop_end/g,Ak=0;Sb.prototype=Object.create(M.prototype);Sb.prototype.constructor=Sb;Sb.prototype.isMeshDepthMaterial=!0;Sb.prototype.copy=function(a){M.prototype.copy.call(this,a);this.depthPacking=a.depthPacking;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.map=a.map;this.alphaMap=a.alphaMap;this.displacementMap=a.displacementMap;this.displacementScale=a.displacementScale;
|
|
|
-this.displacementBias=a.displacementBias;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;return this};Tb.prototype=Object.create(M.prototype);Tb.prototype.constructor=Tb;Tb.prototype.isMeshDistanceMaterial=!0;Tb.prototype.copy=function(a){M.prototype.copy.call(this,a);this.referencePosition.copy(a.referencePosition);this.nearDistance=a.nearDistance;this.farDistance=a.farDistance;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.map=a.map;this.alphaMap=a.alphaMap;
|
|
|
-this.displacementMap=a.displacementMap;this.displacementScale=a.displacementScale;this.displacementBias=a.displacementBias;return this};$e.prototype=Object.assign(Object.create(ta.prototype),{constructor:$e,isArrayCamera:!0});Vb.prototype=Object.assign(Object.create(D.prototype),{constructor:Vb,isGroup:!0});Object.assign(Yd.prototype,{constructor:Yd,getHandSpace:function(){if(null===this._hand&&(this._hand=new Vb,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints=[],this._hand.inputState=
|
|
|
+Sh=/#pragma unroll_loop_start[\s]+?for \( int i = (\d+); i < (\d+); i \+\+ \) \{([\s\S]+?)(?=\})\}[\s]+?#pragma unroll_loop_end/g,Ak=0;Sb.prototype=Object.create(L.prototype);Sb.prototype.constructor=Sb;Sb.prototype.isMeshDepthMaterial=!0;Sb.prototype.copy=function(a){L.prototype.copy.call(this,a);this.depthPacking=a.depthPacking;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.map=a.map;this.alphaMap=a.alphaMap;this.displacementMap=a.displacementMap;this.displacementScale=a.displacementScale;
|
|
|
+this.displacementBias=a.displacementBias;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;return this};Tb.prototype=Object.create(L.prototype);Tb.prototype.constructor=Tb;Tb.prototype.isMeshDistanceMaterial=!0;Tb.prototype.copy=function(a){L.prototype.copy.call(this,a);this.referencePosition.copy(a.referencePosition);this.nearDistance=a.nearDistance;this.farDistance=a.farDistance;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.map=a.map;this.alphaMap=a.alphaMap;
|
|
|
+this.displacementMap=a.displacementMap;this.displacementScale=a.displacementScale;this.displacementBias=a.displacementBias;return this};$e.prototype=Object.assign(Object.create(ta.prototype),{constructor:$e,isArrayCamera:!0});Vb.prototype=Object.assign(Object.create(F.prototype),{constructor:Vb,isGroup:!0});Object.assign(Yd.prototype,{constructor:Yd,getHandSpace:function(){if(null===this._hand&&(this._hand=new Vb,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints=[],this._hand.inputState=
|
|
|
{pinching:!1},window.XRHand))for(var a=0;a<=window.XRHand.LITTLE_PHALANX_TIP;a++){var b=new Vb;b.matrixAutoUpdate=!1;b.visible=!1;this._hand.joints.push(b);this._hand.add(b)}return this._hand},getTargetRaySpace:function(){null===this._targetRay&&(this._targetRay=new Vb,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1);return this._targetRay},getGripSpace:function(){null===this._grip&&(this._grip=new Vb,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1);return this._grip},dispatchEvent:function(a){null!==
|
|
|
this._targetRay&&this._targetRay.dispatchEvent(a);null!==this._grip&&this._grip.dispatchEvent(a);null!==this._hand&&this._hand.dispatchEvent(a);return this},disconnect:function(a){this.dispatchEvent({type:"disconnected",data:a});null!==this._targetRay&&(this._targetRay.visible=!1);null!==this._grip&&(this._grip.visible=!1);null!==this._hand&&(this._hand.visible=!1);return this},update:function(a,b,d){var e=null,f=null,g=null,h=this._targetRay,l=this._grip,k=this._hand;if(a)if(k&&a.hand){g=!0;for(var m=
|
|
|
0;m<=window.XRHand.LITTLE_PHALANX_TIP;m++)if(a.hand[m]){var u=b.getJointPose(a.hand[m],d),q=k.joints[m];null!==u&&(q.matrix.fromArray(u.transform.matrix),q.matrix.decompose(q.position,q.rotation,q.scale),q.jointRadius=u.radius);q.visible=null!==u;u=k.joints[window.XRHand.INDEX_PHALANX_TIP].position.distanceTo(k.joints[window.XRHand.THUMB_PHALANX_TIP].position);k.inputState.pinching&&.025<u?(k.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:a.handedness,target:this})):!k.inputState.pinching&&
|
|
|
.015>=u&&(k.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:a.handedness,target:this}))}}else null!==h&&(e=b.getPose(a.targetRaySpace,d),null!==e&&(h.matrix.fromArray(e.transform.matrix),h.matrix.decompose(h.position,h.rotation,h.scale))),null!==l&&a.gripSpace&&(f=b.getPose(a.gripSpace,d),null!==f&&(l.matrix.fromArray(f.transform.matrix),l.matrix.decompose(l.position,l.rotation,l.scale)));null!==h&&(h.visible=null!==e);null!==l&&(l.visible=null!==f);null!==k&&(k.visible=null!==
|
|
|
g);return this}});Object.assign(Zh.prototype,La.prototype);yg.prototype=Object.assign(Object.create(Zd.prototype),{constructor:yg,isWebGL1Renderer:!0});var Hd=function(a,b){this.name="";this.color=new x(a);this.density=void 0!==b?b:2.5E-4};Hd.prototype.clone=function(){return new Hd(this.color,this.density)};Hd.prototype.toJSON=function(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}};Hd.prototype.isFogExp2=!0;var Id=function(a,b,d){this.name="";this.color=new x(a);this.near=
|
|
|
-void 0!==b?b:1;this.far=void 0!==d?d:1E3};Id.prototype.clone=function(){return new Id(this.color,this.near,this.far)};Id.prototype.toJSON=function(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}};Id.prototype.isFog=!0;Ab.prototype=Object.create(D.prototype);Ab.prototype.constructor=Ab;Ab.prototype.copy=function(a,b){D.prototype.copy.call(this,a,b);null!==a.background&&(this.background=a.background.clone());null!==a.environment&&(this.environment=a.environment.clone());null!==
|
|
|
-a.fog&&(this.fog=a.fog.clone());null!==a.overrideMaterial&&(this.overrideMaterial=a.overrideMaterial.clone());this.autoUpdate=a.autoUpdate;this.matrixAutoUpdate=a.matrixAutoUpdate;return this};Ab.prototype.toJSON=function(a){var b=D.prototype.toJSON.call(this,a);null!==this.background&&(b.object.background=this.background.toJSON(a));null!==this.environment&&(b.object.environment=this.environment.toJSON(a));null!==this.fog&&(b.object.fog=this.fog.toJSON());return b};Ab.prototype.isScene=!0;Object.defineProperty(Va.prototype,
|
|
|
+void 0!==b?b:1;this.far=void 0!==d?d:1E3};Id.prototype.clone=function(){return new Id(this.color,this.near,this.far)};Id.prototype.toJSON=function(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}};Id.prototype.isFog=!0;Ab.prototype=Object.create(F.prototype);Ab.prototype.constructor=Ab;Ab.prototype.copy=function(a,b){F.prototype.copy.call(this,a,b);null!==a.background&&(this.background=a.background.clone());null!==a.environment&&(this.environment=a.environment.clone());null!==
|
|
|
+a.fog&&(this.fog=a.fog.clone());null!==a.overrideMaterial&&(this.overrideMaterial=a.overrideMaterial.clone());this.autoUpdate=a.autoUpdate;this.matrixAutoUpdate=a.matrixAutoUpdate;return this};Ab.prototype.toJSON=function(a){var b=F.prototype.toJSON.call(this,a);null!==this.background&&(b.object.background=this.background.toJSON(a));null!==this.environment&&(b.object.environment=this.environment.toJSON(a));null!==this.fog&&(b.object.fog=this.fog.toJSON());return b};Ab.prototype.isScene=!0;Object.defineProperty(Va.prototype,
|
|
|
"needsUpdate",{set:function(a){!0===a&&this.version++}});Object.assign(Va.prototype,{isInterleavedBuffer:!0,onUploadCallback:function(){},setUsage:function(a){this.usage=a;return this},copy:function(a){this.array=new a.array.constructor(a.array);this.count=a.count;this.stride=a.stride;this.usage=a.usage;return this},copyAt:function(a,b,d){a*=this.stride;d*=b.stride;for(var e=0,f=this.stride;e<f;e++)this.array[a+e]=b.array[d+e];return this},set:function(a,b){void 0===b&&(b=0);this.array.set(a,b);return this},
|
|
|
clone:function(a){void 0===a.arrayBuffers&&(a.arrayBuffers={});void 0===this.array.buffer._uuid&&(this.array.buffer._uuid=T.generateUUID());void 0===a.arrayBuffers[this.array.buffer._uuid]&&(a.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);a=new this.array.constructor(a.arrayBuffers[this.array.buffer._uuid]);a=new Va(a,this.stride);a.setUsage(this.usage);return a},onUpload:function(a){this.onUploadCallback=a;return this},toJSON:function(a){void 0===a.arrayBuffers&&(a.arrayBuffers=
|
|
|
{});void 0===this.array.buffer._uuid&&(this.array.buffer._uuid=T.generateUUID());void 0===a.arrayBuffers[this.array.buffer._uuid]&&(a.arrayBuffers[this.array.buffer._uuid]=Array.prototype.slice.call(new Uint32Array(this.array.buffer)));return{uuid:this.uuid,buffer:this.array.buffer._uuid,type:this.array.constructor.name,stride:this.stride}}});var Fc=new m;Object.defineProperties(Wb.prototype,{count:{get:function(){return this.data.count}},array:{get:function(){return this.data.array}},needsUpdate:{set:function(a){this.data.needsUpdate=
|
|
@@ -710,28 +710,28 @@ b){this.data.array[a*this.data.stride+this.offset+3]=b;return this},getX:functio
|
|
|
e){a=a*this.data.stride+this.offset;this.data.array[a+0]=b;this.data.array[a+1]=d;this.data.array[a+2]=e;return this},setXYZW:function(a,b,d,e,f){a=a*this.data.stride+this.offset;this.data.array[a+0]=b;this.data.array[a+1]=d;this.data.array[a+2]=e;this.data.array[a+3]=f;return this},clone:function(a){if(void 0===a){console.log("THREE.InterleavedBufferAttribute.clone(): Cloning an interlaved buffer attribute will deinterleave buffer data.");a=[];for(var b=0;b<this.count;b++)for(var d=b*this.data.stride+
|
|
|
this.offset,e=0;e<this.itemSize;e++)a.push(this.data.array[d+e]);return new N(new this.array.constructor(a),this.itemSize,this.normalized)}void 0===a.interleavedBuffers&&(a.interleavedBuffers={});void 0===a.interleavedBuffers[this.data.uuid]&&(a.interleavedBuffers[this.data.uuid]=this.data.clone(a));return new Wb(a.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)},toJSON:function(a){if(void 0===a){console.log("THREE.InterleavedBufferAttribute.toJSON(): Serializing an interlaved buffer attribute will deinterleave buffer data.");
|
|
|
a=[];for(var b=0;b<this.count;b++)for(var d=b*this.data.stride+this.offset,e=0;e<this.itemSize;e++)a.push(this.data.array[d+e]);return{itemSize:this.itemSize,type:this.array.constructor.name,array:a,normalized:this.normalized}}void 0===a.interleavedBuffers&&(a.interleavedBuffers={});void 0===a.interleavedBuffers[this.data.uuid]&&(a.interleavedBuffers[this.data.uuid]=this.data.toJSON(a));return{isInterleavedBufferAttribute:!0,itemSize:this.itemSize,data:this.data.uuid,offset:this.offset,normalized:this.normalized}}});
|
|
|
-Xb.prototype=Object.create(M.prototype);Xb.prototype.constructor=Xb;Xb.prototype.isSpriteMaterial=!0;Xb.prototype.copy=function(a){M.prototype.copy.call(this,a);this.color.copy(a.color);this.map=a.map;this.alphaMap=a.alphaMap;this.rotation=a.rotation;this.sizeAttenuation=a.sizeAttenuation;return this};var Wc,Pe=new m,Jd=new m,Kd=new m,Xc=new p,ae=new p,ai=new z,Uf=new m,Qe=new m,Vf=new m,Fi=new p,oh=new p,Gi=new p;$d.prototype=Object.assign(Object.create(D.prototype),{constructor:$d,isSprite:!0,raycast:function(a,
|
|
|
+Xb.prototype=Object.create(L.prototype);Xb.prototype.constructor=Xb;Xb.prototype.isSpriteMaterial=!0;Xb.prototype.copy=function(a){L.prototype.copy.call(this,a);this.color.copy(a.color);this.map=a.map;this.alphaMap=a.alphaMap;this.rotation=a.rotation;this.sizeAttenuation=a.sizeAttenuation;return this};var Wc,Pe=new m,Jd=new m,Kd=new m,Xc=new p,ae=new p,ai=new z,Uf=new m,Qe=new m,Vf=new m,Fi=new p,oh=new p,Gi=new p;$d.prototype=Object.assign(Object.create(F.prototype),{constructor:$d,isSprite:!0,raycast:function(a,
|
|
|
b){null===a.camera&&console.error('THREE.Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.');Jd.setFromMatrixScale(this.matrixWorld);ai.copy(a.camera.matrixWorld);this.modelViewMatrix.multiplyMatrices(a.camera.matrixWorldInverse,this.matrixWorld);Kd.setFromMatrixPosition(this.modelViewMatrix);a.camera.isPerspectiveCamera&&!1===this.material.sizeAttenuation&&Jd.multiplyScalar(-Kd.z);var d=this.material.rotation;if(0!==d){var e=Math.cos(d);var f=Math.sin(d)}d=this.center;
|
|
|
-af(Uf.set(-.5,-.5,0),Kd,d,Jd,f,e);af(Qe.set(.5,-.5,0),Kd,d,Jd,f,e);af(Vf.set(.5,.5,0),Kd,d,Jd,f,e);Fi.set(0,0);oh.set(1,0);Gi.set(1,1);var g=a.ray.intersectTriangle(Uf,Qe,Vf,!1,Pe);if(null===g&&(af(Qe.set(-.5,.5,0),Kd,d,Jd,f,e),oh.set(0,1),g=a.ray.intersectTriangle(Uf,Vf,Qe,!1,Pe),null===g))return;f=a.ray.origin.distanceTo(Pe);f<a.near||f>a.far||b.push({distance:f,point:Pe.clone(),uv:S.getUV(Pe,Uf,Qe,Vf,Fi,oh,Gi,new p),face:null,object:this})},copy:function(a){D.prototype.copy.call(this,a);void 0!==
|
|
|
-a.center&&this.center.copy(a.center);this.material=a.material;return this}});var Wf=new m,Hi=new m;be.prototype=Object.assign(Object.create(D.prototype),{constructor:be,isLOD:!0,copy:function(a){D.prototype.copy.call(this,a,!1);for(var b=a.levels,d=0,e=b.length;d<e;d++){var f=b[d];this.addLevel(f.object.clone(),f.distance)}this.autoUpdate=a.autoUpdate;return this},addLevel:function(a,b){void 0===b&&(b=0);b=Math.abs(b);var d=this.levels,e;for(e=0;e<d.length&&!(b<d[e].distance);e++);d.splice(e,0,{distance:b,
|
|
|
+af(Uf.set(-.5,-.5,0),Kd,d,Jd,f,e);af(Qe.set(.5,-.5,0),Kd,d,Jd,f,e);af(Vf.set(.5,.5,0),Kd,d,Jd,f,e);Fi.set(0,0);oh.set(1,0);Gi.set(1,1);var g=a.ray.intersectTriangle(Uf,Qe,Vf,!1,Pe);if(null===g&&(af(Qe.set(-.5,.5,0),Kd,d,Jd,f,e),oh.set(0,1),g=a.ray.intersectTriangle(Uf,Vf,Qe,!1,Pe),null===g))return;f=a.ray.origin.distanceTo(Pe);f<a.near||f>a.far||b.push({distance:f,point:Pe.clone(),uv:S.getUV(Pe,Uf,Qe,Vf,Fi,oh,Gi,new p),face:null,object:this})},copy:function(a){F.prototype.copy.call(this,a);void 0!==
|
|
|
+a.center&&this.center.copy(a.center);this.material=a.material;return this}});var Wf=new m,Hi=new m;be.prototype=Object.assign(Object.create(F.prototype),{constructor:be,isLOD:!0,copy:function(a){F.prototype.copy.call(this,a,!1);for(var b=a.levels,d=0,e=b.length;d<e;d++){var f=b[d];this.addLevel(f.object.clone(),f.distance)}this.autoUpdate=a.autoUpdate;return this},addLevel:function(a,b){void 0===b&&(b=0);b=Math.abs(b);var d=this.levels,e;for(e=0;e<d.length&&!(b<d[e].distance);e++);d.splice(e,0,{distance:b,
|
|
|
object:a});this.add(a);return this},getCurrentLevel:function(){return this._currentLevel},getObjectForDistance:function(a){var b=this.levels;if(0<b.length){var d;var e=1;for(d=b.length;e<d&&!(a<b[e].distance);e++);return b[e-1].object}return null},raycast:function(a,b){if(0<this.levels.length){Wf.setFromMatrixPosition(this.matrixWorld);var d=a.ray.origin.distanceTo(Wf);this.getObjectForDistance(d).raycast(a,b)}},update:function(a){var b=this.levels;if(1<b.length){Wf.setFromMatrixPosition(a.matrixWorld);
|
|
|
-Hi.setFromMatrixPosition(this.matrixWorld);a=Wf.distanceTo(Hi)/a.zoom;b[0].object.visible=!0;var d;var e=1;for(d=b.length;e<d;e++)if(a>=b[e].distance)b[e-1].object.visible=!1,b[e].object.visible=!0;else break;for(this._currentLevel=e-1;e<d;e++)b[e].object.visible=!1}},toJSON:function(a){a=D.prototype.toJSON.call(this,a);!1===this.autoUpdate&&(a.object.autoUpdate=!1);a.object.levels=[];for(var b=this.levels,d=0,e=b.length;d<e;d++){var f=b[d];a.object.levels.push({object:f.object.uuid,distance:f.distance})}return a}});
|
|
|
+Hi.setFromMatrixPosition(this.matrixWorld);a=Wf.distanceTo(Hi)/a.zoom;b[0].object.visible=!0;var d;var e=1;for(d=b.length;e<d;e++)if(a>=b[e].distance)b[e-1].object.visible=!1,b[e].object.visible=!0;else break;for(this._currentLevel=e-1;e<d;e++)b[e].object.visible=!1}},toJSON:function(a){a=F.prototype.toJSON.call(this,a);!1===this.autoUpdate&&(a.object.autoUpdate=!1);a.object.levels=[];for(var b=this.levels,d=0,e=b.length;d<e;d++){var f=b[d];a.object.levels.push({object:f.object.uuid,distance:f.distance})}return a}});
|
|
|
bf.prototype=Object.assign(Object.create(na.prototype),{constructor:bf,isSkinnedMesh:!0,copy:function(a){na.prototype.copy.call(this,a);this.bindMode=a.bindMode;this.bindMatrix.copy(a.bindMatrix);this.bindMatrixInverse.copy(a.bindMatrixInverse);this.skeleton=a.skeleton;return this},bind:function(a,b){this.skeleton=a;void 0===b&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),b=this.matrixWorld);this.bindMatrix.copy(b);this.bindMatrixInverse.getInverse(b)},pose:function(){this.skeleton.pose()},
|
|
|
normalizeSkinWeights:function(){for(var a=new B,b=this.geometry.attributes.skinWeight,d=0,e=b.count;d<e;d++){a.x=b.getX(d);a.y=b.getY(d);a.z=b.getZ(d);a.w=b.getW(d);var f=1/a.manhattanLength();Infinity!==f?a.multiplyScalar(f):a.set(1,0,0,0);b.setXYZW(d,a.x,a.y,a.z,a.w)}},updateMatrixWorld:function(a){na.prototype.updateMatrixWorld.call(this,a);"attached"===this.bindMode?this.bindMatrixInverse.getInverse(this.matrixWorld):"detached"===this.bindMode?this.bindMatrixInverse.getInverse(this.bindMatrix):
|
|
|
console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)},boneTransform:function(){var a=new m,b=new B,d=new B,e=new m,f=new z;return function(g,h){var l=this.skeleton,k=this.geometry;b.fromBufferAttribute(k.attributes.skinIndex,g);d.fromBufferAttribute(k.attributes.skinWeight,g);a.fromBufferAttribute(k.attributes.position,g).applyMatrix4(this.bindMatrix);h.set(0,0,0);for(g=0;4>g;g++)if(k=d.getComponent(g),0!==k){var m=b.getComponent(g);f.multiplyMatrices(l.bones[m].matrixWorld,l.boneInverses[m]);
|
|
|
h.addScaledVector(e.copy(a).applyMatrix4(f),k)}return h.applyMatrix4(this.bindMatrixInverse)}}()});var Ii=new z,Vk=new z;Object.assign(cf.prototype,{calculateInverses:function(){this.boneInverses=[];for(var a=0,b=this.bones.length;a<b;a++){var d=new z;this.bones[a]&&d.getInverse(this.bones[a].matrixWorld);this.boneInverses.push(d)}},pose:function(){for(var a=0,b=this.bones.length;a<b;a++){var d=this.bones[a];d&&d.matrixWorld.getInverse(this.boneInverses[a])}a=0;for(b=this.bones.length;a<b;a++)if(d=
|
|
|
this.bones[a])d.parent&&d.parent.isBone?(d.matrix.getInverse(d.parent.matrixWorld),d.matrix.multiply(d.matrixWorld)):d.matrix.copy(d.matrixWorld),d.matrix.decompose(d.position,d.quaternion,d.scale)},update:function(){for(var a=this.bones,b=this.boneInverses,d=this.boneMatrices,e=this.boneTexture,f=0,g=a.length;f<g;f++)Ii.multiplyMatrices(a[f]?a[f].matrixWorld:Vk,b[f]),Ii.toArray(d,16*f);void 0!==e&&(e.needsUpdate=!0)},clone:function(){return new cf(this.bones,this.boneInverses)},getBoneByName:function(a){for(var b=
|
|
|
-0,d=this.bones.length;b<d;b++){var e=this.bones[b];if(e.name===a)return e}},dispose:function(){this.boneTexture&&(this.boneTexture.dispose(),this.boneTexture=void 0)}});zg.prototype=Object.assign(Object.create(D.prototype),{constructor:zg,isBone:!0});var Ji=new z,Ki=new z,Xf=[],Re=new na;df.prototype=Object.assign(Object.create(na.prototype),{constructor:df,isInstancedMesh:!0,copy:function(a){na.prototype.copy.call(this,a);this.instanceMatrix.copy(a.instanceMatrix);this.count=a.count;return this},
|
|
|
+0,d=this.bones.length;b<d;b++){var e=this.bones[b];if(e.name===a)return e}},dispose:function(){this.boneTexture&&(this.boneTexture.dispose(),this.boneTexture=void 0)}});zg.prototype=Object.assign(Object.create(F.prototype),{constructor:zg,isBone:!0});var Ji=new z,Ki=new z,Xf=[],Re=new na;df.prototype=Object.assign(Object.create(na.prototype),{constructor:df,isInstancedMesh:!0,copy:function(a){na.prototype.copy.call(this,a);this.instanceMatrix.copy(a.instanceMatrix);this.count=a.count;return this},
|
|
|
setColorAt:function(a,b){null===this.instanceColor&&(this.instanceColor=new N(new Float32Array(3*this.count),3));b.toArray(this.instanceColor.array,3*a)},getMatrixAt:function(a,b){b.fromArray(this.instanceMatrix.array,16*a)},raycast:function(a,b){var d=this.matrixWorld,e=this.count;Re.geometry=this.geometry;Re.material=this.material;if(void 0!==Re.material)for(var f=0;f<e;f++){this.getMatrixAt(f,Ji);Ki.multiplyMatrices(d,Ji);Re.matrixWorld=Ki;Re.raycast(a,Xf);for(var g=0,h=Xf.length;g<h;g++){var l=
|
|
|
-Xf[g];l.instanceId=f;l.object=this;b.push(l)}Xf.length=0}},setMatrixAt:function(a,b){b.toArray(this.instanceMatrix.array,16*a)},updateMorphTargets:function(){}});pa.prototype=Object.create(M.prototype);pa.prototype.constructor=pa;pa.prototype.isLineBasicMaterial=!0;pa.prototype.copy=function(a){M.prototype.copy.call(this,a);this.color.copy(a.color);this.linewidth=a.linewidth;this.linecap=a.linecap;this.linejoin=a.linejoin;this.morphTargets=a.morphTargets;return this};var Li=new m,Mi=new m,Ni=new z,
|
|
|
-Yf=new qa,Se=new ha;Na.prototype=Object.assign(Object.create(D.prototype),{constructor:Na,isLine:!0,copy:function(a){D.prototype.copy.call(this,a);this.material=a.material;this.geometry=a.geometry;return this},computeLineDistances:function(){var a=this.geometry;if(a.isBufferGeometry)if(null===a.index){for(var b=a.attributes.position,d=[0],e=1,f=b.count;e<f;e++)Li.fromBufferAttribute(b,e-1),Mi.fromBufferAttribute(b,e),d[e]=d[e-1],d[e]+=Li.distanceTo(Mi);a.setAttribute("lineDistance",new H(d,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");
|
|
|
+Xf[g];l.instanceId=f;l.object=this;b.push(l)}Xf.length=0}},setMatrixAt:function(a,b){b.toArray(this.instanceMatrix.array,16*a)},updateMorphTargets:function(){}});pa.prototype=Object.create(L.prototype);pa.prototype.constructor=pa;pa.prototype.isLineBasicMaterial=!0;pa.prototype.copy=function(a){L.prototype.copy.call(this,a);this.color.copy(a.color);this.linewidth=a.linewidth;this.linecap=a.linecap;this.linejoin=a.linejoin;this.morphTargets=a.morphTargets;return this};var Li=new m,Mi=new m,Ni=new z,
|
|
|
+Yf=new qa,Se=new ha;Na.prototype=Object.assign(Object.create(F.prototype),{constructor:Na,isLine:!0,copy:function(a){F.prototype.copy.call(this,a);this.material=a.material;this.geometry=a.geometry;return this},computeLineDistances:function(){var a=this.geometry;if(a.isBufferGeometry)if(null===a.index){for(var b=a.attributes.position,d=[0],e=1,f=b.count;e<f;e++)Li.fromBufferAttribute(b,e-1),Mi.fromBufferAttribute(b,e),d[e]=d[e-1],d[e]+=Li.distanceTo(Mi);a.setAttribute("lineDistance",new I(d,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");
|
|
|
else if(a.isGeometry)for(b=a.vertices,a=a.lineDistances,a[0]=0,d=1,e=b.length;d<e;d++)a[d]=a[d-1],a[d]+=b[d-1].distanceTo(b[d]);return this},raycast:function(a,b){var d=this.geometry,e=this.matrixWorld,f=a.params.Line.threshold;null===d.boundingSphere&&d.computeBoundingSphere();Se.copy(d.boundingSphere);Se.applyMatrix4(e);Se.radius+=f;if(!1!==a.ray.intersectsSphere(Se)){Ni.getInverse(e);Yf.copy(a.ray).applyMatrix4(Ni);e=f/((this.scale.x+this.scale.y+this.scale.z)/3);e*=e;var g=new m,h=new m;f=new m;
|
|
|
var l=new m,k=this&&this.isLineSegments?2:1;if(d.isBufferGeometry){var r=d.index;d=d.attributes.position.array;if(null!==r){r=r.array;for(var u=0,q=r.length-1;u<q;u+=k){var v=r[u+1];g.fromArray(d,3*r[u]);h.fromArray(d,3*v);Yf.distanceSqToSegment(g,h,l,f)>e||(l.applyMatrix4(this.matrixWorld),v=a.ray.origin.distanceTo(l),v<a.near||v>a.far||b.push({distance:v,point:f.clone().applyMatrix4(this.matrixWorld),index:u,face:null,faceIndex:null,object:this}))}}else for(r=0,u=d.length/3-1;r<u;r+=k)g.fromArray(d,
|
|
|
3*r),h.fromArray(d,3*r+3),Yf.distanceSqToSegment(g,h,l,f)>e||(l.applyMatrix4(this.matrixWorld),q=a.ray.origin.distanceTo(l),q<a.near||q>a.far||b.push({distance:q,point:f.clone().applyMatrix4(this.matrixWorld),index:r,face:null,faceIndex:null,object:this}))}else if(d.isGeometry)for(g=d.vertices,h=g.length,d=0;d<h-1;d+=k)Yf.distanceSqToSegment(g[d],g[d+1],l,f)>e||(l.applyMatrix4(this.matrixWorld),r=a.ray.origin.distanceTo(l),r<a.near||r>a.far||b.push({distance:r,point:f.clone().applyMatrix4(this.matrixWorld),
|
|
|
index:d,face:null,faceIndex:null,object:this}))}},updateMorphTargets:function(){var a=this.geometry;if(a.isBufferGeometry){a=a.morphAttributes;var b=Object.keys(a);if(0<b.length&&(a=a[b[0]],void 0!==a)){this.morphTargetInfluences=[];this.morphTargetDictionary={};b=0;for(var d=a.length;b<d;b++){var e=a[b].name||String(b);this.morphTargetInfluences.push(0);this.morphTargetDictionary[e]=b}}}else a=a.morphTargets,void 0!==a&&0<a.length&&console.error("THREE.Line.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}});
|
|
|
-var Zf=new m,$f=new m;sa.prototype=Object.assign(Object.create(Na.prototype),{constructor:sa,isLineSegments:!0,computeLineDistances:function(){var a=this.geometry;if(a.isBufferGeometry)if(null===a.index){for(var b=a.attributes.position,d=[],e=0,f=b.count;e<f;e+=2)Zf.fromBufferAttribute(b,e),$f.fromBufferAttribute(b,e+1),d[e]=0===e?0:d[e-1],d[e+1]=d[e]+Zf.distanceTo($f);a.setAttribute("lineDistance",new H(d,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");
|
|
|
-else if(a.isGeometry)for(b=a.vertices,a=a.lineDistances,d=0,e=b.length;d<e;d+=2)Zf.copy(b[d]),$f.copy(b[d+1]),a[d]=0===d?0:a[d-1],a[d+1]=a[d]+Zf.distanceTo($f);return this}});ef.prototype=Object.assign(Object.create(Na.prototype),{constructor:ef,isLineLoop:!0});eb.prototype=Object.create(M.prototype);eb.prototype.constructor=eb;eb.prototype.isPointsMaterial=!0;eb.prototype.copy=function(a){M.prototype.copy.call(this,a);this.color.copy(a.color);this.map=a.map;this.alphaMap=a.alphaMap;this.size=a.size;
|
|
|
-this.sizeAttenuation=a.sizeAttenuation;this.morphTargets=a.morphTargets;return this};var Oi=new z,Bg=new qa,Te=new ha,ag=new m;Yc.prototype=Object.assign(Object.create(D.prototype),{constructor:Yc,isPoints:!0,copy:function(a){D.prototype.copy.call(this,a);this.material=a.material;this.geometry=a.geometry;return this},raycast:function(a,b){var d=this.geometry,e=this.matrixWorld,f=a.params.Points.threshold;null===d.boundingSphere&&d.computeBoundingSphere();Te.copy(d.boundingSphere);Te.applyMatrix4(e);
|
|
|
+var Zf=new m,$f=new m;sa.prototype=Object.assign(Object.create(Na.prototype),{constructor:sa,isLineSegments:!0,computeLineDistances:function(){var a=this.geometry;if(a.isBufferGeometry)if(null===a.index){for(var b=a.attributes.position,d=[],e=0,f=b.count;e<f;e+=2)Zf.fromBufferAttribute(b,e),$f.fromBufferAttribute(b,e+1),d[e]=0===e?0:d[e-1],d[e+1]=d[e]+Zf.distanceTo($f);a.setAttribute("lineDistance",new I(d,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");
|
|
|
+else if(a.isGeometry)for(b=a.vertices,a=a.lineDistances,d=0,e=b.length;d<e;d+=2)Zf.copy(b[d]),$f.copy(b[d+1]),a[d]=0===d?0:a[d-1],a[d+1]=a[d]+Zf.distanceTo($f);return this}});ef.prototype=Object.assign(Object.create(Na.prototype),{constructor:ef,isLineLoop:!0});eb.prototype=Object.create(L.prototype);eb.prototype.constructor=eb;eb.prototype.isPointsMaterial=!0;eb.prototype.copy=function(a){L.prototype.copy.call(this,a);this.color.copy(a.color);this.map=a.map;this.alphaMap=a.alphaMap;this.size=a.size;
|
|
|
+this.sizeAttenuation=a.sizeAttenuation;this.morphTargets=a.morphTargets;return this};var Oi=new z,Bg=new qa,Te=new ha,ag=new m;Yc.prototype=Object.assign(Object.create(F.prototype),{constructor:Yc,isPoints:!0,copy:function(a){F.prototype.copy.call(this,a);this.material=a.material;this.geometry=a.geometry;return this},raycast:function(a,b){var d=this.geometry,e=this.matrixWorld,f=a.params.Points.threshold;null===d.boundingSphere&&d.computeBoundingSphere();Te.copy(d.boundingSphere);Te.applyMatrix4(e);
|
|
|
Te.radius+=f;if(!1!==a.ray.intersectsSphere(Te))if(Oi.getInverse(e),Bg.copy(a.ray).applyMatrix4(Oi),f/=(this.scale.x+this.scale.y+this.scale.z)/3,f*=f,d.isBufferGeometry){var g=d.index;d=d.attributes.position.array;if(null!==g){g=g.array;for(var h=0,l=g.length;h<l;h++){var k=g[h];ag.fromArray(d,3*k);Ag(ag,k,f,e,a,b,this)}}else for(g=0,h=d.length/3;g<h;g++)ag.fromArray(d,3*g),Ag(ag,g,f,e,a,b,this)}else for(d=d.vertices,g=0,h=d.length;g<h;g++)Ag(d[g],g,f,e,a,b,this)},updateMorphTargets:function(){var a=
|
|
|
this.geometry;if(a.isBufferGeometry){a=a.morphAttributes;var b=Object.keys(a);if(0<b.length&&(a=a[b[0]],void 0!==a)){this.morphTargetInfluences=[];this.morphTargetDictionary={};b=0;for(var d=a.length;b<d;b++){var e=a[b].name||String(b);this.morphTargetInfluences.push(0);this.morphTargetDictionary[e]=b}}}else a=a.morphTargets,void 0!==a&&0<a.length&&console.error("THREE.Points.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}});Cg.prototype=Object.assign(Object.create(fa.prototype),
|
|
|
{constructor:Cg,isVideoTexture:!0,update:function(){var a=this.image;!1==="requestVideoFrameCallback"in a&&a.readyState>=a.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}});Zc.prototype=Object.create(fa.prototype);Zc.prototype.constructor=Zc;Zc.prototype.isCompressedTexture=!0;ce.prototype=Object.create(fa.prototype);ce.prototype.constructor=ce;ce.prototype.isCanvasTexture=!0;de.prototype=Object.create(fa.prototype);de.prototype.constructor=de;de.prototype.isDepthTexture=!0;$c.prototype=Object.create(G.prototype);
|
|
@@ -745,22 +745,22 @@ b[3*f+2];var q=b[3*g],v=b[3*g+1];b=b[3*g+2];return.01>Math.abs(h-k)?[new p(a,1-d
|
|
|
se;id.prototype=Object.create(G.prototype);id.prototype.constructor=id;te.prototype=Object.create(P.prototype);te.prototype.constructor=te;jd.prototype=Object.create(G.prototype);jd.prototype.constructor=jd;uc.prototype=Object.create(P.prototype);uc.prototype.constructor=uc;uc.prototype.toJSON=function(){var a=P.prototype.toJSON.call(this);return ii(this.parameters.shapes,a)};vc.prototype=Object.create(G.prototype);vc.prototype.constructor=vc;vc.prototype.toJSON=function(){var a=G.prototype.toJSON.call(this);
|
|
|
return ii(this.parameters.shapes,a)};kd.prototype=Object.create(G.prototype);kd.prototype.constructor=kd;wc.prototype=Object.create(P.prototype);wc.prototype.constructor=wc;Cb.prototype=Object.create(G.prototype);Cb.prototype.constructor=Cb;ue.prototype=Object.create(wc.prototype);ue.prototype.constructor=ue;ve.prototype=Object.create(Cb.prototype);ve.prototype.constructor=ve;we.prototype=Object.create(P.prototype);we.prototype.constructor=we;ld.prototype=Object.create(G.prototype);ld.prototype.constructor=
|
|
|
ld;var Ka=Object.freeze({__proto__:null,WireframeGeometry:$c,ParametricGeometry:ee,ParametricBufferGeometry:ad,TetrahedronGeometry:ge,TetrahedronBufferGeometry:bd,OctahedronGeometry:he,OctahedronBufferGeometry:qc,IcosahedronGeometry:ie,IcosahedronBufferGeometry:cd,DodecahedronGeometry:je,DodecahedronBufferGeometry:dd,PolyhedronGeometry:fe,PolyhedronBufferGeometry:Oa,TubeGeometry:ke,TubeBufferGeometry:rc,TorusKnotGeometry:le,TorusKnotBufferGeometry:ed,TorusGeometry:me,TorusBufferGeometry:fd,TextGeometry:qe,
|
|
|
-TextBufferGeometry:hd,SphereGeometry:re,SphereBufferGeometry:tc,RingGeometry:se,RingBufferGeometry:id,PlaneGeometry:Ud,PlaneBufferGeometry:oc,LatheGeometry:te,LatheBufferGeometry:jd,ShapeGeometry:uc,ShapeBufferGeometry:vc,ExtrudeGeometry:sc,ExtrudeBufferGeometry:qb,EdgesGeometry:kd,ConeGeometry:ue,ConeBufferGeometry:ve,CylinderGeometry:wc,CylinderBufferGeometry:Cb,CircleGeometry:we,CircleBufferGeometry:ld,BoxGeometry:Qc,BoxBufferGeometry:Pb});xc.prototype=Object.create(M.prototype);xc.prototype.constructor=
|
|
|
-xc;xc.prototype.isShadowMaterial=!0;xc.prototype.copy=function(a){M.prototype.copy.call(this,a);this.color.copy(a.color);return this};Db.prototype=Object.create(Aa.prototype);Db.prototype.constructor=Db;Db.prototype.isRawShaderMaterial=!0;rb.prototype=Object.create(M.prototype);rb.prototype.constructor=rb;rb.prototype.isMeshStandardMaterial=!0;rb.prototype.copy=function(a){M.prototype.copy.call(this,a);this.defines={STANDARD:""};this.color.copy(a.color);this.roughness=a.roughness;this.metalness=a.metalness;
|
|
|
+TextBufferGeometry:hd,SphereGeometry:re,SphereBufferGeometry:tc,RingGeometry:se,RingBufferGeometry:id,PlaneGeometry:Ud,PlaneBufferGeometry:oc,LatheGeometry:te,LatheBufferGeometry:jd,ShapeGeometry:uc,ShapeBufferGeometry:vc,ExtrudeGeometry:sc,ExtrudeBufferGeometry:qb,EdgesGeometry:kd,ConeGeometry:ue,ConeBufferGeometry:ve,CylinderGeometry:wc,CylinderBufferGeometry:Cb,CircleGeometry:we,CircleBufferGeometry:ld,BoxGeometry:Qc,BoxBufferGeometry:Pb});xc.prototype=Object.create(L.prototype);xc.prototype.constructor=
|
|
|
+xc;xc.prototype.isShadowMaterial=!0;xc.prototype.copy=function(a){L.prototype.copy.call(this,a);this.color.copy(a.color);return this};Db.prototype=Object.create(Aa.prototype);Db.prototype.constructor=Db;Db.prototype.isRawShaderMaterial=!0;rb.prototype=Object.create(L.prototype);rb.prototype.constructor=rb;rb.prototype.isMeshStandardMaterial=!0;rb.prototype.copy=function(a){L.prototype.copy.call(this,a);this.defines={STANDARD:""};this.color.copy(a.color);this.roughness=a.roughness;this.metalness=a.metalness;
|
|
|
this.map=a.map;this.lightMap=a.lightMap;this.lightMapIntensity=a.lightMapIntensity;this.aoMap=a.aoMap;this.aoMapIntensity=a.aoMapIntensity;this.emissive.copy(a.emissive);this.emissiveMap=a.emissiveMap;this.emissiveIntensity=a.emissiveIntensity;this.bumpMap=a.bumpMap;this.bumpScale=a.bumpScale;this.normalMap=a.normalMap;this.normalMapType=a.normalMapType;this.normalScale.copy(a.normalScale);this.displacementMap=a.displacementMap;this.displacementScale=a.displacementScale;this.displacementBias=a.displacementBias;
|
|
|
this.roughnessMap=a.roughnessMap;this.metalnessMap=a.metalnessMap;this.alphaMap=a.alphaMap;this.envMap=a.envMap;this.envMapIntensity=a.envMapIntensity;this.refractionRatio=a.refractionRatio;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.wireframeLinecap=a.wireframeLinecap;this.wireframeLinejoin=a.wireframeLinejoin;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;this.vertexTangents=a.vertexTangents;return this};Zb.prototype=Object.create(rb.prototype);
|
|
|
Zb.prototype.constructor=Zb;Zb.prototype.isMeshPhysicalMaterial=!0;Zb.prototype.copy=function(a){rb.prototype.copy.call(this,a);this.defines={STANDARD:"",PHYSICAL:""};this.clearcoat=a.clearcoat;this.clearcoatMap=a.clearcoatMap;this.clearcoatRoughness=a.clearcoatRoughness;this.clearcoatRoughnessMap=a.clearcoatRoughnessMap;this.clearcoatNormalMap=a.clearcoatNormalMap;this.clearcoatNormalScale.copy(a.clearcoatNormalScale);this.reflectivity=a.reflectivity;this.sheen=a.sheen?(this.sheen||new x).copy(a.sheen):
|
|
|
-null;this.transmission=a.transmission;this.transmissionMap=a.transmissionMap;return this};$b.prototype=Object.create(M.prototype);$b.prototype.constructor=$b;$b.prototype.isMeshPhongMaterial=!0;$b.prototype.copy=function(a){M.prototype.copy.call(this,a);this.color.copy(a.color);this.specular.copy(a.specular);this.shininess=a.shininess;this.map=a.map;this.lightMap=a.lightMap;this.lightMapIntensity=a.lightMapIntensity;this.aoMap=a.aoMap;this.aoMapIntensity=a.aoMapIntensity;this.emissive.copy(a.emissive);
|
|
|
+null;this.transmission=a.transmission;this.transmissionMap=a.transmissionMap;return this};$b.prototype=Object.create(L.prototype);$b.prototype.constructor=$b;$b.prototype.isMeshPhongMaterial=!0;$b.prototype.copy=function(a){L.prototype.copy.call(this,a);this.color.copy(a.color);this.specular.copy(a.specular);this.shininess=a.shininess;this.map=a.map;this.lightMap=a.lightMap;this.lightMapIntensity=a.lightMapIntensity;this.aoMap=a.aoMap;this.aoMapIntensity=a.aoMapIntensity;this.emissive.copy(a.emissive);
|
|
|
this.emissiveMap=a.emissiveMap;this.emissiveIntensity=a.emissiveIntensity;this.bumpMap=a.bumpMap;this.bumpScale=a.bumpScale;this.normalMap=a.normalMap;this.normalMapType=a.normalMapType;this.normalScale.copy(a.normalScale);this.displacementMap=a.displacementMap;this.displacementScale=a.displacementScale;this.displacementBias=a.displacementBias;this.specularMap=a.specularMap;this.alphaMap=a.alphaMap;this.envMap=a.envMap;this.combine=a.combine;this.reflectivity=a.reflectivity;this.refractionRatio=a.refractionRatio;
|
|
|
-this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.wireframeLinecap=a.wireframeLinecap;this.wireframeLinejoin=a.wireframeLinejoin;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;return this};yc.prototype=Object.create(M.prototype);yc.prototype.constructor=yc;yc.prototype.isMeshToonMaterial=!0;yc.prototype.copy=function(a){M.prototype.copy.call(this,a);this.color.copy(a.color);this.map=a.map;this.gradientMap=a.gradientMap;this.lightMap=
|
|
|
+this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.wireframeLinecap=a.wireframeLinecap;this.wireframeLinejoin=a.wireframeLinejoin;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;return this};yc.prototype=Object.create(L.prototype);yc.prototype.constructor=yc;yc.prototype.isMeshToonMaterial=!0;yc.prototype.copy=function(a){L.prototype.copy.call(this,a);this.color.copy(a.color);this.map=a.map;this.gradientMap=a.gradientMap;this.lightMap=
|
|
|
a.lightMap;this.lightMapIntensity=a.lightMapIntensity;this.aoMap=a.aoMap;this.aoMapIntensity=a.aoMapIntensity;this.emissive.copy(a.emissive);this.emissiveMap=a.emissiveMap;this.emissiveIntensity=a.emissiveIntensity;this.bumpMap=a.bumpMap;this.bumpScale=a.bumpScale;this.normalMap=a.normalMap;this.normalMapType=a.normalMapType;this.normalScale.copy(a.normalScale);this.displacementMap=a.displacementMap;this.displacementScale=a.displacementScale;this.displacementBias=a.displacementBias;this.alphaMap=
|
|
|
-a.alphaMap;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.wireframeLinecap=a.wireframeLinecap;this.wireframeLinejoin=a.wireframeLinejoin;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;return this};zc.prototype=Object.create(M.prototype);zc.prototype.constructor=zc;zc.prototype.isMeshNormalMaterial=!0;zc.prototype.copy=function(a){M.prototype.copy.call(this,a);this.bumpMap=a.bumpMap;this.bumpScale=a.bumpScale;this.normalMap=
|
|
|
-a.normalMap;this.normalMapType=a.normalMapType;this.normalScale.copy(a.normalScale);this.displacementMap=a.displacementMap;this.displacementScale=a.displacementScale;this.displacementBias=a.displacementBias;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;return this};Ac.prototype=Object.create(M.prototype);Ac.prototype.constructor=Ac;Ac.prototype.isMeshLambertMaterial=!0;Ac.prototype.copy=
|
|
|
-function(a){M.prototype.copy.call(this,a);this.color.copy(a.color);this.map=a.map;this.lightMap=a.lightMap;this.lightMapIntensity=a.lightMapIntensity;this.aoMap=a.aoMap;this.aoMapIntensity=a.aoMapIntensity;this.emissive.copy(a.emissive);this.emissiveMap=a.emissiveMap;this.emissiveIntensity=a.emissiveIntensity;this.specularMap=a.specularMap;this.alphaMap=a.alphaMap;this.envMap=a.envMap;this.combine=a.combine;this.reflectivity=a.reflectivity;this.refractionRatio=a.refractionRatio;this.wireframe=a.wireframe;
|
|
|
-this.wireframeLinewidth=a.wireframeLinewidth;this.wireframeLinecap=a.wireframeLinecap;this.wireframeLinejoin=a.wireframeLinejoin;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;return this};Bc.prototype=Object.create(M.prototype);Bc.prototype.constructor=Bc;Bc.prototype.isMeshMatcapMaterial=!0;Bc.prototype.copy=function(a){M.prototype.copy.call(this,a);this.defines={MATCAP:""};this.color.copy(a.color);this.matcap=a.matcap;this.map=a.map;this.bumpMap=a.bumpMap;
|
|
|
+a.alphaMap;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.wireframeLinecap=a.wireframeLinecap;this.wireframeLinejoin=a.wireframeLinejoin;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;return this};zc.prototype=Object.create(L.prototype);zc.prototype.constructor=zc;zc.prototype.isMeshNormalMaterial=!0;zc.prototype.copy=function(a){L.prototype.copy.call(this,a);this.bumpMap=a.bumpMap;this.bumpScale=a.bumpScale;this.normalMap=
|
|
|
+a.normalMap;this.normalMapType=a.normalMapType;this.normalScale.copy(a.normalScale);this.displacementMap=a.displacementMap;this.displacementScale=a.displacementScale;this.displacementBias=a.displacementBias;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;return this};Ac.prototype=Object.create(L.prototype);Ac.prototype.constructor=Ac;Ac.prototype.isMeshLambertMaterial=!0;Ac.prototype.copy=
|
|
|
+function(a){L.prototype.copy.call(this,a);this.color.copy(a.color);this.map=a.map;this.lightMap=a.lightMap;this.lightMapIntensity=a.lightMapIntensity;this.aoMap=a.aoMap;this.aoMapIntensity=a.aoMapIntensity;this.emissive.copy(a.emissive);this.emissiveMap=a.emissiveMap;this.emissiveIntensity=a.emissiveIntensity;this.specularMap=a.specularMap;this.alphaMap=a.alphaMap;this.envMap=a.envMap;this.combine=a.combine;this.reflectivity=a.reflectivity;this.refractionRatio=a.refractionRatio;this.wireframe=a.wireframe;
|
|
|
+this.wireframeLinewidth=a.wireframeLinewidth;this.wireframeLinecap=a.wireframeLinecap;this.wireframeLinejoin=a.wireframeLinejoin;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;return this};Bc.prototype=Object.create(L.prototype);Bc.prototype.constructor=Bc;Bc.prototype.isMeshMatcapMaterial=!0;Bc.prototype.copy=function(a){L.prototype.copy.call(this,a);this.defines={MATCAP:""};this.color.copy(a.color);this.matcap=a.matcap;this.map=a.map;this.bumpMap=a.bumpMap;
|
|
|
this.bumpScale=a.bumpScale;this.normalMap=a.normalMap;this.normalMapType=a.normalMapType;this.normalScale.copy(a.normalScale);this.displacementMap=a.displacementMap;this.displacementScale=a.displacementScale;this.displacementBias=a.displacementBias;this.alphaMap=a.alphaMap;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;return this};Cc.prototype=Object.create(pa.prototype);Cc.prototype.constructor=Cc;Cc.prototype.isLineDashedMaterial=!0;Cc.prototype.copy=
|
|
|
function(a){pa.prototype.copy.call(this,a);this.scale=a.scale;this.dashSize=a.dashSize;this.gapSize=a.gapSize;return this};var Xk=Object.freeze({__proto__:null,ShadowMaterial:xc,SpriteMaterial:Xb,RawShaderMaterial:Db,ShaderMaterial:Aa,PointsMaterial:eb,MeshPhysicalMaterial:Zb,MeshStandardMaterial:rb,MeshPhongMaterial:$b,MeshToonMaterial:yc,MeshNormalMaterial:zc,MeshLambertMaterial:Ac,MeshDepthMaterial:Sb,MeshDistanceMaterial:Tb,MeshBasicMaterial:Za,MeshMatcapMaterial:Bc,LineDashedMaterial:Cc,LineBasicMaterial:pa,
|
|
|
-Material:M}),Z={arraySlice:function(a,b,d){return Z.isTypedArray(a)?new a.constructor(a.subarray(b,void 0!==d?d:a.length)):a.slice(b,d)},convertArray:function(a,b,d){return!a||!d&&a.constructor===b?a:"number"===typeof b.BYTES_PER_ELEMENT?new b(a):Array.prototype.slice.call(a)},isTypedArray:function(a){return ArrayBuffer.isView(a)&&!(a instanceof DataView)},getKeyframeOrder:function(a){for(var b=a.length,d=Array(b),e=0;e!==b;++e)d[e]=e;d.sort(function(b,d){return a[b]-a[d]});return d},sortedArray:function(a,
|
|
|
+Material:L}),Z={arraySlice:function(a,b,d){return Z.isTypedArray(a)?new a.constructor(a.subarray(b,void 0!==d?d:a.length)):a.slice(b,d)},convertArray:function(a,b,d){return!a||!d&&a.constructor===b?a:"number"===typeof b.BYTES_PER_ELEMENT?new b(a):Array.prototype.slice.call(a)},isTypedArray:function(a){return ArrayBuffer.isView(a)&&!(a instanceof DataView)},getKeyframeOrder:function(a){for(var b=a.length,d=Array(b),e=0;e!==b;++e)d[e]=e;d.sort(function(b,d){return a[b]-a[d]});return d},sortedArray:function(a,
|
|
|
b,d){for(var e=a.length,f=new a.constructor(e),g=0,h=0;h!==e;++g)for(var l=d[g]*b,k=0;k!==b;++k)f[h++]=a[l+k];return f},flattenJSON:function(a,b,d,e){for(var f=1,g=a[0];void 0!==g&&void 0===g[e];)g=a[f++];if(void 0!==g){var h=g[e];if(void 0!==h)if(Array.isArray(h)){do h=g[e],void 0!==h&&(b.push(g.time),d.push.apply(d,h)),g=a[f++];while(void 0!==g)}else if(void 0!==h.toArray){do h=g[e],void 0!==h&&(b.push(g.time),h.toArray(d,d.length)),g=a[f++];while(void 0!==g)}else{do h=g[e],void 0!==h&&(b.push(g.time),
|
|
|
d.push(h)),g=a[f++];while(void 0!==g)}}},subclip:function(a,b,d,e,f){f=f||30;a=a.clone();a.name=b;b=[];for(var g=0;g<a.tracks.length;++g){for(var h=a.tracks[g],l=h.getValueSize(),k=[],m=[],u=0;u<h.times.length;++u){var q=h.times[u]*f;if(!(q<d||q>=e))for(k.push(h.times[u]),q=0;q<l;++q)m.push(h.values[u*l+q])}0!==k.length&&(h.times=Z.convertArray(k,h.times.constructor),h.values=Z.convertArray(m,h.values.constructor),b.push(h))}a.tracks=b;d=Infinity;for(e=0;e<a.tracks.length;++e)d>a.tracks[e].times[0]&&
|
|
|
(d=a.tracks[e].times[0]);for(e=0;e<a.tracks.length;++e)a.tracks[e].shift(-1*d);a.resetDuration();return a},makeClipAdditive:function(a,b,d,e){void 0===b&&(b=0);void 0===d&&(d=a);if(void 0===e||0>=e)e=30;var f=a.tracks.length,g=b/e;b=function(b){var e=d.tracks[b],f=e.ValueTypeName;if("bool"!==f&&"string"!==f&&(b=a.tracks.find(function(a){return a.name===e.name&&a.ValueTypeName===f}),void 0!==b)){var h=0,k=e.getValueSize();e.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(h=k/3);var m=
|
|
@@ -797,39 +797,39 @@ a.width,l.image.height=a.height,l.mipmaps=a.mipmaps;1===a.mipmapCount&&(l.minFil
|
|
|
void 0!==this.path&&(a=this.path+a);a=this.manager.resolveURL(a);var h=this,l=Gc.get(a);if(void 0!==l)return h.manager.itemStart(a),setTimeout(function(){b&&b(l);h.manager.itemEnd(a)},0),l;var k=document.createElementNS("http://www.w3.org/1999/xhtml","img");k.addEventListener("load",f,!1);k.addEventListener("error",g,!1);"data:"!==a.substr(0,5)&&void 0!==this.crossOrigin&&(k.crossOrigin=this.crossOrigin);h.manager.itemStart(a);k.src=a;return k}});pf.prototype=Object.assign(Object.create(ba.prototype),
|
|
|
{constructor:pf,load:function(a,b,d,e){function f(d){h.load(a[d],function(a){g.images[d]=a;l++;6===l&&(g.needsUpdate=!0,b&&b(g))},void 0,e)}var g=new zb,h=new od(this.manager);h.setCrossOrigin(this.crossOrigin);h.setPath(this.path);var l=0;for(d=0;d<a.length;++d)f(d);return g}});qf.prototype=Object.assign(Object.create(ba.prototype),{constructor:qf,load:function(a,b,d,e){var f=this,g=new nc,h=new bb(this.manager);h.setResponseType("arraybuffer");h.setRequestHeader(this.requestHeader);h.setPath(this.path);
|
|
|
h.load(a,function(a){if(a=f.parse(a))void 0!==a.image?g.image=a.image:void 0!==a.data&&(g.image.width=a.width,g.image.height=a.height,g.image.data=a.data),g.wrapS=void 0!==a.wrapS?a.wrapS:1001,g.wrapT=void 0!==a.wrapT?a.wrapT:1001,g.magFilter=void 0!==a.magFilter?a.magFilter:1006,g.minFilter=void 0!==a.minFilter?a.minFilter:1006,g.anisotropy=void 0!==a.anisotropy?a.anisotropy:1,void 0!==a.format&&(g.format=a.format),void 0!==a.type&&(g.type=a.type),void 0!==a.mipmaps&&(g.mipmaps=a.mipmaps,g.minFilter=
|
|
|
-1008),1===a.mipmapCount&&(g.minFilter=1006),g.needsUpdate=!0,b&&b(g,a)},d,e);return g}});rf.prototype=Object.assign(Object.create(ba.prototype),{constructor:rf,load:function(a,b,d,e){var f=new fa,g=new od(this.manager);g.setCrossOrigin(this.crossOrigin);g.setPath(this.path);g.load(a,function(d){f.image=d;d=0<a.search(/\.jpe?g($|\?)/i)||0===a.search(/^data:image\/jpeg/);f.format=d?1022:1023;f.needsUpdate=!0;void 0!==b&&b(f)},d,e);return f}});Object.assign(L.prototype,{getPoint:function(){console.warn("THREE.Curve: .getPoint() not implemented.");
|
|
|
+1008),1===a.mipmapCount&&(g.minFilter=1006),g.needsUpdate=!0,b&&b(g,a)},d,e);return g}});rf.prototype=Object.assign(Object.create(ba.prototype),{constructor:rf,load:function(a,b,d,e){var f=new fa,g=new od(this.manager);g.setCrossOrigin(this.crossOrigin);g.setPath(this.path);g.load(a,function(d){f.image=d;d=0<a.search(/\.jpe?g($|\?)/i)||0===a.search(/^data:image\/jpeg/);f.format=d?1022:1023;f.needsUpdate=!0;void 0!==b&&b(f)},d,e);return f}});Object.assign(K.prototype,{getPoint:function(){console.warn("THREE.Curve: .getPoint() not implemented.");
|
|
|
return null},getPointAt:function(a,b){a=this.getUtoTmapping(a);return this.getPoint(a,b)},getPoints:function(a){void 0===a&&(a=5);for(var b=[],d=0;d<=a;d++)b.push(this.getPoint(d/a));return b},getSpacedPoints:function(a){void 0===a&&(a=5);for(var b=[],d=0;d<=a;d++)b.push(this.getPointAt(d/a));return b},getLength:function(){var a=this.getLengths();return a[a.length-1]},getLengths:function(a){void 0===a&&(a=this.arcLengthDivisions);if(this.cacheArcLengths&&this.cacheArcLengths.length===a+1&&!this.needsUpdate)return this.cacheArcLengths;
|
|
|
this.needsUpdate=!1;var b=[],d=this.getPoint(0),e=0;b.push(0);for(var f=1;f<=a;f++){var g=this.getPoint(f/a);e+=g.distanceTo(d);b.push(e);d=g}return this.cacheArcLengths=b},updateArcLengths:function(){this.needsUpdate=!0;this.getLengths()},getUtoTmapping:function(a,b){var d=this.getLengths(),e=d.length;b=b?b:a*d[e-1];for(var f=0,g=e-1,h;f<=g;)if(a=Math.floor(f+(g-f)/2),h=d[a]-b,0>h)f=a+1;else if(0<h)g=a-1;else{g=a;break}a=g;if(d[a]===b)return a/(e-1);f=d[a];return(a+(b-f)/(d[a+1]-f))/(e-1)},getTangent:function(a,
|
|
|
b){var d=a-1E-4;a+=1E-4;0>d&&(d=0);1<a&&(a=1);d=this.getPoint(d);a=this.getPoint(a);b=b||(d.isVector2?new p:new m);b.copy(a).sub(d).normalize();return b},getTangentAt:function(a,b){a=this.getUtoTmapping(a);return this.getTangent(a,b)},computeFrenetFrames:function(a,b){for(var d=new m,e=[],f=[],g=[],h=new m,l=new z,k=0;k<=a;k++)e[k]=this.getTangentAt(k/a,new m),e[k].normalize();f[0]=new m;g[0]=new m;k=Number.MAX_VALUE;var r=Math.abs(e[0].x),u=Math.abs(e[0].y),q=Math.abs(e[0].z);r<=k&&(k=r,d.set(1,
|
|
|
0,0));u<=k&&(k=u,d.set(0,1,0));q<=k&&d.set(0,0,1);h.crossVectors(e[0],d).normalize();f[0].crossVectors(e[0],h);g[0].crossVectors(e[0],f[0]);for(d=1;d<=a;d++)f[d]=f[d-1].clone(),g[d]=g[d-1].clone(),h.crossVectors(e[d-1],e[d]),h.length()>Number.EPSILON&&(h.normalize(),k=Math.acos(T.clamp(e[d-1].dot(e[d]),-1,1)),f[d].applyMatrix4(l.makeRotationAxis(h,k))),g[d].crossVectors(e[d],f[d]);if(!0===b)for(b=Math.acos(T.clamp(f[0].dot(f[a]),-1,1)),b/=a,0<e[0].dot(h.crossVectors(f[0],f[a]))&&(b=-b),h=1;h<=a;h++)f[h].applyMatrix4(l.makeRotationAxis(e[h],
|
|
|
-b*h)),g[h].crossVectors(e[h],f[h]);return{tangents:e,normals:f,binormals:g}},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.arcLengthDivisions=a.arcLengthDivisions;return this},toJSON:function(){var a={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};a.arcLengthDivisions=this.arcLengthDivisions;a.type=this.type;return a},fromJSON:function(a){this.arcLengthDivisions=a.arcLengthDivisions;return this}});Xa.prototype=Object.create(L.prototype);Xa.prototype.constructor=
|
|
|
+b*h)),g[h].crossVectors(e[h],f[h]);return{tangents:e,normals:f,binormals:g}},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.arcLengthDivisions=a.arcLengthDivisions;return this},toJSON:function(){var a={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};a.arcLengthDivisions=this.arcLengthDivisions;a.type=this.type;return a},fromJSON:function(a){this.arcLengthDivisions=a.arcLengthDivisions;return this}});Xa.prototype=Object.create(K.prototype);Xa.prototype.constructor=
|
|
|
Xa;Xa.prototype.isEllipseCurve=!0;Xa.prototype.getPoint=function(a,b){b=b||new p;for(var d=2*Math.PI,e=this.aEndAngle-this.aStartAngle,f=Math.abs(e)<Number.EPSILON;0>e;)e+=d;for(;e>d;)e-=d;e<Number.EPSILON&&(e=f?0:d);!0!==this.aClockwise||f||(e=e===d?-d:e-d);d=this.aStartAngle+a*e;a=this.aX+this.xRadius*Math.cos(d);var g=this.aY+this.yRadius*Math.sin(d);0!==this.aRotation&&(d=Math.cos(this.aRotation),e=Math.sin(this.aRotation),f=a-this.aX,g-=this.aY,a=f*d-g*e+this.aX,g=f*e+g*d+this.aY);return b.set(a,
|
|
|
-g)};Xa.prototype.copy=function(a){L.prototype.copy.call(this,a);this.aX=a.aX;this.aY=a.aY;this.xRadius=a.xRadius;this.yRadius=a.yRadius;this.aStartAngle=a.aStartAngle;this.aEndAngle=a.aEndAngle;this.aClockwise=a.aClockwise;this.aRotation=a.aRotation;return this};Xa.prototype.toJSON=function(){var a=L.prototype.toJSON.call(this);a.aX=this.aX;a.aY=this.aY;a.xRadius=this.xRadius;a.yRadius=this.yRadius;a.aStartAngle=this.aStartAngle;a.aEndAngle=this.aEndAngle;a.aClockwise=this.aClockwise;a.aRotation=
|
|
|
-this.aRotation;return a};Xa.prototype.fromJSON=function(a){L.prototype.fromJSON.call(this,a);this.aX=a.aX;this.aY=a.aY;this.xRadius=a.xRadius;this.yRadius=a.yRadius;this.aStartAngle=a.aStartAngle;this.aEndAngle=a.aEndAngle;this.aClockwise=a.aClockwise;this.aRotation=a.aRotation;return this};pd.prototype=Object.create(Xa.prototype);pd.prototype.constructor=pd;pd.prototype.isArcCurve=!0;var bg=new m,ph=new Ig,qh=new Ig,rh=new Ig;za.prototype=Object.create(L.prototype);za.prototype.constructor=za;za.prototype.isCatmullRomCurve3=
|
|
|
+g)};Xa.prototype.copy=function(a){K.prototype.copy.call(this,a);this.aX=a.aX;this.aY=a.aY;this.xRadius=a.xRadius;this.yRadius=a.yRadius;this.aStartAngle=a.aStartAngle;this.aEndAngle=a.aEndAngle;this.aClockwise=a.aClockwise;this.aRotation=a.aRotation;return this};Xa.prototype.toJSON=function(){var a=K.prototype.toJSON.call(this);a.aX=this.aX;a.aY=this.aY;a.xRadius=this.xRadius;a.yRadius=this.yRadius;a.aStartAngle=this.aStartAngle;a.aEndAngle=this.aEndAngle;a.aClockwise=this.aClockwise;a.aRotation=
|
|
|
+this.aRotation;return a};Xa.prototype.fromJSON=function(a){K.prototype.fromJSON.call(this,a);this.aX=a.aX;this.aY=a.aY;this.xRadius=a.xRadius;this.yRadius=a.yRadius;this.aStartAngle=a.aStartAngle;this.aEndAngle=a.aEndAngle;this.aClockwise=a.aClockwise;this.aRotation=a.aRotation;return this};pd.prototype=Object.create(Xa.prototype);pd.prototype.constructor=pd;pd.prototype.isArcCurve=!0;var bg=new m,ph=new Ig,qh=new Ig,rh=new Ig;za.prototype=Object.create(K.prototype);za.prototype.constructor=za;za.prototype.isCatmullRomCurve3=
|
|
|
!0;za.prototype.getPoint=function(a,b){b=b||new m;var d=this.points,e=d.length;a*=e-(this.closed?0:1);var f=Math.floor(a);a-=f;this.closed?f+=0<f?0:(Math.floor(Math.abs(f)/e)+1)*e:0===a&&f===e-1&&(f=e-2,a=1);if(this.closed||0<f)var g=d[(f-1)%e];else bg.subVectors(d[0],d[1]).add(d[0]),g=bg;var h=d[f%e],l=d[(f+1)%e];this.closed||f+2<e?d=d[(f+2)%e]:(bg.subVectors(d[e-1],d[e-2]).add(d[e-1]),d=bg);if("centripetal"===this.curveType||"chordal"===this.curveType){var k="chordal"===this.curveType?.5:.25;e=
|
|
|
Math.pow(g.distanceToSquared(h),k);f=Math.pow(h.distanceToSquared(l),k);k=Math.pow(l.distanceToSquared(d),k);1E-4>f&&(f=1);1E-4>e&&(e=f);1E-4>k&&(k=f);ph.initNonuniformCatmullRom(g.x,h.x,l.x,d.x,e,f,k);qh.initNonuniformCatmullRom(g.y,h.y,l.y,d.y,e,f,k);rh.initNonuniformCatmullRom(g.z,h.z,l.z,d.z,e,f,k)}else"catmullrom"===this.curveType&&(ph.initCatmullRom(g.x,h.x,l.x,d.x,this.tension),qh.initCatmullRom(g.y,h.y,l.y,d.y,this.tension),rh.initCatmullRom(g.z,h.z,l.z,d.z,this.tension));b.set(ph.calc(a),
|
|
|
-qh.calc(a),rh.calc(a));return b};za.prototype.copy=function(a){L.prototype.copy.call(this,a);this.points=[];for(var b=0,d=a.points.length;b<d;b++)this.points.push(a.points[b].clone());this.closed=a.closed;this.curveType=a.curveType;this.tension=a.tension;return this};za.prototype.toJSON=function(){var a=L.prototype.toJSON.call(this);a.points=[];for(var b=0,d=this.points.length;b<d;b++)a.points.push(this.points[b].toArray());a.closed=this.closed;a.curveType=this.curveType;a.tension=this.tension;return a};
|
|
|
-za.prototype.fromJSON=function(a){L.prototype.fromJSON.call(this,a);this.points=[];for(var b=0,d=a.points.length;b<d;b++){var e=a.points[b];this.points.push((new m).fromArray(e))}this.closed=a.closed;this.curveType=a.curveType;this.tension=a.tension;return this};fb.prototype=Object.create(L.prototype);fb.prototype.constructor=fb;fb.prototype.isCubicBezierCurve=!0;fb.prototype.getPoint=function(a,b){b=b||new p;var d=this.v0,e=this.v1,f=this.v2,g=this.v3;b.set(Ae(a,d.x,e.x,f.x,g.x),Ae(a,d.y,e.y,f.y,
|
|
|
-g.y));return b};fb.prototype.copy=function(a){L.prototype.copy.call(this,a);this.v0.copy(a.v0);this.v1.copy(a.v1);this.v2.copy(a.v2);this.v3.copy(a.v3);return this};fb.prototype.toJSON=function(){var a=L.prototype.toJSON.call(this);a.v0=this.v0.toArray();a.v1=this.v1.toArray();a.v2=this.v2.toArray();a.v3=this.v3.toArray();return a};fb.prototype.fromJSON=function(a){L.prototype.fromJSON.call(this,a);this.v0.fromArray(a.v0);this.v1.fromArray(a.v1);this.v2.fromArray(a.v2);this.v3.fromArray(a.v3);return this};
|
|
|
-sb.prototype=Object.create(L.prototype);sb.prototype.constructor=sb;sb.prototype.isCubicBezierCurve3=!0;sb.prototype.getPoint=function(a,b){b=b||new m;var d=this.v0,e=this.v1,f=this.v2,g=this.v3;b.set(Ae(a,d.x,e.x,f.x,g.x),Ae(a,d.y,e.y,f.y,g.y),Ae(a,d.z,e.z,f.z,g.z));return b};sb.prototype.copy=function(a){L.prototype.copy.call(this,a);this.v0.copy(a.v0);this.v1.copy(a.v1);this.v2.copy(a.v2);this.v3.copy(a.v3);return this};sb.prototype.toJSON=function(){var a=L.prototype.toJSON.call(this);a.v0=this.v0.toArray();
|
|
|
-a.v1=this.v1.toArray();a.v2=this.v2.toArray();a.v3=this.v3.toArray();return a};sb.prototype.fromJSON=function(a){L.prototype.fromJSON.call(this,a);this.v0.fromArray(a.v0);this.v1.fromArray(a.v1);this.v2.fromArray(a.v2);this.v3.fromArray(a.v3);return this};Pa.prototype=Object.create(L.prototype);Pa.prototype.constructor=Pa;Pa.prototype.isLineCurve=!0;Pa.prototype.getPoint=function(a,b){b=b||new p;1===a?b.copy(this.v2):(b.copy(this.v2).sub(this.v1),b.multiplyScalar(a).add(this.v1));return b};Pa.prototype.getPointAt=
|
|
|
-function(a,b){return this.getPoint(a,b)};Pa.prototype.getTangent=function(a,b){a=b||new p;a.copy(this.v2).sub(this.v1).normalize();return a};Pa.prototype.copy=function(a){L.prototype.copy.call(this,a);this.v1.copy(a.v1);this.v2.copy(a.v2);return this};Pa.prototype.toJSON=function(){var a=L.prototype.toJSON.call(this);a.v1=this.v1.toArray();a.v2=this.v2.toArray();return a};Pa.prototype.fromJSON=function(a){L.prototype.fromJSON.call(this,a);this.v1.fromArray(a.v1);this.v2.fromArray(a.v2);return this};
|
|
|
-gb.prototype=Object.create(L.prototype);gb.prototype.constructor=gb;gb.prototype.isLineCurve3=!0;gb.prototype.getPoint=function(a,b){b=b||new m;1===a?b.copy(this.v2):(b.copy(this.v2).sub(this.v1),b.multiplyScalar(a).add(this.v1));return b};gb.prototype.getPointAt=function(a,b){return this.getPoint(a,b)};gb.prototype.copy=function(a){L.prototype.copy.call(this,a);this.v1.copy(a.v1);this.v2.copy(a.v2);return this};gb.prototype.toJSON=function(){var a=L.prototype.toJSON.call(this);a.v1=this.v1.toArray();
|
|
|
-a.v2=this.v2.toArray();return a};gb.prototype.fromJSON=function(a){L.prototype.fromJSON.call(this,a);this.v1.fromArray(a.v1);this.v2.fromArray(a.v2);return this};hb.prototype=Object.create(L.prototype);hb.prototype.constructor=hb;hb.prototype.isQuadraticBezierCurve=!0;hb.prototype.getPoint=function(a,b){b=b||new p;var d=this.v0,e=this.v1,f=this.v2;b.set(ze(a,d.x,e.x,f.x),ze(a,d.y,e.y,f.y));return b};hb.prototype.copy=function(a){L.prototype.copy.call(this,a);this.v0.copy(a.v0);this.v1.copy(a.v1);
|
|
|
-this.v2.copy(a.v2);return this};hb.prototype.toJSON=function(){var a=L.prototype.toJSON.call(this);a.v0=this.v0.toArray();a.v1=this.v1.toArray();a.v2=this.v2.toArray();return a};hb.prototype.fromJSON=function(a){L.prototype.fromJSON.call(this,a);this.v0.fromArray(a.v0);this.v1.fromArray(a.v1);this.v2.fromArray(a.v2);return this};tb.prototype=Object.create(L.prototype);tb.prototype.constructor=tb;tb.prototype.isQuadraticBezierCurve3=!0;tb.prototype.getPoint=function(a,b){b=b||new m;var d=this.v0,e=
|
|
|
-this.v1,f=this.v2;b.set(ze(a,d.x,e.x,f.x),ze(a,d.y,e.y,f.y),ze(a,d.z,e.z,f.z));return b};tb.prototype.copy=function(a){L.prototype.copy.call(this,a);this.v0.copy(a.v0);this.v1.copy(a.v1);this.v2.copy(a.v2);return this};tb.prototype.toJSON=function(){var a=L.prototype.toJSON.call(this);a.v0=this.v0.toArray();a.v1=this.v1.toArray();a.v2=this.v2.toArray();return a};tb.prototype.fromJSON=function(a){L.prototype.fromJSON.call(this,a);this.v0.fromArray(a.v0);this.v1.fromArray(a.v1);this.v2.fromArray(a.v2);
|
|
|
-return this};ib.prototype=Object.create(L.prototype);ib.prototype.constructor=ib;ib.prototype.isSplineCurve=!0;ib.prototype.getPoint=function(a,b){b=b||new p;var d=this.points,e=(d.length-1)*a;a=Math.floor(e);e-=a;var f=d[0===a?a:a-1],g=d[a],h=d[a>d.length-2?d.length-1:a+1];d=d[a>d.length-3?d.length-1:a+2];b.set(ki(e,f.x,g.x,h.x,d.x),ki(e,f.y,g.y,h.y,d.y));return b};ib.prototype.copy=function(a){L.prototype.copy.call(this,a);this.points=[];for(var b=0,d=a.points.length;b<d;b++)this.points.push(a.points[b].clone());
|
|
|
-return this};ib.prototype.toJSON=function(){var a=L.prototype.toJSON.call(this);a.points=[];for(var b=0,d=this.points.length;b<d;b++)a.points.push(this.points[b].toArray());return a};ib.prototype.fromJSON=function(a){L.prototype.fromJSON.call(this,a);this.points=[];for(var b=0,d=a.points.length;b<d;b++){var e=a.points[b];this.points.push((new p).fromArray(e))}return this};var sh=Object.freeze({__proto__:null,ArcCurve:pd,CatmullRomCurve3:za,CubicBezierCurve:fb,CubicBezierCurve3:sb,EllipseCurve:Xa,
|
|
|
-LineCurve:Pa,LineCurve3:gb,QuadraticBezierCurve:hb,QuadraticBezierCurve3:tb,SplineCurve:ib});Eb.prototype=Object.assign(Object.create(L.prototype),{constructor:Eb,add:function(a){this.curves.push(a)},closePath:function(){var a=this.curves[0].getPoint(0),b=this.curves[this.curves.length-1].getPoint(1);a.equals(b)||this.curves.push(new Pa(b,a))},getPoint:function(a){var b=a*this.getLength(),d=this.getCurveLengths();for(a=0;a<d.length;){if(d[a]>=b)return b=d[a]-b,a=this.curves[a],d=a.getLength(),a.getPointAt(0===
|
|
|
+qh.calc(a),rh.calc(a));return b};za.prototype.copy=function(a){K.prototype.copy.call(this,a);this.points=[];for(var b=0,d=a.points.length;b<d;b++)this.points.push(a.points[b].clone());this.closed=a.closed;this.curveType=a.curveType;this.tension=a.tension;return this};za.prototype.toJSON=function(){var a=K.prototype.toJSON.call(this);a.points=[];for(var b=0,d=this.points.length;b<d;b++)a.points.push(this.points[b].toArray());a.closed=this.closed;a.curveType=this.curveType;a.tension=this.tension;return a};
|
|
|
+za.prototype.fromJSON=function(a){K.prototype.fromJSON.call(this,a);this.points=[];for(var b=0,d=a.points.length;b<d;b++){var e=a.points[b];this.points.push((new m).fromArray(e))}this.closed=a.closed;this.curveType=a.curveType;this.tension=a.tension;return this};fb.prototype=Object.create(K.prototype);fb.prototype.constructor=fb;fb.prototype.isCubicBezierCurve=!0;fb.prototype.getPoint=function(a,b){b=b||new p;var d=this.v0,e=this.v1,f=this.v2,g=this.v3;b.set(Ae(a,d.x,e.x,f.x,g.x),Ae(a,d.y,e.y,f.y,
|
|
|
+g.y));return b};fb.prototype.copy=function(a){K.prototype.copy.call(this,a);this.v0.copy(a.v0);this.v1.copy(a.v1);this.v2.copy(a.v2);this.v3.copy(a.v3);return this};fb.prototype.toJSON=function(){var a=K.prototype.toJSON.call(this);a.v0=this.v0.toArray();a.v1=this.v1.toArray();a.v2=this.v2.toArray();a.v3=this.v3.toArray();return a};fb.prototype.fromJSON=function(a){K.prototype.fromJSON.call(this,a);this.v0.fromArray(a.v0);this.v1.fromArray(a.v1);this.v2.fromArray(a.v2);this.v3.fromArray(a.v3);return this};
|
|
|
+sb.prototype=Object.create(K.prototype);sb.prototype.constructor=sb;sb.prototype.isCubicBezierCurve3=!0;sb.prototype.getPoint=function(a,b){b=b||new m;var d=this.v0,e=this.v1,f=this.v2,g=this.v3;b.set(Ae(a,d.x,e.x,f.x,g.x),Ae(a,d.y,e.y,f.y,g.y),Ae(a,d.z,e.z,f.z,g.z));return b};sb.prototype.copy=function(a){K.prototype.copy.call(this,a);this.v0.copy(a.v0);this.v1.copy(a.v1);this.v2.copy(a.v2);this.v3.copy(a.v3);return this};sb.prototype.toJSON=function(){var a=K.prototype.toJSON.call(this);a.v0=this.v0.toArray();
|
|
|
+a.v1=this.v1.toArray();a.v2=this.v2.toArray();a.v3=this.v3.toArray();return a};sb.prototype.fromJSON=function(a){K.prototype.fromJSON.call(this,a);this.v0.fromArray(a.v0);this.v1.fromArray(a.v1);this.v2.fromArray(a.v2);this.v3.fromArray(a.v3);return this};Pa.prototype=Object.create(K.prototype);Pa.prototype.constructor=Pa;Pa.prototype.isLineCurve=!0;Pa.prototype.getPoint=function(a,b){b=b||new p;1===a?b.copy(this.v2):(b.copy(this.v2).sub(this.v1),b.multiplyScalar(a).add(this.v1));return b};Pa.prototype.getPointAt=
|
|
|
+function(a,b){return this.getPoint(a,b)};Pa.prototype.getTangent=function(a,b){a=b||new p;a.copy(this.v2).sub(this.v1).normalize();return a};Pa.prototype.copy=function(a){K.prototype.copy.call(this,a);this.v1.copy(a.v1);this.v2.copy(a.v2);return this};Pa.prototype.toJSON=function(){var a=K.prototype.toJSON.call(this);a.v1=this.v1.toArray();a.v2=this.v2.toArray();return a};Pa.prototype.fromJSON=function(a){K.prototype.fromJSON.call(this,a);this.v1.fromArray(a.v1);this.v2.fromArray(a.v2);return this};
|
|
|
+gb.prototype=Object.create(K.prototype);gb.prototype.constructor=gb;gb.prototype.isLineCurve3=!0;gb.prototype.getPoint=function(a,b){b=b||new m;1===a?b.copy(this.v2):(b.copy(this.v2).sub(this.v1),b.multiplyScalar(a).add(this.v1));return b};gb.prototype.getPointAt=function(a,b){return this.getPoint(a,b)};gb.prototype.copy=function(a){K.prototype.copy.call(this,a);this.v1.copy(a.v1);this.v2.copy(a.v2);return this};gb.prototype.toJSON=function(){var a=K.prototype.toJSON.call(this);a.v1=this.v1.toArray();
|
|
|
+a.v2=this.v2.toArray();return a};gb.prototype.fromJSON=function(a){K.prototype.fromJSON.call(this,a);this.v1.fromArray(a.v1);this.v2.fromArray(a.v2);return this};hb.prototype=Object.create(K.prototype);hb.prototype.constructor=hb;hb.prototype.isQuadraticBezierCurve=!0;hb.prototype.getPoint=function(a,b){b=b||new p;var d=this.v0,e=this.v1,f=this.v2;b.set(ze(a,d.x,e.x,f.x),ze(a,d.y,e.y,f.y));return b};hb.prototype.copy=function(a){K.prototype.copy.call(this,a);this.v0.copy(a.v0);this.v1.copy(a.v1);
|
|
|
+this.v2.copy(a.v2);return this};hb.prototype.toJSON=function(){var a=K.prototype.toJSON.call(this);a.v0=this.v0.toArray();a.v1=this.v1.toArray();a.v2=this.v2.toArray();return a};hb.prototype.fromJSON=function(a){K.prototype.fromJSON.call(this,a);this.v0.fromArray(a.v0);this.v1.fromArray(a.v1);this.v2.fromArray(a.v2);return this};tb.prototype=Object.create(K.prototype);tb.prototype.constructor=tb;tb.prototype.isQuadraticBezierCurve3=!0;tb.prototype.getPoint=function(a,b){b=b||new m;var d=this.v0,e=
|
|
|
+this.v1,f=this.v2;b.set(ze(a,d.x,e.x,f.x),ze(a,d.y,e.y,f.y),ze(a,d.z,e.z,f.z));return b};tb.prototype.copy=function(a){K.prototype.copy.call(this,a);this.v0.copy(a.v0);this.v1.copy(a.v1);this.v2.copy(a.v2);return this};tb.prototype.toJSON=function(){var a=K.prototype.toJSON.call(this);a.v0=this.v0.toArray();a.v1=this.v1.toArray();a.v2=this.v2.toArray();return a};tb.prototype.fromJSON=function(a){K.prototype.fromJSON.call(this,a);this.v0.fromArray(a.v0);this.v1.fromArray(a.v1);this.v2.fromArray(a.v2);
|
|
|
+return this};ib.prototype=Object.create(K.prototype);ib.prototype.constructor=ib;ib.prototype.isSplineCurve=!0;ib.prototype.getPoint=function(a,b){b=b||new p;var d=this.points,e=(d.length-1)*a;a=Math.floor(e);e-=a;var f=d[0===a?a:a-1],g=d[a],h=d[a>d.length-2?d.length-1:a+1];d=d[a>d.length-3?d.length-1:a+2];b.set(ki(e,f.x,g.x,h.x,d.x),ki(e,f.y,g.y,h.y,d.y));return b};ib.prototype.copy=function(a){K.prototype.copy.call(this,a);this.points=[];for(var b=0,d=a.points.length;b<d;b++)this.points.push(a.points[b].clone());
|
|
|
+return this};ib.prototype.toJSON=function(){var a=K.prototype.toJSON.call(this);a.points=[];for(var b=0,d=this.points.length;b<d;b++)a.points.push(this.points[b].toArray());return a};ib.prototype.fromJSON=function(a){K.prototype.fromJSON.call(this,a);this.points=[];for(var b=0,d=a.points.length;b<d;b++){var e=a.points[b];this.points.push((new p).fromArray(e))}return this};var sh=Object.freeze({__proto__:null,ArcCurve:pd,CatmullRomCurve3:za,CubicBezierCurve:fb,CubicBezierCurve3:sb,EllipseCurve:Xa,
|
|
|
+LineCurve:Pa,LineCurve3:gb,QuadraticBezierCurve:hb,QuadraticBezierCurve3:tb,SplineCurve:ib});Eb.prototype=Object.assign(Object.create(K.prototype),{constructor:Eb,add:function(a){this.curves.push(a)},closePath:function(){var a=this.curves[0].getPoint(0),b=this.curves[this.curves.length-1].getPoint(1);a.equals(b)||this.curves.push(new Pa(b,a))},getPoint:function(a){var b=a*this.getLength(),d=this.getCurveLengths();for(a=0;a<d.length;){if(d[a]>=b)return b=d[a]-b,a=this.curves[a],d=a.getLength(),a.getPointAt(0===
|
|
|
d?0:1-b/d);a++}return null},getLength:function(){var a=this.getCurveLengths();return a[a.length-1]},updateArcLengths:function(){this.needsUpdate=!0;this.cacheLengths=null;this.getCurveLengths()},getCurveLengths:function(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var a=[],b=0,d=0,e=this.curves.length;d<e;d++)b+=this.curves[d].getLength(),a.push(b);return this.cacheLengths=a},getSpacedPoints:function(a){void 0===a&&(a=40);for(var b=[],d=0;d<=a;d++)b.push(this.getPoint(d/
|
|
|
-a));this.autoClose&&b.push(b[0]);return b},getPoints:function(a){a=a||12;for(var b=[],d,e=0,f=this.curves;e<f.length;e++){var g=f[e];g=g.getPoints(g&&g.isEllipseCurve?2*a:g&&(g.isLineCurve||g.isLineCurve3)?1:g&&g.isSplineCurve?a*g.points.length:a);for(var h=0;h<g.length;h++){var l=g[h];d&&d.equals(l)||(b.push(l),d=l)}}this.autoClose&&1<b.length&&!b[b.length-1].equals(b[0])&&b.push(b[0]);return b},copy:function(a){L.prototype.copy.call(this,a);this.curves=[];for(var b=0,d=a.curves.length;b<d;b++)this.curves.push(a.curves[b].clone());
|
|
|
-this.autoClose=a.autoClose;return this},toJSON:function(){var a=L.prototype.toJSON.call(this);a.autoClose=this.autoClose;a.curves=[];for(var b=0,d=this.curves.length;b<d;b++)a.curves.push(this.curves[b].toJSON());return a},fromJSON:function(a){L.prototype.fromJSON.call(this,a);this.autoClose=a.autoClose;this.curves=[];for(var b=0,d=a.curves.length;b<d;b++){var e=a.curves[b];this.curves.push((new sh[e.type]).fromJSON(e))}return this}});jb.prototype=Object.assign(Object.create(Eb.prototype),{constructor:jb,
|
|
|
+a));this.autoClose&&b.push(b[0]);return b},getPoints:function(a){a=a||12;for(var b=[],d,e=0,f=this.curves;e<f.length;e++){var g=f[e];g=g.getPoints(g&&g.isEllipseCurve?2*a:g&&(g.isLineCurve||g.isLineCurve3)?1:g&&g.isSplineCurve?a*g.points.length:a);for(var h=0;h<g.length;h++){var l=g[h];d&&d.equals(l)||(b.push(l),d=l)}}this.autoClose&&1<b.length&&!b[b.length-1].equals(b[0])&&b.push(b[0]);return b},copy:function(a){K.prototype.copy.call(this,a);this.curves=[];for(var b=0,d=a.curves.length;b<d;b++)this.curves.push(a.curves[b].clone());
|
|
|
+this.autoClose=a.autoClose;return this},toJSON:function(){var a=K.prototype.toJSON.call(this);a.autoClose=this.autoClose;a.curves=[];for(var b=0,d=this.curves.length;b<d;b++)a.curves.push(this.curves[b].toJSON());return a},fromJSON:function(a){K.prototype.fromJSON.call(this,a);this.autoClose=a.autoClose;this.curves=[];for(var b=0,d=a.curves.length;b<d;b++){var e=a.curves[b];this.curves.push((new sh[e.type]).fromJSON(e))}return this}});jb.prototype=Object.assign(Object.create(Eb.prototype),{constructor:jb,
|
|
|
setFromPoints:function(a){this.moveTo(a[0].x,a[0].y);for(var b=1,d=a.length;b<d;b++)this.lineTo(a[b].x,a[b].y);return this},moveTo:function(a,b){this.currentPoint.set(a,b);return this},lineTo:function(a,b){var d=new Pa(this.currentPoint.clone(),new p(a,b));this.curves.push(d);this.currentPoint.set(a,b);return this},quadraticCurveTo:function(a,b,d,e){a=new hb(this.currentPoint.clone(),new p(a,b),new p(d,e));this.curves.push(a);this.currentPoint.set(d,e);return this},bezierCurveTo:function(a,b,d,e,
|
|
|
f,g){a=new fb(this.currentPoint.clone(),new p(a,b),new p(d,e),new p(f,g));this.curves.push(a);this.currentPoint.set(f,g);return this},splineThru:function(a){var b=[this.currentPoint.clone()].concat(a);b=new ib(b);this.curves.push(b);this.currentPoint.copy(a[a.length-1]);return this},arc:function(a,b,d,e,f,g){this.absarc(a+this.currentPoint.x,b+this.currentPoint.y,d,e,f,g);return this},absarc:function(a,b,d,e,f,g){this.absellipse(a,b,d,d,e,f,g);return this},ellipse:function(a,b,d,e,f,g,h,l){this.absellipse(a+
|
|
|
this.currentPoint.x,b+this.currentPoint.y,d,e,f,g,h,l);return this},absellipse:function(a,b,d,e,f,g,h,l){a=new Xa(a,b,d,e,f,g,h,l);0<this.curves.length&&(b=a.getPoint(0),b.equals(this.currentPoint)||this.lineTo(b.x,b.y));this.curves.push(a);a=a.getPoint(1);this.currentPoint.copy(a);return this},copy:function(a){Eb.prototype.copy.call(this,a);this.currentPoint.copy(a.currentPoint);return this},toJSON:function(){var a=Eb.prototype.toJSON.call(this);a.currentPoint=this.currentPoint.toArray();return a},
|
|
|
fromJSON:function(a){Eb.prototype.fromJSON.call(this,a);this.currentPoint.fromArray(a.currentPoint);return this}});ac.prototype=Object.assign(Object.create(jb.prototype),{constructor:ac,getPointsHoles:function(a){for(var b=[],d=0,e=this.holes.length;d<e;d++)b[d]=this.holes[d].getPoints(a);return b},extractPoints:function(a){return{shape:this.getPoints(a),holes:this.getPointsHoles(a)}},copy:function(a){jb.prototype.copy.call(this,a);this.holes=[];for(var b=0,d=a.holes.length;b<d;b++)this.holes.push(a.holes[b].clone());
|
|
|
-return this},toJSON:function(){var a=jb.prototype.toJSON.call(this);a.uuid=this.uuid;a.holes=[];for(var b=0,d=this.holes.length;b<d;b++)a.holes.push(this.holes[b].toJSON());return a},fromJSON:function(a){jb.prototype.fromJSON.call(this,a);this.uuid=a.uuid;this.holes=[];for(var b=0,d=a.holes.length;b<d;b++){var e=a.holes[b];this.holes.push((new jb).fromJSON(e))}return this}});la.prototype=Object.assign(Object.create(D.prototype),{constructor:la,isLight:!0,copy:function(a){D.prototype.copy.call(this,
|
|
|
-a);this.color.copy(a.color);this.intensity=a.intensity;return this},toJSON:function(a){a=D.prototype.toJSON.call(this,a);a.object.color=this.color.getHex();a.object.intensity=this.intensity;void 0!==this.groundColor&&(a.object.groundColor=this.groundColor.getHex());void 0!==this.distance&&(a.object.distance=this.distance);void 0!==this.angle&&(a.object.angle=this.angle);void 0!==this.decay&&(a.object.decay=this.decay);void 0!==this.penumbra&&(a.object.penumbra=this.penumbra);void 0!==this.shadow&&
|
|
|
+return this},toJSON:function(){var a=jb.prototype.toJSON.call(this);a.uuid=this.uuid;a.holes=[];for(var b=0,d=this.holes.length;b<d;b++)a.holes.push(this.holes[b].toJSON());return a},fromJSON:function(a){jb.prototype.fromJSON.call(this,a);this.uuid=a.uuid;this.holes=[];for(var b=0,d=a.holes.length;b<d;b++){var e=a.holes[b];this.holes.push((new jb).fromJSON(e))}return this}});la.prototype=Object.assign(Object.create(F.prototype),{constructor:la,isLight:!0,copy:function(a){F.prototype.copy.call(this,
|
|
|
+a);this.color.copy(a.color);this.intensity=a.intensity;return this},toJSON:function(a){a=F.prototype.toJSON.call(this,a);a.object.color=this.color.getHex();a.object.intensity=this.intensity;void 0!==this.groundColor&&(a.object.groundColor=this.groundColor.getHex());void 0!==this.distance&&(a.object.distance=this.distance);void 0!==this.angle&&(a.object.angle=this.angle);void 0!==this.decay&&(a.object.decay=this.decay);void 0!==this.penumbra&&(a.object.penumbra=this.penumbra);void 0!==this.shadow&&
|
|
|
(a.object.shadow=this.shadow.toJSON());return a}});sf.prototype=Object.assign(Object.create(la.prototype),{constructor:sf,isHemisphereLight:!0,copy:function(a){la.prototype.copy.call(this,a);this.groundColor.copy(a.groundColor);return this}});Object.assign(ub.prototype,{_projScreenMatrix:new z,_lightPositionWorld:new m,_lookTarget:new m,getViewportCount:function(){return this._viewportCount},getFrustum:function(){return this._frustum},updateMatrices:function(a){var b=this.camera,d=this.matrix,e=this._projScreenMatrix,
|
|
|
f=this._lookTarget,g=this._lightPositionWorld;g.setFromMatrixPosition(a.matrixWorld);b.position.copy(g);f.setFromMatrixPosition(a.target.matrixWorld);b.lookAt(f);b.updateMatrixWorld();e.multiplyMatrices(b.projectionMatrix,b.matrixWorldInverse);this._frustum.setFromProjectionMatrix(e);d.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1);d.multiply(b.projectionMatrix);d.multiply(b.matrixWorldInverse)},getViewport:function(a){return this._viewports[a]},getFrameExtents:function(){return this._frameExtents},copy:function(a){this.camera=
|
|
|
a.camera.clone();this.bias=a.bias;this.radius=a.radius;this.mapSize.copy(a.mapSize);return this},clone:function(){return(new this.constructor).copy(this)},toJSON:function(){var a={};0!==this.bias&&(a.bias=this.bias);0!==this.normalBias&&(a.normalBias=this.normalBias);1!==this.radius&&(a.radius=this.radius);if(512!==this.mapSize.x||512!==this.mapSize.y)a.mapSize=this.mapSize.toArray();a.camera=this.camera.toJSON(!1).object;delete a.camera.matrix;return a}});tf.prototype=Object.assign(Object.create(ub.prototype),
|
|
@@ -838,7 +838,7 @@ this.decay=a.decay;this.target=a.target.clone();this.shadow=a.shadow.clone();ret
|
|
|
e.makeTranslation(-f.x,-f.y,-f.z);h.multiplyMatrices(d.projectionMatrix,d.matrixWorldInverse);this._frustum.setFromProjectionMatrix(h)}});vf.prototype=Object.assign(Object.create(la.prototype),{constructor:vf,isPointLight:!0,copy:function(a){la.prototype.copy.call(this,a);this.distance=a.distance;this.decay=a.decay;this.shadow=a.shadow.clone();return this}});qd.prototype=Object.assign(Object.create(ob.prototype),{constructor:qd,isOrthographicCamera:!0,copy:function(a,b){ob.prototype.copy.call(this,
|
|
|
a,b);this.left=a.left;this.right=a.right;this.top=a.top;this.bottom=a.bottom;this.near=a.near;this.far=a.far;this.zoom=a.zoom;this.view=null===a.view?null:Object.assign({},a.view);return this},setViewOffset:function(a,b,d,e,f,g){null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1});this.view.enabled=!0;this.view.fullWidth=a;this.view.fullHeight=b;this.view.offsetX=d;this.view.offsetY=e;this.view.width=f;this.view.height=g;this.updateProjectionMatrix()},
|
|
|
clearViewOffset:function(){null!==this.view&&(this.view.enabled=!1);this.updateProjectionMatrix()},updateProjectionMatrix:function(){var a=(this.right-this.left)/(2*this.zoom),b=(this.top-this.bottom)/(2*this.zoom),d=(this.right+this.left)/2,e=(this.top+this.bottom)/2,f=d-a;d+=a;a=e+b;b=e-b;null!==this.view&&this.view.enabled&&(e=(this.right-this.left)/this.view.fullWidth/this.zoom,b=(this.top-this.bottom)/this.view.fullHeight/this.zoom,f+=e*this.view.offsetX,d=f+e*this.view.width,a-=b*this.view.offsetY,
|
|
|
-b=a-b*this.view.height);this.projectionMatrix.makeOrthographic(f,d,a,b,this.near,this.far);this.projectionMatrixInverse.getInverse(this.projectionMatrix)},toJSON:function(a){a=D.prototype.toJSON.call(this,a);a.object.zoom=this.zoom;a.object.left=this.left;a.object.right=this.right;a.object.top=this.top;a.object.bottom=this.bottom;a.object.near=this.near;a.object.far=this.far;null!==this.view&&(a.object.view=Object.assign({},this.view));return a}});wf.prototype=Object.assign(Object.create(ub.prototype),
|
|
|
+b=a-b*this.view.height);this.projectionMatrix.makeOrthographic(f,d,a,b,this.near,this.far);this.projectionMatrixInverse.getInverse(this.projectionMatrix)},toJSON:function(a){a=F.prototype.toJSON.call(this,a);a.object.zoom=this.zoom;a.object.left=this.left;a.object.right=this.right;a.object.top=this.top;a.object.bottom=this.bottom;a.object.near=this.near;a.object.far=this.far;null!==this.view&&(a.object.view=Object.assign({},this.view));return a}});wf.prototype=Object.assign(Object.create(ub.prototype),
|
|
|
{constructor:wf,isDirectionalLightShadow:!0,updateMatrices:function(a){ub.prototype.updateMatrices.call(this,a)}});xf.prototype=Object.assign(Object.create(la.prototype),{constructor:xf,isDirectionalLight:!0,copy:function(a){la.prototype.copy.call(this,a);this.target=a.target.clone();this.shadow=a.shadow.clone();return this}});yf.prototype=Object.assign(Object.create(la.prototype),{constructor:yf,isAmbientLight:!0});zf.prototype=Object.assign(Object.create(la.prototype),{constructor:zf,isRectAreaLight:!0,
|
|
|
copy:function(a){la.prototype.copy.call(this,a);this.width=a.width;this.height=a.height;return this},toJSON:function(a){a=la.prototype.toJSON.call(this,a);a.object.width=this.width;a.object.height=this.height;return a}});var Da=function(){this.coefficients=[];for(var a=0;9>a;a++)this.coefficients.push(new m)};Da.prototype.set=function(a){for(var b=0;9>b;b++)this.coefficients[b].copy(a[b]);return this};Da.prototype.zero=function(){for(var a=0;9>a;a++)this.coefficients[a].set(0,0,0);return this};Da.prototype.getAt=
|
|
|
function(a,b){var d=a.x,e=a.y;a=a.z;var f=this.coefficients;b.copy(f[0]).multiplyScalar(.282095);b.addScaledVector(f[1],.488603*e);b.addScaledVector(f[2],.488603*a);b.addScaledVector(f[3],.488603*d);b.addScaledVector(f[4],1.092548*d*e);b.addScaledVector(f[5],1.092548*e*a);b.addScaledVector(f[6],.315392*(3*a*a-1));b.addScaledVector(f[7],1.092548*d*a);b.addScaledVector(f[8],.546274*(d*d-e*e));return b};Da.prototype.getIrradianceAt=function(a,b){var d=a.x,e=a.y;a=a.z;var f=this.coefficients;b.copy(f[0]).multiplyScalar(.886227);
|
|
@@ -880,7 +880,7 @@ b,d){function e(a){void 0===b[a]&&console.warn("THREE.ObjectLoader: Undefined ge
|
|
|
void 0!==a.fog&&("Fog"===a.fog.type?g.fog=new Id(a.fog.color,a.fog.near,a.fog.far):"FogExp2"===a.fog.type&&(g.fog=new Hd(a.fog.color,a.fog.density)));break;case "PerspectiveCamera":g=new ta(a.fov,a.aspect,a.near,a.far);void 0!==a.focus&&(g.focus=a.focus);void 0!==a.zoom&&(g.zoom=a.zoom);void 0!==a.filmGauge&&(g.filmGauge=a.filmGauge);void 0!==a.filmOffset&&(g.filmOffset=a.filmOffset);void 0!==a.view&&(g.view=Object.assign({},a.view));break;case "OrthographicCamera":g=new qd(a.left,a.right,a.top,a.bottom,
|
|
|
a.near,a.far);void 0!==a.zoom&&(g.zoom=a.zoom);void 0!==a.view&&(g.view=Object.assign({},a.view));break;case "AmbientLight":g=new yf(a.color,a.intensity);break;case "DirectionalLight":g=new xf(a.color,a.intensity);break;case "PointLight":g=new vf(a.color,a.intensity,a.distance,a.decay);break;case "RectAreaLight":g=new zf(a.color,a.intensity,a.width,a.height);break;case "SpotLight":g=new uf(a.color,a.intensity,a.distance,a.angle,a.penumbra,a.decay);break;case "HemisphereLight":g=new sf(a.color,a.groundColor,
|
|
|
a.intensity);break;case "LightProbe":g=(new cb).fromJSON(a);break;case "SkinnedMesh":console.warn("THREE.ObjectLoader.parseObject() does not support SkinnedMesh yet.");case "Mesh":g=e(a.geometry);var h=f(a.material);g=new na(g,h);break;case "InstancedMesh":g=e(a.geometry);h=f(a.material);var l=a.instanceMatrix;g=new df(g,h,a.count);g.instanceMatrix=new N(new Float32Array(l.array),16);break;case "LOD":g=new be;break;case "Line":g=new Na(e(a.geometry),f(a.material),a.mode);break;case "LineLoop":g=new ef(e(a.geometry),
|
|
|
-f(a.material));break;case "LineSegments":g=new sa(e(a.geometry),f(a.material));break;case "PointCloud":case "Points":g=new Yc(e(a.geometry),f(a.material));break;case "Sprite":g=new $d(f(a.material));break;case "Group":g=new Vb;break;default:g=new D}g.uuid=a.uuid;void 0!==a.name&&(g.name=a.name);void 0!==a.matrix?(g.matrix.fromArray(a.matrix),void 0!==a.matrixAutoUpdate&&(g.matrixAutoUpdate=a.matrixAutoUpdate),g.matrixAutoUpdate&&g.matrix.decompose(g.position,g.quaternion,g.scale)):(void 0!==a.position&&
|
|
|
+f(a.material));break;case "LineSegments":g=new sa(e(a.geometry),f(a.material));break;case "PointCloud":case "Points":g=new Yc(e(a.geometry),f(a.material));break;case "Sprite":g=new $d(f(a.material));break;case "Group":g=new Vb;break;default:g=new F}g.uuid=a.uuid;void 0!==a.name&&(g.name=a.name);void 0!==a.matrix?(g.matrix.fromArray(a.matrix),void 0!==a.matrixAutoUpdate&&(g.matrixAutoUpdate=a.matrixAutoUpdate),g.matrixAutoUpdate&&g.matrix.decompose(g.position,g.quaternion,g.scale)):(void 0!==a.position&&
|
|
|
g.position.fromArray(a.position),void 0!==a.rotation&&g.rotation.fromArray(a.rotation),void 0!==a.quaternion&&g.quaternion.fromArray(a.quaternion),void 0!==a.scale&&g.scale.fromArray(a.scale));void 0!==a.castShadow&&(g.castShadow=a.castShadow);void 0!==a.receiveShadow&&(g.receiveShadow=a.receiveShadow);a.shadow&&(void 0!==a.shadow.bias&&(g.shadow.bias=a.shadow.bias),void 0!==a.shadow.normalBias&&(g.shadow.normalBias=a.shadow.normalBias),void 0!==a.shadow.radius&&(g.shadow.radius=a.shadow.radius),
|
|
|
void 0!==a.shadow.mapSize&&g.shadow.mapSize.fromArray(a.shadow.mapSize),void 0!==a.shadow.camera&&(g.shadow.camera=this.parseObject(a.shadow.camera)));void 0!==a.visible&&(g.visible=a.visible);void 0!==a.frustumCulled&&(g.frustumCulled=a.frustumCulled);void 0!==a.renderOrder&&(g.renderOrder=a.renderOrder);void 0!==a.userData&&(g.userData=a.userData);void 0!==a.layers&&(g.layers.mask=a.layers);if(void 0!==a.children)for(l=a.children,h=0;h<l.length;h++)g.add(this.parseObject(l[h],b,d));if("LOD"===a.type)for(void 0!==
|
|
|
a.autoUpdate&&(g.autoUpdate=a.autoUpdate),a=a.levels,l=0;l<a.length;l++){h=a[l];var k=g.getObjectByProperty("uuid",h.object);void 0!==k&&g.addLevel(k,h.distance)}return g}});var Yk={UVMapping:300,CubeReflectionMapping:301,CubeRefractionMapping:302,EquirectangularReflectionMapping:303,EquirectangularRefractionMapping:304,CubeUVReflectionMapping:306,CubeUVRefractionMapping:307},Pi={RepeatWrapping:1E3,ClampToEdgeWrapping:1001,MirroredRepeatWrapping:1002},Qi={NearestFilter:1003,NearestMipmapNearestFilter:1004,
|
|
@@ -889,18 +889,18 @@ f.options)}).then(function(d){Gc.add(a,d);b&&b(d);f.manager.itemEnd(a)}).catch(f
|
|
|
b,d,e,f,g){this.currentPath.bezierCurveTo(a,b,d,e,f,g);return this},splineThru:function(a){this.currentPath.splineThru(a);return this},toShapes:function(a,b){function d(a){for(var b=[],d=0,e=a.length;d<e;d++){var f=a[d],g=new ac;g.curves=f.curves;b.push(g)}return b}function e(a,b){for(var d=b.length,e=!1,f=d-1,g=0;g<d;f=g++){var h=b[f],l=b[g],k=l.x-h.x,m=l.y-h.y;if(Math.abs(m)>Number.EPSILON){if(0>m&&(h=b[g],k=-k,l=b[f],m=-m),!(a.y<h.y||a.y>l.y))if(a.y===h.y){if(a.x===h.x)return!0}else{f=m*(a.x-h.x)-
|
|
|
k*(a.y-h.y);if(0===f)return!0;0>f||(e=!e)}}else if(a.y===h.y&&(l.x<=a.x&&a.x<=h.x||h.x<=a.x&&a.x<=l.x))return!0}return e}var f=Bb.isClockWise,g=this.subPaths;if(0===g.length)return[];if(!0===b)return d(g);b=[];if(1===g.length){var h=g[0];var l=new ac;l.curves=h.curves;b.push(l);return b}var k=!f(g[0].getPoints());k=a?!k:k;l=[];var m=[],p=[],q=0;m[q]=void 0;p[q]=[];for(var v=0,t=g.length;v<t;v++){h=g[v];var w=h.getPoints();var x=f(w);(x=a?!x:x)?(!k&&m[q]&&q++,m[q]={s:new ac,p:w},m[q].s.curves=h.curves,
|
|
|
k&&q++,p[q]=[]):p[q].push({h:h,p:w[0]})}if(!m[0])return d(g);if(1<m.length){a=!1;f=[];g=0;for(h=m.length;g<h;g++)l[g]=[];g=0;for(h=m.length;g<h;g++)for(x=p[g],k=0;k<x.length;k++){q=x[k];w=!0;for(v=0;v<m.length;v++)e(q.p,m[v].p)&&(g!==v&&f.push({froms:g,tos:v,hole:k}),w?(w=!1,l[v].push(q)):a=!0);w&&l[g].push(q)}0<f.length&&(a||(p=l))}f=0;for(g=m.length;f<g;f++)for(l=m[f].s,b.push(l),a=p[f],h=0,x=a.length;h<x;h++)l.holes.push(a[h].h);return b}});Object.assign(Mg.prototype,{isFont:!0,generateShapes:function(a,
|
|
|
-b){void 0===b&&(b=100);var d=[],e=b;b=this.data;var f=Array.from?Array.from(a):String(a).split("");e/=b.resolution;var g=(b.boundingBox.yMax-b.boundingBox.yMin+b.underlineThickness)*e;a=[];for(var h=0,l=0,k=0;k<f.length;k++){var m=f[k];if("\n"===m)h=0,l-=g;else{var p=m;m=e;var q=h,v=l,t=b,w=t.glyphs[p]||t.glyphs["?"];if(w){p=new Lg;if(w.o){t=w._cachedOutline||(w._cachedOutline=w.o.split(" "));for(var x=0,y=t.length;x<y;)switch(t[x++]){case "m":var z=t[x++]*m+q;var C=t[x++]*m+v;p.moveTo(z,C);break;
|
|
|
-case "l":z=t[x++]*m+q;C=t[x++]*m+v;p.lineTo(z,C);break;case "q":var B=t[x++]*m+q;var F=t[x++]*m+v;var A=t[x++]*m+q;var D=t[x++]*m+v;p.quadraticCurveTo(A,D,B,F);break;case "b":B=t[x++]*m+q,F=t[x++]*m+v,A=t[x++]*m+q,D=t[x++]*m+v,z=t[x++]*m+q,C=t[x++]*m+v,p.bezierCurveTo(A,D,z,C,B,F)}}m={offsetX:w.ha*m,path:p}}else console.error('THREE.Font: character "'+p+'" does not exists in font family '+t.familyName+"."),m=void 0;h+=m.offsetX;a.push(m.path)}}b=0;for(f=a.length;b<f;b++)Array.prototype.push.apply(d,
|
|
|
+b){void 0===b&&(b=100);var d=[],e=b;b=this.data;var f=Array.from?Array.from(a):String(a).split("");e/=b.resolution;var g=(b.boundingBox.yMax-b.boundingBox.yMin+b.underlineThickness)*e;a=[];for(var h=0,l=0,k=0;k<f.length;k++){var m=f[k];if("\n"===m)h=0,l-=g;else{var p=m;m=e;var q=h,v=l,t=b,w=t.glyphs[p]||t.glyphs["?"];if(w){p=new Lg;if(w.o){t=w._cachedOutline||(w._cachedOutline=w.o.split(" "));for(var x=0,y=t.length;x<y;)switch(t[x++]){case "m":var z=t[x++]*m+q;var B=t[x++]*m+v;p.moveTo(z,B);break;
|
|
|
+case "l":z=t[x++]*m+q;B=t[x++]*m+v;p.lineTo(z,B);break;case "q":var F=t[x++]*m+q;var H=t[x++]*m+v;var A=t[x++]*m+q;var G=t[x++]*m+v;p.quadraticCurveTo(A,G,F,H);break;case "b":F=t[x++]*m+q,H=t[x++]*m+v,A=t[x++]*m+q,G=t[x++]*m+v,z=t[x++]*m+q,B=t[x++]*m+v,p.bezierCurveTo(A,G,z,B,F,H)}}m={offsetX:w.ha*m,path:p}}else console.error('THREE.Font: character "'+p+'" does not exists in font family '+t.familyName+"."),m=void 0;h+=m.offsetX;a.push(m.path)}}b=0;for(f=a.length;b<f;b++)Array.prototype.push.apply(d,
|
|
|
a[b].toShapes());return d}});Ng.prototype=Object.assign(Object.create(ba.prototype),{constructor:Ng,load:function(a,b,d,e){var f=this,g=new bb(this.manager);g.setPath(this.path);g.setRequestHeader(this.requestHeader);g.load(a,function(a){try{var d=JSON.parse(a)}catch(n){console.warn("THREE.FontLoader: typeface.js support is being deprecated. Use typeface.json instead."),d=JSON.parse(a.substring(65,a.length-2))}a=f.parse(d);b&&b(a)},d,e)},parse:function(a){return new Mg(a)}});var dg,Qg={getContext:function(){void 0===
|
|
|
dg&&(dg=new (window.AudioContext||window.webkitAudioContext));return dg},setContext:function(a){dg=a}};Ef.prototype=Object.assign(Object.create(ba.prototype),{constructor:Ef,load:function(a,b,d,e){var f=this,g=new bb(f.manager);g.setResponseType("arraybuffer");g.setPath(f.path);g.setRequestHeader(f.requestHeader);g.load(a,function(d){try{var g=d.slice(0);Qg.getContext().decodeAudioData(g,function(a){b(a)})}catch(n){e?e(n):console.error(n),f.manager.itemError(a)}},d,e)}});Og.prototype=Object.assign(Object.create(cb.prototype),
|
|
|
{constructor:Og,isHemisphereLightProbe:!0,copy:function(a){cb.prototype.copy.call(this,a);return this},toJSON:function(a){return cb.prototype.toJSON.call(this,a)}});Pg.prototype=Object.assign(Object.create(cb.prototype),{constructor:Pg,isAmbientLightProbe:!0,copy:function(a){cb.prototype.copy.call(this,a);return this},toJSON:function(a){return cb.prototype.toJSON.call(this,a)}});var Ri=new z,Si=new z;Object.assign(li.prototype,{update:function(a){var b=this._cache;if(b.focus!==a.focus||b.fov!==a.fov||
|
|
|
b.aspect!==a.aspect*this.aspect||b.near!==a.near||b.far!==a.far||b.zoom!==a.zoom||b.eyeSep!==this.eyeSep){b.focus=a.focus;b.fov=a.fov;b.aspect=a.aspect*this.aspect;b.near=a.near;b.far=a.far;b.zoom=a.zoom;b.eyeSep=this.eyeSep;var d=a.projectionMatrix.clone(),e=b.eyeSep/2,f=e*b.near/b.focus,g=b.near*Math.tan(T.DEG2RAD*b.fov*.5)/b.zoom;Si.elements[12]=-e;Ri.elements[12]=e;e=-g*b.aspect+f;var h=g*b.aspect+f;d.elements[0]=2*b.near/(h-e);d.elements[8]=(h+e)/(h-e);this.cameraL.projectionMatrix.copy(d);e=
|
|
|
-g*b.aspect-f;h=g*b.aspect-f;d.elements[0]=2*b.near/(h-e);d.elements[8]=(h+e)/(h-e);this.cameraR.projectionMatrix.copy(d)}this.cameraL.matrixWorld.copy(a.matrixWorld).multiply(Si);this.cameraR.matrixWorld.copy(a.matrixWorld).multiply(Ri)}});var rd=function(a){this.autoStart=void 0!==a?a:!0;this.elapsedTime=this.oldTime=this.startTime=0;this.running=!1};rd.prototype.start=function(){this.oldTime=this.startTime=("undefined"===typeof performance?Date:performance).now();this.elapsedTime=0;this.running=
|
|
|
-!0};rd.prototype.stop=function(){this.getElapsedTime();this.autoStart=this.running=!1};rd.prototype.getElapsedTime=function(){this.getDelta();return this.elapsedTime};rd.prototype.getDelta=function(){var a=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){var b=("undefined"===typeof performance?Date:performance).now();a=(b-this.oldTime)/1E3;this.oldTime=b;this.elapsedTime+=a}return a};var Hc=new m,Ti=new O,Zk=new m,Ic=new m;kb.prototype=Object.create(D.prototype);kb.prototype.constructor=
|
|
|
+!0};rd.prototype.stop=function(){this.getElapsedTime();this.autoStart=this.running=!1};rd.prototype.getElapsedTime=function(){this.getDelta();return this.elapsedTime};rd.prototype.getDelta=function(){var a=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){var b=("undefined"===typeof performance?Date:performance).now();a=(b-this.oldTime)/1E3;this.oldTime=b;this.elapsedTime+=a}return a};var Hc=new m,Ti=new O,Zk=new m,Ic=new m;kb.prototype=Object.create(F.prototype);kb.prototype.constructor=
|
|
|
kb;kb.prototype.getInput=function(){return this.gain};kb.prototype.removeFilter=function(){null!==this.filter&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null);return this};kb.prototype.getFilter=function(){return this.filter};kb.prototype.setFilter=function(a){null!==this.filter?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination);
|
|
|
-this.filter=a;this.gain.connect(this.filter);this.filter.connect(this.context.destination);return this};kb.prototype.getMasterVolume=function(){return this.gain.gain.value};kb.prototype.setMasterVolume=function(a){this.gain.gain.setTargetAtTime(a,this.context.currentTime,.01);return this};kb.prototype.updateMatrixWorld=function(a){D.prototype.updateMatrixWorld.call(this,a);a=this.context.listener;var b=this.up;this.timeDelta=this._clock.getDelta();this.matrixWorld.decompose(Hc,Ti,Zk);Ic.set(0,0,-1).applyQuaternion(Ti);
|
|
|
+this.filter=a;this.gain.connect(this.filter);this.filter.connect(this.context.destination);return this};kb.prototype.getMasterVolume=function(){return this.gain.gain.value};kb.prototype.setMasterVolume=function(a){this.gain.gain.setTargetAtTime(a,this.context.currentTime,.01);return this};kb.prototype.updateMatrixWorld=function(a){F.prototype.updateMatrixWorld.call(this,a);a=this.context.listener;var b=this.up;this.timeDelta=this._clock.getDelta();this.matrixWorld.decompose(Hc,Ti,Zk);Ic.set(0,0,-1).applyQuaternion(Ti);
|
|
|
if(a.positionX){var d=this.context.currentTime+this.timeDelta;a.positionX.linearRampToValueAtTime(Hc.x,d);a.positionY.linearRampToValueAtTime(Hc.y,d);a.positionZ.linearRampToValueAtTime(Hc.z,d);a.forwardX.linearRampToValueAtTime(Ic.x,d);a.forwardY.linearRampToValueAtTime(Ic.y,d);a.forwardZ.linearRampToValueAtTime(Ic.z,d);a.upX.linearRampToValueAtTime(b.x,d);a.upY.linearRampToValueAtTime(b.y,d);a.upZ.linearRampToValueAtTime(b.z,d)}else a.setPosition(Hc.x,Hc.y,Hc.z),a.setOrientation(Ic.x,Ic.y,Ic.z,
|
|
|
-b.x,b.y,b.z)};da.prototype=Object.create(D.prototype);da.prototype.constructor=da;da.prototype.getOutput=function(){return this.gain};da.prototype.setNodeSource=function(a){this.hasPlaybackControl=!1;this.sourceType="audioNode";this.source=a;this.connect();return this};da.prototype.setMediaElementSource=function(a){this.hasPlaybackControl=!1;this.sourceType="mediaNode";this.source=this.context.createMediaElementSource(a);this.connect();return this};da.prototype.setMediaStreamSource=function(a){this.hasPlaybackControl=
|
|
|
+b.x,b.y,b.z)};da.prototype=Object.create(F.prototype);da.prototype.constructor=da;da.prototype.getOutput=function(){return this.gain};da.prototype.setNodeSource=function(a){this.hasPlaybackControl=!1;this.sourceType="audioNode";this.source=a;this.connect();return this};da.prototype.setMediaElementSource=function(a){this.hasPlaybackControl=!1;this.sourceType="mediaNode";this.source=this.context.createMediaElementSource(a);this.connect();return this};da.prototype.setMediaStreamSource=function(a){this.hasPlaybackControl=
|
|
|
!1;this.sourceType="mediaStreamNode";this.source=this.context.createMediaStreamSource(a);this.connect();return this};da.prototype.setBuffer=function(a){this.buffer=a;this.sourceType="buffer";this.autoplay&&this.play();return this};da.prototype.play=function(a){void 0===a&&(a=0);if(!0===this.isPlaying)console.warn("THREE.Audio: Audio is already playing.");else if(!1===this.hasPlaybackControl)console.warn("THREE.Audio: this Audio has no playback control.");else return this._startedAt=this.context.currentTime+
|
|
|
a,a=this.context.createBufferSource(),a.buffer=this.buffer,a.loop=this.loop,a.loopStart=this.loopStart,a.loopEnd=this.loopEnd,a.onended=this.onEnded.bind(this),a.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=a,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()};da.prototype.pause=function(){if(!1===this.hasPlaybackControl)console.warn("THREE.Audio: this Audio has no playback control.");else return!0===this.isPlaying&&
|
|
|
(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,!0===this.loop&&(this._progress%=this.duration||this.buffer.duration),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this};da.prototype.stop=function(){if(!1===this.hasPlaybackControl)console.warn("THREE.Audio: this Audio has no playback control.");else return this._progress=0,this.source.stop(),this.source.onended=null,this.isPlaying=!1,this};da.prototype.connect=function(){if(0<this.filters.length){this.source.connect(this.filters[0]);
|
|
@@ -970,18 +970,18 @@ b=new p);return b.copy(a).clamp(this.min,this.max)};ma.prototype.distanceToPoint
|
|
|
gg=new m,Ra=function(a,b){this.start=void 0!==a?a:new m;this.end=void 0!==b?b:new m};Ra.prototype.set=function(a,b){this.start.copy(a);this.end.copy(b);return this};Ra.prototype.clone=function(){return(new this.constructor).copy(this)};Ra.prototype.copy=function(a){this.start.copy(a.start);this.end.copy(a.end);return this};Ra.prototype.getCenter=function(a){void 0===a&&(console.warn("THREE.Line3: .getCenter() target is now required"),a=new m);return a.addVectors(this.start,this.end).multiplyScalar(.5)};
|
|
|
Ra.prototype.delta=function(a){void 0===a&&(console.warn("THREE.Line3: .delta() target is now required"),a=new m);return a.subVectors(this.end,this.start)};Ra.prototype.distanceSq=function(){return this.start.distanceToSquared(this.end)};Ra.prototype.distance=function(){return this.start.distanceTo(this.end)};Ra.prototype.at=function(a,b){void 0===b&&(console.warn("THREE.Line3: .at() target is now required"),b=new m);return this.delta(b).multiplyScalar(a).add(this.start)};Ra.prototype.closestPointToPointParameter=
|
|
|
function(a,b){Wi.subVectors(a,this.start);gg.subVectors(this.end,this.start);a=gg.dot(gg);a=gg.dot(Wi)/a;b&&(a=T.clamp(a,0,1));return a};Ra.prototype.closestPointToPoint=function(a,b,d){a=this.closestPointToPointParameter(a,b);void 0===d&&(console.warn("THREE.Line3: .closestPointToPoint() target is now required"),d=new m);return this.delta(d).multiplyScalar(a).add(this.start)};Ra.prototype.applyMatrix4=function(a){this.start.applyMatrix4(a);this.end.applyMatrix4(a);return this};Ra.prototype.equals=
|
|
|
-function(a){return a.start.equals(this.start)&&a.end.equals(this.end)};Ce.prototype=Object.create(D.prototype);Ce.prototype.constructor=Ce;Ce.prototype.isImmediateRenderObject=!0;var Xi=new m;sd.prototype=Object.create(D.prototype);sd.prototype.constructor=sd;sd.prototype.dispose=function(){this.cone.geometry.dispose();this.cone.material.dispose()};sd.prototype.update=function(){this.light.updateMatrixWorld();var a=this.light.distance?this.light.distance:1E3,b=a*Math.tan(this.light.angle);this.cone.scale.set(b,
|
|
|
+function(a){return a.start.equals(this.start)&&a.end.equals(this.end)};Ce.prototype=Object.create(F.prototype);Ce.prototype.constructor=Ce;Ce.prototype.isImmediateRenderObject=!0;var Xi=new m;sd.prototype=Object.create(F.prototype);sd.prototype.constructor=sd;sd.prototype.dispose=function(){this.cone.geometry.dispose();this.cone.material.dispose()};sd.prototype.update=function(){this.light.updateMatrixWorld();var a=this.light.distance?this.light.distance:1E3,b=a*Math.tan(this.light.angle);this.cone.scale.set(b,
|
|
|
b,a);Xi.setFromMatrixPosition(this.light.target.matrixWorld);this.cone.lookAt(Xi);void 0!==this.color?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)};var ic=new m,hg=new z,uh=new z;td.prototype=Object.create(sa.prototype);td.prototype.constructor=td;td.prototype.updateMatrixWorld=function(a){var b=this.bones,d=this.geometry,e=d.getAttribute("position");uh.getInverse(this.root.matrixWorld);for(var f=0,g=0;f<b.length;f++){var h=b[f];h.parent&&h.parent.isBone&&
|
|
|
(hg.multiplyMatrices(uh,h.matrixWorld),ic.setFromMatrixPosition(hg),e.setXYZ(g,ic.x,ic.y,ic.z),hg.multiplyMatrices(uh,h.parent.matrixWorld),ic.setFromMatrixPosition(hg),e.setXYZ(g+1,ic.x,ic.y,ic.z),g+=2)}d.getAttribute("position").needsUpdate=!0;sa.prototype.updateMatrixWorld.call(this,a)};ud.prototype=Object.create(na.prototype);ud.prototype.constructor=ud;ud.prototype.dispose=function(){this.geometry.dispose();this.material.dispose()};ud.prototype.update=function(){void 0!==this.color?this.material.color.set(this.color):
|
|
|
-this.material.color.copy(this.light.color)};var il=new m,Yi=new x,Zi=new x;vd.prototype=Object.create(D.prototype);vd.prototype.constructor=vd;vd.prototype.dispose=function(){this.children[0].geometry.dispose();this.children[0].material.dispose()};vd.prototype.update=function(){var a=this.children[0];if(void 0!==this.color)this.material.color.set(this.color);else{var b=a.geometry.getAttribute("color");Yi.copy(this.light.color);Zi.copy(this.light.groundColor);for(var d=0,e=b.count;d<e;d++){var f=d<
|
|
|
-e/2?Yi:Zi;b.setXYZ(d,f.r,f.g,f.b)}b.needsUpdate=!0}a.lookAt(il.setFromMatrixPosition(this.light.matrixWorld).negate())};De.prototype=Object.create(sa.prototype);De.prototype.constructor=De;Ff.prototype=Object.create(sa.prototype);Ff.prototype.constructor=Ff;var $i=new m,ig=new m,aj=new m;wd.prototype=Object.create(D.prototype);wd.prototype.constructor=wd;wd.prototype.dispose=function(){this.lightPlane.geometry.dispose();this.lightPlane.material.dispose();this.targetLine.geometry.dispose();this.targetLine.material.dispose()};
|
|
|
+this.material.color.copy(this.light.color)};var il=new m,Yi=new x,Zi=new x;vd.prototype=Object.create(F.prototype);vd.prototype.constructor=vd;vd.prototype.dispose=function(){this.children[0].geometry.dispose();this.children[0].material.dispose()};vd.prototype.update=function(){var a=this.children[0];if(void 0!==this.color)this.material.color.set(this.color);else{var b=a.geometry.getAttribute("color");Yi.copy(this.light.color);Zi.copy(this.light.groundColor);for(var d=0,e=b.count;d<e;d++){var f=d<
|
|
|
+e/2?Yi:Zi;b.setXYZ(d,f.r,f.g,f.b)}b.needsUpdate=!0}a.lookAt(il.setFromMatrixPosition(this.light.matrixWorld).negate())};De.prototype=Object.create(sa.prototype);De.prototype.constructor=De;Ff.prototype=Object.create(sa.prototype);Ff.prototype.constructor=Ff;var $i=new m,ig=new m,aj=new m;wd.prototype=Object.create(F.prototype);wd.prototype.constructor=wd;wd.prototype.dispose=function(){this.lightPlane.geometry.dispose();this.lightPlane.material.dispose();this.targetLine.geometry.dispose();this.targetLine.material.dispose()};
|
|
|
wd.prototype.update=function(){$i.setFromMatrixPosition(this.light.matrixWorld);ig.setFromMatrixPosition(this.light.target.matrixWorld);aj.subVectors(ig,$i);this.lightPlane.lookAt(ig);void 0!==this.color?(this.lightPlane.material.color.set(this.color),this.targetLine.material.color.set(this.color)):(this.lightPlane.material.color.copy(this.light.color),this.targetLine.material.color.copy(this.light.color));this.targetLine.lookAt(ig);this.targetLine.scale.z=aj.length()};var Gf=new m,wa=new ob;Ee.prototype=
|
|
|
Object.create(sa.prototype);Ee.prototype.constructor=Ee;Ee.prototype.update=function(){var a=this.geometry,b=this.pointMap;wa.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse);va("c",b,a,wa,0,0,-1);va("t",b,a,wa,0,0,1);va("n1",b,a,wa,-1,-1,-1);va("n2",b,a,wa,1,-1,-1);va("n3",b,a,wa,-1,1,-1);va("n4",b,a,wa,1,1,-1);va("f1",b,a,wa,-1,-1,1);va("f2",b,a,wa,1,-1,1);va("f3",b,a,wa,-1,1,1);va("f4",b,a,wa,1,1,1);va("u1",b,a,wa,.7,1.1,-1);va("u2",b,a,wa,-.7,1.1,-1);va("u3",b,a,wa,0,2,-1);va("cf1",
|
|
|
b,a,wa,-1,0,1);va("cf2",b,a,wa,1,0,1);va("cf3",b,a,wa,0,-1,1);va("cf4",b,a,wa,0,1,1);va("cn1",b,a,wa,-1,0,-1);va("cn2",b,a,wa,1,0,-1);va("cn3",b,a,wa,0,-1,-1);va("cn4",b,a,wa,0,1,-1);a.getAttribute("position").needsUpdate=!0};var jg=new V;bc.prototype=Object.create(sa.prototype);bc.prototype.constructor=bc;bc.prototype.update=function(a){void 0!==a&&console.warn("THREE.BoxHelper: .update() has no longer arguments.");void 0!==this.object&&jg.setFromObject(this.object);if(!jg.isEmpty()){a=jg.min;var b=
|
|
|
jg.max,d=this.geometry.attributes.position,e=d.array;e[0]=b.x;e[1]=b.y;e[2]=b.z;e[3]=a.x;e[4]=b.y;e[5]=b.z;e[6]=a.x;e[7]=a.y;e[8]=b.z;e[9]=b.x;e[10]=a.y;e[11]=b.z;e[12]=b.x;e[13]=b.y;e[14]=a.z;e[15]=a.x;e[16]=b.y;e[17]=a.z;e[18]=a.x;e[19]=a.y;e[20]=a.z;e[21]=b.x;e[22]=a.y;e[23]=a.z;d.needsUpdate=!0;this.geometry.computeBoundingSphere()}};bc.prototype.setFromObject=function(a){this.object=a;this.update();return this};bc.prototype.copy=function(a){sa.prototype.copy.call(this,a);this.object=a.object;
|
|
|
return this};Fe.prototype=Object.create(sa.prototype);Fe.prototype.constructor=Fe;Fe.prototype.updateMatrixWorld=function(a){var b=this.box;b.isEmpty()||(b.getCenter(this.position),b.getSize(this.scale),this.scale.multiplyScalar(.5),sa.prototype.updateMatrixWorld.call(this,a))};Ge.prototype=Object.create(Na.prototype);Ge.prototype.constructor=Ge;Ge.prototype.updateMatrixWorld=function(a){var b=-this.plane.constant;1E-8>Math.abs(b)&&(b=1E-8);this.scale.set(.5*this.size,.5*this.size,b);this.children[0].material.side=
|
|
|
-0>b?1:0;this.lookAt(this.plane.normal);Na.prototype.updateMatrixWorld.call(this,a)};var bj=new m,Hf,Xg;cc.prototype=Object.create(D.prototype);cc.prototype.constructor=cc;cc.prototype.setDirection=function(a){.99999<a.y?this.quaternion.set(0,0,0,1):-.99999>a.y?this.quaternion.set(1,0,0,0):(bj.set(a.z,0,-a.x).normalize(),this.quaternion.setFromAxisAngle(bj,Math.acos(a.y)))};cc.prototype.setLength=function(a,b,d){void 0===b&&(b=.2*a);void 0===d&&(d=.2*b);this.line.scale.set(1,Math.max(1E-4,a-b),1);
|
|
|
-this.line.updateMatrix();this.cone.scale.set(d,b,d);this.cone.position.y=a;this.cone.updateMatrix()};cc.prototype.setColor=function(a){this.line.material.color.set(a);this.cone.material.color.set(a)};cc.prototype.copy=function(a){D.prototype.copy.call(this,a,!1);this.line.copy(a.line);this.cone.copy(a.cone);return this};He.prototype=Object.create(sa.prototype);He.prototype.constructor=He;var vb=Math.pow(2,8),cj=[.125,.215,.35,.446,.526,.582],dj=5+cj.length,wb={3E3:0,3001:1,3002:2,3004:3,3005:4,3006:5,
|
|
|
+0>b?1:0;this.lookAt(this.plane.normal);Na.prototype.updateMatrixWorld.call(this,a)};var bj=new m,Hf,Xg;cc.prototype=Object.create(F.prototype);cc.prototype.constructor=cc;cc.prototype.setDirection=function(a){.99999<a.y?this.quaternion.set(0,0,0,1):-.99999>a.y?this.quaternion.set(1,0,0,0):(bj.set(a.z,0,-a.x).normalize(),this.quaternion.setFromAxisAngle(bj,Math.acos(a.y)))};cc.prototype.setLength=function(a,b,d){void 0===b&&(b=.2*a);void 0===d&&(d=.2*b);this.line.scale.set(1,Math.max(1E-4,a-b),1);
|
|
|
+this.line.updateMatrix();this.cone.scale.set(d,b,d);this.cone.position.y=a;this.cone.updateMatrix()};cc.prototype.setColor=function(a){this.line.material.color.set(a);this.cone.material.color.set(a)};cc.prototype.copy=function(a){F.prototype.copy.call(this,a,!1);this.line.copy(a.line);this.cone.copy(a.cone);return this};He.prototype=Object.create(sa.prototype);He.prototype.constructor=He;var vb=Math.pow(2,8),cj=[.125,.215,.35,.446,.526,.582],dj=5+cj.length,wb={3E3:0,3001:1,3002:2,3004:3,3005:4,3006:5,
|
|
|
3007:6},vh=new qd,wh=function(){for(var a=[],b=[],d=[],e=8,f=0;f<dj;f++){var g=Math.pow(2,e);b.push(g);var h=1/g;4<f?h=cj[f-8+4-1]:0==f&&(h=0);d.push(h);h=1/(g-1);g=-h/2;h=1+h/2;var l=[g,g,h,g,h,h,g,g,h,h,g,h];g=new Float32Array(108);h=new Float32Array(72);for(var k=new Float32Array(36),m=0;6>m;m++){var p=m%3*2/3-1,q=2<m?0:-1;g.set([p,q,0,p+2/3,q,0,p+2/3,q+1,0,p,q,0,p+2/3,q+1,0,p,q+1,0],18*m);h.set(l,12*m);k.set([m,m,m,m,m,m],6*m)}l=new G;l.setAttribute("position",new N(g,3));l.setAttribute("uv",
|
|
|
new N(h,2));l.setAttribute("faceIndex",new N(k,1));a.push(l);4<e&&e--}return{_lodPlanes:a,_sizeLods:b,_sigmas:d}}(),Ue=wh._lodPlanes,ej=wh._sizeLods,kg=wh._sigmas,xh=null,Mc=(1+Math.sqrt(5))/2,Md=1/Mc,fj=[new m(1,1,1),new m(-1,1,1),new m(1,1,-1),new m(-1,1,-1),new m(0,Mc,Md),new m(0,Mc,-Md),new m(Md,0,Mc),new m(-Md,0,Mc),new m(Mc,Md,0),new m(-Mc,Md,0)],Ea=function(a){this._renderer=a;this._pingPongRenderTarget=null;a=new Float32Array(20);var b=new m(0,1,0);this._blurMaterial=new Db({name:"SphericalGaussianBlur",
|
|
|
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:wb[3E3]},outputEncoding:{value:wb[3E3]}},vertexShader:Yg(),fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\t\t\tuniform int samples;\n\t\t\tuniform float weights[ n ];\n\t\t\tuniform bool latitudinal;\n\t\t\tuniform float dTheta;\n\t\t\tuniform float mipInt;\n\t\t\tuniform vec3 poleAxis;\n\n\t\t\t"+
|
|
@@ -992,9 +992,9 @@ Ea.prototype._cleanup=function(a){this._pingPongRenderTarget.dispose();this._ren
|
|
|
type:1009,format:1023,encoding:b?a.encoding:3002,depthBuffer:!1,stencilBuffer:!1};var d=qi(b);d.depthBuffer=a?!1:!0;this._pingPongRenderTarget=qi(b);return d};Ea.prototype._compileMaterial=function(a){a=new na(Ue[0],a);this._renderer.compile(a,vh)};Ea.prototype._sceneToCubeUV=function(a,b,d,e){b=new ta(90,1,b,d);d=[1,-1,1,1,1,1];var f=[1,1,1,-1,-1,-1],g=this._renderer,h=g.outputEncoding,l=g.toneMapping,k=g.getClearColor(),m=g.getClearAlpha();g.toneMapping=0;g.outputEncoding=3E3;var p=a.background;
|
|
|
if(p&&p.isColor){p.convertSRGBToLinear();var q=Math.min(Math.max(Math.ceil(Math.log2(Math.max(p.r,p.g,p.b))),-128),127);p=p.multiplyScalar(Math.pow(2,-q));g.setClearColor(p,(q+128)/255);a.background=null}for(p=0;6>p;p++)q=p%3,0==q?(b.up.set(0,d[p],0),b.lookAt(f[p],0,0)):1==q?(b.up.set(0,0,d[p]),b.lookAt(0,f[p],0)):(b.up.set(0,d[p],0),b.lookAt(0,0,f[p])),If(e,q*vb,2<p?vb:0,vb,vb),g.setRenderTarget(e),g.render(a,b);g.toneMapping=l;g.outputEncoding=h;g.setClearColor(k,m)};Ea.prototype._textureToCubeUV=
|
|
|
function(a,b){var d=this._renderer;a.isCubeTexture?null==this._cubemapShader&&(this._cubemapShader=si()):null==this._equirectShader&&(this._equirectShader=ri());var e=a.isCubeTexture?this._cubemapShader:this._equirectShader,f=new na(Ue[0],e);e=e.uniforms;e.envMap.value=a;a.isCubeTexture||e.texelSize.value.set(1/a.image.width,1/a.image.height);e.inputEncoding.value=wb[a.encoding];e.outputEncoding.value=wb[b.texture.encoding];If(b,0,0,3*vb,2*vb);d.setRenderTarget(b);d.render(f,vh)};Ea.prototype._applyPMREM=
|
|
|
-function(a){var b=this._renderer,d=b.autoClear;b.autoClear=!1;for(var e=1;e<dj;e++)this._blur(a,e-1,e,Math.sqrt(kg[e]*kg[e]-kg[e-1]*kg[e-1]),fj[(e-1)%fj.length]);b.autoClear=d};Ea.prototype._blur=function(a,b,d,e,f){var g=this._pingPongRenderTarget;this._halfBlur(a,g,b,d,e,"latitudinal",f);this._halfBlur(g,a,d,d,e,"longitudinal",f)};Ea.prototype._halfBlur=function(a,b,d,e,f,g,h){var l=this._renderer,k=this._blurMaterial;"latitudinal"!==g&&"longitudinal"!==g&&console.error("blur direction must be either latitudinal or longitudinal!");
|
|
|
-var m=new na(Ue[e],k);k=k.uniforms;var p=ej[d]-1;p=isFinite(f)?Math.PI/(2*p):2*Math.PI/39;var q=f/p,v=isFinite(f)?1+Math.floor(3*q):20;20<v&&console.warn("sigmaRadians, "+f+", is too large and will clip, as it requested "+v+" samples when the maximum is set to 20");f=[];for(var t=0,w=0;20>w;++w){var x=w/q;x=Math.exp(-x*x/2);f.push(x);0==w?t+=x:w<v&&(t+=2*x)}for(q=0;q<f.length;q++)f[q]/=t;k.envMap.value=a.texture;k.samples.value=v;k.weights.value=f;k.latitudinal.value="latitudinal"===g;h&&(k.poleAxis.value=
|
|
|
-h);k.dTheta.value=p;k.mipInt.value=8-d;k.inputEncoding.value=wb[a.texture.encoding];k.outputEncoding.value=wb[a.texture.encoding];a=ej[e];If(b,3*Math.max(0,vb-2*a),(0===e?0:2*vb)+2*a*(4<e?e-8+4:0),3*a,2*a);l.setRenderTarget(b);l.render(m,vh)};L.create=function(a,b){console.log("THREE.Curve.create() has been deprecated");a.prototype=Object.create(L.prototype);a.prototype.constructor=a;a.prototype.getPoint=b;return a};Object.assign(Eb.prototype,{createPointsGeometry:function(a){console.warn("THREE.CurvePath: .createPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");
|
|
|
+function(a){var b=this._renderer,d=b.autoClear;b.autoClear=!1;for(var e=1;e<dj;e++)this._blur(a,e-1,e,Math.sqrt(kg[e]*kg[e]-kg[e-1]*kg[e-1]),fj[(e-1)%fj.length]);b.autoClear=d};Ea.prototype._blur=function(a,b,d,e,f){var g=this._pingPongRenderTarget;this._halfBlur(a,g,b,d,e,"latitudinal",f);this._halfBlur(g,a,d,d,e,"longitudinal",f)};Ea.prototype._halfBlur=function(a,b,d,e,f,g,h){var k=this._renderer,m=this._blurMaterial;"latitudinal"!==g&&"longitudinal"!==g&&console.error("blur direction must be either latitudinal or longitudinal!");
|
|
|
+var p=new na(Ue[e],m);m=m.uniforms;var u=ej[d]-1;u=isFinite(f)?Math.PI/(2*u):2*Math.PI/39;var q=f/u,v=isFinite(f)?1+Math.floor(3*q):20;20<v&&console.warn("sigmaRadians, "+f+", is too large and will clip, as it requested "+v+" samples when the maximum is set to 20");f=[];for(var t=0,w=0;20>w;++w){var x=w/q;x=Math.exp(-x*x/2);f.push(x);0==w?t+=x:w<v&&(t+=2*x)}for(q=0;q<f.length;q++)f[q]/=t;m.envMap.value=a.texture;m.samples.value=v;m.weights.value=f;m.latitudinal.value="latitudinal"===g;h&&(m.poleAxis.value=
|
|
|
+h);m.dTheta.value=u;m.mipInt.value=8-d;m.inputEncoding.value=wb[a.texture.encoding];m.outputEncoding.value=wb[a.texture.encoding];a=ej[e];If(b,3*Math.max(0,vb-2*a),(0===e?0:2*vb)+2*a*(4<e?e-8+4:0),3*a,2*a);k.setRenderTarget(b);k.render(p,vh)};K.create=function(a,b){console.log("THREE.Curve.create() has been deprecated");a.prototype=Object.create(K.prototype);a.prototype.constructor=a;a.prototype.getPoint=b;return a};Object.assign(Eb.prototype,{createPointsGeometry:function(a){console.warn("THREE.CurvePath: .createPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");
|
|
|
a=this.getPoints(a);return this.createGeometry(a)},createSpacedPointsGeometry:function(a){console.warn("THREE.CurvePath: .createSpacedPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");a=this.getSpacedPoints(a);return this.createGeometry(a)},createGeometry:function(a){console.warn("THREE.CurvePath: .createGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");for(var b=new P,d=0,e=a.length;d<e;d++){var f=a[d];b.vertices.push(new m(f.x,
|
|
|
f.y,f.z||0))}return b}});Object.assign(jb.prototype,{fromPoints:function(a){console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints().");return this.setFromPoints(a)}});ti.prototype=Object.create(za.prototype);ui.prototype=Object.create(za.prototype);$g.prototype=Object.create(za.prototype);Object.assign($g.prototype,{initFromArray:function(){console.error("THREE.Spline: .initFromArray() has been removed.")},getControlPointsArray:function(){console.error("THREE.Spline: .getControlPointsArray() has been removed.")},
|
|
|
reparametrizeByArcLength:function(){console.error("THREE.Spline: .reparametrizeByArcLength() has been removed.")}});De.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")};td.prototype.update=function(){console.error("THREE.SkeletonHelper: update() no longer needs to be called.")};Object.assign(ba.prototype,{extractUrlBase:function(a){console.warn("THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead.");
|
|
@@ -1017,11 +1017,11 @@ lengthManhattan:function(){console.warn("THREE.Vector2: .lengthManhattan() has b
|
|
|
return this.setFromMatrixPosition(a)},getScaleFromMatrix:function(a){console.warn("THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale().");return this.setFromMatrixScale(a)},getColumnFromMatrix:function(a,b){console.warn("THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn().");return this.setFromMatrixColumn(b,a)},applyProjection:function(a){console.warn("THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead.");return this.applyMatrix4(a)},
|
|
|
fromAttribute:function(a,b,d){console.warn("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute().");return this.fromBufferAttribute(a,b,d)},distanceToManhattan:function(a){console.warn("THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo().");return this.manhattanDistanceTo(a)},lengthManhattan:function(){console.warn("THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength().");return this.manhattanLength()}});Object.assign(B.prototype,
|
|
|
{fromAttribute:function(a,b,d){console.warn("THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute().");return this.fromBufferAttribute(a,b,d)},lengthManhattan:function(){console.warn("THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength().");return this.manhattanLength()}});Object.assign(P.prototype,{computeTangents:function(){console.error("THREE.Geometry: .computeTangents() has been removed.")},computeLineDistances:function(){console.error("THREE.Geometry: .computeLineDistances() has been removed. Use THREE.Line.computeLineDistances() instead.")},
|
|
|
-applyMatrix:function(a){console.warn("THREE.Geometry: .applyMatrix() has been renamed to .applyMatrix4().");return this.applyMatrix4(a)}});Object.assign(D.prototype,{getChildByName:function(a){console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName().");return this.getObjectByName(a)},renderDepth:function(){console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")},translate:function(a,b){console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead.");
|
|
|
-return this.translateOnAxis(b,a)},getWorldRotation:function(){console.error("THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.")},applyMatrix:function(a){console.warn("THREE.Object3D: .applyMatrix() has been renamed to .applyMatrix4().");return this.applyMatrix4(a)}});Object.defineProperties(D.prototype,{eulerOrder:{get:function(){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order.");return this.rotation.order},set:function(a){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order.");
|
|
|
+applyMatrix:function(a){console.warn("THREE.Geometry: .applyMatrix() has been renamed to .applyMatrix4().");return this.applyMatrix4(a)}});Object.assign(F.prototype,{getChildByName:function(a){console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName().");return this.getObjectByName(a)},renderDepth:function(){console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")},translate:function(a,b){console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead.");
|
|
|
+return this.translateOnAxis(b,a)},getWorldRotation:function(){console.error("THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.")},applyMatrix:function(a){console.warn("THREE.Object3D: .applyMatrix() has been renamed to .applyMatrix4().");return this.applyMatrix4(a)}});Object.defineProperties(F.prototype,{eulerOrder:{get:function(){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order.");return this.rotation.order},set:function(a){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order.");
|
|
|
this.rotation.order=a}},useQuaternion:{get:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")},set:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")}}});Object.assign(na.prototype,{setDrawMode:function(){console.error("THREE.Mesh: .setDrawMode() has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.")}});
|
|
|
Object.defineProperties(na.prototype,{drawMode:{get:function(){console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode.");return 0},set:function(){console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.")}}});Object.defineProperties(be.prototype,{objects:{get:function(){console.warn("THREE.LOD: .objects has been renamed to .levels.");
|
|
|
-return this.levels}}});Object.defineProperty(cf.prototype,"useVertexTexture",{get:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")},set:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")}});bf.prototype.initBones=function(){console.error("THREE.SkinnedMesh: initBones() has been removed.")};Object.defineProperty(L.prototype,"__arcLengthDivisions",{get:function(){console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions.");return this.arcLengthDivisions},
|
|
|
+return this.levels}}});Object.defineProperty(cf.prototype,"useVertexTexture",{get:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")},set:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")}});bf.prototype.initBones=function(){console.error("THREE.SkinnedMesh: initBones() has been removed.")};Object.defineProperty(K.prototype,"__arcLengthDivisions",{get:function(){console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions.");return this.arcLengthDivisions},
|
|
|
set:function(a){console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions.");this.arcLengthDivisions=a}});ta.prototype.setLens=function(a,b){console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup.");void 0!==b&&(this.filmGauge=b);this.setFocalLength(a)};Object.defineProperties(la.prototype,{onlyShadow:{set:function(){console.warn("THREE.Light: .onlyShadow has been removed.")}},shadowCameraFov:{set:function(a){console.warn("THREE.Light: .shadowCameraFov is now .shadow.camera.fov.");
|
|
|
this.shadow.camera.fov=a}},shadowCameraLeft:{set:function(a){console.warn("THREE.Light: .shadowCameraLeft is now .shadow.camera.left.");this.shadow.camera.left=a}},shadowCameraRight:{set:function(a){console.warn("THREE.Light: .shadowCameraRight is now .shadow.camera.right.");this.shadow.camera.right=a}},shadowCameraTop:{set:function(a){console.warn("THREE.Light: .shadowCameraTop is now .shadow.camera.top.");this.shadow.camera.top=a}},shadowCameraBottom:{set:function(a){console.warn("THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom.");
|
|
|
this.shadow.camera.bottom=a}},shadowCameraNear:{set:function(a){console.warn("THREE.Light: .shadowCameraNear is now .shadow.camera.near.");this.shadow.camera.near=a}},shadowCameraFar:{set:function(a){console.warn("THREE.Light: .shadowCameraFar is now .shadow.camera.far.");this.shadow.camera.far=a}},shadowCameraVisible:{set:function(){console.warn("THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.")}},shadowBias:{set:function(a){console.warn("THREE.Light: .shadowBias is now .shadow.bias.");
|
|
@@ -1034,7 +1034,7 @@ Object.defineProperties(G.prototype,{drawcalls:{get:function(){console.error("TH
|
|
|
this.instanceCount=a}}});Object.defineProperties(Vg.prototype,{linePrecision:{get:function(){console.warn("THREE.Raycaster: .linePrecision has been deprecated. Use .params.Line.threshold instead.");return this.params.Line.threshold},set:function(a){console.warn("THREE.Raycaster: .linePrecision has been deprecated. Use .params.Line.threshold instead.");this.params.Line.threshold=a}}});Object.defineProperties(Va.prototype,{dynamic:{get:function(){console.warn("THREE.InterleavedBuffer: .length has been deprecated. Use .usage instead.");
|
|
|
return 35048===this.usage},set:function(a){console.warn("THREE.InterleavedBuffer: .length has been deprecated. Use .usage instead.");this.setUsage(a)}}});Object.assign(Va.prototype,{setDynamic:function(a){console.warn("THREE.InterleavedBuffer: .setDynamic() has been deprecated. Use .setUsage() instead.");this.setUsage(!0===a?35048:35044);return this},setArray:function(){console.error("THREE.InterleavedBuffer: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers")}});
|
|
|
Object.assign(qb.prototype,{getArrays:function(){console.error("THREE.ExtrudeBufferGeometry: .getArrays() has been removed.")},addShapeList:function(){console.error("THREE.ExtrudeBufferGeometry: .addShapeList() has been removed.")},addShape:function(){console.error("THREE.ExtrudeBufferGeometry: .addShape() has been removed.")}});Object.assign(Ab.prototype,{dispose:function(){console.error("THREE.Scene: .dispose() has been removed.")}});Object.defineProperties(fg.prototype,{dynamic:{set:function(){console.warn("THREE.Uniform: .dynamic has been removed. Use object.onBeforeRender() instead.")}},
|
|
|
-onUpdate:{value:function(){console.warn("THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead.");return this}}});Object.defineProperties(M.prototype,{wrapAround:{get:function(){console.warn("THREE.Material: .wrapAround has been removed.")},set:function(){console.warn("THREE.Material: .wrapAround has been removed.")}},overdraw:{get:function(){console.warn("THREE.Material: .overdraw has been removed.")},set:function(){console.warn("THREE.Material: .overdraw has been removed.")}},
|
|
|
+onUpdate:{value:function(){console.warn("THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead.");return this}}});Object.defineProperties(L.prototype,{wrapAround:{get:function(){console.warn("THREE.Material: .wrapAround has been removed.")},set:function(){console.warn("THREE.Material: .wrapAround has been removed.")}},overdraw:{get:function(){console.warn("THREE.Material: .overdraw has been removed.")},set:function(){console.warn("THREE.Material: .overdraw has been removed.")}},
|
|
|
wrapRGB:{get:function(){console.warn("THREE.Material: .wrapRGB has been removed.");return new x}},shading:{get:function(){console.error("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead.")},set:function(a){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead.");this.flatShading=1===a}},stencilMask:{get:function(){console.warn("THREE."+this.type+": .stencilMask has been removed. Use .stencilFuncMask instead.");return this.stencilFuncMask},
|
|
|
set:function(a){console.warn("THREE."+this.type+": .stencilMask has been removed. Use .stencilFuncMask instead.");this.stencilFuncMask=a}}});Object.defineProperties($b.prototype,{metal:{get:function(){console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead.");return!1},set:function(){console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead")}}});Object.defineProperties(Zb.prototype,{transparency:{get:function(){console.warn("THREE.MeshPhysicalMaterial: .transparency has been renamed to .transmission.");
|
|
|
return this.transmission},set:function(a){console.warn("THREE.MeshPhysicalMaterial: .transparency has been renamed to .transmission.");this.transmission=a}}});Object.defineProperties(Aa.prototype,{derivatives:{get:function(){console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives.");return this.extensions.derivatives},set:function(a){console.warn("THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives.");this.extensions.derivatives=a}}});Object.assign(Zd.prototype,
|
|
@@ -1060,29 +1060,29 @@ var f=new pf;f.setCrossOrigin(this.crossOrigin);a=f.load(a,d,void 0,e);b&&(a.map
|
|
|
k.ACESFilmicToneMapping=4;k.AddEquation=100;k.AddOperation=2;k.AdditiveAnimationBlendMode=2501;k.AdditiveBlending=2;k.AlphaFormat=1021;k.AlwaysDepth=1;k.AlwaysStencilFunc=519;k.AmbientLight=yf;k.AmbientLightProbe=Pg;k.AnimationClip=ab;k.AnimationLoader=Gg;k.AnimationMixer=Sg;k.AnimationObjectGroup=ni;k.AnimationUtils=Z;k.ArcCurve=pd;k.ArrayCamera=$e;k.ArrowHelper=cc;k.Audio=da;k.AudioAnalyser=eg;k.AudioContext=Qg;k.AudioListener=kb;k.AudioLoader=Ef;k.AxesHelper=He;k.AxisHelper=function(a){console.warn("THREE.AxisHelper has been renamed to THREE.AxesHelper.");
|
|
|
return new He(a)};k.BackSide=1;k.BasicDepthPacking=3200;k.BasicShadowMap=0;k.BinaryTextureLoader=function(a){console.warn("THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader.");return new qf(a)};k.Bone=zg;k.BooleanKeyframeTrack=lf;k.BoundingBoxHelper=function(a,b){console.warn("THREE.BoundingBoxHelper has been deprecated. Creating a THREE.BoxHelper instead.");return new bc(a,b)};k.Box2=ma;k.Box3=V;k.Box3Helper=Fe;k.BoxBufferGeometry=Pb;k.BoxGeometry=Qc;k.BoxHelper=bc;k.BufferAttribute=
|
|
|
N;k.BufferGeometry=G;k.BufferGeometryLoader=Cf;k.ByteType=1010;k.Cache=Gc;k.Camera=ob;k.CameraHelper=Ee;k.CanvasRenderer=function(){console.error("THREE.CanvasRenderer has been removed")};k.CanvasTexture=ce;k.CatmullRomCurve3=za;k.CineonToneMapping=3;k.CircleBufferGeometry=ld;k.CircleGeometry=we;k.ClampToEdgeWrapping=1001;k.Clock=rd;k.ClosedSplineCurve3=ti;k.Color=x;k.ColorKeyframeTrack=mf;k.CompressedTexture=Zc;k.CompressedTextureLoader=Hg;k.ConeBufferGeometry=ve;k.ConeGeometry=ue;k.CubeCamera=Sc;
|
|
|
-k.CubeGeometry=Qc;k.CubeReflectionMapping=301;k.CubeRefractionMapping=302;k.CubeTexture=zb;k.CubeTextureLoader=pf;k.CubeUVReflectionMapping=306;k.CubeUVRefractionMapping=307;k.CubicBezierCurve=fb;k.CubicBezierCurve3=sb;k.CubicInterpolant=jf;k.CullFaceBack=1;k.CullFaceFront=2;k.CullFaceFrontBack=3;k.CullFaceNone=0;k.Curve=L;k.CurvePath=Eb;k.CustomBlending=5;k.CustomToneMapping=5;k.CylinderBufferGeometry=Cb;k.CylinderGeometry=wc;k.Cylindrical=Ld;k.DataTexture=nc;k.DataTexture2DArray=Tc;k.DataTexture3D=
|
|
|
+k.CubeGeometry=Qc;k.CubeReflectionMapping=301;k.CubeRefractionMapping=302;k.CubeTexture=zb;k.CubeTextureLoader=pf;k.CubeUVReflectionMapping=306;k.CubeUVRefractionMapping=307;k.CubicBezierCurve=fb;k.CubicBezierCurve3=sb;k.CubicInterpolant=jf;k.CullFaceBack=1;k.CullFaceFront=2;k.CullFaceFrontBack=3;k.CullFaceNone=0;k.Curve=K;k.CurvePath=Eb;k.CustomBlending=5;k.CustomToneMapping=5;k.CylinderBufferGeometry=Cb;k.CylinderGeometry=wc;k.Cylindrical=Ld;k.DataTexture=nc;k.DataTexture2DArray=Tc;k.DataTexture3D=
|
|
|
Uc;k.DataTextureLoader=qf;k.DecrementStencilOp=7683;k.DecrementWrapStencilOp=34056;k.DefaultLoadingManager=ji;k.DepthFormat=1026;k.DepthStencilFormat=1027;k.DepthTexture=de;k.DirectionalLight=xf;k.DirectionalLightHelper=wd;k.DirectionalLightShadow=wf;k.DiscreteInterpolant=kf;k.DodecahedronBufferGeometry=dd;k.DodecahedronGeometry=je;k.DoubleSide=2;k.DstAlphaFactor=206;k.DstColorFactor=208;k.DynamicBufferAttribute=function(a,b){console.warn("THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setUsage( THREE.DynamicDrawUsage ) instead.");
|
|
|
return(new N(a,b)).setUsage(35048)};k.DynamicCopyUsage=35050;k.DynamicDrawUsage=35048;k.DynamicReadUsage=35049;k.EdgesGeometry=kd;k.EdgesHelper=function(a,b){console.warn("THREE.EdgesHelper has been removed. Use THREE.EdgesGeometry instead.");return new sa(new kd(a.geometry),new pa({color:void 0!==b?b:16777215}))};k.EllipseCurve=Xa;k.EqualDepth=4;k.EqualStencilFunc=514;k.EquirectangularReflectionMapping=303;k.EquirectangularRefractionMapping=304;k.Euler=ra;k.EventDispatcher=La;k.ExtrudeBufferGeometry=
|
|
|
-qb;k.ExtrudeGeometry=sc;k.Face3=mc;k.Face4=function(a,b,d,e,f,g,h){console.warn("THREE.Face4 has been removed. A THREE.Face3 will be created instead.");return new mc(a,b,d,f,g,h)};k.FaceColors=1;k.FileLoader=bb;k.FlatShading=1;k.Float32Attribute=function(a,b){console.warn("THREE.Float32Attribute has been removed. Use new THREE.Float32BufferAttribute() instead.");return new H(a,b)};k.Float32BufferAttribute=H;k.Float64Attribute=function(a,b){console.warn("THREE.Float64Attribute has been removed. Use new THREE.Float64BufferAttribute() instead.");
|
|
|
-return new Sd(a,b)};k.Float64BufferAttribute=Sd;k.FloatType=1015;k.Fog=Id;k.FogExp2=Hd;k.Font=Mg;k.FontLoader=Ng;k.FrontSide=0;k.Frustum=Ma;k.GLBufferAttribute=Ug;k.GammaEncoding=3007;k.Geometry=P;k.GeometryUtils={merge:function(a,b,d){console.warn("THREE.GeometryUtils: .merge() has been moved to Geometry. Use geometry.merge( geometry2, matrix, materialIndexOffset ) instead.");if(b.isMesh){b.matrixAutoUpdate&&b.updateMatrix();var e=b.matrix;b=b.geometry}a.merge(b,e,d)},center:function(a){console.warn("THREE.GeometryUtils: .center() has been moved to Geometry. Use geometry.center() instead.");
|
|
|
-return a.center()}};k.GreaterDepth=6;k.GreaterEqualDepth=5;k.GreaterEqualStencilFunc=518;k.GreaterStencilFunc=516;k.GridHelper=De;k.Group=Vb;k.HalfFloatType=1016;k.HemisphereLight=sf;k.HemisphereLightHelper=vd;k.HemisphereLightProbe=Og;k.IcosahedronBufferGeometry=cd;k.IcosahedronGeometry=ie;k.ImageBitmapLoader=Kg;k.ImageLoader=od;k.ImageUtils=dc;k.ImmediateRenderObject=Ce;k.IncrementStencilOp=7682;k.IncrementWrapStencilOp=34055;k.InstancedBufferAttribute=Bf;k.InstancedBufferGeometry=Be;k.InstancedInterleavedBuffer=
|
|
|
-Tg;k.InstancedMesh=df;k.Int16Attribute=function(a,b){console.warn("THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead.");return new Qd(a,b)};k.Int16BufferAttribute=Qd;k.Int32Attribute=function(a,b){console.warn("THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead.");return new Rd(a,b)};k.Int32BufferAttribute=Rd;k.Int8Attribute=function(a,b){console.warn("THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead.");
|
|
|
-return new Nd(a,b)};k.Int8BufferAttribute=Nd;k.IntType=1013;k.InterleavedBuffer=Va;k.InterleavedBufferAttribute=Wb;k.Interpolant=Wa;k.InterpolateDiscrete=2300;k.InterpolateLinear=2301;k.InterpolateSmooth=2302;k.InvertStencilOp=5386;k.JSONLoader=function(){console.error("THREE.JSONLoader has been removed.")};k.KeepStencilOp=7680;k.KeyframeTrack=Ca;k.LOD=be;k.LatheBufferGeometry=jd;k.LatheGeometry=te;k.Layers=nb;k.LensFlare=function(){console.error("THREE.LensFlare has been moved to /examples/jsm/objects/Lensflare.js")};
|
|
|
-k.LessDepth=2;k.LessEqualDepth=3;k.LessEqualStencilFunc=515;k.LessStencilFunc=513;k.Light=la;k.LightProbe=cb;k.LightShadow=ub;k.Line=Na;k.Line3=Ra;k.LineBasicMaterial=pa;k.LineCurve=Pa;k.LineCurve3=gb;k.LineDashedMaterial=Cc;k.LineLoop=ef;k.LinePieces=1;k.LineSegments=sa;k.LineStrip=0;k.LinearEncoding=3E3;k.LinearFilter=1006;k.LinearInterpolant=xe;k.LinearMipMapLinearFilter=1008;k.LinearMipMapNearestFilter=1007;k.LinearMipmapLinearFilter=1008;k.LinearMipmapNearestFilter=1007;k.LinearToneMapping=1;
|
|
|
-k.Loader=ba;k.LoaderUtils=th;k.LoadingManager=Fg;k.LogLuvEncoding=3003;k.LoopOnce=2200;k.LoopPingPong=2202;k.LoopRepeat=2201;k.LuminanceAlphaFormat=1025;k.LuminanceFormat=1024;k.MOUSE={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2};k.Material=M;k.MaterialLoader=Af;k.Math=T;k.MathUtils=T;k.Matrix3=X;k.Matrix4=z;k.MaxEquation=104;k.Mesh=na;k.MeshBasicMaterial=Za;k.MeshDepthMaterial=Sb;k.MeshDistanceMaterial=Tb;k.MeshFaceMaterial=function(a){console.warn("THREE.MeshFaceMaterial has been removed. Use an Array instead.");
|
|
|
-return a};k.MeshLambertMaterial=Ac;k.MeshMatcapMaterial=Bc;k.MeshNormalMaterial=zc;k.MeshPhongMaterial=$b;k.MeshPhysicalMaterial=Zb;k.MeshStandardMaterial=rb;k.MeshToonMaterial=yc;k.MinEquation=103;k.MirroredRepeatWrapping=1002;k.MixOperation=1;k.MultiMaterial=function(a){void 0===a&&(a=[]);console.warn("THREE.MultiMaterial has been removed. Use an Array instead.");a.isMultiMaterial=!0;a.materials=a;a.clone=function(){return a.slice()};return a};k.MultiplyBlending=4;k.MultiplyOperation=0;k.NearestFilter=
|
|
|
-1003;k.NearestMipMapLinearFilter=1005;k.NearestMipMapNearestFilter=1004;k.NearestMipmapLinearFilter=1005;k.NearestMipmapNearestFilter=1004;k.NeverDepth=0;k.NeverStencilFunc=512;k.NoBlending=0;k.NoColors=0;k.NoToneMapping=0;k.NormalAnimationBlendMode=2500;k.NormalBlending=1;k.NotEqualDepth=7;k.NotEqualStencilFunc=517;k.NumberKeyframeTrack=md;k.Object3D=D;k.ObjectLoader=Df;k.ObjectSpaceNormalMap=1;k.OctahedronBufferGeometry=qc;k.OctahedronGeometry=he;k.OneFactor=201;k.OneMinusDstAlphaFactor=207;k.OneMinusDstColorFactor=
|
|
|
-209;k.OneMinusSrcAlphaFactor=205;k.OneMinusSrcColorFactor=203;k.OrthographicCamera=qd;k.PCFShadowMap=1;k.PCFSoftShadowMap=2;k.PMREMGenerator=Ea;k.ParametricBufferGeometry=ad;k.ParametricGeometry=ee;k.Particle=function(a){console.warn("THREE.Particle has been renamed to THREE.Sprite.");return new $d(a)};k.ParticleBasicMaterial=function(a){console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial.");return new eb(a)};k.ParticleSystem=function(a,b){console.warn("THREE.ParticleSystem has been renamed to THREE.Points.");
|
|
|
-return new Yc(a,b)};k.ParticleSystemMaterial=function(a){console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial.");return new eb(a)};k.Path=jb;k.PerspectiveCamera=ta;k.Plane=W;k.PlaneBufferGeometry=oc;k.PlaneGeometry=Ud;k.PlaneHelper=Ge;k.PointCloud=function(a,b){console.warn("THREE.PointCloud has been renamed to THREE.Points.");return new Yc(a,b)};k.PointCloudMaterial=function(a){console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial.");return new eb(a)};
|
|
|
-k.PointLight=vf;k.PointLightHelper=ud;k.Points=Yc;k.PointsMaterial=eb;k.PolarGridHelper=Ff;k.PolyhedronBufferGeometry=Oa;k.PolyhedronGeometry=fe;k.PositionalAudio=Ia;k.PropertyBinding=Fa;k.PropertyMixer=Rg;k.QuadraticBezierCurve=hb;k.QuadraticBezierCurve3=tb;k.Quaternion=O;k.QuaternionKeyframeTrack=ye;k.QuaternionLinearInterpolant=nf;k.REVISION="120dev";k.RGBADepthPacking=3201;k.RGBAFormat=1023;k.RGBAIntegerFormat=1033;k.RGBA_ASTC_10x10_Format=37819;k.RGBA_ASTC_10x5_Format=37816;k.RGBA_ASTC_10x6_Format=
|
|
|
-37817;k.RGBA_ASTC_10x8_Format=37818;k.RGBA_ASTC_12x10_Format=37820;k.RGBA_ASTC_12x12_Format=37821;k.RGBA_ASTC_4x4_Format=37808;k.RGBA_ASTC_5x4_Format=37809;k.RGBA_ASTC_5x5_Format=37810;k.RGBA_ASTC_6x5_Format=37811;k.RGBA_ASTC_6x6_Format=37812;k.RGBA_ASTC_8x5_Format=37813;k.RGBA_ASTC_8x6_Format=37814;k.RGBA_ASTC_8x8_Format=37815;k.RGBA_BPTC_Format=36492;k.RGBA_ETC2_EAC_Format=37496;k.RGBA_PVRTC_2BPPV1_Format=35843;k.RGBA_PVRTC_4BPPV1_Format=35842;k.RGBA_S3TC_DXT1_Format=33777;k.RGBA_S3TC_DXT3_Format=
|
|
|
-33778;k.RGBA_S3TC_DXT5_Format=33779;k.RGBDEncoding=3006;k.RGBEEncoding=3002;k.RGBEFormat=1023;k.RGBFormat=1022;k.RGBIntegerFormat=1032;k.RGBM16Encoding=3005;k.RGBM7Encoding=3004;k.RGB_ETC1_Format=36196;k.RGB_ETC2_Format=37492;k.RGB_PVRTC_2BPPV1_Format=35841;k.RGB_PVRTC_4BPPV1_Format=35840;k.RGB_S3TC_DXT1_Format=33776;k.RGFormat=1030;k.RGIntegerFormat=1031;k.RawShaderMaterial=Db;k.Ray=qa;k.Raycaster=Vg;k.RectAreaLight=zf;k.RedFormat=1028;k.RedIntegerFormat=1029;k.ReinhardToneMapping=2;k.RepeatWrapping=
|
|
|
-1E3;k.ReplaceStencilOp=7681;k.ReverseSubtractEquation=102;k.RingBufferGeometry=id;k.RingGeometry=se;k.SRGB8_ALPHA8_ASTC_10x10_Format=37851;k.SRGB8_ALPHA8_ASTC_10x5_Format=37848;k.SRGB8_ALPHA8_ASTC_10x6_Format=37849;k.SRGB8_ALPHA8_ASTC_10x8_Format=37850;k.SRGB8_ALPHA8_ASTC_12x10_Format=37852;k.SRGB8_ALPHA8_ASTC_12x12_Format=37853;k.SRGB8_ALPHA8_ASTC_4x4_Format=37840;k.SRGB8_ALPHA8_ASTC_5x4_Format=37841;k.SRGB8_ALPHA8_ASTC_5x5_Format=37842;k.SRGB8_ALPHA8_ASTC_6x5_Format=37843;k.SRGB8_ALPHA8_ASTC_6x6_Format=
|
|
|
-37844;k.SRGB8_ALPHA8_ASTC_8x5_Format=37845;k.SRGB8_ALPHA8_ASTC_8x6_Format=37846;k.SRGB8_ALPHA8_ASTC_8x8_Format=37847;k.Scene=Ab;k.SceneUtils={createMultiMaterialObject:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")},detach:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")},attach:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")}};k.ShaderChunk=U;k.ShaderLib=
|
|
|
-db;k.ShaderMaterial=Aa;k.ShadowMaterial=xc;k.Shape=ac;k.ShapeBufferGeometry=vc;k.ShapeGeometry=uc;k.ShapePath=Lg;k.ShapeUtils=Bb;k.ShortType=1011;k.Skeleton=cf;k.SkeletonHelper=td;k.SkinnedMesh=bf;k.SmoothShading=2;k.Sphere=ha;k.SphereBufferGeometry=tc;k.SphereGeometry=re;k.Spherical=Lc;k.SphericalHarmonics3=Da;k.Spline=$g;k.SplineCurve=ib;k.SplineCurve3=ui;k.SpotLight=uf;k.SpotLightHelper=sd;k.SpotLightShadow=tf;k.Sprite=$d;k.SpriteMaterial=Xb;k.SrcAlphaFactor=204;k.SrcAlphaSaturateFactor=210;k.SrcColorFactor=
|
|
|
-202;k.StaticCopyUsage=35046;k.StaticDrawUsage=35044;k.StaticReadUsage=35045;k.StereoCamera=li;k.StreamCopyUsage=35042;k.StreamDrawUsage=35040;k.StreamReadUsage=35041;k.StringKeyframeTrack=of;k.SubtractEquation=101;k.SubtractiveBlending=3;k.TOUCH={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3};k.TangentSpaceNormalMap=0;k.TetrahedronBufferGeometry=bd;k.TetrahedronGeometry=ge;k.TextBufferGeometry=hd;k.TextGeometry=qe;k.Texture=fa;k.TextureLoader=rf;k.TorusBufferGeometry=fd;k.TorusGeometry=me;k.TorusKnotBufferGeometry=
|
|
|
-ed;k.TorusKnotGeometry=le;k.Triangle=S;k.TriangleFanDrawMode=2;k.TriangleStripDrawMode=1;k.TrianglesDrawMode=0;k.TubeBufferGeometry=rc;k.TubeGeometry=ke;k.UVMapping=300;k.Uint16Attribute=function(a,b){console.warn("THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead.");return new kc(a,b)};k.Uint16BufferAttribute=kc;k.Uint32Attribute=function(a,b){console.warn("THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead.");return new lc(a,
|
|
|
-b)};k.Uint32BufferAttribute=lc;k.Uint8Attribute=function(a,b){console.warn("THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead.");return new Od(a,b)};k.Uint8BufferAttribute=Od;k.Uint8ClampedAttribute=function(a,b){console.warn("THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead.");return new Pd(a,b)};k.Uint8ClampedBufferAttribute=Pd;k.Uniform=fg;k.UniformsLib=I;k.UniformsUtils=Uh;k.UnsignedByteType=1009;k.UnsignedInt248Type=
|
|
|
-1020;k.UnsignedIntType=1014;k.UnsignedShort4444Type=1017;k.UnsignedShort5551Type=1018;k.UnsignedShort565Type=1019;k.UnsignedShortType=1012;k.VSMShadowMap=3;k.Vector2=p;k.Vector3=m;k.Vector4=B;k.VectorKeyframeTrack=nd;k.Vertex=function(a,b,d){console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead.");return new m(a,b,d)};k.VertexColors=2;k.VideoTexture=Cg;k.WebGL1Renderer=yg;k.WebGLCubeRenderTarget=Qb;k.WebGLMultisampleRenderTarget=lg;k.WebGLRenderTarget=Sa;k.WebGLRenderTargetCube=function(a,
|
|
|
-b,d){console.warn("THREE.WebGLRenderTargetCube( width, height, options ) is now WebGLCubeRenderTarget( size, options ).");return new Qb(a,d)};k.WebGLRenderer=Zd;k.WebGLUtils=Yh;k.WireframeGeometry=$c;k.WireframeHelper=function(a,b){console.warn("THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead.");return new sa(new $c(a.geometry),new pa({color:void 0!==b?b:16777215}))};k.WrapAroundEnding=2402;k.XHRLoader=function(a){console.warn("THREE.XHRLoader has been renamed to THREE.FileLoader.");
|
|
|
+qb;k.ExtrudeGeometry=sc;k.Face3=mc;k.Face4=function(a,b,d,e,f,g,h){console.warn("THREE.Face4 has been removed. A THREE.Face3 will be created instead.");return new mc(a,b,d,f,g,h)};k.FaceColors=1;k.FileLoader=bb;k.FlatShading=1;k.Float32Attribute=function(a,b){console.warn("THREE.Float32Attribute has been removed. Use new THREE.Float32BufferAttribute() instead.");return new I(a,b)};k.Float32BufferAttribute=I;k.Float64Attribute=function(a,b){console.warn("THREE.Float64Attribute has been removed. Use new THREE.Float64BufferAttribute() instead.");
|
|
|
+return new Sd(a,b)};k.Float64BufferAttribute=Sd;k.FloatType=1015;k.Fog=Id;k.FogExp2=Hd;k.Font=Mg;k.FontLoader=Ng;k.FrontSide=0;k.Frustum=Ma;k.GLBufferAttribute=Ug;k.GLSL1="100";k.GLSL3="300 es";k.GammaEncoding=3007;k.Geometry=P;k.GeometryUtils={merge:function(a,b,d){console.warn("THREE.GeometryUtils: .merge() has been moved to Geometry. Use geometry.merge( geometry2, matrix, materialIndexOffset ) instead.");if(b.isMesh){b.matrixAutoUpdate&&b.updateMatrix();var e=b.matrix;b=b.geometry}a.merge(b,e,
|
|
|
+d)},center:function(a){console.warn("THREE.GeometryUtils: .center() has been moved to Geometry. Use geometry.center() instead.");return a.center()}};k.GreaterDepth=6;k.GreaterEqualDepth=5;k.GreaterEqualStencilFunc=518;k.GreaterStencilFunc=516;k.GridHelper=De;k.Group=Vb;k.HalfFloatType=1016;k.HemisphereLight=sf;k.HemisphereLightHelper=vd;k.HemisphereLightProbe=Og;k.IcosahedronBufferGeometry=cd;k.IcosahedronGeometry=ie;k.ImageBitmapLoader=Kg;k.ImageLoader=od;k.ImageUtils=dc;k.ImmediateRenderObject=
|
|
|
+Ce;k.IncrementStencilOp=7682;k.IncrementWrapStencilOp=34055;k.InstancedBufferAttribute=Bf;k.InstancedBufferGeometry=Be;k.InstancedInterleavedBuffer=Tg;k.InstancedMesh=df;k.Int16Attribute=function(a,b){console.warn("THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead.");return new Qd(a,b)};k.Int16BufferAttribute=Qd;k.Int32Attribute=function(a,b){console.warn("THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead.");return new Rd(a,b)};k.Int32BufferAttribute=
|
|
|
+Rd;k.Int8Attribute=function(a,b){console.warn("THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead.");return new Nd(a,b)};k.Int8BufferAttribute=Nd;k.IntType=1013;k.InterleavedBuffer=Va;k.InterleavedBufferAttribute=Wb;k.Interpolant=Wa;k.InterpolateDiscrete=2300;k.InterpolateLinear=2301;k.InterpolateSmooth=2302;k.InvertStencilOp=5386;k.JSONLoader=function(){console.error("THREE.JSONLoader has been removed.")};k.KeepStencilOp=7680;k.KeyframeTrack=Ca;k.LOD=be;k.LatheBufferGeometry=
|
|
|
+jd;k.LatheGeometry=te;k.Layers=nb;k.LensFlare=function(){console.error("THREE.LensFlare has been moved to /examples/jsm/objects/Lensflare.js")};k.LessDepth=2;k.LessEqualDepth=3;k.LessEqualStencilFunc=515;k.LessStencilFunc=513;k.Light=la;k.LightProbe=cb;k.LightShadow=ub;k.Line=Na;k.Line3=Ra;k.LineBasicMaterial=pa;k.LineCurve=Pa;k.LineCurve3=gb;k.LineDashedMaterial=Cc;k.LineLoop=ef;k.LinePieces=1;k.LineSegments=sa;k.LineStrip=0;k.LinearEncoding=3E3;k.LinearFilter=1006;k.LinearInterpolant=xe;k.LinearMipMapLinearFilter=
|
|
|
+1008;k.LinearMipMapNearestFilter=1007;k.LinearMipmapLinearFilter=1008;k.LinearMipmapNearestFilter=1007;k.LinearToneMapping=1;k.Loader=ba;k.LoaderUtils=th;k.LoadingManager=Fg;k.LogLuvEncoding=3003;k.LoopOnce=2200;k.LoopPingPong=2202;k.LoopRepeat=2201;k.LuminanceAlphaFormat=1025;k.LuminanceFormat=1024;k.MOUSE={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2};k.Material=L;k.MaterialLoader=Af;k.Math=T;k.MathUtils=T;k.Matrix3=X;k.Matrix4=z;k.MaxEquation=104;k.Mesh=na;k.MeshBasicMaterial=Za;k.MeshDepthMaterial=
|
|
|
+Sb;k.MeshDistanceMaterial=Tb;k.MeshFaceMaterial=function(a){console.warn("THREE.MeshFaceMaterial has been removed. Use an Array instead.");return a};k.MeshLambertMaterial=Ac;k.MeshMatcapMaterial=Bc;k.MeshNormalMaterial=zc;k.MeshPhongMaterial=$b;k.MeshPhysicalMaterial=Zb;k.MeshStandardMaterial=rb;k.MeshToonMaterial=yc;k.MinEquation=103;k.MirroredRepeatWrapping=1002;k.MixOperation=1;k.MultiMaterial=function(a){void 0===a&&(a=[]);console.warn("THREE.MultiMaterial has been removed. Use an Array instead.");
|
|
|
+a.isMultiMaterial=!0;a.materials=a;a.clone=function(){return a.slice()};return a};k.MultiplyBlending=4;k.MultiplyOperation=0;k.NearestFilter=1003;k.NearestMipMapLinearFilter=1005;k.NearestMipMapNearestFilter=1004;k.NearestMipmapLinearFilter=1005;k.NearestMipmapNearestFilter=1004;k.NeverDepth=0;k.NeverStencilFunc=512;k.NoBlending=0;k.NoColors=0;k.NoToneMapping=0;k.NormalAnimationBlendMode=2500;k.NormalBlending=1;k.NotEqualDepth=7;k.NotEqualStencilFunc=517;k.NumberKeyframeTrack=md;k.Object3D=F;k.ObjectLoader=
|
|
|
+Df;k.ObjectSpaceNormalMap=1;k.OctahedronBufferGeometry=qc;k.OctahedronGeometry=he;k.OneFactor=201;k.OneMinusDstAlphaFactor=207;k.OneMinusDstColorFactor=209;k.OneMinusSrcAlphaFactor=205;k.OneMinusSrcColorFactor=203;k.OrthographicCamera=qd;k.PCFShadowMap=1;k.PCFSoftShadowMap=2;k.PMREMGenerator=Ea;k.ParametricBufferGeometry=ad;k.ParametricGeometry=ee;k.Particle=function(a){console.warn("THREE.Particle has been renamed to THREE.Sprite.");return new $d(a)};k.ParticleBasicMaterial=function(a){console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial.");
|
|
|
+return new eb(a)};k.ParticleSystem=function(a,b){console.warn("THREE.ParticleSystem has been renamed to THREE.Points.");return new Yc(a,b)};k.ParticleSystemMaterial=function(a){console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial.");return new eb(a)};k.Path=jb;k.PerspectiveCamera=ta;k.Plane=W;k.PlaneBufferGeometry=oc;k.PlaneGeometry=Ud;k.PlaneHelper=Ge;k.PointCloud=function(a,b){console.warn("THREE.PointCloud has been renamed to THREE.Points.");return new Yc(a,b)};k.PointCloudMaterial=
|
|
|
+function(a){console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial.");return new eb(a)};k.PointLight=vf;k.PointLightHelper=ud;k.Points=Yc;k.PointsMaterial=eb;k.PolarGridHelper=Ff;k.PolyhedronBufferGeometry=Oa;k.PolyhedronGeometry=fe;k.PositionalAudio=Ia;k.PropertyBinding=Fa;k.PropertyMixer=Rg;k.QuadraticBezierCurve=hb;k.QuadraticBezierCurve3=tb;k.Quaternion=O;k.QuaternionKeyframeTrack=ye;k.QuaternionLinearInterpolant=nf;k.REVISION="120dev";k.RGBADepthPacking=3201;k.RGBAFormat=
|
|
|
+1023;k.RGBAIntegerFormat=1033;k.RGBA_ASTC_10x10_Format=37819;k.RGBA_ASTC_10x5_Format=37816;k.RGBA_ASTC_10x6_Format=37817;k.RGBA_ASTC_10x8_Format=37818;k.RGBA_ASTC_12x10_Format=37820;k.RGBA_ASTC_12x12_Format=37821;k.RGBA_ASTC_4x4_Format=37808;k.RGBA_ASTC_5x4_Format=37809;k.RGBA_ASTC_5x5_Format=37810;k.RGBA_ASTC_6x5_Format=37811;k.RGBA_ASTC_6x6_Format=37812;k.RGBA_ASTC_8x5_Format=37813;k.RGBA_ASTC_8x6_Format=37814;k.RGBA_ASTC_8x8_Format=37815;k.RGBA_BPTC_Format=36492;k.RGBA_ETC2_EAC_Format=37496;k.RGBA_PVRTC_2BPPV1_Format=
|
|
|
+35843;k.RGBA_PVRTC_4BPPV1_Format=35842;k.RGBA_S3TC_DXT1_Format=33777;k.RGBA_S3TC_DXT3_Format=33778;k.RGBA_S3TC_DXT5_Format=33779;k.RGBDEncoding=3006;k.RGBEEncoding=3002;k.RGBEFormat=1023;k.RGBFormat=1022;k.RGBIntegerFormat=1032;k.RGBM16Encoding=3005;k.RGBM7Encoding=3004;k.RGB_ETC1_Format=36196;k.RGB_ETC2_Format=37492;k.RGB_PVRTC_2BPPV1_Format=35841;k.RGB_PVRTC_4BPPV1_Format=35840;k.RGB_S3TC_DXT1_Format=33776;k.RGFormat=1030;k.RGIntegerFormat=1031;k.RawShaderMaterial=Db;k.Ray=qa;k.Raycaster=Vg;k.RectAreaLight=
|
|
|
+zf;k.RedFormat=1028;k.RedIntegerFormat=1029;k.ReinhardToneMapping=2;k.RepeatWrapping=1E3;k.ReplaceStencilOp=7681;k.ReverseSubtractEquation=102;k.RingBufferGeometry=id;k.RingGeometry=se;k.SRGB8_ALPHA8_ASTC_10x10_Format=37851;k.SRGB8_ALPHA8_ASTC_10x5_Format=37848;k.SRGB8_ALPHA8_ASTC_10x6_Format=37849;k.SRGB8_ALPHA8_ASTC_10x8_Format=37850;k.SRGB8_ALPHA8_ASTC_12x10_Format=37852;k.SRGB8_ALPHA8_ASTC_12x12_Format=37853;k.SRGB8_ALPHA8_ASTC_4x4_Format=37840;k.SRGB8_ALPHA8_ASTC_5x4_Format=37841;k.SRGB8_ALPHA8_ASTC_5x5_Format=
|
|
|
+37842;k.SRGB8_ALPHA8_ASTC_6x5_Format=37843;k.SRGB8_ALPHA8_ASTC_6x6_Format=37844;k.SRGB8_ALPHA8_ASTC_8x5_Format=37845;k.SRGB8_ALPHA8_ASTC_8x6_Format=37846;k.SRGB8_ALPHA8_ASTC_8x8_Format=37847;k.Scene=Ab;k.SceneUtils={createMultiMaterialObject:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")},detach:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")},attach:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")}};
|
|
|
+k.ShaderChunk=U;k.ShaderLib=db;k.ShaderMaterial=Aa;k.ShadowMaterial=xc;k.Shape=ac;k.ShapeBufferGeometry=vc;k.ShapeGeometry=uc;k.ShapePath=Lg;k.ShapeUtils=Bb;k.ShortType=1011;k.Skeleton=cf;k.SkeletonHelper=td;k.SkinnedMesh=bf;k.SmoothShading=2;k.Sphere=ha;k.SphereBufferGeometry=tc;k.SphereGeometry=re;k.Spherical=Lc;k.SphericalHarmonics3=Da;k.Spline=$g;k.SplineCurve=ib;k.SplineCurve3=ui;k.SpotLight=uf;k.SpotLightHelper=sd;k.SpotLightShadow=tf;k.Sprite=$d;k.SpriteMaterial=Xb;k.SrcAlphaFactor=204;k.SrcAlphaSaturateFactor=
|
|
|
+210;k.SrcColorFactor=202;k.StaticCopyUsage=35046;k.StaticDrawUsage=35044;k.StaticReadUsage=35045;k.StereoCamera=li;k.StreamCopyUsage=35042;k.StreamDrawUsage=35040;k.StreamReadUsage=35041;k.StringKeyframeTrack=of;k.SubtractEquation=101;k.SubtractiveBlending=3;k.TOUCH={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3};k.TangentSpaceNormalMap=0;k.TetrahedronBufferGeometry=bd;k.TetrahedronGeometry=ge;k.TextBufferGeometry=hd;k.TextGeometry=qe;k.Texture=fa;k.TextureLoader=rf;k.TorusBufferGeometry=fd;k.TorusGeometry=
|
|
|
+me;k.TorusKnotBufferGeometry=ed;k.TorusKnotGeometry=le;k.Triangle=S;k.TriangleFanDrawMode=2;k.TriangleStripDrawMode=1;k.TrianglesDrawMode=0;k.TubeBufferGeometry=rc;k.TubeGeometry=ke;k.UVMapping=300;k.Uint16Attribute=function(a,b){console.warn("THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead.");return new kc(a,b)};k.Uint16BufferAttribute=kc;k.Uint32Attribute=function(a,b){console.warn("THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead.");
|
|
|
+return new lc(a,b)};k.Uint32BufferAttribute=lc;k.Uint8Attribute=function(a,b){console.warn("THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead.");return new Od(a,b)};k.Uint8BufferAttribute=Od;k.Uint8ClampedAttribute=function(a,b){console.warn("THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead.");return new Pd(a,b)};k.Uint8ClampedBufferAttribute=Pd;k.Uniform=fg;k.UniformsLib=J;k.UniformsUtils=Uh;k.UnsignedByteType=1009;
|
|
|
+k.UnsignedInt248Type=1020;k.UnsignedIntType=1014;k.UnsignedShort4444Type=1017;k.UnsignedShort5551Type=1018;k.UnsignedShort565Type=1019;k.UnsignedShortType=1012;k.VSMShadowMap=3;k.Vector2=p;k.Vector3=m;k.Vector4=B;k.VectorKeyframeTrack=nd;k.Vertex=function(a,b,d){console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead.");return new m(a,b,d)};k.VertexColors=2;k.VideoTexture=Cg;k.WebGL1Renderer=yg;k.WebGLCubeRenderTarget=Qb;k.WebGLMultisampleRenderTarget=lg;k.WebGLRenderTarget=Sa;k.WebGLRenderTargetCube=
|
|
|
+function(a,b,d){console.warn("THREE.WebGLRenderTargetCube( width, height, options ) is now WebGLCubeRenderTarget( size, options ).");return new Qb(a,d)};k.WebGLRenderer=Zd;k.WebGLUtils=Yh;k.WireframeGeometry=$c;k.WireframeHelper=function(a,b){console.warn("THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead.");return new sa(new $c(a.geometry),new pa({color:void 0!==b?b:16777215}))};k.WrapAroundEnding=2402;k.XHRLoader=function(a){console.warn("THREE.XHRLoader has been renamed to THREE.FileLoader.");
|
|
|
return new bb(a)};k.ZeroCurvatureEnding=2400;k.ZeroFactor=200;k.ZeroSlopeEnding=2401;k.ZeroStencilOp=0;k.sRGBEncoding=3001;Object.defineProperty(k,"__esModule",{value:!0})});
|