From 7b1648436c59b5bc99ef33105dd0436d926dc80e Mon Sep 17 00:00:00 2001 From: "Mr.doob" Date: Sun, 15 Sep 2019 20:22:32 -0700 Subject: [PATCH] Updated builds. --- build/three.js | 74 ++-- build/three.min.js | 895 +++++++++++++++++++++--------------------- build/three.module.js | 74 ++-- 3 files changed, 527 insertions(+), 516 deletions(-) diff --git a/build/three.js b/build/three.js index 8b9eff3142..1cee060b6b 100644 --- a/build/three.js +++ b/build/three.js @@ -8869,21 +8869,6 @@ onUploadCallback: function () {}, - setArray: function ( array ) { - - if ( Array.isArray( array ) ) { - - throw new TypeError( 'THREE.BufferAttribute: array should be a Typed Array.' ); - - } - - this.count = array !== undefined ? array.length / this.itemSize : 0; - this.array = array; - - return this; - - }, - setDynamic: function ( value ) { this.dynamic = value; @@ -9635,9 +9620,7 @@ } - this.attributes[ name ] = attribute; - - return this; + return this.setAttribute( name, attribute ); }, @@ -9647,6 +9630,14 @@ }, + setAttribute: function ( name, attribute ) { + + this.attributes[ name ] = attribute; + + return this; + + }, + removeAttribute: function ( name ) { delete this.attributes[ name ]; @@ -25993,21 +25984,6 @@ onUploadCallback: function () {}, - setArray: function ( array ) { - - if ( Array.isArray( array ) ) { - - throw new TypeError( 'THREE.BufferAttribute: array should be a Typed Array.' ); - - } - - this.count = array !== undefined ? array.length / this.stride : 0; - this.array = array; - - return this; - - }, - setDynamic: function ( value ) { this.dynamic = value; @@ -48169,11 +48145,26 @@ return this.array.length; } - }, + } + + } ); + + Object.assign( BufferAttribute.prototype, { + copyIndicesArray: function ( /* indices */ ) { console.error( 'THREE.BufferAttribute: .copyIndicesArray() has been removed.' ); + }, + setArray: function ( array ) { + + console.warn( 'THREE.BufferAttribute: .setArray has been deprecated. Use BufferGeometry .setAttribute to replace/resize attribute buffers' ); + + this.count = array !== undefined ? array.length / this.itemSize : 0; + this.array = array; + + return this; + } } ); @@ -48237,6 +48228,21 @@ } ); + Object.assign( InterleavedBuffer.prototype, { + + setArray: function ( array ) { + + console.warn( 'THREE.InterleavedBuffer: .setArray has been deprecated. Use BufferGeometry .setAttribute to replace/resize attribute buffers' ); + + this.count = array !== undefined ? array.length / this.stride : 0; + this.array = array; + + return this; + + } + + } ); + // Object.assign( ExtrudeBufferGeometry.prototype, { diff --git a/build/three.min.js b/build/three.min.js index f09262989f..2f2edb8cbd 100644 --- a/build/three.min.js +++ b/build/three.min.js @@ -3,35 +3,35 @@ function Z(a,b,c,d,e,f,g,h,l,m){Object.defineProperty(this,"id",{value:Ni++});this.uuid=N.generateUUID();this.name="";this.image=void 0!==a?a:Z.DEFAULT_IMAGE;this.mipmaps=[];this.mapping=void 0!==b?b:Z.DEFAULT_MAPPING;this.wrapS=void 0!==c?c: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.type=void 0!==h?h:1009;this.offset=new w(0,0);this.repeat=new w(1,1);this.center=new w(0,0);this.rotation= 0;this.matrixAutoUpdate=!0;this.matrix=new S;this.generateMipmaps=!0;this.premultiplyAlpha=!1;this.flipY=!0;this.unpackAlignment=4;this.encoding=void 0!==m?m:3E3;this.version=0;this.onUpdate=null}function ca(a,b,c,d){this.x=a||0;this.y=b||0;this.z=c||0;this.w=void 0!==d?d:1}function ka(a,b,c){this.width=a;this.height=b;this.scissor=new ca(0,0,a,b);this.scissorTest=!1;this.viewport=new ca(0,0,a,b);c=c||{};this.texture=new Z(void 0,void 0,c.wrapS,c.wrapT,c.magFilter,c.minFilter,c.format,c.type,c.anisotropy, c.encoding);this.texture.image={};this.texture.image.width=a;this.texture.image.height=b;this.texture.generateMipmaps=void 0!==c.generateMipmaps?c.generateMipmaps:!1;this.texture.minFilter=void 0!==c.minFilter?c.minFilter:1006;this.depthBuffer=void 0!==c.depthBuffer?c.depthBuffer:!0;this.stencilBuffer=void 0!==c.stencilBuffer?c.stencilBuffer:!0;this.depthTexture=void 0!==c.depthTexture?c.depthTexture:null}function Of(a,b,c){ka.call(this,a,b,c);this.samples=4}function M(){this.elements=[1,0,0,0,0, -1,0,0,0,0,1,0,0,0,0,1];0h)return!1}return!0}function nb(a,b){this.center=void 0!==a?a:new n;this.radius=void 0!==b?b:0}function Rb(a,b){this.origin=void 0!==a?a:new n;this.direction=void 0!==b?b:new n}function aa(a,b,c){this.a=void 0!==a?a:new n;this.b=void 0!==b?b:new n;this.c=void 0!==c?c:new n}function I(a,b,c){return void 0===b&&void 0=== +a.length-3;g<=f;g+=3){Rb.fromArray(a,g);var h=e.x*Math.abs(Rb.x)+e.y*Math.abs(Rb.y)+e.z*Math.abs(Rb.z),l=b.dot(Rb),m=c.dot(Rb),p=d.dot(Rb);if(Math.max(-Math.max(l,m,p),Math.min(l,m,p))>h)return!1}return!0}function nb(a,b){this.center=void 0!==a?a:new n;this.radius=void 0!==b?b:0}function Sb(a,b){this.origin=void 0!==a?a:new n;this.direction=void 0!==b?b:new n}function aa(a,b,c){this.a=void 0!==a?a:new n;this.b=void 0!==b?b:new n;this.c=void 0!==c?c:new n}function I(a,b,c){return void 0===b&&void 0=== c?this.set(a):this.setRGB(a,b,c)}function Rf(a,b,c){0>c&&(c+=1);1c?b:c<2/3?a+6*(b-a)*(2/3-c):a}function Sf(a){return.04045>a?.0773993808*a:Math.pow(.9478672986*a+.0521327014,2.4)}function Tf(a){return.0031308>a?12.92*a:1.055*Math.pow(a,.41666)-.055}function zc(a,b,c,d,e,f){this.a=a;this.b=b;this.c=c;this.normal=d&&d.isVector3?d:new n;this.vertexNormals=Array.isArray(d)?d:[];this.color=e&&e.isColor?e:new I;this.vertexColors=Array.isArray(e)?e:[];this.materialIndex= -void 0!==f?f:0}function P(){Object.defineProperty(this,"id",{value:Pi++});this.uuid=N.generateUUID();this.name="";this.type="Material";this.lights=this.fog=!0;this.blending=1;this.side=0;this.vertexTangents=this.flatShading=!1;this.vertexColors=0;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.needsUpdate=!0}function Ga(a){P.call(this);this.type="MeshBasicMaterial"; -this.color=new I(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.lights=this.morphTargets=this.skinning=!1;this.setValues(a)}function Q(a,b,c){if(Array.isArray(a))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array."); -this.name="";this.array=a;this.itemSize=b;this.count=void 0!==a?a.length/b:0;this.normalized=!0===c;this.dynamic=!1;this.updateRange={offset:0,count:-1};this.version=0}function xd(a,b,c){Q.call(this,new Int8Array(a),b,c)}function yd(a,b,c){Q.call(this,new Uint8Array(a),b,c)}function zd(a,b,c){Q.call(this,new Uint8ClampedArray(a),b,c)}function Ad(a,b,c){Q.call(this,new Int16Array(a),b,c)}function Sb(a,b,c){Q.call(this,new Uint16Array(a),b,c)}function Bd(a,b,c){Q.call(this,new Int32Array(a),b,c)}function Tb(a, -b,c){Q.call(this,new Uint32Array(a),b,c)}function A(a,b,c){Q.call(this,new Float32Array(a),b,c)}function Cd(a,b,c){Q.call(this,new Float64Array(a),b,c)}function hh(){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}function ih(a){if(0===a.length)return-Infinity; +void 0!==f?f:0}function Q(){Object.defineProperty(this,"id",{value:Pi++});this.uuid=N.generateUUID();this.name="";this.type="Material";this.lights=this.fog=!0;this.blending=1;this.side=0;this.vertexTangents=this.flatShading=!1;this.vertexColors=0;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.needsUpdate=!0}function Ga(a){Q.call(this);this.type="MeshBasicMaterial"; +this.color=new I(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.lights=this.morphTargets=this.skinning=!1;this.setValues(a)}function O(a,b,c){if(Array.isArray(a))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array."); +this.name="";this.array=a;this.itemSize=b;this.count=void 0!==a?a.length/b:0;this.normalized=!0===c;this.dynamic=!1;this.updateRange={offset:0,count:-1};this.version=0}function xd(a,b,c){O.call(this,new Int8Array(a),b,c)}function yd(a,b,c){O.call(this,new Uint8Array(a),b,c)}function zd(a,b,c){O.call(this,new Uint8ClampedArray(a),b,c)}function Ad(a,b,c){O.call(this,new Int16Array(a),b,c)}function Tb(a,b,c){O.call(this,new Uint16Array(a),b,c)}function Bd(a,b,c){O.call(this,new Int32Array(a),b,c)}function Ub(a, +b,c){O.call(this,new Uint32Array(a),b,c)}function A(a,b,c){O.call(this,new Float32Array(a),b,c)}function Cd(a,b,c){O.call(this,new Float64Array(a),b,c)}function hh(){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}function ih(a){if(0===a.length)return-Infinity; for(var b=a[0],c=1,d=a.length;cb&&(b=a[c]);return b}function D(){Object.defineProperty(this,"id",{value:Qi+=2});this.uuid=N.generateUUID();this.name="";this.type="BufferGeometry";this.index=null;this.attributes={};this.morphAttributes={};this.groups=[];this.boundingSphere=this.boundingBox=null;this.drawRange={start:0,count:Infinity};this.userData={}}function R(a,b){C.call(this);this.type="Mesh";this.geometry=void 0!==a?a:new D;this.material=void 0!==b?b:new Ga({color:16777215*Math.random()}); -this.drawMode=0;this.updateMorphTargets()}function jh(a,b,c,d,e,f,g,h){if(null===(1===b.side?d.intersectTriangle(g,f,e,!0,h):d.intersectTriangle(e,f,g,2!==b.side,h)))return null;Ee.copy(h);Ee.applyMatrix4(a.matrixWorld);b=c.ray.origin.distanceTo(Ee);return bc.far?null:{distance:b,point:Ee.clone(),object:a}}function Fe(a,b,c,d,e,f,g,h,l,m,p){Ub.fromBufferAttribute(e,l);Vb.fromBufferAttribute(e,m);Wb.fromBufferAttribute(e,p);e=a.morphTargetInfluences;if(b.morphTargets&&f&&e){Uf.set(0,0,0); -Vf.set(0,0,0);Wf.set(0,0,0);for(var u=0,t=f.length;uc.far?null:{distance:b,point:Ee.clone(),object:a}}function Fe(a,b,c,d,e,f,g,h,l,m,p){Vb.fromBufferAttribute(e,l);Wb.fromBufferAttribute(e,m);Xb.fromBufferAttribute(e,p);e=a.morphTargetInfluences;if(b.morphTargets&&f&&e){Uf.set(0,0,0); +Vf.set(0,0,0);Wf.set(0,0,0);for(var u=0,t=f.length;ug;g++)a.setRenderTarget(f,g),a.clear(b,c,d);a.setRenderTarget(e)}}function Ab(a,b,c){ka.call(this,a,b,c)}function Yb(a,b,c,d,e,f,g,h,l,m,p,u){Z.call(this,null,f,g,h,l,m,d,e,p,u);this.image={data:a||null, +1);a.render(b,f);a.setRenderTarget(d,2);a.render(b,g);a.setRenderTarget(d,3);a.render(b,h);a.setRenderTarget(d,4);a.render(b,l);d.texture.generateMipmaps=p;a.setRenderTarget(d,5);a.render(b,m);a.setRenderTarget(c)};this.clear=function(a,b,c,d){for(var e=a.getRenderTarget(),f=this.renderTarget,g=0;6>g;g++)a.setRenderTarget(f,g),a.clear(b,c,d);a.setRenderTarget(e)}}function Ab(a,b,c){ka.call(this,a,b,c)}function Zb(a,b,c,d,e,f,g,h,l,m,p,u){Z.call(this,null,f,g,h,l,m,d,e,p,u);this.image={data:a||null, width:b||1,height:c||1};this.magFilter=void 0!==l?l:1003;this.minFilter=void 0!==m?m:1003;this.flipY=this.generateMipmaps=!1;this.unpackAlignment=1;this.needsUpdate=!0}function cb(a,b){this.normal=void 0!==a?a:new n(1,0,0);this.constant=void 0!==b?b:0}function Ed(a,b,c,d,e,f){this.planes=[void 0!==a?a:new cb,void 0!==b?b:new cb,void 0!==c?c:new cb,void 0!==d?d:new cb,void 0!==e?e:new cb,void 0!==f?f:new cb]}function Xf(){function a(e,f){!1!==c&&(d(e,f),b.requestAnimationFrame(a))}var b=null,c=!1, d=null;return{start:function(){!0!==c&&null!==d&&(b.requestAnimationFrame(a),c=!0)},stop:function(){c=!1},setAnimationLoop:function(a){d=a},setContext:function(a){b=a}}}function Si(a){function b(b,c){var d=b.array,e=b.dynamic?35048:35044,h=a.createBuffer();a.bindBuffer(c,h);a.bufferData(c,d,e);b.onUploadCallback();c=5126;d instanceof Float32Array?c=5126:d instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):d instanceof Uint16Array?c=5123:d instanceof Int16Array?c=5122:d instanceof Uint32Array?c=5125:d instanceof Int32Array?c=5124:d instanceof Int8Array?c=5120:d instanceof Uint8Array&&(c=5121);return{buffer:h,type:c,bytesPerElement:d.BYTES_PER_ELEMENT,version:b.version}}var c=new WeakMap;return{get:function(a){a.isInterleavedBufferAttribute&&(a=a.data);return c.get(a)},remove:function(b){b.isInterleavedBufferAttribute&&(b=b.data);var d=c.get(b);d&&(a.deleteBuffer(d.buffer),c.delete(b))},update:function(d,e){d.isInterleavedBufferAttribute&&(d=d.data); var f=c.get(d);if(void 0===f)c.set(d,b(d,e));else if(f.version/gm,function(a,c){a=O[c];if(void 0===a)throw Error("Can not resolve #include <"+c+">");return Zf(a)})}function Ch(a){return a.replace(/#pragma unroll_loop[\s]+?for \( int i = (\d+); i < (\d+); i \+\+ \) \{([\s\S]+?)(?=\})\}/g,function(a,c,d,e){a="";for(c=parseInt(c);c/gm,function(a,c){a=P[c];if(void 0===a)throw Error("Can not resolve #include <"+c+">");return Zf(a)})}function Ch(a){return a.replace(/#pragma unroll_loop[\s]+?for \( int i = (\d+); i < (\d+); i \+\+ \) \{([\s\S]+?)(?=\})\}/g,function(a,c,d,e){a="";for(c=parseInt(c);c\nvoid main() {\n float mean = 0.0;\n float squared_mean = 0.0;\n \n\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy ) / resolution ) );\n for ( float i = -1.0; i < 1.0 ; i += SAMPLE_RATE) {\n #ifdef HORIZONAL_PASS\n vec2 distribution = decodeHalfRGBA ( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( i, 0.0 ) * radius ) / resolution ) );\n mean += distribution.x;\n squared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n #else\n float depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, i ) * radius ) / resolution ) );\n mean += depth;\n squared_mean += depth * depth;\n #endif\n }\n mean = mean * HALF_SAMPLE_RATE;\n squared_mean = squared_mean * HALF_SAMPLE_RATE;\n float std_dev = pow( squared_mean - mean * mean, 0.5 );\n gl_FragColor = encodeHalfRGBA( vec2( mean, std_dev ) );\n}"}), -q=r.clone();q.defines.HORIZONAL_PASS=1;var v=new D;v.addAttribute("position",new Q(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));var n=new R(v,r);for(v=0;4!==v;++v){var z=0!==(v&1),x=0!==(v&2),F=new Db({depthPacking:3201,morphTargets:z,skinning:x});m[v]=F;z=new Eb({morphTargets:z,skinning:x});p[v]=z}var V=this;this.enabled=!1;this.autoUpdate=!0;this.needsUpdate=!1;this.type=1;this.render=function(d,m,p){if(!1!==V.enabled&&(!1!==V.autoUpdate||!1!==V.needsUpdate)&&0!==d.length){var u=a.getRenderTarget(), +q=r.clone();q.defines.HORIZONAL_PASS=1;var v=new D;v.addAttribute("position",new O(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));var n=new R(v,r);for(v=0;4!==v;++v){var z=0!==(v&1),x=0!==(v&2),F=new Db({depthPacking:3201,morphTargets:z,skinning:x});m[v]=F;z=new Eb({morphTargets:z,skinning:x});p[v]=z}var V=this;this.enabled=!1;this.autoUpdate=!0;this.needsUpdate=!1;this.type=1;this.render=function(d,m,p){if(!1!==V.enabled&&(!1!==V.autoUpdate||!1!==V.needsUpdate)&&0!==d.length){var u=a.getRenderTarget(), k=a.getActiveCubeFace(),t=a.getActiveMipmapLevel(),v=a.state;v.setBlending(0);v.buffers.color.setClear(1,1,1,1);v.buffers.depth.setTest(!0);v.setScissorTest(!1);for(var y=0,x=d.length;yc||g.y>c)console.warn("THREE.WebGLShadowMap:",F,"has shadow exceeding max texture size, reducing"),g.x>c&&(h.x=Math.floor(c/ia.x), g.x=h.x*ia.x,W.mapSize.x=h.x),g.y>c&&(h.y=Math.floor(c/ia.y),g.y=h.y*ia.y,W.mapSize.y=h.y);null!==W.map||W.isPointLightShadow||3!==this.type||(ia={minFilter:1006,magFilter:1006,format:1023},W.map=new ka(g.x,g.y,ia),W.map.texture.name=F.name+".shadowMap",W.mapPass=new ka(g.x,g.y,ia),W.camera.updateProjectionMatrix());null===W.map&&(ia={minFilter:1003,magFilter:1003,format:1023},W.map=new ka(g.x,g.y,ia),W.map.texture.name=F.name+".shadowMap",W.camera.updateProjectionMatrix());a.setRenderTarget(W.map); a.clear();ia=W.getViewportCount();for(var z=0;zd||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?N.floorPowerOfTwo:Math.floor,b=d(e*a.width),e=d(e*a.height),void 0===H&&(H=h(b,e)),c=c?h(b,e):H,c.width=b,c.height=e,c.getContext("2d").drawImage(a,0,0,b,e),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+a.width+"x"+a.height+") to ("+b+"x"+e+")."),c;"data"in a&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+a.width+"x"+a.height+").")}return a}function m(a){return N.isPowerOfTwo(a.width)&&N.isPowerOfTwo(a.height)}function p(a,b){return a.generateMipmaps&& b&&1003!==a.minFilter&&1006!==a.minFilter}function u(b,c,e,f){a.generateMipmap(b);d.get(c).__maxMipLevel=Math.log(Math.max(e,f))*Math.LOG2E}function k(a,c){if(!e.isWebGL2)return a;var d=a;6403===a&&(5126===c&&(d=33326),5131===c&&(d=33325),5121===c&&(d=33321));6407===a&&(5126===c&&(d=34837),5131===c&&(d=34843),5121===c&&(d=32849));6408===a&&(5126===c&&(d=34836),5131===c&&(d=34842),5121===c&&(d=32856));33325===d||33326===d||34842===d||34836===d?b.get("EXT_color_buffer_float"):(34843===d||34837===d)&& @@ -176,18 +176,18 @@ function(){r=l.inputSources;console.log(r);for(var a=0;af.matrixWorld.determinant();ha.setMaterial(e, -h);var l=k(a,c,e,f),m=!1;if(b!==d.id||ac!==l.id||Y!==(!0===e.wireframe))b=d.id,ac=l.id,Y=!0===e.wireframe,m=!0;f.morphTargetInfluences&&(ya.update(f,d,e,l),m=!0);h=d.index;var p=d.attributes.position;c=1;!0===e.wireframe&&(h=wa.getWireframeAttribute(d),c=2);a=Aa;if(null!==h){var u=ta.get(h);a=Ba;a.setIndex(u)}if(m){if(d&&d.isInstancedBufferGeometry&&!Ca.isWebGL2&&null===pa.get("ANGLE_instanced_arrays"))console.error("THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays."); +h);var l=k(a,c,e,f),m=!1;if(b!==d.id||bc!==l.id||Y!==(!0===e.wireframe))b=d.id,bc=l.id,Y=!0===e.wireframe,m=!0;f.morphTargetInfluences&&(ya.update(f,d,e,l),m=!0);h=d.index;var p=d.attributes.position;c=1;!0===e.wireframe&&(h=wa.getWireframeAttribute(d),c=2);a=Aa;if(null!==h){var u=ta.get(h);a=Ba;a.setIndex(u)}if(m){if(d&&d.isInstancedBufferGeometry&&!Ca.isWebGL2&&null===pa.get("ANGLE_instanced_arrays"))console.error("THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays."); else{ha.initAttributes();m=d.attributes;l=l.getAttributes();var q=e.defaultAttributeValues;for(w in l){var r=l[w];if(0<=r){var t=m[w];if(void 0!==t){var n=t.normalized,v=t.itemSize,y=ta.get(t);if(void 0!==y){var x=y.buffer,z=y.type;y=y.bytesPerElement;if(t.isInterleavedBufferAttribute){var B=t.data,F=B.stride;t=t.offset;B&&B.isInstancedInterleavedBuffer?(ha.enableAttributeAndDivisor(r,B.meshPerAttribute),void 0===d.maxInstancedCount&&(d.maxInstancedCount=B.meshPerAttribute*B.count)):ha.enableAttribute(r); K.bindBuffer(34962,x);K.vertexAttribPointer(r,v,z,n,F*y,t*y)}else t.isInstancedBufferAttribute?(ha.enableAttributeAndDivisor(r,t.meshPerAttribute),void 0===d.maxInstancedCount&&(d.maxInstancedCount=t.meshPerAttribute*t.count)):ha.enableAttribute(r),K.bindBuffer(34962,x),K.vertexAttribPointer(r,v,z,n,0,0)}}else if(void 0!==q&&(n=q[w],void 0!==n))switch(n.length){case 2:K.vertexAttrib2fv(r,n);break;case 3:K.vertexAttrib3fv(r,n);break;case 4:K.vertexAttrib4fv(r,n);break;default:K.vertexAttrib1fv(r,n)}}}ha.disableUnusedAttributes()}null!== -h&&K.bindBuffer(34963,u.buffer)}u=Infinity;null!==h?u=h.count:void 0!==p&&(u=p.count);h=d.drawRange.start*c;p=null!==g?g.start*c:0;var w=Math.max(h,p);g=Math.max(0,Math.min(u,h+d.drawRange.count*c,p+(null!==g?g.count*c:Infinity))-1-w+1);if(0!==g){if(f.isMesh)if(!0===e.wireframe)ha.setLineWidth(e.wireframeLinewidth*(null===O?ea:1)),a.setMode(1);else switch(f.drawMode){case 0:a.setMode(4);break;case 1:a.setMode(5);break;case 2:a.setMode(6)}else f.isLine?(e=e.linewidth,void 0===e&&(e=1),ha.setLineWidth(e* -(null===O?ea:1)),f.isLineSegments?a.setMode(1):f.isLineLoop?a.setMode(2):a.setMode(3)):f.isPoints?a.setMode(0):f.isSprite&&a.setMode(4);d&&d.isInstancedBufferGeometry?0e.far||f.push({distance:a,distanceToRay:Math.sqrt(h),point:c,index:b,face:null,object:g}))}function kg(a,b,c,d,e,f,g,h,l){Z.call(this,a,b,c,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}function Lc(a,b,c,d,e,f,g,h,l,m,p,k){Z.call(this,null,f,g,h,l,m,d,e,p,k);this.image={width:b,height:c};this.mipmaps=a;this.generateMipmaps=this.flipY=!1}function Pd(a, b,c,d,e,f,g,h,l){Z.call(this,a,b,c,d,e,f,g,h,l);this.needsUpdate=!0}function Qd(a,b,c,d,e,f,g,h,l,m){m=void 0!==m?m:1026;if(1026!==m&&1027!==m)throw Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===c&&1026===m&&(c=1012);void 0===c&&1027===m&&(c=1020);Z.call(this,null,d,e,f,g,h,m,c,l);this.image={width:a,height:b};this.magFilter=void 0!==g?g:1003;this.minFilter=void 0!==h?h:1003;this.generateMipmaps=this.flipY=!1}function Mc(a){D.call(this);this.type= "WireframeGeometry";var b=[],c,d,e,f=[0,0],g={},h=["a","b","c"];if(a&&a.isGeometry){var l=a.faces;var m=0;for(d=l.length;mc;c++){var k=p[h[c]];var t=p[h[(c+1)%3]];f[0]=Math.min(k,t);f[1]=Math.max(k,t);k=f[0]+","+f[1];void 0===g[k]&&(g[k]={index1:f[0],index2:f[1]})}}for(k in g)m=g[k],h=a.vertices[m.index1],b.push(h.x,h.y,h.z),h=a.vertices[m.index2],b.push(h.x,h.y,h.z)}else if(a&&a.isBufferGeometry)if(h=new n,null!==a.index){l=a.attributes.position;p=a.index;var r=a.groups; @@ -264,13 +264,13 @@ a.nextZ);a.nextZ&&(a.nextZ.prevZ=a.prevZ)}function mg(a,b,c){this.i=a;this.x=b;t 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),m=Math.sqrt(f*f+g*g);h=b.x-e/l;b=b.y+d/l;g=((c.x-g/m-h)*g-(c.y+f/m-b)*f)/(d*g-e*f);f=h+d*g-a.x;d=b+e*g-a.y;e=f*f+d*d;if(2>=e)return new w(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 w(f/e,d/e)}function h(a,b){for(L=a.length;0<=--L;){var c=L;var f=L-1;0>f&&(f=a.length-1);var g,h=x+2*D;for(g=0;gthis.duration&&this.resetDuration()}function ik(a){switch(a.toLowerCase()){case "scalar":case "double":case "float":case "number":case "integer":return $c; @@ -303,12 +303,12 @@ a)}function Ue(a){Y.call(this,a)}function Ve(a){Y.call(this,a)}function E(){this h=l*(h-f);a=f;b=e;c=-3*f+3*g-2*e-h;d=2*f-2*g+e+h},initNonuniformCatmullRom:function(e,f,g,h,l,m,k){e=((f-e)/l-(g-e)/(l+m)+(g-f)/m)*m;h=((g-f)/m-(h-f)/(m+k)+(h-g)/k)*m;a=f;b=e;c=-3*f+3*g-2*e-h;d=2*f-2*g+e+h},calc:function(e){var f=e*e;return a+b*e+c*f+d*f*e}}}function ya(a,b,c,d){E.call(this);this.type="CatmullRomCurve3";this.points=a||[];this.closed=b||!1;this.curveType=c||"centripetal";this.tension=d||.5}function Wh(a,b,c,d,e){b=.5*(d-b);e=.5*(e-c);var f=a*a;return(2*c-2*d+b+e)*a*f+(-3*c+3*d-2*b- e)*f+b*a+c}function me(a,b,c,d){var e=1-a;return e*e*b+2*(1-a)*a*c+a*a*d}function ne(a,b,c,d,e){var f=1-a,g=1-a;return f*f*f*b+3*g*g*a*c+3*(1-a)*a*a*d+a*a*a*e}function Sa(a,b,c,d){E.call(this);this.type="CubicBezierCurve";this.v0=a||new w;this.v1=b||new w;this.v2=c||new w;this.v3=d||new w}function gb(a,b,c,d){E.call(this);this.type="CubicBezierCurve3";this.v0=a||new n;this.v1=b||new n;this.v2=c||new n;this.v3=d||new n}function za(a,b){E.call(this);this.type="LineCurve";this.v1=a||new w;this.v2=b|| new w}function Ta(a,b){E.call(this);this.type="LineCurve3";this.v1=a||new n;this.v2=b||new n}function Ua(a,b,c){E.call(this);this.type="QuadraticBezierCurve";this.v0=a||new w;this.v1=b||new w;this.v2=c||new w}function hb(a,b,c){E.call(this);this.type="QuadraticBezierCurve3";this.v0=a||new n;this.v1=b||new n;this.v2=c||new n}function Va(a){E.call(this);this.type="SplineCurve";this.points=a||[]}function rb(){E.call(this);this.type="CurvePath";this.curves=[];this.autoClose=!1}function Wa(a){rb.call(this); -this.type="Path";this.currentPoint=new w;a&&this.setFromPoints(a)}function Ib(a){Wa.call(this,a);this.uuid=N.generateUUID();this.type="Shape";this.holes=[]}function da(a,b){C.call(this);this.type="Light";this.color=new I(a);this.intensity=void 0!==b?b:1;this.receiveShadow=void 0}function We(a,b,c){da.call(this,a,c);this.type="HemisphereLight";this.castShadow=void 0;this.position.copy(C.DefaultUp);this.updateMatrix();this.groundColor=new I(b)}function ib(a){this.camera=a;this.bias=0;this.radius=1; +this.type="Path";this.currentPoint=new w;a&&this.setFromPoints(a)}function Jb(a){Wa.call(this,a);this.uuid=N.generateUUID();this.type="Shape";this.holes=[]}function da(a,b){C.call(this);this.type="Light";this.color=new I(a);this.intensity=void 0!==b?b:1;this.receiveShadow=void 0}function We(a,b,c){da.call(this,a,c);this.type="HemisphereLight";this.castShadow=void 0;this.position.copy(C.DefaultUp);this.updateMatrix();this.groundColor=new I(b)}function ib(a){this.camera=a;this.bias=0;this.radius=1; this.mapSize=new w(512,512);this.mapPass=this.map=null;this.matrix=new M;this._frustum=new Ed;this._frameExtents=new w(1,1);this._viewportCount=1;this._viewports=[new ca(0,0,1,1)]}function Xe(){ib.call(this,new ja(50,1,.5,500))}function Ye(a,b,c,d,e,f){da.call(this,a,b);this.type="SpotLight";this.position.copy(C.DefaultUp);this.updateMatrix();this.target=new C;Object.defineProperty(this,"power",{get:function(){return this.intensity*Math.PI},set:function(a){this.intensity=a/Math.PI}});this.distance= void 0!==c?c:0;this.angle=void 0!==d?d:Math.PI/3;this.penumbra=void 0!==e?e:0;this.decay=void 0!==f?f:1;this.shadow=new Xe}function rg(){ib.call(this,new ja(90,1,.5,500));this._frameExtents=new w(4,2);this._viewportCount=6;this._viewports=[new ca(2,1,1,1),new ca(0,1,1,1),new ca(3,1,1,1),new ca(1,1,1,1),new ca(3,0,1,1),new ca(1,0,1,1)];this._cubeDirections=[new n(1,0,0),new n(-1,0,0),new n(0,0,1),new n(0,0,-1),new n(0,1,0),new n(0,-1,0)];this._cubeUps=[new n(0,1,0),new n(0,1,0),new n(0,1,0),new n(0, 1,0),new n(0,0,1),new n(0,0,-1)]}function Ze(a,b,c,d){da.call(this,a,b);this.type="PointLight";Object.defineProperty(this,"power",{get:function(){return 4*this.intensity*Math.PI},set:function(a){this.intensity=a/(4*Math.PI)}});this.distance=void 0!==c?c:0;this.decay=void 0!==d?d:1;this.shadow=new rg}function oe(a,b,c,d,e,f){bb.call(this);this.type="OrthographicCamera";this.zoom=1;this.view=null;this.left=void 0!==a?a:-1;this.right=void 0!==b?b:1;this.top=void 0!==c?c:1;this.bottom=void 0!==d?d:-1; this.near=void 0!==e?e:.1;this.far=void 0!==f?f:2E3;this.updateProjectionMatrix()}function $e(){ib.call(this,new oe(-5,5,5,-5,.5,500))}function af(a,b){da.call(this,a,b);this.type="DirectionalLight";this.position.copy(C.DefaultUp);this.updateMatrix();this.target=new C;this.shadow=new $e}function bf(a,b){da.call(this,a,b);this.type="AmbientLight";this.castShadow=void 0}function cf(a,b,c,d){da.call(this,a,b);this.type="RectAreaLight";this.width=void 0!==c?c:10;this.height=void 0!==d?d:10}function df(a){Y.call(this, -a);this.textures={}}function ef(){D.call(this);this.type="InstancedBufferGeometry";this.maxInstancedCount=void 0}function ff(a,b,c,d){"number"===typeof c&&(d=c,c=!1,console.error("THREE.InstancedBufferAttribute: The constructor now expects normalized as the third argument."));Q.call(this,a,b,c);this.meshPerAttribute=d||1}function gf(a){Y.call(this,a)}function hf(a){Y.call(this,a)}function sg(a){"undefined"===typeof createImageBitmap&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."); +a);this.textures={}}function ef(){D.call(this);this.type="InstancedBufferGeometry";this.maxInstancedCount=void 0}function ff(a,b,c,d){"number"===typeof c&&(d=c,c=!1,console.error("THREE.InstancedBufferAttribute: The constructor now expects normalized as the third argument."));O.call(this,a,b,c);this.meshPerAttribute=d||1}function gf(a){Y.call(this,a)}function hf(a){Y.call(this,a)}function sg(a){"undefined"===typeof createImageBitmap&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."); "undefined"===typeof fetch&&console.warn("THREE.ImageBitmapLoader: fetch() not supported.");Y.call(this,a);this.options=void 0}function tg(){this.type="ShapePath";this.color=new I;this.subPaths=[];this.currentPath=null}function ug(a){this.type="Font";this.data=a}function vg(a){Y.call(this,a)}function jf(a){Y.call(this,a)}function kf(){this.coefficients=[];for(var a=0;9>a;a++)this.coefficients.push(new n)}function Xa(a,b){da.call(this,void 0,b);this.sh=void 0!==a?a:new kf}function wg(a,b,c){Xa.call(this, void 0,c);a=(new I).set(a);c=(new I).set(b);b=new n(a.r,a.g,a.b);a=new n(c.r,c.g,c.b);c=Math.sqrt(Math.PI);var d=c*Math.sqrt(.75);this.sh.coefficients[0].copy(b).add(a).multiplyScalar(c);this.sh.coefficients[1].copy(b).sub(a).multiplyScalar(d)}function xg(a,b){Xa.call(this,void 0,b);a=(new I).set(a);this.sh.coefficients[0].set(a.r,a.g,a.b).multiplyScalar(2*Math.sqrt(Math.PI))}function Xh(){this.type="StereoCamera";this.aspect=1;this.eyeSep=.064;this.cameraL=new ja;this.cameraL.layers.enable(1);this.cameraL.matrixAutoUpdate= !1;this.cameraR=new ja;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 yg(a){this.autoStart=void 0!==a?a:!0;this.elapsedTime=this.oldTime=this.startTime=0;this.running=!1}function zg(){C.call(this);this.type="AudioListener";this.context=Ag.getContext();this.gain=this.context.createGain();this.gain.connect(this.context.destination);this.filter=null;this.timeDelta=0;this._clock=new yg}function dd(a){C.call(this); @@ -317,22 +317,22 @@ a.context.createAnalyser();this.analyser.fftSize=void 0!==b?b:2048;this.data=new this._targetGroup=a;this._bindings=a.subscribe_(b,c)}function Aa(a,b,c){this.path=b;this.parsedPath=c||Aa.parseTrackName(b);this.node=Aa.findNode(a,this.parsedPath.nodeName)||a;this.rootNode=a}function Zh(){this.uuid=N.generateUUID();this._objects=Array.prototype.slice.call(arguments);this.nCachedObjects_=0;var a={};this._indicesByUUID=a;for(var b=0,c=arguments.length;b!==c;++b)a[arguments[b].uuid]=b;this._paths=[];this._parsedPaths=[];this._bindings=[];this._bindingsIndicesByPath={};var d=this;this.stats= {objects:{get total(){return d._objects.length},get inUse(){return this.total-d.nCachedObjects_}},get bindingsPerObject(){return d._bindings.length}}}function $h(a,b,c){this._mixer=a;this._clip=b;this._localRoot=c||null;a=b.tracks;b=a.length;c=Array(b);for(var d={endingStart:2400,endingEnd:2400},e=0;e!==b;++e){var f=a[e].createInterpolant(null);c[e]=f;f.settings=d}this._interpolantSettings=d;this._interpolants=c;this._propertyBindings=Array(b);this._weightInterpolant=this._timeScaleInterpolant=this._byClipCacheIndex= this._cacheIndex=null;this.loop=2201;this._loopCount=-1;this._startTime=null;this.time=0;this._effectiveWeight=this.weight=this._effectiveTimeScale=this.timeScale=1;this.repetitions=Infinity;this.paused=!1;this.enabled=!0;this.clampWhenFinished=!1;this.zeroSlopeAtEnd=this.zeroSlopeAtStart=!0}function Eg(a){this._root=a;this._initMemoryManager();this.time=this._accuIndex=0;this.timeScale=1}function lf(a,b){"string"===typeof a&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),a=b); -this.value=a}function Fg(a,b,c){bc.call(this,a,b);this.meshPerAttribute=c||1}function ai(a,b,c,d){this.ray=new Rb(a,b);this.near=c||0;this.far=d||Infinity;this.camera=null;this.params={Mesh:{},Line:{},LOD:{},Points:{threshold:1},Sprite:{}};Object.defineProperties(this.params,{PointCloud:{get:function(){console.warn("THREE.Raycaster: params.PointCloud has been renamed to params.Points.");return this.Points}}})}function bi(a,b){return a.distance-b.distance}function Gg(a,b,c,d){if(!1!==a.visible&&(a.raycast(b, +this.value=a}function Fg(a,b,c){Gb.call(this,a,b);this.meshPerAttribute=c||1}function ai(a,b,c,d){this.ray=new Sb(a,b);this.near=c||0;this.far=d||Infinity;this.camera=null;this.params={Mesh:{},Line:{},LOD:{},Points:{threshold:1},Sprite:{}};Object.defineProperties(this.params,{PointCloud:{get:function(){console.warn("THREE.Raycaster: params.PointCloud has been renamed to params.Points.");return this.Points}}})}function bi(a,b){return a.distance-b.distance}function Gg(a,b,c,d){if(!1!==a.visible&&(a.raycast(b, c),!0===d)){a=a.children;d=0;for(var e=a.length;dc;c++,d++){var e=c/32*Math.PI*2,f=d/32*Math.PI*2;b.push(Math.cos(e),Math.sin(e),1,Math.cos(f),Math.sin(f),1)}a.addAttribute("position",new A(b,3));b=new U({fog:!1});this.cone=new T(a,b);this.add(this.cone);this.update()}function ei(a){var b=[];a&&a.isBone&&b.push(a);for(var c=0;cc;c++)if(b[c]!==a[c])return!1;return!0},fromArray:function(a,b){void 0===b&&(b=0);for(var c=0;9>c;c++)this.elements[c]=a[c+b];return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);var c=this.elements;a[b]=c[0];a[b+1]=c[1];a[b+2]=c[2];a[b+3]=c[3];a[b+4]=c[4];a[b+5]=c[5];a[b+6]=c[6];a[b+7]=c[7];a[b+8]=c[8];return a}});var md,Jb={getDataURL:function(a){if("undefined"==typeof HTMLCanvasElement)return a.src;if(!(a instanceof HTMLCanvasElement)){void 0===md&&(md=document.createElementNS("http://www.w3.org/1999/xhtml", +for(var c=0;9>c;c++)if(b[c]!==a[c])return!1;return!0},fromArray:function(a,b){void 0===b&&(b=0);for(var c=0;9>c;c++)this.elements[c]=a[c+b];return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);var c=this.elements;a[b]=c[0];a[b+1]=c[1];a[b+2]=c[2];a[b+3]=c[3];a[b+4]=c[4];a[b+5]=c[5];a[b+6]=c[6];a[b+7]=c[7];a[b+8]=c[8];return a}});var md,Kb={getDataURL:function(a){if("undefined"==typeof HTMLCanvasElement)return a.src;if(!(a instanceof HTMLCanvasElement)){void 0===md&&(md=document.createElementNS("http://www.w3.org/1999/xhtml", "canvas"));md.width=a.width;md.height=a.height;var b=md.getContext("2d");a instanceof ImageData?b.putImageData(a,0,0):b.drawImage(a,0,0,a.width,a.height);a=md}return 2048a.x||1a.x?0:1;break;case 1002:a.x=1===Math.abs(Math.floor(a.x)%2)?Math.ceil(a.x)-a.x:a.x-Math.floor(a.x)}if(0>a.y||1a.x||1a.x?0:1;break;case 1002:a.x=1===Math.abs(Math.floor(a.x)%2)?Math.ceil(a.x)-a.x:a.x-Math.floor(a.x)}if(0>a.y||1a.y?0:1;break;case 1002:a.y=1===Math.abs(Math.floor(a.y)%2)?Math.ceil(a.y)-a.y:a.y-Math.floor(a.y)}this.flipY&&(a.y=1-a.y);return a}});Object.defineProperty(Z.prototype,"needsUpdate",{set:function(a){!0===a&&this.version++}});Object.defineProperties(ca.prototype,{width:{get:function(){return this.z},set:function(a){this.z=a}},height:{get:function(){return this.w},set:function(a){this.w=a}}});Object.assign(ca.prototype,{isVector4:!0,set:function(a,b,c,d){this.x= a;this.y=b;this.z=c;this.w=d;return this},setScalar:function(a){this.w=this.z=this.y=this.x=a;return this},setX:function(a){this.x=a;return this},setY:function(a){this.y=a;return this},setZ:function(a){this.z=a;return this},setW:function(a){this.w=a;return this},setComponent:function(a,b){switch(a){case 0:this.x=b;break;case 1:this.y=b;break;case 2:this.z=b;break;case 3:this.w=b;break;default:throw Error("index is out of range: "+a);}return this},getComponent:function(a){switch(a){case 0:return this.x; case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw Error("index is out of range: "+a);}},clone:function(){return new this.constructor(this.x,this.y,this.z,this.w)},copy:function(a){this.x=a.x;this.y=a.y;this.z=a.z;this.w=void 0!==a.w?a.w:1;return this},add:function(a,b){if(void 0!==b)return console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(a,b);this.x+=a.x;this.y+=a.y;this.z+=a.z;this.w+=a.w;return this}, @@ -400,13 +400,13 @@ Math.round(this.x);this.y=Math.round(this.y);this.z=Math.round(this.z);this.w=Ma a.z+this.w*a.w},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(a){return this.normalize().multiplyScalar(a)},lerp:function(a,b){this.x+=(a.x-this.x)*b;this.y+=(a.y-this.y)*b;this.z+=(a.z- this.z)*b;this.w+=(a.w-this.w)*b;return this},lerpVectors:function(a,b,c){return this.subVectors(b,a).multiplyScalar(c).add(a)},equals:function(a){return a.x===this.x&&a.y===this.y&&a.z===this.z&&a.w===this.w},fromArray:function(a,b){void 0===b&&(b=0);this.x=a[b];this.y=a[b+1];this.z=a[b+2];this.w=a[b+3];return this},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.w;return a},fromBufferAttribute:function(a,b,c){void 0!==c&&console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute()."); this.x=a.getX(b);this.y=a.getY(b);this.z=a.getZ(b);this.w=a.getW(b);return this}});ka.prototype=Object.assign(Object.create(Ba.prototype),{constructor:ka,isWebGLRenderTarget:!0,setSize:function(a,b){if(this.width!==a||this.height!==b)this.width=a,this.height=b,this.texture.image.width=a,this.texture.image.height=b,this.dispose();this.viewport.set(0,0,a,b);this.scissor.set(0,0,a,b)},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.width=a.width;this.height=a.height;this.viewport.copy(a.viewport); -this.texture=a.texture.clone();this.depthBuffer=a.depthBuffer;this.stencilBuffer=a.stencilBuffer;this.depthTexture=a.depthTexture;return this},dispose:function(){this.dispatchEvent({type:"dispose"})}});Of.prototype=Object.assign(Object.create(ka.prototype),{constructor:Of,isWebGLMultisampleRenderTarget:!0,copy:function(a){ka.prototype.copy.call(this,a);this.samples=a.samples;return this}});var Ka=new n,ra=new M,kk=new n(0,0,0),lk=new n(1,1,1),Kb=new n,qf=new n,oa=new n;Object.assign(M.prototype,{isMatrix4:!0, +this.texture=a.texture.clone();this.depthBuffer=a.depthBuffer;this.stencilBuffer=a.stencilBuffer;this.depthTexture=a.depthTexture;return this},dispose:function(){this.dispatchEvent({type:"dispose"})}});Of.prototype=Object.assign(Object.create(ka.prototype),{constructor:Of,isWebGLMultisampleRenderTarget:!0,copy:function(a){ka.prototype.copy.call(this,a);this.samples=a.samples;return this}});var Ka=new n,ra=new M,kk=new n(0,0,0),lk=new n(1,1,1),Lb=new n,qf=new n,oa=new n;Object.assign(M.prototype,{isMatrix4:!0, set:function(a,b,c,d,e,f,g,h,l,m,k,u,t,r,q,n){var p=this.elements;p[0]=a;p[4]=b;p[8]=c;p[12]=d;p[1]=e;p[5]=f;p[9]=g;p[13]=h;p[2]=l;p[6]=m;p[10]=k;p[14]=u;p[3]=t;p[7]=r;p[11]=q;p[15]=n;return this},identity:function(){this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1);return this},clone:function(){return(new M).fromArray(this.elements)},copy:function(a){var b=this.elements;a=a.elements;b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]=a[3];b[4]=a[4];b[5]=a[5];b[6]=a[6];b[7]=a[7];b[8]=a[8];b[9]=a[9];b[10]=a[10];b[11]=a[11]; b[12]=a[12];b[13]=a[13];b[14]=a[14];b[15]=a[15];return this},copyPosition:function(a){var b=this.elements;a=a.elements;b[12]=a[12];b[13]=a[13];b[14]=a[14];return this},extractBasis:function(a,b,c){a.setFromMatrixColumn(this,0);b.setFromMatrixColumn(this,1);c.setFromMatrixColumn(this,2);return this},makeBasis:function(a,b,c){this.set(a.x,b.x,c.x,0,a.y,b.y,c.y,0,a.z,b.z,c.z,0,0,0,0,1);return this},extractRotation:function(a){var b=this.elements,c=a.elements,d=1/Ka.setFromMatrixColumn(a,0).length(), e=1/Ka.setFromMatrixColumn(a,1).length();a=1/Ka.setFromMatrixColumn(a,2).length();b[0]=c[0]*d;b[1]=c[1]*d;b[2]=c[2]*d;b[3]=0;b[4]=c[4]*e;b[5]=c[5]*e;b[6]=c[6]*e;b[7]=0;b[8]=c[8]*a;b[9]=c[9]*a;b[10]=c[10]*a;b[11]=0;b[12]=0;b[13]=0;b[14]=0;b[15]=1;return this},makeRotationFromEuler:function(a){a&&a.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");var b=this.elements,c=a.x,d=a.y,e=a.z,f=Math.cos(c);c=Math.sin(c);var g=Math.cos(d); d=Math.sin(d);var h=Math.cos(e);e=Math.sin(e);if("XYZ"===a.order){a=f*h;var l=f*e,m=c*h,k=c*e;b[0]=g*h;b[4]=-g*e;b[8]=d;b[1]=l+m*d;b[5]=a-k*d;b[9]=-c*g;b[2]=k-a*d;b[6]=m+l*d;b[10]=f*g}else"YXZ"===a.order?(a=g*h,l=g*e,m=d*h,k=d*e,b[0]=a+k*c,b[4]=m*c-l,b[8]=f*d,b[1]=f*e,b[5]=f*h,b[9]=-c,b[2]=l*c-m,b[6]=k+a*c,b[10]=f*g):"ZXY"===a.order?(a=g*h,l=g*e,m=d*h,k=d*e,b[0]=a-k*c,b[4]=-f*e,b[8]=m+l*c,b[1]=l+m*c,b[5]=f*h,b[9]=k-a*c,b[2]=-f*d,b[6]=c,b[10]=f*g):"ZYX"===a.order?(a=f*h,l=f*e,m=c*h,k=c*e,b[0]=g*h, b[4]=m*d-l,b[8]=a*d+k,b[1]=g*e,b[5]=k*d+a,b[9]=l*d-m,b[2]=-d,b[6]=c*g,b[10]=f*g):"YZX"===a.order?(a=f*g,l=f*d,m=c*g,k=c*d,b[0]=g*h,b[4]=k-a*e,b[8]=m*e+l,b[1]=e,b[5]=f*h,b[9]=-c*h,b[2]=-d*h,b[6]=l*e+m,b[10]=a-k*e):"XZY"===a.order&&(a=f*g,l=f*d,m=c*g,k=c*d,b[0]=g*h,b[4]=-e,b[8]=d*h,b[1]=a*e+k,b[5]=f*h,b[9]=l*e-m,b[2]=m*e-l,b[6]=c*h,b[10]=k*e+a);b[3]=0;b[7]=0;b[11]=0;b[12]=0;b[13]=0;b[14]=0;b[15]=1;return this},makeRotationFromQuaternion:function(a){return this.compose(kk,a,lk)},lookAt:function(a,b, -c){var d=this.elements;oa.subVectors(a,b);0===oa.lengthSq()&&(oa.z=1);oa.normalize();Kb.crossVectors(c,oa);0===Kb.lengthSq()&&(1===Math.abs(c.z)?oa.x+=1E-4:oa.z+=1E-4,oa.normalize(),Kb.crossVectors(c,oa));Kb.normalize();qf.crossVectors(oa,Kb);d[0]=Kb.x;d[4]=qf.x;d[8]=oa.x;d[1]=Kb.y;d[5]=qf.y;d[9]=oa.y;d[2]=Kb.z;d[6]=qf.z;d[10]=oa.z;return this},multiply:function(a,b){return void 0!==b?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."), +c){var d=this.elements;oa.subVectors(a,b);0===oa.lengthSq()&&(oa.z=1);oa.normalize();Lb.crossVectors(c,oa);0===Lb.lengthSq()&&(1===Math.abs(c.z)?oa.x+=1E-4:oa.z+=1E-4,oa.normalize(),Lb.crossVectors(c,oa));Lb.normalize();qf.crossVectors(oa,Lb);d[0]=Lb.x;d[4]=qf.x;d[8]=oa.x;d[1]=Lb.y;d[5]=qf.y;d[9]=oa.y;d[2]=Lb.z;d[6]=qf.z;d[10]=oa.z;return this},multiply:function(a,b){return void 0!==b?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."), this.multiplyMatrices(a,b)):this.multiplyMatrices(this,a)},premultiply:function(a){return this.multiplyMatrices(a,this)},multiplyMatrices:function(a,b){var c=a.elements,d=b.elements;b=this.elements;a=c[0];var e=c[4],f=c[8],g=c[12],h=c[1],l=c[5],m=c[9],k=c[13],u=c[2],t=c[6],r=c[10],q=c[14],n=c[3],y=c[7],z=c[11];c=c[15];var x=d[0],w=d[4],A=d[8],B=d[12],C=d[1],D=d[5],E=d[9],G=d[13],H=d[2],I=d[6],J=d[10],M=d[14],N=d[3],O=d[7],P=d[11];d=d[15];b[0]=a*x+e*C+f*H+g*N;b[4]=a*w+e*D+f*I+g*O;b[8]=a*A+e*E+f*J+ g*P;b[12]=a*B+e*G+f*M+g*d;b[1]=h*x+l*C+m*H+k*N;b[5]=h*w+l*D+m*I+k*O;b[9]=h*A+l*E+m*J+k*P;b[13]=h*B+l*G+m*M+k*d;b[2]=u*x+t*C+r*H+q*N;b[6]=u*w+t*D+r*I+q*O;b[10]=u*A+t*E+r*J+q*P;b[14]=u*B+t*G+r*M+q*d;b[3]=n*x+y*C+z*H+c*N;b[7]=n*w+y*D+z*I+c*O;b[11]=n*A+y*E+z*J+c*P;b[15]=n*B+y*G+z*M+c*d;return this},multiplyScalar:function(a){var b=this.elements;b[0]*=a;b[4]*=a;b[8]*=a;b[12]*=a;b[1]*=a;b[5]*=a;b[9]*=a;b[13]*=a;b[2]*=a;b[6]*=a;b[10]*=a;b[14]*=a;b[3]*=a;b[7]*=a;b[11]*=a;b[15]*=a;return this},applyToBufferAttribute:function(a){for(var b= 0,c=a.count;bthis.determinant()&&(e=-e);a.x=d[12];a.y=d[13];a.z=d[14];ra.copy(this);a=1/e;d=1/f;var h=1/g;ra.elements[0]*=a;ra.elements[1]*=a;ra.elements[2]*=a;ra.elements[4]*=d;ra.elements[5]*=d;ra.elements[6]*=d;ra.elements[8]*=h;ra.elements[9]*=h;ra.elements[10]*=h;b.setFromRotationMatrix(ra);c.x=e;c.y=f;c.z=g;return this},makePerspective:function(a,b,c,d,e,f){void 0===f&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs."); var g=this.elements;g[0]=2*e/(b-a);g[4]=0;g[8]=(b+a)/(b-a);g[12]=0;g[1]=0;g[5]=2*e/(c-d);g[9]=(c+d)/(c-d);g[13]=0;g[2]=0;g[6]=0;g[10]=-(f+e)/(f-e);g[14]=-2*f*e/(f-e);g[3]=0;g[7]=0;g[11]=-1;g[15]=0;return this},makeOrthographic:function(a,b,c,d,e,f){var g=this.elements,h=1/(b-a),l=1/(c-d),m=1/(f-e);g[0]=2*h;g[4]=0;g[8]=0;g[12]=-((b+a)*h);g[1]=0;g[5]=2*l;g[9]=0;g[13]=-((c+d)*l);g[2]=0;g[6]=0;g[10]=-2*m;g[14]=-((f+e)*m);g[3]=0;g[7]=0;g[11]=0;g[15]=1;return this},equals:function(a){var b=this.elements; -a=a.elements;for(var c=0;16>c;c++)if(b[c]!==a[c])return!1;return!0},fromArray:function(a,b){void 0===b&&(b=0);for(var c=0;16>c;c++)this.elements[c]=a[c+b];return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);var c=this.elements;a[b]=c[0];a[b+1]=c[1];a[b+2]=c[2];a[b+3]=c[3];a[b+4]=c[4];a[b+5]=c[5];a[b+6]=c[6];a[b+7]=c[7];a[b+8]=c[8];a[b+9]=c[9];a[b+10]=c[10];a[b+11]=c[11];a[b+12]=c[12];a[b+13]=c[13];a[b+14]=c[14];a[b+15]=c[15];return a}});var ii=new M,ji=new sa;Pb.RotationOrders= -"XYZ YZX ZXY XZY YXZ ZYX".split(" ");Pb.DefaultOrder="XYZ";Object.defineProperties(Pb.prototype,{x:{get:function(){return this._x},set:function(a){this._x=a;this._onChangeCallback()}},y:{get:function(){return this._y},set:function(a){this._y=a;this._onChangeCallback()}},z:{get:function(){return this._z},set:function(a){this._z=a;this._onChangeCallback()}},order:{get:function(){return this._order},set:function(a){this._order=a;this._onChangeCallback()}}});Object.assign(Pb.prototype,{isEuler:!0,set:function(a, +a=a.elements;for(var c=0;16>c;c++)if(b[c]!==a[c])return!1;return!0},fromArray:function(a,b){void 0===b&&(b=0);for(var c=0;16>c;c++)this.elements[c]=a[c+b];return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);var c=this.elements;a[b]=c[0];a[b+1]=c[1];a[b+2]=c[2];a[b+3]=c[3];a[b+4]=c[4];a[b+5]=c[5];a[b+6]=c[6];a[b+7]=c[7];a[b+8]=c[8];a[b+9]=c[9];a[b+10]=c[10];a[b+11]=c[11];a[b+12]=c[12];a[b+13]=c[13];a[b+14]=c[14];a[b+15]=c[15];return a}});var ii=new M,ji=new sa;Qb.RotationOrders= +"XYZ YZX ZXY XZY YXZ ZYX".split(" ");Qb.DefaultOrder="XYZ";Object.defineProperties(Qb.prototype,{x:{get:function(){return this._x},set:function(a){this._x=a;this._onChangeCallback()}},y:{get:function(){return this._y},set:function(a){this._y=a;this._onChangeCallback()}},z:{get:function(){return this._z},set:function(a){this._z=a;this._onChangeCallback()}},order:{get:function(){return this._order},set:function(a){this._order=a;this._onChangeCallback()}}});Object.assign(Qb.prototype,{isEuler:!0,set:function(a, b,c,d){this._x=a;this._y=b;this._z=c;this._order=d||this._order;this._onChangeCallback();return this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._order)},copy:function(a){this._x=a._x;this._y=a._y;this._z=a._z;this._order=a._order;this._onChangeCallback();return this},setFromRotationMatrix:function(a,b,c){var d=N.clamp,e=a.elements;a=e[0];var f=e[4],g=e[8],h=e[1],l=e[5],m=e[9],k=e[2],n=e[6];e=e[10];b=b||this._order;"XYZ"===b?(this._y=Math.asin(d(g,-1,1)),.9999999>Math.abs(g)? (this._x=Math.atan2(-m,e),this._z=Math.atan2(-f,a)):(this._x=Math.atan2(n,l),this._z=0)):"YXZ"===b?(this._x=Math.asin(-d(m,-1,1)),.9999999>Math.abs(m)?(this._y=Math.atan2(g,e),this._z=Math.atan2(h,l)):(this._y=Math.atan2(-k,a),this._z=0)):"ZXY"===b?(this._x=Math.asin(d(n,-1,1)),.9999999>Math.abs(n)?(this._y=Math.atan2(-k,e),this._z=Math.atan2(-f,l)):(this._y=0,this._z=Math.atan2(h,a))):"ZYX"===b?(this._y=Math.asin(-d(k,-1,1)),.9999999>Math.abs(k)?(this._x=Math.atan2(n,e),this._z=Math.atan2(h,a)): (this._x=0,this._z=Math.atan2(-f,l))):"YZX"===b?(this._z=Math.asin(d(h,-1,1)),.9999999>Math.abs(h)?(this._x=Math.atan2(-m,l),this._y=Math.atan2(-k,a)):(this._x=0,this._y=Math.atan2(g,e))):"XZY"===b?(this._z=Math.asin(-d(f,-1,1)),.9999999>Math.abs(f)?(this._x=Math.atan2(n,l),this._y=Math.atan2(g,a)):(this._x=Math.atan2(-m,e),this._y=0)):console.warn("THREE.Euler: .setFromRotationMatrix() given unsupported order: "+b);this._order=b;!1!==c&&this._onChangeCallback();return this},setFromQuaternion:function(a, @@ -441,28 +441,28 @@ this.isPoints){f.geometry=b(a.geometries,this.geometry);var g=this.geometry.para if(d){d=c(a.geometries);h=c(a.materials);l=c(a.textures);var m=c(a.images);g=c(a.shapes);0e&&(e=m);k>f&&(f=k);n>g&&(g=n)}this.min.set(b,c,d); +var vb=[new n,new n,new n,new n,new n,new n,new n,new n],jb=new n,od=new n,pd=new n,qd=new n,Mb=new n,Nb=new n,rc=new n,ye=new n,sf=new n,tf=new n,Rb=new n;Object.assign(ab.prototype,{isBox3:!0,set:function(a,b){this.min.copy(a);this.max.copy(b);return this},setFromArray:function(a){for(var b=Infinity,c=Infinity,d=Infinity,e=-Infinity,f=-Infinity,g=-Infinity,h=0,l=a.length;he&&(e=m);k>f&&(f=k);n>g&&(g=n)}this.min.set(b,c,d); this.max.set(e,f,g);return this},setFromBufferAttribute:function(a){for(var b=Infinity,c=Infinity,d=Infinity,e=-Infinity,f=-Infinity,g=-Infinity,h=0,l=a.count;he&&(e=m);k>f&&(f=k);n>g&&(g=n)}this.min.set(b,c,d);this.max.set(e,f,g);return this},setFromPoints:function(a){this.makeEmpty();for(var b=0,c=a.length;bthis.max.x||a.ythis.max.y||a.zthis.max.z?!1:!0},containsBox:function(a){return this.min.x<=a.min.x&&a.max.x<=this.max.x&&this.min.y<=a.min.y&&a.max.y<=this.max.y&&this.min.z<=a.min.z&&a.max.z<=this.max.z},getParameter:function(a,b){void 0===b&&(console.warn("THREE.Box3: .getParameter() target is now required"),b=new n);return b.set((a.x-this.min.x)/(this.max.x-this.min.x),(a.y-this.min.y)/(this.max.y-this.min.y), (a.z-this.min.z)/(this.max.z-this.min.z))},intersectsBox:function(a){return a.max.xthis.max.x||a.max.ythis.max.y||a.max.zthis.max.z?!1:!0},intersectsSphere:function(a){this.clampPoint(a.center,jb);return jb.distanceToSquared(a.center)<=a.radius*a.radius},intersectsPlane:function(a){if(0=-a.constant},intersectsTriangle:function(a){if(this.isEmpty())return!1;this.getCenter(ye);sf.subVectors(this.max,ye);od.subVectors(a.a,ye);pd.subVectors(a.b,ye);qd.subVectors(a.c,ye);Lb.subVectors(pd,od);Mb.subVectors(qd,pd);rc.subVectors(od,qd);a=[0,-Lb.z,Lb.y,0,-Mb.z,Mb.y,0,-rc.z, -rc.y,Lb.z,0,-Lb.x,Mb.z,0,-Mb.x,rc.z,0,-rc.x,-Lb.y,Lb.x,0,-Mb.y,Mb.x,0,-rc.y,rc.x,0];if(!Qf(a,od,pd,qd,sf))return!1;a=[1,0,0,0,1,0,0,0,1];if(!Qf(a,od,pd,qd,sf))return!1;tf.crossVectors(Lb,Mb);a=[tf.x,tf.y,tf.z];return Qf(a,od,pd,qd,sf)},clampPoint:function(a,b){void 0===b&&(console.warn("THREE.Box3: .clampPoint() target is now required"),b=new n);return b.copy(a).clamp(this.min,this.max)},distanceToPoint:function(a){return jb.copy(a).clamp(this.min,this.max).sub(a).length()},getBoundingSphere:function(a){void 0=== +c+=a.normal.y*this.max.y):(b+=a.normal.y*this.max.y,c+=a.normal.y*this.min.y);0=-a.constant},intersectsTriangle:function(a){if(this.isEmpty())return!1;this.getCenter(ye);sf.subVectors(this.max,ye);od.subVectors(a.a,ye);pd.subVectors(a.b,ye);qd.subVectors(a.c,ye);Mb.subVectors(pd,od);Nb.subVectors(qd,pd);rc.subVectors(od,qd);a=[0,-Mb.z,Mb.y,0,-Nb.z,Nb.y,0,-rc.z, +rc.y,Mb.z,0,-Mb.x,Nb.z,0,-Nb.x,rc.z,0,-rc.x,-Mb.y,Mb.x,0,-Nb.y,Nb.x,0,-rc.y,rc.x,0];if(!Qf(a,od,pd,qd,sf))return!1;a=[1,0,0,0,1,0,0,0,1];if(!Qf(a,od,pd,qd,sf))return!1;tf.crossVectors(Mb,Nb);a=[tf.x,tf.y,tf.z];return Qf(a,od,pd,qd,sf)},clampPoint:function(a,b){void 0===b&&(console.warn("THREE.Box3: .clampPoint() target is now required"),b=new n);return b.copy(a).clamp(this.min,this.max)},distanceToPoint:function(a){return jb.copy(a).clamp(this.min,this.max).sub(a).length()},getBoundingSphere:function(a){void 0=== a&&console.error("THREE.Box3: .getBoundingSphere() target is now required");this.getCenter(a.center);a.radius=.5*this.getSize(jb).length();return a},intersect:function(a){this.min.max(a.min);this.max.min(a.max);this.isEmpty()&&this.makeEmpty();return this},union:function(a){this.min.min(a.min);this.max.max(a.max);return this},applyMatrix4:function(a){if(this.isEmpty())return this;vb[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(a);vb[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(a); vb[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(a);vb[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(a);vb[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(a);vb[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(a);vb[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(a);vb[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(a);this.setFromPoints(vb);return this},translate:function(a){this.min.add(a);this.max.add(a);return this},equals:function(a){return a.min.equals(this.min)&& a.max.equals(this.max)}});var qk=new ab;Object.assign(nb.prototype,{set:function(a,b){this.center.copy(a);this.radius=b;return this},setFromPoints:function(a,b){var c=this.center;void 0!==b?c.copy(b):qk.setFromPoints(a).getCenter(c);for(var d=b=0,e=a.length;d= this.radius},containsPoint:function(a){return a.distanceToSquared(this.center)<=this.radius*this.radius},distanceToPoint:function(a){return a.distanceTo(this.center)-this.radius},intersectsSphere:function(a){var b=this.radius+a.radius;return a.center.distanceToSquared(this.center)<=b*b},intersectsBox:function(a){return a.intersectsSphere(this)},intersectsPlane:function(a){return Math.abs(a.distanceToPoint(this.center))<=this.radius},clampPoint:function(a,b){var c=this.center.distanceToSquared(a); void 0===b&&(console.warn("THREE.Sphere: .clampPoint() target is now required"),b=new n);b.copy(a);c>this.radius*this.radius&&(b.sub(this.center).normalize(),b.multiplyScalar(this.radius).add(this.center));return b},getBoundingBox:function(a){void 0===a&&(console.warn("THREE.Sphere: .getBoundingBox() target is now required"),a=new ab);a.set(this.center,this.center);a.expandByScalar(this.radius);return a},applyMatrix4:function(a){this.center.applyMatrix4(a);this.radius*=a.getMaxScaleOnAxis();return this}, -translate:function(a){this.center.add(a);return this},equals:function(a){return a.center.equals(this.center)&&a.radius===this.radius}});var wb=new n,Mg=new n,uf=new n,Nb=new n,Ng=new n,vf=new n,Og=new n;Object.assign(Rb.prototype,{set:function(a,b){this.origin.copy(a);this.direction.copy(b);return this},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.origin.copy(a.origin);this.direction.copy(a.direction);return this},at:function(a,b){void 0===b&&(console.warn("THREE.Ray: .at() target is now required"), +translate:function(a){this.center.add(a);return this},equals:function(a){return a.center.equals(this.center)&&a.radius===this.radius}});var wb=new n,Mg=new n,uf=new n,Ob=new n,Ng=new n,vf=new n,Og=new n;Object.assign(Sb.prototype,{set:function(a,b){this.origin.copy(a);this.direction.copy(b);return this},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.origin.copy(a.origin);this.direction.copy(a.direction);return this},at:function(a,b){void 0===b&&(console.warn("THREE.Ray: .at() target is now required"), b=new n);return b.copy(this.direction).multiplyScalar(a).add(this.origin)},lookAt:function(a){this.direction.copy(a).sub(this.origin).normalize();return this},recast:function(a){this.origin.copy(this.at(a,wb));return this},closestPointToPoint:function(a,b){void 0===b&&(console.warn("THREE.Ray: .closestPointToPoint() target is now required"),b=new n);b.subVectors(a,this.origin);a=b.dot(this.direction);return 0>a?b.copy(this.origin):b.copy(this.direction).multiplyScalar(a).add(this.origin)},distanceToPoint:function(a){return Math.sqrt(this.distanceSqToPoint(a))}, -distanceSqToPoint:function(a){var b=wb.subVectors(a,this.origin).dot(this.direction);if(0>b)return this.origin.distanceToSquared(a);wb.copy(this.direction).multiplyScalar(b).add(this.origin);return wb.distanceToSquared(a)},distanceSqToSegment:function(a,b,c,d){Mg.copy(a).add(b).multiplyScalar(.5);uf.copy(b).sub(a).normalize();Nb.copy(this.origin).sub(Mg);var e=.5*a.distanceTo(b),f=-this.direction.dot(uf),g=Nb.dot(this.direction),h=-Nb.dot(uf),l=Nb.lengthSq(),m=Math.abs(1-f*f);if(0b)return this.origin.distanceToSquared(a);wb.copy(this.direction).multiplyScalar(b).add(this.origin);return wb.distanceToSquared(a)},distanceSqToSegment:function(a,b,c,d){Mg.copy(a).add(b).multiplyScalar(.5);uf.copy(b).sub(a).normalize();Ob.copy(this.origin).sub(Mg);var e=.5*a.distanceTo(b),f=-this.direction.dot(uf),g=Ob.dot(this.direction),h=-Ob.dot(uf),l=Ob.lengthSq(),m=Math.abs(1-f*f);if(0=-k?b<=k?(e=1/m,a*=e,b*=e,f=a*(a+f*b+2*g)+b*(f*a+b+2*h)+l):(b=e,a=Math.max(0,-(f*b+g)),f=-a*a+b*(b+2*h)+l):(b=-e,a=Math.max(0,-(f*b+g)),f=-a*a+b*(b+2*h)+l):b<=-k?(a=Math.max(0,-(-f*e+g)),b=0a)return null;a=Math.sqrt(a-d);d=c-a;c+=a;return 0>d&&0>c?null:0>d?this.at(c,b):this.at(d,b)},intersectsSphere:function(a){return this.distanceSqToPoint(a.center)<=a.radius*a.radius},distanceToPlane:function(a){var b=a.normal.dot(this.direction);if(0===b)return 0===a.distanceToPoint(this.origin)?0:null;a=-(this.origin.dot(a.normal)+ a.constant)/b;return 0<=a?a:null},intersectPlane:function(a,b){a=this.distanceToPlane(a);return null===a?null:this.at(a,b)},intersectsPlane:function(a){var b=a.distanceToPoint(this.origin);return 0===b||0>a.normal.dot(this.direction)*b?!0:!1},intersectBox:function(a,b){var c=1/this.direction.x;var d=1/this.direction.y;var e=1/this.direction.z,f=this.origin;if(0<=c){var g=(a.min.x-f.x)*c;c*=a.max.x-f.x}else g=(a.max.x-f.x)*c,c*=a.min.x-f.x;if(0<=d){var h=(a.min.y-f.y)*d;d*=a.max.y-f.y}else h=(a.max.y- f.y)*d,d*=a.min.y-f.y;if(g>d||h>c)return null;if(h>g||g!==g)g=h;if(da||h>c)return null;if(h>g||g!==g)g=h;if(ac?null:this.at(0<=g?g:c,b)},intersectsBox:function(a){return null!==this.intersectBox(a,wb)},intersectTriangle:function(a,b,c,d,e){Ng.subVectors(b,a);vf.subVectors(c,a);Og.crossVectors(Ng,vf);b=this.direction.dot(Og);if(0b)d=-1,b=-b;else return null; -Nb.subVectors(this.origin,a);a=d*this.direction.dot(vf.crossVectors(Nb,vf));if(0>a)return null;c=d*this.direction.dot(Ng.cross(Nb));if(0>c||a+c>b)return null;a=-d*Nb.dot(Og);return 0>a?null:this.at(a/b,e)},applyMatrix4:function(a){this.origin.applyMatrix4(a);this.direction.transformDirection(a);return this},equals:function(a){return a.origin.equals(this.origin)&&a.direction.equals(this.direction)}});var Ya=new n,xb=new n,Pg=new n,yb=new n,rd=new n,sd=new n,oi=new n,Qg=new n,Rg=new n,Sg=new n;Object.assign(aa, +Ob.subVectors(this.origin,a);a=d*this.direction.dot(vf.crossVectors(Ob,vf));if(0>a)return null;c=d*this.direction.dot(Ng.cross(Ob));if(0>c||a+c>b)return null;a=-d*Ob.dot(Og);return 0>a?null:this.at(a/b,e)},applyMatrix4:function(a){this.origin.applyMatrix4(a);this.direction.transformDirection(a);return this},equals:function(a){return a.origin.equals(this.origin)&&a.direction.equals(this.direction)}});var Ya=new n,xb=new n,Pg=new n,yb=new n,rd=new n,sd=new n,oi=new n,Qg=new n,Rg=new n,Sg=new n;Object.assign(aa, {getNormal:function(a,b,c,d){void 0===d&&(console.warn("THREE.Triangle: .getNormal() target is now required"),d=new n);d.subVectors(c,b);Ya.subVectors(a,b);d.cross(Ya);a=d.lengthSq();return 0=yb.x+yb.y},getUV:function(a,b,c,d,e,f,g,h){this.getBarycoord(a,b,c,d,yb);h.set(0,0);h.addScaledVector(e,yb.x);h.addScaledVector(f,yb.y);h.addScaledVector(g,yb.z);return h},isFrontFacing:function(a,b,c,d){Ya.subVectors(c,b);xb.subVectors(a,b);return 0>Ya.cross(xb).dot(d)?!0:!1}});Object.assign(aa.prototype,{set:function(a, b,c){this.a.copy(a);this.b.copy(b);this.c.copy(c);return this},setFromPointsAndIndices:function(a,b,c,d){this.a.copy(a[b]);this.b.copy(a[c]);this.c.copy(a[d]);return this},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.a.copy(a.a);this.b.copy(a.b);this.c.copy(a.c);return this},getArea:function(){Ya.subVectors(this.c,this.b);xb.subVectors(this.a,this.b);return.5*Ya.cross(xb).length()},getMidpoint:function(a){void 0===a&&(console.warn("THREE.Triangle: .getMidpoint() target is now required"), @@ -484,7 +484,7 @@ return this},convertLinearToSRGB:function(){this.copyLinearToSRGB(this);return t d)/l+(c\n\t#include \n}", +Object.create(ka.prototype);Ab.prototype.constructor=Ab;Ab.prototype.isWebGLRenderTargetCube=!0;Ab.prototype.fromEquirectangularTexture=function(a,b){this.texture.type=b.type;this.texture.format=b.format;this.texture.encoding=b.encoding;var c=new wd,d=new la({type:"CubemapFromEquirect",uniforms:Yb({tEquirect:{value:null}}),vertexShader:"varying vec3 vWorldDirection;\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n}", fragmentShader:"uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#define RECIPROCAL_PI 0.31830988618\n#define RECIPROCAL_PI2 0.15915494\nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV;\n\tsampleUV.y = asin( clamp( direction.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\tsampleUV.x = atan( direction.z, direction.x ) * RECIPROCAL_PI2 + 0.5;\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n}",side:1,blending:0});d.uniforms.tEquirect.value=b;b=new R(new Gd(5, -5,5),d);c.add(b);d=new Dc(1,10,1);d.renderTarget=this;d.renderTarget.texture.name="CubeCameraTexture";d.update(a,c);b.geometry.dispose();b.material.dispose();return this};Yb.prototype=Object.create(Z.prototype);Yb.prototype.constructor=Yb;Yb.prototype.isDataTexture=!0;var Yg=new n,tk=new n,uk=new S;Object.assign(cb.prototype,{isPlane:!0,set:function(a,b){this.normal.copy(a);this.constant=b;return this},setComponents:function(a,b,c,d){this.normal.set(a,b,c);this.constant=d;return this},setFromNormalAndCoplanarPoint:function(a, +5,5),d);c.add(b);d=new Dc(1,10,1);d.renderTarget=this;d.renderTarget.texture.name="CubeCameraTexture";d.update(a,c);b.geometry.dispose();b.material.dispose();return this};Zb.prototype=Object.create(Z.prototype);Zb.prototype.constructor=Zb;Zb.prototype.isDataTexture=!0;var Yg=new n,tk=new n,uk=new S;Object.assign(cb.prototype,{isPlane:!0,set:function(a,b){this.normal.copy(a);this.constant=b;return this},setComponents:function(a,b,c,d){this.normal.set(a,b,c);this.constant=d;return this},setFromNormalAndCoplanarPoint:function(a, b){this.normal.copy(a);this.constant=-b.dot(this.normal);return this},setFromCoplanarPoints:function(a,b,c){b=Yg.subVectors(c,b).cross(tk.subVectors(a,b)).normalize();this.setFromNormalAndCoplanarPoint(b,a);return this},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.normal.copy(a.normal);this.constant=a.constant;return this},normalize:function(){var a=1/this.normal.length();this.normal.multiplyScalar(a);this.constant*=a;return this},negate:function(){this.constant*= -1;this.normal.negate();return this},distanceToPoint:function(a){return this.normal.dot(a)+this.constant},distanceToSphere:function(a){return this.distanceToPoint(a.center)-a.radius},projectPoint:function(a,b){void 0===b&&(console.warn("THREE.Plane: .projectPoint() target is now required"),b=new n);return b.copy(this.normal).multiplyScalar(-this.distanceToPoint(a)).add(a)},intersectLine:function(a,b){void 0===b&&(console.warn("THREE.Plane: .intersectLine() target is now required"),b=new n);var c= a.delta(Yg),d=this.normal.dot(c);if(0===d){if(0===this.distanceToPoint(a.start))return b.copy(a.start)}else if(d=-(a.start.dot(this.normal)+this.constant)/d,!(0>d||1b&&0a&&0c;c++)b[c].copy(a.planes[c]);return this},setFromMatrix:function(a){var b=this.planes,c=a.elements;a=c[0];var d=c[1],e=c[2],f=c[3],g=c[4],h=c[5],l=c[6],k=c[7],p=c[8],n=c[9],t=c[10],r=c[11],q=c[12],v=c[13],y=c[14];c=c[15];b[0].setComponents(f-a,k-g,r-p,c-q).normalize();b[1].setComponents(f+a,k+g,r+p,c+q).normalize();b[2].setComponents(f+ d,k+h,r+n,c+v).normalize();b[3].setComponents(f-d,k-h,r-n,c-v).normalize();b[4].setComponents(f-e,k-l,r-t,c-y).normalize();b[5].setComponents(f+e,k+l,r+t,c+y).normalize();return this},intersectsObject:function(a){var b=a.geometry;null===b.boundingSphere&&b.computeBoundingSphere();td.copy(b.boundingSphere).applyMatrix4(a.matrixWorld);return this.intersectsSphere(td)},intersectsSprite:function(a){td.center.set(0,0,0);td.radius=.7071067811865476;td.applyMatrix4(a.matrixWorld);return this.intersectsSphere(td)}, -intersectsSphere:function(a){var b=this.planes,c=a.center;a=-a.radius;for(var d=0;6>d;d++)if(b[d].distanceToPoint(c)c;c++){var d=b[c];zf.x=0d.distanceToPoint(zf))return!1}return!0},containsPoint:function(a){for(var b=this.planes,c=0;6>c;c++)if(0>b[c].distanceToPoint(a))return!1;return!0}});var O={alphamap_fragment:"#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\n#endif", +intersectsSphere:function(a){var b=this.planes,c=a.center;a=-a.radius;for(var d=0;6>d;d++)if(b[d].distanceToPoint(c)c;c++){var d=b[c];zf.x=0d.distanceToPoint(zf))return!1}return!0},containsPoint:function(a){for(var b=this.planes,c=0;6>c;c++)if(0>b[c].distanceToPoint(a))return!1;return!0}});var P={alphamap_fragment:"#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\n#endif", alphamap_pars_fragment:"#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",alphatest_fragment:"#ifdef ALPHATEST\n\tif ( diffuseColor.a < ALPHATEST ) discard;\n#endif",aomap_fragment:"#ifdef USE_AOMAP\n\tfloat ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;\n\treflectedLight.indirectDiffuse *= ambientOcclusion;\n\t#if defined( USE_ENVMAP ) && defined( STANDARD )\n\t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.specularRoughness );\n\t#endif\n#endif", aomap_pars_fragment:"#ifdef USE_AOMAP\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n#endif",begin_vertex:"vec3 transformed = vec3( position );",beginnormal_vertex:"vec3 objectNormal = vec3( normal );\n#ifdef USE_TANGENT\n\tvec3 objectTangent = vec3( tangent.xyz );\n#endif",bsdfs:"vec2 integrateSpecularBRDF( const in float dotNV, const in float roughness ) {\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\treturn vec2( -1.04, 1.04 ) * a004 + r.zw;\n}\nfloat punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n#if defined ( PHYSICALLY_CORRECT_LIGHTS )\n\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\tif( cutoffDistance > 0.0 ) {\n\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t}\n\treturn distanceFalloff;\n#else\n\tif( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n\t\treturn pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );\n\t}\n\treturn 1.0;\n#endif\n}\nvec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 specularColor, const in float dotLH ) {\n\tfloat fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );\n\treturn ( 1.0 - specularColor ) * fresnel + specularColor;\n}\nvec3 F_Schlick_RoughnessDependent( const in vec3 F0, const in float dotNV, const in float roughness ) {\n\tfloat fresnel = exp2( ( -5.55473 * dotNV - 6.98316 ) * dotNV );\n\tvec3 Fr = max( vec3( 1.0 - roughness ), F0 ) - F0;\n\treturn Fr * fresnel + F0;\n}\nfloat G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\tfloat gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\treturn 1.0 / ( gl * gv );\n}\nfloat G_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\nvec3 BRDF_Specular_GGX( const in IncidentLight incidentLight, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float roughness ) {\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( incidentLight.direction + viewDir );\n\tfloat dotNL = saturate( dot( normal, incidentLight.direction ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\tfloat D = D_GGX( alpha, dotNH );\n\treturn F * ( G * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\nvec3 BRDF_Specular_GGX_Environment( const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tvec2 brdf = integrateSpecularBRDF( dotNV, roughness );\n\treturn specularColor * brdf.x + brdf.y;\n}\nvoid BRDF_Specular_Multiscattering_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\tvec3 F = F_Schlick_RoughnessDependent( specularColor, dotNV, roughness );\n\tvec2 brdf = integrateSpecularBRDF( dotNV, roughness );\n\tvec3 FssEss = F * brdf.x + brdf.y;\n\tfloat Ess = brdf.x + brdf.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = specularColor + ( 1.0 - specularColor ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n}\nfloat G_BlinnPhong_Implicit( ) {\n\treturn 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\n\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n}\nfloat GGXRoughnessToBlinnExponent( const in float ggxRoughness ) {\n\treturn ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 );\n}\nfloat BlinnExponentToGGXRoughness( const in float blinnExponent ) {\n\treturn sqrt( 2.0 / ( blinnExponent + 2.0 ) );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie(float roughness, float NoH) {\n\tfloat invAlpha = 1.0 / roughness;\n\tfloat cos2h = NoH * NoH;\n\tfloat sin2h = max(1.0 - cos2h, 0.0078125);\treturn (2.0 + invAlpha) * pow(sin2h, invAlpha * 0.5) / (2.0 * PI);\n}\nfloat V_Neubelt(float NoV, float NoL) {\n\treturn saturate(1.0 / (4.0 * (NoL + NoV - NoL * NoV)));\n}\nvec3 BRDF_Specular_Sheen( const in float roughness, const in vec3 L, const in GeometricContext geometry, vec3 specularColor ) {\n\tvec3 N = geometry.normal;\n\tvec3 V = geometry.viewDir;\n\tvec3 H = normalize( V + L );\n\tfloat dotNH = saturate( dot( N, H ) );\n\treturn specularColor * D_Charlie( roughness, dotNH ) * V_Neubelt( dot(N, V), dot(N, L) );\n}\n#endif", bumpmap_pars_fragment:"#ifdef USE_BUMPMAP\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\tvec2 dHdxy_fwd() {\n\t\tvec2 dSTdx = dFdx( vUv );\n\t\tvec2 dSTdy = dFdy( vUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy ) {\n\t\tvec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );\n\t\tvec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );\n\t\tvec3 vN = surf_norm;\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\t\tfloat fDet = dot( vSigmaX, R1 );\n\t\tfDet *= ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif", @@ -653,355 +653,354 @@ J={common:{diffuse:{value:new I(15658734)},opacity:{value:1},map:{value:null},uv normalScale:{value:new w(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 I(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{},shadow:{},shadowBias:{}, shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}}, pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}}},points:{diffuse:{value:new I(15658734)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},uvTransform:{value:new S}},sprite:{diffuse:{value:new I(15658734)},opacity:{value:1},center:{value:new w(.5,.5)},rotation:{value:0},map:{value:null},uvTransform:{value:new S}}},db= -{basic:{uniforms:Ea([J.common,J.specularmap,J.envmap,J.aomap,J.lightmap,J.fog]),vertexShader:O.meshbasic_vert,fragmentShader:O.meshbasic_frag},lambert:{uniforms:Ea([J.common,J.specularmap,J.envmap,J.aomap,J.lightmap,J.emissivemap,J.fog,J.lights,{emissive:{value:new I(0)}}]),vertexShader:O.meshlambert_vert,fragmentShader:O.meshlambert_frag},phong:{uniforms:Ea([J.common,J.specularmap,J.envmap,J.aomap,J.lightmap,J.emissivemap,J.bumpmap,J.normalmap,J.displacementmap,J.gradientmap,J.fog,J.lights,{emissive:{value:new I(0)}, -specular:{value:new I(1118481)},shininess:{value:30}}]),vertexShader:O.meshphong_vert,fragmentShader:O.meshphong_frag},standard:{uniforms:Ea([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 I(0)},roughness:{value:.5},metalness:{value:.5},envMapIntensity:{value:1}}]),vertexShader:O.meshphysical_vert,fragmentShader:O.meshphysical_frag},matcap:{uniforms:Ea([J.common,J.bumpmap,J.normalmap,J.displacementmap, -J.fog,{matcap:{value:null}}]),vertexShader:O.meshmatcap_vert,fragmentShader:O.meshmatcap_frag},points:{uniforms:Ea([J.points,J.fog]),vertexShader:O.points_vert,fragmentShader:O.points_frag},dashed:{uniforms:Ea([J.common,J.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:O.linedashed_vert,fragmentShader:O.linedashed_frag},depth:{uniforms:Ea([J.common,J.displacementmap]),vertexShader:O.depth_vert,fragmentShader:O.depth_frag},normal:{uniforms:Ea([J.common,J.bumpmap,J.normalmap, -J.displacementmap,{opacity:{value:1}}]),vertexShader:O.normal_vert,fragmentShader:O.normal_frag},sprite:{uniforms:Ea([J.sprite,J.fog]),vertexShader:O.sprite_vert,fragmentShader:O.sprite_frag},background:{uniforms:{uvTransform:{value:new S},t2D:{value:null}},vertexShader:O.background_vert,fragmentShader:O.background_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:O.cube_vert,fragmentShader:O.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:O.equirect_vert, -fragmentShader:O.equirect_frag},distanceRGBA:{uniforms:Ea([J.common,J.displacementmap,{referencePosition:{value:new n},nearDistance:{value:1},farDistance:{value:1E3}}]),vertexShader:O.distanceRGBA_vert,fragmentShader:O.distanceRGBA_frag},shadow:{uniforms:Ea([J.lights,J.fog,{color:{value:new I(0)},opacity:{value:1}}]),vertexShader:O.shadow_vert,fragmentShader:O.shadow_frag}};db.physical={uniforms:Ea([db.standard.uniforms,{transparency:{value:0},clearcoat:{value:0},clearcoatRoughness:{value:0},sheen:{value:new I(0)}, -clearcoatNormalScale:{value:new w(1,1)},clearcoatNormalMap:{value:null}}]),vertexShader:O.meshphysical_vert,fragmentShader:O.meshphysical_frag};Fd.prototype=Object.create(G.prototype);Fd.prototype.constructor=Fd;Zb.prototype=Object.create(D.prototype);Zb.prototype.constructor=Zb;ob.prototype=Object.create(Z.prototype);ob.prototype.constructor=ob;ob.prototype.isCubeTexture=!0;Object.defineProperty(ob.prototype,"images",{get:function(){return this.image},set:function(a){this.image=a}});Ec.prototype= +{basic:{uniforms:Ea([J.common,J.specularmap,J.envmap,J.aomap,J.lightmap,J.fog]),vertexShader:P.meshbasic_vert,fragmentShader:P.meshbasic_frag},lambert:{uniforms:Ea([J.common,J.specularmap,J.envmap,J.aomap,J.lightmap,J.emissivemap,J.fog,J.lights,{emissive:{value:new I(0)}}]),vertexShader:P.meshlambert_vert,fragmentShader:P.meshlambert_frag},phong:{uniforms:Ea([J.common,J.specularmap,J.envmap,J.aomap,J.lightmap,J.emissivemap,J.bumpmap,J.normalmap,J.displacementmap,J.gradientmap,J.fog,J.lights,{emissive:{value:new I(0)}, +specular:{value:new I(1118481)},shininess:{value:30}}]),vertexShader:P.meshphong_vert,fragmentShader:P.meshphong_frag},standard:{uniforms:Ea([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 I(0)},roughness:{value:.5},metalness:{value:.5},envMapIntensity:{value:1}}]),vertexShader:P.meshphysical_vert,fragmentShader:P.meshphysical_frag},matcap:{uniforms:Ea([J.common,J.bumpmap,J.normalmap,J.displacementmap, +J.fog,{matcap:{value:null}}]),vertexShader:P.meshmatcap_vert,fragmentShader:P.meshmatcap_frag},points:{uniforms:Ea([J.points,J.fog]),vertexShader:P.points_vert,fragmentShader:P.points_frag},dashed:{uniforms:Ea([J.common,J.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:P.linedashed_vert,fragmentShader:P.linedashed_frag},depth:{uniforms:Ea([J.common,J.displacementmap]),vertexShader:P.depth_vert,fragmentShader:P.depth_frag},normal:{uniforms:Ea([J.common,J.bumpmap,J.normalmap, +J.displacementmap,{opacity:{value:1}}]),vertexShader:P.normal_vert,fragmentShader:P.normal_frag},sprite:{uniforms:Ea([J.sprite,J.fog]),vertexShader:P.sprite_vert,fragmentShader:P.sprite_frag},background:{uniforms:{uvTransform:{value:new S},t2D:{value:null}},vertexShader:P.background_vert,fragmentShader:P.background_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:P.cube_vert,fragmentShader:P.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:P.equirect_vert, +fragmentShader:P.equirect_frag},distanceRGBA:{uniforms:Ea([J.common,J.displacementmap,{referencePosition:{value:new n},nearDistance:{value:1},farDistance:{value:1E3}}]),vertexShader:P.distanceRGBA_vert,fragmentShader:P.distanceRGBA_frag},shadow:{uniforms:Ea([J.lights,J.fog,{color:{value:new I(0)},opacity:{value:1}}]),vertexShader:P.shadow_vert,fragmentShader:P.shadow_frag}};db.physical={uniforms:Ea([db.standard.uniforms,{transparency:{value:0},clearcoat:{value:0},clearcoatRoughness:{value:0},sheen:{value:new I(0)}, +clearcoatNormalScale:{value:new w(1,1)},clearcoatNormalMap:{value:null}}]),vertexShader:P.meshphysical_vert,fragmentShader:P.meshphysical_frag};Fd.prototype=Object.create(G.prototype);Fd.prototype.constructor=Fd;$b.prototype=Object.create(D.prototype);$b.prototype.constructor=$b;ob.prototype=Object.create(Z.prototype);ob.prototype.constructor=ob;ob.prototype.isCubeTexture=!0;Object.defineProperty(ob.prototype,"images",{get:function(){return this.image},set:function(a){this.image=a}});Ec.prototype= Object.create(Z.prototype);Ec.prototype.constructor=Ec;Ec.prototype.isDataTexture2DArray=!0;Fc.prototype=Object.create(Z.prototype);Fc.prototype.constructor=Fc;Fc.prototype.isDataTexture3D=!0;var th=new Z,mj=new Ec,oj=new Fc,uh=new ob,nh=[],ph=[],sh=new Float32Array(16),rh=new Float32Array(9),qh=new Float32Array(4);vh.prototype.updateCache=function(a){var b=this.cache;a instanceof Float32Array&&b.length!==a.length&&(this.cache=new Float32Array(a.length));Ha(b,a)};wh.prototype.setValue=function(a, b,c){for(var d=this.seq,e=0,f=d.length;e!==f;++e){var g=d[e];g.setValue(a,b[g.id],c)}};var Yf=/([\w\d_]+)(\])?(\[|\.)?/g;Bb.prototype.setValue=function(a,b,c,d){b=this.map[b];void 0!==b&&b.setValue(a,c,d)};Bb.prototype.setOptional=function(a,b,c){b=b[c];void 0!==b&&this.setValue(a,c,b)};Bb.upload=function(a,b,c,d){for(var e=0,f=b.length;e!==f;++e){var g=b[e],h=c[g.id];!1!==h.needsUpdate&&g.setValue(a,h.value,d)}};Bb.seqWithValue=function(a,b){for(var c=[],d=0,e=a.length;d!==e;++d){var f=a[d];f.id in -b&&c.push(f)}return c};var Pj=0,Yj=0;Db.prototype=Object.create(P.prototype);Db.prototype.constructor=Db;Db.prototype.isMeshDepthMaterial=!0;Db.prototype.copy=function(a){P.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};Eb.prototype=Object.create(P.prototype);Eb.prototype.constructor=Eb;Eb.prototype.isMeshDistanceMaterial=!0;Eb.prototype.copy=function(a){P.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= +b&&c.push(f)}return c};var Pj=0,Yj=0;Db.prototype=Object.create(Q.prototype);Db.prototype.constructor=Db;Db.prototype.isMeshDepthMaterial=!0;Db.prototype.copy=function(a){Q.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};Eb.prototype=Object.create(Q.prototype);Eb.prototype.constructor=Eb;Eb.prototype.isMeshDistanceMaterial=!0;Eb.prototype.copy=function(a){Q.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};eg.prototype=Object.assign(Object.create(ka.prototype),{constructor:eg,isWebGLMultiviewRenderTarget:!0,copy:function(a){ka.prototype.copy.call(this,a);this.numViews=a.numViews;return this},setNumViews:function(a){this.numViews!==a&&(this.numViews=a,this.dispose());return this}});Hc.prototype=Object.assign(Object.create(C.prototype),{constructor:Hc,isGroup:!0});Jd.prototype=Object.assign(Object.create(ja.prototype),{constructor:Jd,isArrayCamera:!0});var Ih=new n,Jh= -new n;Object.assign(fg.prototype,Ba.prototype);Object.assign(Kh.prototype,Ba.prototype);Object.assign(Ie.prototype,{isFogExp2:!0,clone:function(){return new Ie(this.color,this.density)},toJSON:function(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}}});Object.assign(Je.prototype,{isFog:!0,clone:function(){return new Je(this.color,this.near,this.far)},toJSON:function(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}}});Object.defineProperty(bc.prototype, -"needsUpdate",{set:function(a){!0===a&&this.version++}});Object.assign(bc.prototype,{isInterleavedBuffer:!0,onUploadCallback:function(){},setArray:function(a){if(Array.isArray(a))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.count=void 0!==a?a.length/this.stride:0;this.array=a;return this},setDynamic:function(a){this.dynamic=a;return this},copy:function(a){this.array=new a.array.constructor(a.array);this.count=a.count;this.stride=a.stride;this.dynamic=a.dynamic; -return this},copyAt:function(a,b,c){a*=this.stride;c*=b.stride;for(var d=0,e=this.stride;da.far||b.push({distance:e,point:ze.clone(),uv:aa.getUV(ze,Af,Ae,Bf,qi,Zg,ri,new w),face:null,object:this})},clone:function(){return(new this.constructor(this.material)).copy(this)}, -copy:function(a){C.prototype.copy.call(this,a);void 0!==a.center&&this.center.copy(a.center);return this}});var Cf=new n,si=new n;Nd.prototype=Object.assign(Object.create(C.prototype),{constructor:Nd,isLOD:!0,copy:function(a){C.prototype.copy.call(this,a,!1);a=a.levels;for(var b=0,c=a.length;b=b[c].distance)b[c-1].object.visible=!1,b[c].object.visible=!0;else break;for(;cc||(h.applyMatrix4(this.matrixWorld),t=a.ray.origin.distanceTo(h),ta.far||b.push({distance:t,point:e.clone().applyMatrix4(this.matrixWorld), -index:d,face:null,faceIndex:null,object:this}))}}else for(d=0,u=p.length/3-1;dc||(h.applyMatrix4(this.matrixWorld),t=a.ray.origin.distanceTo(h),ta.far||b.push({distance:t,point:e.clone().applyMatrix4(this.matrixWorld),index:d,face:null,faceIndex:null,object:this}))}else if(d.isGeometry)for(f=d.vertices,g=f.length,d=0;dc||(h.applyMatrix4(this.matrixWorld), -t=a.ray.origin.distanceTo(h),ta.far||b.push({distance:t,point:e.clone().applyMatrix4(this.matrixWorld),index:d,face:null,faceIndex:null,object:this}))}},clone:function(){return(new this.constructor(this.geometry,this.material)).copy(this)}});var Ef=new n,Ff=new n;T.prototype=Object.assign(Object.create(wa.prototype),{constructor:T,isLineSegments:!0,computeLineDistances:function(){var a=this.geometry;if(a.isBufferGeometry)if(null===a.index){for(var b=a.attributes.position,c=[],d=0,e=b.count;d< -e;d+=2)Ef.fromBufferAttribute(b,d),Ff.fromBufferAttribute(b,d+1),c[d]=0===d?0:c[d-1],c[d+1]=c[d]+Ef.distanceTo(Ff);a.addAttribute("lineDistance",new A(c,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(a.isGeometry)for(b=a.vertices,c=a.lineDistances,d=0,e=b.length;d=a.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}});Lc.prototype=Object.create(Z.prototype);Lc.prototype.constructor=Lc;Lc.prototype.isCompressedTexture=!0;Pd.prototype=Object.create(Z.prototype);Pd.prototype.constructor=Pd;Pd.prototype.isCanvasTexture=!0;Qd.prototype=Object.create(Z.prototype); -Qd.prototype.constructor=Qd;Qd.prototype.isDepthTexture=!0;Mc.prototype=Object.create(D.prototype);Mc.prototype.constructor=Mc;Rd.prototype=Object.create(G.prototype);Rd.prototype.constructor=Rd;Nc.prototype=Object.create(D.prototype);Nc.prototype.constructor=Nc;Sd.prototype=Object.create(G.prototype);Sd.prototype.constructor=Sd;Da.prototype=Object.create(D.prototype);Da.prototype.constructor=Da;Td.prototype=Object.create(G.prototype);Td.prototype.constructor=Td;Oc.prototype=Object.create(Da.prototype); -Oc.prototype.constructor=Oc;Ud.prototype=Object.create(G.prototype);Ud.prototype.constructor=Ud;cc.prototype=Object.create(Da.prototype);cc.prototype.constructor=cc;Vd.prototype=Object.create(G.prototype);Vd.prototype.constructor=Vd;Pc.prototype=Object.create(Da.prototype);Pc.prototype.constructor=Pc;Wd.prototype=Object.create(G.prototype);Wd.prototype.constructor=Wd;Qc.prototype=Object.create(Da.prototype);Qc.prototype.constructor=Qc;Xd.prototype=Object.create(G.prototype);Xd.prototype.constructor= -Xd;dc.prototype=Object.create(D.prototype);dc.prototype.constructor=dc;dc.prototype.toJSON=function(){var a=D.prototype.toJSON.call(this);a.path=this.parameters.path.toJSON();return a};Yd.prototype=Object.create(G.prototype);Yd.prototype.constructor=Yd;Rc.prototype=Object.create(D.prototype);Rc.prototype.constructor=Rc;Zd.prototype=Object.create(G.prototype);Zd.prototype.constructor=Zd;Sc.prototype=Object.create(D.prototype);Sc.prototype.constructor=Sc;var wk={triangulate:function(a,b,c){c=c||2;var d= -b&&b.length,e=d?b[0]*c:a.length,f=Nh(a,0,e,c,!0),g=[];if(!f||f.next===f.prev)return g;var h;if(d){var l=c;d=[];var k;var p=0;for(k=b.length;p80*c){var r=h=a[0];var q=d=a[1];for(l=c;lh&&(h=p),b>d&&(d=b);h=Math.max(h-r,d-q);h=0!==h?1/h: -0}be(f,g,c,r,q,h);return g}},pb={area:function(a){for(var b=a.length,c=0,d=b-1,e=0;epb.area(a)},triangulateShape:function(a,b){var c=[],d=[],e=[];Rh(a);Sh(c,a);var f=a.length;b.forEach(Rh);for(a=0;aMath.abs(g-l)?[new w(a,1-c),new w(h,1-d),new w(k,1-e),new w(n,1-b)]:[new w(g,1-c),new w(l,1-d),new w(p,1-e),new w(t,1-b)]}};de.prototype=Object.create(G.prototype);de.prototype.constructor=de;Uc.prototype=Object.create(eb.prototype);Uc.prototype.constructor=Uc;ee.prototype=Object.create(G.prototype);ee.prototype.constructor=ee;Hb.prototype=Object.create(D.prototype);Hb.prototype.constructor= -Hb;fe.prototype=Object.create(G.prototype);fe.prototype.constructor=fe;Vc.prototype=Object.create(D.prototype);Vc.prototype.constructor=Vc;ge.prototype=Object.create(G.prototype);ge.prototype.constructor=ge;Wc.prototype=Object.create(D.prototype);Wc.prototype.constructor=Wc;gc.prototype=Object.create(G.prototype);gc.prototype.constructor=gc;gc.prototype.toJSON=function(){var a=G.prototype.toJSON.call(this);return Uh(this.parameters.shapes,a)};hc.prototype=Object.create(D.prototype);hc.prototype.constructor= -hc;hc.prototype.toJSON=function(){var a=D.prototype.toJSON.call(this);return Uh(this.parameters.shapes,a)};Xc.prototype=Object.create(D.prototype);Xc.prototype.constructor=Xc;ic.prototype=Object.create(G.prototype);ic.prototype.constructor=ic;qb.prototype=Object.create(D.prototype);qb.prototype.constructor=qb;he.prototype=Object.create(ic.prototype);he.prototype.constructor=he;ie.prototype=Object.create(qb.prototype);ie.prototype.constructor=ie;je.prototype=Object.create(G.prototype);je.prototype.constructor= -je;Yc.prototype=Object.create(D.prototype);Yc.prototype.constructor=Yc;var xa=Object.freeze({WireframeGeometry:Mc,ParametricGeometry:Rd,ParametricBufferGeometry:Nc,TetrahedronGeometry:Td,TetrahedronBufferGeometry:Oc,OctahedronGeometry:Ud,OctahedronBufferGeometry:cc,IcosahedronGeometry:Vd,IcosahedronBufferGeometry:Pc,DodecahedronGeometry:Wd,DodecahedronBufferGeometry:Qc,PolyhedronGeometry:Sd,PolyhedronBufferGeometry:Da,TubeGeometry:Xd,TubeBufferGeometry:dc,TorusKnotGeometry:Yd,TorusKnotBufferGeometry:Rc, -TorusGeometry:Zd,TorusBufferGeometry:Sc,TextGeometry:de,TextBufferGeometry:Uc,SphereGeometry:ee,SphereBufferGeometry:Hb,RingGeometry:fe,RingBufferGeometry:Vc,PlaneGeometry:Fd,PlaneBufferGeometry:Zb,LatheGeometry:ge,LatheBufferGeometry:Wc,ShapeGeometry:gc,ShapeBufferGeometry:hc,ExtrudeGeometry:fc,ExtrudeBufferGeometry:eb,EdgesGeometry:Xc,ConeGeometry:he,ConeBufferGeometry:ie,CylinderGeometry:ic,CylinderBufferGeometry:qb,CircleGeometry:je,CircleBufferGeometry:Yc,BoxGeometry:Xg,BoxBufferGeometry:Gd}); -jc.prototype=Object.create(P.prototype);jc.prototype.constructor=jc;jc.prototype.isShadowMaterial=!0;jc.prototype.copy=function(a){P.prototype.copy.call(this,a);this.color.copy(a.color);return this};Zc.prototype=Object.create(la.prototype);Zc.prototype.constructor=Zc;Zc.prototype.isRawShaderMaterial=!0;fb.prototype=Object.create(P.prototype);fb.prototype.constructor=fb;fb.prototype.isMeshStandardMaterial=!0;fb.prototype.copy=function(a){P.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;return this}; -kc.prototype=Object.create(fb.prototype);kc.prototype.constructor=kc;kc.prototype.isMeshPhysicalMaterial=!0;kc.prototype.copy=function(a){fb.prototype.copy.call(this,a);this.defines={STANDARD:"",PHYSICAL:""};this.reflectivity=a.reflectivity;this.clearcoat=a.clearcoat;this.clearcoatRoughness=a.clearcoatRoughness;this.sheen=a.sheen?(this.sheen||new I).copy(a.sheen):null;this.clearcoatNormalMap=a.clearcoatNormalMap;this.clearcoatNormalScale.copy(a.clearcoatNormalScale);this.transparency=a.transparency; -return this};Ra.prototype=Object.create(P.prototype);Ra.prototype.constructor=Ra;Ra.prototype.isMeshPhongMaterial=!0;Ra.prototype.copy=function(a){P.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};lc.prototype=Object.create(Ra.prototype);lc.prototype.constructor=lc;lc.prototype.isMeshToonMaterial=!0;lc.prototype.copy=function(a){Ra.prototype.copy.call(this,a);this.gradientMap=a.gradientMap;return this};mc.prototype=Object.create(P.prototype);mc.prototype.constructor=mc;mc.prototype.isMeshNormalMaterial=!0; -mc.prototype.copy=function(a){P.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}; -nc.prototype=Object.create(P.prototype);nc.prototype.constructor=nc;nc.prototype.isMeshLambertMaterial=!0;nc.prototype.copy=function(a){P.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};oc.prototype=Object.create(P.prototype);oc.prototype.constructor=oc;oc.prototype.isMeshMatcapMaterial=!0;oc.prototype.copy=function(a){P.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};pc.prototype= -Object.create(U.prototype);pc.prototype.constructor=pc;pc.prototype.isLineDashedMaterial=!0;pc.prototype.copy=function(a){U.prototype.copy.call(this,a);this.scale=a.scale;this.dashSize=a.dashSize;this.gapSize=a.gapSize;return this};var xk=Object.freeze({ShadowMaterial:jc,SpriteMaterial:Gb,RawShaderMaterial:Zc,ShaderMaterial:la,PointsMaterial:Qa,MeshPhysicalMaterial:kc,MeshStandardMaterial:fb,MeshPhongMaterial:Ra,MeshToonMaterial:lc,MeshNormalMaterial:mc,MeshLambertMaterial:nc,MeshDepthMaterial:Db, -MeshDistanceMaterial:Eb,MeshBasicMaterial:Ga,MeshMatcapMaterial:oc,LineDashedMaterial:pc,LineBasicMaterial:U,Material:P}),ta={arraySlice:function(a,b,c){return ta.isTypedArray(a)?new a.constructor(a.subarray(b,void 0!==c?c:a.length)):a.slice(b,c)},convertArray:function(a,b,c){return!a||!c&&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,c=Array(b),d=0;d!==b;++d)c[d]=d;c.sort(function(b,c){return a[b]-a[c]});return c},sortedArray:function(a,b,c){for(var d=a.length,e=new a.constructor(d),f=0,g=0;g!==d;++f)for(var h=c[f]*b,l=0;l!==b;++l)e[g++]=a[h+l];return e},flattenJSON:function(a,b,c,d){for(var e=1,f=a[0];void 0!==f&&void 0===f[d];)f=a[e++];if(void 0!==f){var g=f[d];if(void 0!==g)if(Array.isArray(g)){do g=f[d],void 0!==g&&(b.push(f.time),c.push.apply(c,g)),f=a[e++];while(void 0!==f)}else if(void 0!==g.toArray){do g=f[d], -void 0!==g&&(b.push(f.time),g.toArray(c,c.length)),f=a[e++];while(void 0!==f)}else{do g=f[d],void 0!==g&&(b.push(f.time),c.push(g)),f=a[e++];while(void 0!==f)}}}};Object.assign(Ia.prototype,{evaluate:function(a){var b=this.parameterPositions,c=this._cachedIndex,d=b[c],e=b[c-1];a:{b:{c:{d:if(!(a=e)break a;else{f=b[1];a=e)break b}d=c;c=0}}for(;c>>1,ab;)--f;++f;if(0!==e||f!==d)e>=f&&(f=Math.max(f, -1),e=f-1),a=this.getValueSize(),this.times=ta.arraySlice(c,e,f),this.values=ta.arraySlice(this.values,e*a,f*a);return this},validate:function(){var a=!0,b=this.getValueSize();0!==b-Math.floor(b)&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),a=!1);var c=this.times;b=this.values;var d=c.length;0===d&&(console.error("THREE.KeyframeTrack: Track is empty.",this),a=!1);for(var e=null,f=0;f!==d;f++){var g=c[f];if("number"===typeof g&&isNaN(g)){console.error("THREE.KeyframeTrack: Time is not a valid number.", -this,f,g);a=!1;break}if(null!==e&&e>g){console.error("THREE.KeyframeTrack: Out of order keys.",this,f,g,e);a=!1;break}e=g}if(void 0!==b&&ta.isTypedArray(b))for(f=0,c=b.length;f!==c;++f)if(d=b[f],isNaN(d)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,f,d);a=!1;break}return a},optimize:function(){for(var a=this.times,b=this.values,c=this.getValueSize(),d=2302===this.getInterpolation(),e=1,f=a.length-1,g=1;gg)e=a+1;else if(0b&&(b=0);1Number.EPSILON&&(g.normalize(),c=Math.acos(N.clamp(d[l- -1].dot(d[l]),-1,1)),e[l].applyMatrix4(h.makeRotationAxis(g,c))),f[l].crossVectors(d[l],e[l]);if(!0===b)for(c=Math.acos(N.clamp(e[0].dot(e[a]),-1,1)),c/=a,0d;)d+=c;for(;d>c;)d-=c;de&&(e=1);1E-4>d&&(d=e);1E-4>l&&(l=e);$g.initNonuniformCatmullRom(f.x,g.x,h.x,c.x,d,e,l);ah.initNonuniformCatmullRom(f.y, -g.y,h.y,c.y,d,e,l);bh.initNonuniformCatmullRom(f.z,g.z,h.z,c.z,d,e,l)}else"catmullrom"===this.curveType&&($g.initCatmullRom(f.x,g.x,h.x,c.x,this.tension),ah.initCatmullRom(f.y,g.y,h.y,c.y,this.tension),bh.initCatmullRom(f.z,g.z,h.z,c.z,this.tension));b.set($g.calc(a),ah.calc(a),bh.calc(a));return b};ya.prototype.copy=function(a){E.prototype.copy.call(this,a);this.points=[];for(var b=0,c=a.points.length;bc.length-2?c.length-1:a+1];c=c[a>c.length- -3?c.length-1:a+2];b.set(Wh(d,e.x,f.x,g.x,c.x),Wh(d,e.y,f.y,g.y,c.y));return b};Va.prototype.copy=function(a){E.prototype.copy.call(this,a);this.points=[];for(var b=0,c=a.points.length;b=b)return b=c[a]-b,a=this.curves[a],c=a.getLength(),a.getPointAt(0===c?0:1-b/c);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,c=0,d=this.curves.length;cNumber.EPSILON){if(0>k&&(g=b[f],l=-l,h=b[e],k=-k),!(a.yh.y))if(a.y===g.y){if(a.x===g.x)return!0}else{e=k*(a.x-g.x)-l*(a.y-g.y);if(0===e)return!0; -0>e||(d=!d)}}else if(a.y===g.y&&(h.x<=a.x&&a.x<=g.x||g.x<=a.x&&a.x<=h.x))return!0}return d}var e=pb.isClockWise,f=this.subPaths;if(0===f.length)return[];if(!0===b)return c(f);b=[];if(1===f.length){var g=f[0];var h=new Ib;h.curves=g.curves;b.push(h);return b}var l=!e(f[0].getPoints());l=a?!l:l;h=[];var k=[],n=[],u=0;k[u]=void 0;n[u]=[];for(var t=0,r=f.length;tb;b++)this.coefficients[b].copy(a[b]);return this},zero:function(){for(var a=0;9>a;a++)this.coefficients[a].set(0, -0,0);return this},getAt:function(a,b){var c=a.x,d=a.y;a=a.z;var e=this.coefficients;b.copy(e[0]).multiplyScalar(.282095);b.addScale(e[1],.488603*d);b.addScale(e[2],.488603*a);b.addScale(e[3],.488603*c);b.addScale(e[4],1.092548*c*d);b.addScale(e[5],1.092548*d*a);b.addScale(e[6],.315392*(3*a*a-1));b.addScale(e[7],1.092548*c*a);b.addScale(e[8],.546274*(c*c-d*d));return b},getIrradianceAt:function(a,b){var c=a.x,d=a.y;a=a.z;var e=this.coefficients;b.copy(e[0]).multiplyScalar(.886227);b.addScale(e[1], -1.023328*d);b.addScale(e[2],1.023328*a);b.addScale(e[3],1.023328*c);b.addScale(e[4],.858086*c*d);b.addScale(e[5],.858086*d*a);b.addScale(e[6],.743125*a*a-.247708);b.addScale(e[7],.858086*c*a);b.addScale(e[8],.429043*(c*c-d*d));return b},add:function(a){for(var b=0;9>b;b++)this.coefficients[b].add(a.coefficients[b]);return this},scale:function(a){for(var b=0;9>b;b++)this.coefficients[b].multiplyScalar(a);return this},lerp:function(a,b){for(var c=0;9>c;c++)this.coefficients[c].lerp(a.coefficients[c], -b);return this},equals:function(a){for(var b=0;9>b;b++)if(!this.coefficients[b].equals(a.coefficients[b]))return!1;return!0},copy:function(a){return this.set(a.coefficients)},clone:function(){return(new this.constructor).copy(this)},fromArray:function(a,b){void 0===b&&(b=0);for(var c=this.coefficients,d=0;9>d;d++)c[d].fromArray(a,b+3*d);return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);for(var c=this.coefficients,d=0;9>d;d++)c[d].toArray(a,b+3*d);return a}});Object.assign(kf, -{getBasisAt:function(a,b){var c=a.x,d=a.y;a=a.z;b[0]=.282095;b[1]=.488603*d;b[2]=.488603*a;b[3]=.488603*c;b[4]=1.092548*c*d;b[5]=1.092548*d*a;b[6]=.315392*(3*a*a-1);b[7]=1.092548*c*a;b[8]=.546274*(c*c-d*d)}});Xa.prototype=Object.assign(Object.create(da.prototype),{constructor:Xa,isLightProbe:!0,copy:function(a){da.prototype.copy.call(this,a);this.sh.copy(a.sh);this.intensity=a.intensity;return this},toJSON:function(a){return da.prototype.toJSON.call(this,a)}});wg.prototype=Object.assign(Object.create(Xa.prototype), -{constructor:wg,isHemisphereLightProbe:!0,copy:function(a){Xa.prototype.copy.call(this,a);return this},toJSON:function(a){return Xa.prototype.toJSON.call(this,a)}});xg.prototype=Object.assign(Object.create(Xa.prototype),{constructor:xg,isAmbientLightProbe:!0,copy:function(a){Xa.prototype.copy.call(this,a);return this},toJSON:function(a){return Xa.prototype.toJSON.call(this,a)}});var Ai=new M,Bi=new M;Object.assign(Xh.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 c=a.projectionMatrix.clone(),d=b.eyeSep/2,e=d*b.near/b.focus,f=b.near*Math.tan(N.DEG2RAD*b.fov*.5)/b.zoom;Bi.elements[12]=-d;Ai.elements[12]=d;d=-f*b.aspect+e;var g=f*b.aspect+e;c.elements[0]=2*b.near/(g-d);c.elements[8]=(g+d)/(g-d);this.cameraL.projectionMatrix.copy(c);d= --f*b.aspect-e;g=f*b.aspect-e;c.elements[0]=2*b.near/(g-d);c.elements[8]=(g+d)/(g-d);this.cameraR.projectionMatrix.copy(c)}this.cameraL.matrixWorld.copy(a.matrixWorld).multiply(Bi);this.cameraR.matrixWorld.copy(a.matrixWorld).multiply(Ai)}});Object.assign(yg.prototype,{start:function(){this.oldTime=this.startTime=("undefined"===typeof performance?Date:performance).now();this.elapsedTime=0;this.running=!0},stop:function(){this.getElapsedTime();this.autoStart=this.running=!1},getElapsedTime:function(){this.getDelta(); -return this.elapsedTime},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 vc=new n,Ci=new sa,zk=new n,wc=new n;zg.prototype=Object.assign(Object.create(C.prototype),{constructor:zg,getInput:function(){return this.gain},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},getFilter:function(){return this.filter},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},getMasterVolume:function(){return this.gain.gain.value},setMasterVolume:function(a){this.gain.gain.setTargetAtTime(a, -this.context.currentTime,.01);return this},updateMatrixWorld:function(a){C.prototype.updateMatrixWorld.call(this,a);a=this.context.listener;var b=this.up;this.timeDelta=this._clock.getDelta();this.matrixWorld.decompose(vc,Ci,zk);wc.set(0,0,-1).applyQuaternion(Ci);if(a.positionX){var c=this.context.currentTime+this.timeDelta;a.positionX.linearRampToValueAtTime(vc.x,c);a.positionY.linearRampToValueAtTime(vc.y,c);a.positionZ.linearRampToValueAtTime(vc.z,c);a.forwardX.linearRampToValueAtTime(wc.x,c); -a.forwardY.linearRampToValueAtTime(wc.y,c);a.forwardZ.linearRampToValueAtTime(wc.z,c);a.upX.linearRampToValueAtTime(b.x,c);a.upY.linearRampToValueAtTime(b.y,c);a.upZ.linearRampToValueAtTime(b.z,c)}else a.setPosition(vc.x,vc.y,vc.z),a.setOrientation(wc.x,wc.y,wc.z,b.x,b.y,b.z)}});dd.prototype=Object.assign(Object.create(C.prototype),{constructor:dd,getOutput:function(){return this.gain},setNodeSource:function(a){this.hasPlaybackControl=!1;this.sourceType="audioNode";this.source=a;this.connect();return this}, -setMediaElementSource:function(a){this.hasPlaybackControl=!1;this.sourceType="mediaNode";this.source=this.context.createMediaElementSource(a);this.connect();return this},setMediaStreamSource:function(a){this.hasPlaybackControl=!1;this.sourceType="mediaStreamNode";this.source=this.context.createMediaStreamSource(a);this.connect();return this},setBuffer:function(a){this.buffer=a;this.sourceType="buffer";this.autoplay&&this.play();return this},play:function(){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{var a=this.context.createBufferSource();a.buffer=this.buffer;a.loop=this.loop;a.onended=this.onEnded.bind(this);this.startTime=this.context.currentTime;a.start(this.startTime,this.offset,this.duration);this.isPlaying=!0;this.source=a;this.setDetune(this.detune);this.setPlaybackRate(this.playbackRate);return this.connect()}},pause:function(){if(!1===this.hasPlaybackControl)console.warn("THREE.Audio: this Audio has no playback control."); -else return!0===this.isPlaying&&(this.source.stop(),this.source.onended=null,this.offset+=(this.context.currentTime-this.startTime)*this.playbackRate,this.isPlaying=!1),this},stop:function(){if(!1===this.hasPlaybackControl)console.warn("THREE.Audio: this Audio has no playback control.");else return this.source.stop(),this.source.onended=null,this.offset=0,this.isPlaying=!1,this},connect:function(){if(0d&&this._mixBufferRegion(c,a,3*b,1-d,b);d=b;for(var f=b+b;d!==f;++d)if(c[d]!==c[d+b]){e.setValue(c,a);break}},saveOriginalState:function(){var a=this.buffer,b=this.valueSize,c=3*b;this.binding.getValue(a,c);for(var d=b;d!==c;++d)a[d]=a[c+d%b];this.cumulativeWeight=0},restoreOriginalState:function(){this.binding.setValue(this.buffer,3*this.valueSize)},_select:function(a, -b,c,d,e){if(.5<=d)for(d=0;d!==e;++d)a[b+d]=a[c+d]},_slerp:function(a,b,c,d){sa.slerpFlat(a,b,a,b,a,c,d)},_lerp:function(a,b,c,d,e){for(var f=1-d,g=0;g!==e;++g){var h=b+g;a[h]=a[h]*f+a[c+g]*d}}});var Bk=/[\[\]\.:\/]/g,Ck="[^"+"\\[\\]\\.:\\/".replace("\\.","")+"]",Dk=/((?:WC+[\/:])*)/.source.replace("WC","[^\\[\\]\\.:\\/]"),Ek=/(WCOD+)?/.source.replace("WCOD",Ck),Fk=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC","[^\\[\\]\\.:\\/]"),Gk=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC","[^\\[\\]\\.:\\/]"), -Hk=new RegExp("^"+Dk+Ek+Fk+Gk+"$"),Ik=["material","materials","bones"];Object.assign(Yh.prototype,{getValue:function(a,b){this.bind();var c=this._bindings[this._targetGroup.nCachedObjects_];void 0!==c&&c.getValue(a,b)},setValue:function(a,b){for(var c=this._bindings,d=this._targetGroup.nCachedObjects_,e=c.length;d!==e;++d)c[d].setValue(a,b)},bind:function(){for(var a=this._bindings,b=this._targetGroup.nCachedObjects_,c=a.length;b!==c;++b)a[b].bind()},unbind:function(){for(var a=this._bindings,b=this._targetGroup.nCachedObjects_, -c=a.length;b!==c;++b)a[b].unbind()}});Object.assign(Aa,{Composite:Yh,create:function(a,b,c){return a&&a.isAnimationObjectGroup?new Aa.Composite(a,b,c):new Aa(a,b,c)},sanitizeNodeName:function(a){return a.replace(/\s/g,"_").replace(Bk,"")},parseTrackName:function(a){var b=Hk.exec(a);if(!b)throw Error("PropertyBinding: Cannot parse trackName: "+a);b={nodeName:b[2],objectName:b[3],objectIndex:b[4],propertyName:b[5],propertyIndex:b[6]};var c=b.nodeName&&b.nodeName.lastIndexOf(".");if(void 0!==c&&-1!== -c){var d=b.nodeName.substring(c+1);-1!==Ik.indexOf(d)&&(b.nodeName=b.nodeName.substring(0,c),b.objectName=d)}if(null===b.propertyName||0===b.propertyName.length)throw Error("PropertyBinding: can not parse propertyName from trackName: "+a);return b},findNode:function(a,b){if(!b||""===b||"root"===b||"."===b||-1===b||b===a.name||b===a.uuid)return a;if(a.skeleton){var c=a.skeleton.getBoneByName(b);if(void 0!==c)return c}if(a.children){var d=function(a){for(var c=0;c=b){var n=b++,u=a[n];c[u.uuid]=m;a[m]=u;c[k]=n;a[n]=h;h=0;for(k=e;h!==k;++h){u=d[h];var t=u[m];u[m]=u[n];u[n]=t}}}this.nCachedObjects_=b},uncache:function(){for(var a=this._objects,b=a.length,c=this.nCachedObjects_,d=this._indicesByUUID,e=this._bindings,f=e.length,g=0,h=arguments.length;g!==h;++g){var k=arguments[g].uuid,m=d[k];if(void 0!==m)if(delete d[k],mb||0===c)return;this._startTime=null;b*=c}b*=this._updateTimeScale(a);c=this._updateTime(b);a=this._updateWeight(a);if(0c.parameterPositions[1]&&(this.stopFading(),0===d&&(this.enabled=!1))}}return this._effectiveWeight=b},_updateTimeScale:function(a){var b=0;if(!this.paused){b=this.timeScale;var c=this._timeScaleInterpolant;if(null!==c){var d=c.evaluate(a)[0]; -b*=d;a>c.parameterPositions[1]&&(this.stopWarping(),0===b?this.paused=!0:this.timeScale=b)}}return this._effectiveTimeScale=b},_updateTime:function(a){var b=this.time+a,c=this._clip.duration,d=this.loop,e=this._loopCount,f=2202===d;if(0===a)return-1===e?b:f&&1===(e&1)?c-b:b;if(2200===d)a:{if(-1===e&&(this._loopCount=0,this._setEndings(!0,!0,!1)),b>=c)b=c;else if(0>b)b=0;else{this.time=b;break a}this.clampWhenFinished?this.paused=!0:this.enabled=!1;this.time=b;this._mixer.dispatchEvent({type:"finished", -action:this,direction:0>a?-1:1})}else{-1===e&&(0<=a?(e=0,this._setEndings(!0,0===this.repetitions,f)):this._setEndings(0===this.repetitions,!0,f));if(b>=c||0>b){d=Math.floor(b/c);b-=c*d;e+=Math.abs(d);var g=this.repetitions-e;0>=g?(this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=b=0a,this._setEndings(a,!a,f)):this._setEndings(!1,!1,f),this._loopCount=e,this.time=b,this._mixer.dispatchEvent({type:"loop", -action:this,loopDelta:d}))}else this.time=b;if(f&&1===(e&1))return c-b}return b},_setEndings:function(a,b,c){var d=this._interpolantSettings;c?(d.endingStart=2401,d.endingEnd=2401):(d.endingStart=a?this.zeroSlopeAtStart?2401:2400:2402,d.endingEnd=b?this.zeroSlopeAtEnd?2401:2400:2402)},_scheduleFading:function(a,b,c){var d=this._mixer,e=d.time,f=this._weightInterpolant;null===f&&(this._weightInterpolant=f=d._lendControlInterpolant());d=f.parameterPositions;f=f.sampleValues;d[0]=e;f[0]=b;d[1]=e+a;f[1]= -c;return this}});Eg.prototype=Object.assign(Object.create(Ba.prototype),{constructor:Eg,_bindAction:function(a,b){var c=a._localRoot||this._root,d=a._clip.tracks,e=d.length,f=a._propertyBindings;a=a._interpolants;var g=c.uuid,h=this._bindingsByRootAndName,k=h[g];void 0===k&&(k={},h[g]=k);for(h=0;h!==e;++h){var m=d[h],n=m.name,u=k[n];if(void 0===u){u=f[h];if(void 0!==u){null===u._cacheIndex&&(++u.referenceCount,this._addInactiveBinding(u,g,n));continue}u=new Dg(Aa.create(c,n,b&&b._propertyBindings[h].binding.parsedPath), -m.ValueTypeName,m.getValueSize());++u.referenceCount;this._addInactiveBinding(u,g,n)}f[h]=u;a[h].resultBuffer=u.buffer}},_activateAction:function(a){if(!this._isActiveAction(a)){if(null===a._cacheIndex){var b=(a._localRoot||this._root).uuid,c=a._clip.uuid,d=this._actionsByClip[c];this._bindAction(a,d&&d.knownActions[0]);this._addInactiveAction(a,c,b)}b=a._propertyBindings;c=0;for(d=b.length;c!==d;++c){var e=b[c];0===e.useCount++&&(this._lendBinding(e),e.saveOriginalState())}this._lendAction(a)}}, -_deactivateAction:function(a){if(this._isActiveAction(a)){for(var b=a._propertyBindings,c=0,d=b.length;c!==d;++c){var e=b[c];0===--e.useCount&&(e.restoreOriginalState(),this._takeBackBinding(e))}this._takeBackAction(a)}},_initMemoryManager:function(){this._actions=[];this._nActiveActions=0;this._actionsByClip={};this._bindings=[];this._nActiveBindings=0;this._bindingsByRootAndName={};this._controlInterpolants=[];this._nActiveControlInterpolants=0;var a=this;this.stats={actions:{get total(){return a._actions.length}, -get inUse(){return a._nActiveActions}},bindings:{get total(){return a._bindings.length},get inUse(){return a._nActiveBindings}},controlInterpolants:{get total(){return a._controlInterpolants.length},get inUse(){return a._nActiveControlInterpolants}}}},_isActiveAction:function(a){a=a._cacheIndex;return null!==a&&athis.max.x||a.ythis.max.y?!1:!0},containsBox:function(a){return this.min.x<=a.min.x&&a.max.x<=this.max.x&&this.min.y<=a.min.y&&a.max.y<=this.max.y},getParameter:function(a,b){void 0===b&&(console.warn("THREE.Box2: .getParameter() target is now required"), -b=new w);return b.set((a.x-this.min.x)/(this.max.x-this.min.x),(a.y-this.min.y)/(this.max.y-this.min.y))},intersectsBox:function(a){return a.max.xthis.max.x||a.max.ythis.max.y?!1:!0},clampPoint:function(a,b){void 0===b&&(console.warn("THREE.Box2: .clampPoint() target is now required"),b=new w);return b.copy(a).clamp(this.min,this.max)},distanceToPoint:function(a){return Ei.copy(a).clamp(this.min,this.max).sub(a).length()},intersect:function(a){this.min.max(a.min); -this.max.min(a.max);return this},union:function(a){this.min.min(a.min);this.max.max(a.max);return this},translate:function(a){this.min.add(a);this.max.add(a);return this},equals:function(a){return a.min.equals(this.min)&&a.max.equals(this.max)}});var Fi=new n,Jf=new n;Object.assign(Ig.prototype,{set:function(a,b){this.start.copy(a);this.end.copy(b);return this},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.start.copy(a.start);this.end.copy(a.end);return this},getCenter:function(a){void 0=== -a&&(console.warn("THREE.Line3: .getCenter() target is now required"),a=new n);return a.addVectors(this.start,this.end).multiplyScalar(.5)},delta:function(a){void 0===a&&(console.warn("THREE.Line3: .delta() target is now required"),a=new n);return a.subVectors(this.end,this.start)},distanceSq:function(){return this.start.distanceToSquared(this.end)},distance:function(){return this.start.distanceTo(this.end)},at:function(a,b){void 0===b&&(console.warn("THREE.Line3: .at() target is now required"),b= -new n);return this.delta(b).multiplyScalar(a).add(this.start)},closestPointToPointParameter:function(a,b){Fi.subVectors(a,this.start);Jf.subVectors(this.end,this.start);a=Jf.dot(Jf);a=Jf.dot(Fi)/a;b&&(a=N.clamp(a,0,1));return a},closestPointToPoint:function(a,b,c){a=this.closestPointToPointParameter(a,b);void 0===c&&(console.warn("THREE.Line3: .closestPointToPoint() target is now required"),c=new n);return this.delta(c).multiplyScalar(a).add(this.start)},applyMatrix4:function(a){this.start.applyMatrix4(a); -this.end.applyMatrix4(a);return this},equals:function(a){return a.start.equals(this.start)&&a.end.equals(this.end)}});pe.prototype=Object.create(C.prototype);pe.prototype.constructor=pe;pe.prototype.isImmediateRenderObject=!0;var mb=new n,zb=new n,fh=new S,Jk=["a","b","c"];qe.prototype=Object.create(T.prototype);qe.prototype.constructor=qe;qe.prototype.update=function(){this.object.updateMatrixWorld(!0);fh.getNormalMatrix(this.object.matrixWorld);var a=this.object.matrixWorld,b=this.geometry.attributes.position, -c=this.object.geometry;if(c&&c.isGeometry)for(var d=c.vertices,e=c.faces,f=c=0,g=e.length;fMath.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);C.prototype.updateMatrixWorld.call(this,a)};var Mi=new n,pf,Jg;tb.prototype=Object.create(C.prototype);tb.prototype.constructor=tb;tb.prototype.setDirection=function(a){.99999a.y?this.quaternion.set(1,0,0,0):(Mi.set(a.z,0,-a.x).normalize(),this.quaternion.setFromAxisAngle(Mi,Math.acos(a.y)))};tb.prototype.setLength=function(a, -b,c){void 0===b&&(b=.2*a);void 0===c&&(c=.2*b);this.line.scale.set(1,Math.max(1E-4,a-b),1);this.line.updateMatrix();this.cone.scale.set(c,b,c);this.cone.position.y=a;this.cone.updateMatrix()};tb.prototype.setColor=function(a){this.line.material.color.set(a);this.cone.material.color.set(a)};tb.prototype.copy=function(a){C.prototype.copy.call(this,a,!1);this.line.copy(a.line);this.cone.copy(a.cone);return this};tb.prototype.clone=function(){return(new this.constructor).copy(this)};ve.prototype=Object.create(T.prototype); -ve.prototype.constructor=ve;E.create=function(a,b){console.log("THREE.Curve.create() has been deprecated");a.prototype=Object.create(E.prototype);a.prototype.constructor=a;a.prototype.getPoint=b;return a};Object.assign(rb.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 G,c=0,d=a.length;ca.far||b.push({distance:e,point:ze.clone(),uv:aa.getUV(ze,Af,Ae,Bf,qi,Zg,ri,new w),face:null,object:this})},clone:function(){return(new this.constructor(this.material)).copy(this)},copy:function(a){C.prototype.copy.call(this,a);void 0!==a.center&&this.center.copy(a.center);return this}});var Cf=new n,si=new n;Nd.prototype=Object.assign(Object.create(C.prototype), +{constructor:Nd,isLOD:!0,copy:function(a){C.prototype.copy.call(this,a,!1);a=a.levels;for(var b=0,c=a.length;b=b[c].distance)b[c-1].object.visible=!1,b[c].object.visible=!0;else break;for(;cc||(h.applyMatrix4(this.matrixWorld),t=a.ray.origin.distanceTo(h),ta.far||b.push({distance:t,point:e.clone().applyMatrix4(this.matrixWorld),index:d,face:null,faceIndex:null,object:this}))}}else for(d=0,u=p.length/3-1;dc||(h.applyMatrix4(this.matrixWorld),t=a.ray.origin.distanceTo(h), +ta.far||b.push({distance:t,point:e.clone().applyMatrix4(this.matrixWorld),index:d,face:null,faceIndex:null,object:this}))}else if(d.isGeometry)for(f=d.vertices,g=f.length,d=0;dc||(h.applyMatrix4(this.matrixWorld),t=a.ray.origin.distanceTo(h),ta.far||b.push({distance:t,point:e.clone().applyMatrix4(this.matrixWorld),index:d,face:null,faceIndex:null,object:this}))}},clone:function(){return(new this.constructor(this.geometry, +this.material)).copy(this)}});var Ef=new n,Ff=new n;T.prototype=Object.assign(Object.create(wa.prototype),{constructor:T,isLineSegments:!0,computeLineDistances:function(){var a=this.geometry;if(a.isBufferGeometry)if(null===a.index){for(var b=a.attributes.position,c=[],d=0,e=b.count;d=a.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}});Lc.prototype=Object.create(Z.prototype);Lc.prototype.constructor=Lc;Lc.prototype.isCompressedTexture=!0;Pd.prototype=Object.create(Z.prototype);Pd.prototype.constructor=Pd;Pd.prototype.isCanvasTexture=!0;Qd.prototype=Object.create(Z.prototype);Qd.prototype.constructor=Qd;Qd.prototype.isDepthTexture=!0;Mc.prototype=Object.create(D.prototype);Mc.prototype.constructor=Mc;Rd.prototype=Object.create(G.prototype);Rd.prototype.constructor= +Rd;Nc.prototype=Object.create(D.prototype);Nc.prototype.constructor=Nc;Sd.prototype=Object.create(G.prototype);Sd.prototype.constructor=Sd;Da.prototype=Object.create(D.prototype);Da.prototype.constructor=Da;Td.prototype=Object.create(G.prototype);Td.prototype.constructor=Td;Oc.prototype=Object.create(Da.prototype);Oc.prototype.constructor=Oc;Ud.prototype=Object.create(G.prototype);Ud.prototype.constructor=Ud;cc.prototype=Object.create(Da.prototype);cc.prototype.constructor=cc;Vd.prototype=Object.create(G.prototype); +Vd.prototype.constructor=Vd;Pc.prototype=Object.create(Da.prototype);Pc.prototype.constructor=Pc;Wd.prototype=Object.create(G.prototype);Wd.prototype.constructor=Wd;Qc.prototype=Object.create(Da.prototype);Qc.prototype.constructor=Qc;Xd.prototype=Object.create(G.prototype);Xd.prototype.constructor=Xd;dc.prototype=Object.create(D.prototype);dc.prototype.constructor=dc;dc.prototype.toJSON=function(){var a=D.prototype.toJSON.call(this);a.path=this.parameters.path.toJSON();return a};Yd.prototype=Object.create(G.prototype); +Yd.prototype.constructor=Yd;Rc.prototype=Object.create(D.prototype);Rc.prototype.constructor=Rc;Zd.prototype=Object.create(G.prototype);Zd.prototype.constructor=Zd;Sc.prototype=Object.create(D.prototype);Sc.prototype.constructor=Sc;var wk={triangulate:function(a,b,c){c=c||2;var d=b&&b.length,e=d?b[0]*c:a.length,f=Nh(a,0,e,c,!0),g=[];if(!f||f.next===f.prev)return g;var h;if(d){var l=c;d=[];var k;var p=0;for(k=b.length;p80*c){var r=h=a[0];var q=d=a[1];for(l=c;lh&&(h=p),b>d&&(d=b);h=Math.max(h-r,d-q);h=0!==h?1/h:0}be(f,g,c,r,q,h);return g}},pb={area:function(a){for(var b=a.length,c=0,d=b-1,e=0;epb.area(a)},triangulateShape:function(a,b){var c=[], +d=[],e=[];Rh(a);Sh(c,a);var f=a.length;b.forEach(Rh);for(a=0;aMath.abs(g-l)?[new w(a,1-c),new w(h,1-d),new w(k,1-e),new w(n,1-b)]:[new w(g,1-c),new w(l,1-d),new w(p,1-e),new w(t, +1-b)]}};de.prototype=Object.create(G.prototype);de.prototype.constructor=de;Uc.prototype=Object.create(eb.prototype);Uc.prototype.constructor=Uc;ee.prototype=Object.create(G.prototype);ee.prototype.constructor=ee;Ib.prototype=Object.create(D.prototype);Ib.prototype.constructor=Ib;fe.prototype=Object.create(G.prototype);fe.prototype.constructor=fe;Vc.prototype=Object.create(D.prototype);Vc.prototype.constructor=Vc;ge.prototype=Object.create(G.prototype);ge.prototype.constructor=ge;Wc.prototype=Object.create(D.prototype); +Wc.prototype.constructor=Wc;gc.prototype=Object.create(G.prototype);gc.prototype.constructor=gc;gc.prototype.toJSON=function(){var a=G.prototype.toJSON.call(this);return Uh(this.parameters.shapes,a)};hc.prototype=Object.create(D.prototype);hc.prototype.constructor=hc;hc.prototype.toJSON=function(){var a=D.prototype.toJSON.call(this);return Uh(this.parameters.shapes,a)};Xc.prototype=Object.create(D.prototype);Xc.prototype.constructor=Xc;ic.prototype=Object.create(G.prototype);ic.prototype.constructor= +ic;qb.prototype=Object.create(D.prototype);qb.prototype.constructor=qb;he.prototype=Object.create(ic.prototype);he.prototype.constructor=he;ie.prototype=Object.create(qb.prototype);ie.prototype.constructor=ie;je.prototype=Object.create(G.prototype);je.prototype.constructor=je;Yc.prototype=Object.create(D.prototype);Yc.prototype.constructor=Yc;var xa=Object.freeze({WireframeGeometry:Mc,ParametricGeometry:Rd,ParametricBufferGeometry:Nc,TetrahedronGeometry:Td,TetrahedronBufferGeometry:Oc,OctahedronGeometry:Ud, +OctahedronBufferGeometry:cc,IcosahedronGeometry:Vd,IcosahedronBufferGeometry:Pc,DodecahedronGeometry:Wd,DodecahedronBufferGeometry:Qc,PolyhedronGeometry:Sd,PolyhedronBufferGeometry:Da,TubeGeometry:Xd,TubeBufferGeometry:dc,TorusKnotGeometry:Yd,TorusKnotBufferGeometry:Rc,TorusGeometry:Zd,TorusBufferGeometry:Sc,TextGeometry:de,TextBufferGeometry:Uc,SphereGeometry:ee,SphereBufferGeometry:Ib,RingGeometry:fe,RingBufferGeometry:Vc,PlaneGeometry:Fd,PlaneBufferGeometry:$b,LatheGeometry:ge,LatheBufferGeometry:Wc, +ShapeGeometry:gc,ShapeBufferGeometry:hc,ExtrudeGeometry:fc,ExtrudeBufferGeometry:eb,EdgesGeometry:Xc,ConeGeometry:he,ConeBufferGeometry:ie,CylinderGeometry:ic,CylinderBufferGeometry:qb,CircleGeometry:je,CircleBufferGeometry:Yc,BoxGeometry:Xg,BoxBufferGeometry:Gd});jc.prototype=Object.create(Q.prototype);jc.prototype.constructor=jc;jc.prototype.isShadowMaterial=!0;jc.prototype.copy=function(a){Q.prototype.copy.call(this,a);this.color.copy(a.color);return this};Zc.prototype=Object.create(la.prototype); +Zc.prototype.constructor=Zc;Zc.prototype.isRawShaderMaterial=!0;fb.prototype=Object.create(Q.prototype);fb.prototype.constructor=fb;fb.prototype.isMeshStandardMaterial=!0;fb.prototype.copy=function(a){Q.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;return this};kc.prototype=Object.create(fb.prototype);kc.prototype.constructor=kc;kc.prototype.isMeshPhysicalMaterial=!0;kc.prototype.copy=function(a){fb.prototype.copy.call(this,a);this.defines={STANDARD:"",PHYSICAL:""};this.reflectivity= +a.reflectivity;this.clearcoat=a.clearcoat;this.clearcoatRoughness=a.clearcoatRoughness;this.sheen=a.sheen?(this.sheen||new I).copy(a.sheen):null;this.clearcoatNormalMap=a.clearcoatNormalMap;this.clearcoatNormalScale.copy(a.clearcoatNormalScale);this.transparency=a.transparency;return this};Ra.prototype=Object.create(Q.prototype);Ra.prototype.constructor=Ra;Ra.prototype.isMeshPhongMaterial=!0;Ra.prototype.copy=function(a){Q.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};lc.prototype=Object.create(Ra.prototype); +lc.prototype.constructor=lc;lc.prototype.isMeshToonMaterial=!0;lc.prototype.copy=function(a){Ra.prototype.copy.call(this,a);this.gradientMap=a.gradientMap;return this};mc.prototype=Object.create(Q.prototype);mc.prototype.constructor=mc;mc.prototype.isMeshNormalMaterial=!0;mc.prototype.copy=function(a){Q.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};nc.prototype=Object.create(Q.prototype);nc.prototype.constructor=nc;nc.prototype.isMeshLambertMaterial=!0;nc.prototype.copy=function(a){Q.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};oc.prototype=Object.create(Q.prototype);oc.prototype.constructor=oc;oc.prototype.isMeshMatcapMaterial=!0;oc.prototype.copy=function(a){Q.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};pc.prototype=Object.create(U.prototype);pc.prototype.constructor=pc;pc.prototype.isLineDashedMaterial=!0;pc.prototype.copy=function(a){U.prototype.copy.call(this,a);this.scale=a.scale;this.dashSize=a.dashSize;this.gapSize=a.gapSize;return this};var xk= +Object.freeze({ShadowMaterial:jc,SpriteMaterial:Hb,RawShaderMaterial:Zc,ShaderMaterial:la,PointsMaterial:Qa,MeshPhysicalMaterial:kc,MeshStandardMaterial:fb,MeshPhongMaterial:Ra,MeshToonMaterial:lc,MeshNormalMaterial:mc,MeshLambertMaterial:nc,MeshDepthMaterial:Db,MeshDistanceMaterial:Eb,MeshBasicMaterial:Ga,MeshMatcapMaterial:oc,LineDashedMaterial:pc,LineBasicMaterial:U,Material:Q}),ta={arraySlice:function(a,b,c){return ta.isTypedArray(a)?new a.constructor(a.subarray(b,void 0!==c?c:a.length)):a.slice(b, +c)},convertArray:function(a,b,c){return!a||!c&&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,c=Array(b),d=0;d!==b;++d)c[d]=d;c.sort(function(b,c){return a[b]-a[c]});return c},sortedArray:function(a,b,c){for(var d=a.length,e=new a.constructor(d),f=0,g=0;g!==d;++f)for(var h=c[f]*b,l=0;l!==b;++l)e[g++]=a[h+l];return e},flattenJSON:function(a, +b,c,d){for(var e=1,f=a[0];void 0!==f&&void 0===f[d];)f=a[e++];if(void 0!==f){var g=f[d];if(void 0!==g)if(Array.isArray(g)){do g=f[d],void 0!==g&&(b.push(f.time),c.push.apply(c,g)),f=a[e++];while(void 0!==f)}else if(void 0!==g.toArray){do g=f[d],void 0!==g&&(b.push(f.time),g.toArray(c,c.length)),f=a[e++];while(void 0!==f)}else{do g=f[d],void 0!==g&&(b.push(f.time),c.push(g)),f=a[e++];while(void 0!==f)}}}};Object.assign(Ia.prototype,{evaluate:function(a){var b=this.parameterPositions,c=this._cachedIndex, +d=b[c],e=b[c-1];a:{b:{c:{d:if(!(a=e)break a;else{f=b[1];a=e)break b}d=c;c=0}}for(;c>>1,ab;)--f;++f;if(0!==e||f!==d)e>=f&&(f=Math.max(f,1),e=f-1),a=this.getValueSize(),this.times=ta.arraySlice(c,e,f),this.values=ta.arraySlice(this.values,e*a,f*a);return this},validate:function(){var a=!0,b=this.getValueSize();0!==b-Math.floor(b)&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),a=!1);var c=this.times; +b=this.values;var d=c.length;0===d&&(console.error("THREE.KeyframeTrack: Track is empty.",this),a=!1);for(var e=null,f=0;f!==d;f++){var g=c[f];if("number"===typeof g&&isNaN(g)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,f,g);a=!1;break}if(null!==e&&e>g){console.error("THREE.KeyframeTrack: Out of order keys.",this,f,g,e);a=!1;break}e=g}if(void 0!==b&&ta.isTypedArray(b))for(f=0,c=b.length;f!==c;++f)if(d=b[f],isNaN(d)){console.error("THREE.KeyframeTrack: Value is not a valid number.", +this,f,d);a=!1;break}return a},optimize:function(){for(var a=this.times,b=this.values,c=this.getValueSize(),d=2302===this.getInterpolation(),e=1,f=a.length-1,g=1;gg)e=a+1;else if(0b&&(b=0);1Number.EPSILON&&(g.normalize(),c=Math.acos(N.clamp(d[l-1].dot(d[l]),-1,1)),e[l].applyMatrix4(h.makeRotationAxis(g,c))),f[l].crossVectors(d[l],e[l]);if(!0===b)for(c=Math.acos(N.clamp(e[0].dot(e[a]),-1,1)),c/=a,0d;)d+=c;for(;d>c;)d-=c;de&&(e=1);1E-4>d&&(d=e);1E-4>l&&(l=e);$g.initNonuniformCatmullRom(f.x,g.x,h.x,c.x,d,e,l);ah.initNonuniformCatmullRom(f.y,g.y,h.y,c.y,d,e,l);bh.initNonuniformCatmullRom(f.z,g.z,h.z,c.z,d,e,l)}else"catmullrom"===this.curveType&&($g.initCatmullRom(f.x,g.x,h.x,c.x,this.tension),ah.initCatmullRom(f.y,g.y,h.y,c.y,this.tension),bh.initCatmullRom(f.z,g.z,h.z,c.z,this.tension));b.set($g.calc(a), +ah.calc(a),bh.calc(a));return b};ya.prototype.copy=function(a){E.prototype.copy.call(this,a);this.points=[];for(var b=0,c=a.points.length;bc.length-2?c.length-1:a+1];c=c[a>c.length-3?c.length-1:a+2];b.set(Wh(d,e.x,f.x,g.x,c.x),Wh(d,e.y,f.y,g.y,c.y));return b};Va.prototype.copy=function(a){E.prototype.copy.call(this,a);this.points=[];for(var b=0,c=a.points.length;b=b)return b=c[a]-b,a=this.curves[a],c=a.getLength(),a.getPointAt(0===c?0:1-b/c);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,c=0,d=this.curves.length;cNumber.EPSILON){if(0>k&&(g=b[f],l=-l,h=b[e],k=-k),!(a.yh.y))if(a.y===g.y){if(a.x===g.x)return!0}else{e=k*(a.x-g.x)-l*(a.y-g.y);if(0===e)return!0;0>e||(d=!d)}}else if(a.y===g.y&&(h.x<=a.x&&a.x<=g.x||g.x<=a.x&&a.x<=h.x))return!0}return d}var e=pb.isClockWise,f=this.subPaths;if(0===f.length)return[];if(!0===b)return c(f);b=[];if(1===f.length){var g=f[0];var h=new Jb;h.curves=g.curves;b.push(h);return b}var l=!e(f[0].getPoints()); +l=a?!l:l;h=[];var k=[],n=[],u=0;k[u]=void 0;n[u]=[];for(var t=0,r=f.length;tb;b++)this.coefficients[b].copy(a[b]);return this},zero:function(){for(var a=0;9>a;a++)this.coefficients[a].set(0,0,0);return this},getAt:function(a,b){var c=a.x,d=a.y;a=a.z;var e=this.coefficients;b.copy(e[0]).multiplyScalar(.282095);b.addScale(e[1],.488603*d);b.addScale(e[2],.488603*a);b.addScale(e[3],.488603*c);b.addScale(e[4],1.092548*c*d);b.addScale(e[5],1.092548*d*a);b.addScale(e[6],.315392*(3*a*a-1));b.addScale(e[7],1.092548*c*a);b.addScale(e[8], +.546274*(c*c-d*d));return b},getIrradianceAt:function(a,b){var c=a.x,d=a.y;a=a.z;var e=this.coefficients;b.copy(e[0]).multiplyScalar(.886227);b.addScale(e[1],1.023328*d);b.addScale(e[2],1.023328*a);b.addScale(e[3],1.023328*c);b.addScale(e[4],.858086*c*d);b.addScale(e[5],.858086*d*a);b.addScale(e[6],.743125*a*a-.247708);b.addScale(e[7],.858086*c*a);b.addScale(e[8],.429043*(c*c-d*d));return b},add:function(a){for(var b=0;9>b;b++)this.coefficients[b].add(a.coefficients[b]);return this},scale:function(a){for(var b= +0;9>b;b++)this.coefficients[b].multiplyScalar(a);return this},lerp:function(a,b){for(var c=0;9>c;c++)this.coefficients[c].lerp(a.coefficients[c],b);return this},equals:function(a){for(var b=0;9>b;b++)if(!this.coefficients[b].equals(a.coefficients[b]))return!1;return!0},copy:function(a){return this.set(a.coefficients)},clone:function(){return(new this.constructor).copy(this)},fromArray:function(a,b){void 0===b&&(b=0);for(var c=this.coefficients,d=0;9>d;d++)c[d].fromArray(a,b+3*d);return this},toArray:function(a, +b){void 0===a&&(a=[]);void 0===b&&(b=0);for(var c=this.coefficients,d=0;9>d;d++)c[d].toArray(a,b+3*d);return a}});Object.assign(kf,{getBasisAt:function(a,b){var c=a.x,d=a.y;a=a.z;b[0]=.282095;b[1]=.488603*d;b[2]=.488603*a;b[3]=.488603*c;b[4]=1.092548*c*d;b[5]=1.092548*d*a;b[6]=.315392*(3*a*a-1);b[7]=1.092548*c*a;b[8]=.546274*(c*c-d*d)}});Xa.prototype=Object.assign(Object.create(da.prototype),{constructor:Xa,isLightProbe:!0,copy:function(a){da.prototype.copy.call(this,a);this.sh.copy(a.sh);this.intensity= +a.intensity;return this},toJSON:function(a){return da.prototype.toJSON.call(this,a)}});wg.prototype=Object.assign(Object.create(Xa.prototype),{constructor:wg,isHemisphereLightProbe:!0,copy:function(a){Xa.prototype.copy.call(this,a);return this},toJSON:function(a){return Xa.prototype.toJSON.call(this,a)}});xg.prototype=Object.assign(Object.create(Xa.prototype),{constructor:xg,isAmbientLightProbe:!0,copy:function(a){Xa.prototype.copy.call(this,a);return this},toJSON:function(a){return Xa.prototype.toJSON.call(this, +a)}});var Ai=new M,Bi=new M;Object.assign(Xh.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 c=a.projectionMatrix.clone(),d=b.eyeSep/2,e=d*b.near/b.focus,f=b.near*Math.tan(N.DEG2RAD*b.fov*.5)/b.zoom;Bi.elements[12]=-d;Ai.elements[12]=d; +d=-f*b.aspect+e;var g=f*b.aspect+e;c.elements[0]=2*b.near/(g-d);c.elements[8]=(g+d)/(g-d);this.cameraL.projectionMatrix.copy(c);d=-f*b.aspect-e;g=f*b.aspect-e;c.elements[0]=2*b.near/(g-d);c.elements[8]=(g+d)/(g-d);this.cameraR.projectionMatrix.copy(c)}this.cameraL.matrixWorld.copy(a.matrixWorld).multiply(Bi);this.cameraR.matrixWorld.copy(a.matrixWorld).multiply(Ai)}});Object.assign(yg.prototype,{start:function(){this.oldTime=this.startTime=("undefined"===typeof performance?Date:performance).now(); +this.elapsedTime=0;this.running=!0},stop:function(){this.getElapsedTime();this.autoStart=this.running=!1},getElapsedTime:function(){this.getDelta();return this.elapsedTime},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 vc=new n,Ci=new sa,zk=new n,wc=new n;zg.prototype=Object.assign(Object.create(C.prototype), +{constructor:zg,getInput:function(){return this.gain},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},getFilter:function(){return this.filter},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},getMasterVolume:function(){return this.gain.gain.value},setMasterVolume:function(a){this.gain.gain.setTargetAtTime(a,this.context.currentTime,.01);return this},updateMatrixWorld:function(a){C.prototype.updateMatrixWorld.call(this,a);a=this.context.listener;var b=this.up;this.timeDelta=this._clock.getDelta();this.matrixWorld.decompose(vc,Ci,zk);wc.set(0,0,-1).applyQuaternion(Ci);if(a.positionX){var c=this.context.currentTime+this.timeDelta; +a.positionX.linearRampToValueAtTime(vc.x,c);a.positionY.linearRampToValueAtTime(vc.y,c);a.positionZ.linearRampToValueAtTime(vc.z,c);a.forwardX.linearRampToValueAtTime(wc.x,c);a.forwardY.linearRampToValueAtTime(wc.y,c);a.forwardZ.linearRampToValueAtTime(wc.z,c);a.upX.linearRampToValueAtTime(b.x,c);a.upY.linearRampToValueAtTime(b.y,c);a.upZ.linearRampToValueAtTime(b.z,c)}else a.setPosition(vc.x,vc.y,vc.z),a.setOrientation(wc.x,wc.y,wc.z,b.x,b.y,b.z)}});dd.prototype=Object.assign(Object.create(C.prototype), +{constructor:dd,getOutput:function(){return this.gain},setNodeSource:function(a){this.hasPlaybackControl=!1;this.sourceType="audioNode";this.source=a;this.connect();return this},setMediaElementSource:function(a){this.hasPlaybackControl=!1;this.sourceType="mediaNode";this.source=this.context.createMediaElementSource(a);this.connect();return this},setMediaStreamSource:function(a){this.hasPlaybackControl=!1;this.sourceType="mediaStreamNode";this.source=this.context.createMediaStreamSource(a);this.connect(); +return this},setBuffer:function(a){this.buffer=a;this.sourceType="buffer";this.autoplay&&this.play();return this},play:function(){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{var a=this.context.createBufferSource();a.buffer=this.buffer;a.loop=this.loop;a.onended=this.onEnded.bind(this);this.startTime=this.context.currentTime;a.start(this.startTime,this.offset, +this.duration);this.isPlaying=!0;this.source=a;this.setDetune(this.detune);this.setPlaybackRate(this.playbackRate);return this.connect()}},pause:function(){if(!1===this.hasPlaybackControl)console.warn("THREE.Audio: this Audio has no playback control.");else return!0===this.isPlaying&&(this.source.stop(),this.source.onended=null,this.offset+=(this.context.currentTime-this.startTime)*this.playbackRate,this.isPlaying=!1),this},stop:function(){if(!1===this.hasPlaybackControl)console.warn("THREE.Audio: this Audio has no playback control."); +else return this.source.stop(),this.source.onended=null,this.offset=0,this.isPlaying=!1,this},connect:function(){if(0d&&this._mixBufferRegion(c, +a,3*b,1-d,b);d=b;for(var f=b+b;d!==f;++d)if(c[d]!==c[d+b]){e.setValue(c,a);break}},saveOriginalState:function(){var a=this.buffer,b=this.valueSize,c=3*b;this.binding.getValue(a,c);for(var d=b;d!==c;++d)a[d]=a[c+d%b];this.cumulativeWeight=0},restoreOriginalState:function(){this.binding.setValue(this.buffer,3*this.valueSize)},_select:function(a,b,c,d,e){if(.5<=d)for(d=0;d!==e;++d)a[b+d]=a[c+d]},_slerp:function(a,b,c,d){sa.slerpFlat(a,b,a,b,a,c,d)},_lerp:function(a,b,c,d,e){for(var f=1-d,g=0;g!==e;++g){var h= +b+g;a[h]=a[h]*f+a[c+g]*d}}});var Bk=/[\[\]\.:\/]/g,Ck="[^"+"\\[\\]\\.:\\/".replace("\\.","")+"]",Dk=/((?:WC+[\/:])*)/.source.replace("WC","[^\\[\\]\\.:\\/]"),Ek=/(WCOD+)?/.source.replace("WCOD",Ck),Fk=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC","[^\\[\\]\\.:\\/]"),Gk=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC","[^\\[\\]\\.:\\/]"),Hk=new RegExp("^"+Dk+Ek+Fk+Gk+"$"),Ik=["material","materials","bones"];Object.assign(Yh.prototype,{getValue:function(a,b){this.bind();var c=this._bindings[this._targetGroup.nCachedObjects_]; +void 0!==c&&c.getValue(a,b)},setValue:function(a,b){for(var c=this._bindings,d=this._targetGroup.nCachedObjects_,e=c.length;d!==e;++d)c[d].setValue(a,b)},bind:function(){for(var a=this._bindings,b=this._targetGroup.nCachedObjects_,c=a.length;b!==c;++b)a[b].bind()},unbind:function(){for(var a=this._bindings,b=this._targetGroup.nCachedObjects_,c=a.length;b!==c;++b)a[b].unbind()}});Object.assign(Aa,{Composite:Yh,create:function(a,b,c){return a&&a.isAnimationObjectGroup?new Aa.Composite(a,b,c):new Aa(a, +b,c)},sanitizeNodeName:function(a){return a.replace(/\s/g,"_").replace(Bk,"")},parseTrackName:function(a){var b=Hk.exec(a);if(!b)throw Error("PropertyBinding: Cannot parse trackName: "+a);b={nodeName:b[2],objectName:b[3],objectIndex:b[4],propertyName:b[5],propertyIndex:b[6]};var c=b.nodeName&&b.nodeName.lastIndexOf(".");if(void 0!==c&&-1!==c){var d=b.nodeName.substring(c+1);-1!==Ik.indexOf(d)&&(b.nodeName=b.nodeName.substring(0,c),b.objectName=d)}if(null===b.propertyName||0===b.propertyName.length)throw Error("PropertyBinding: can not parse propertyName from trackName: "+ +a);return b},findNode:function(a,b){if(!b||""===b||"root"===b||"."===b||-1===b||b===a.name||b===a.uuid)return a;if(a.skeleton){var c=a.skeleton.getBoneByName(b);if(void 0!==c)return c}if(a.children){var d=function(a){for(var c=0;c=b){var n=b++,u=a[n];c[u.uuid]=m;a[m]=u;c[k]=n;a[n]=h;h=0;for(k=e;h!==k;++h){u=d[h];var t=u[m];u[m]=u[n];u[n]=t}}}this.nCachedObjects_=b},uncache:function(){for(var a=this._objects,b=a.length,c=this.nCachedObjects_,d=this._indicesByUUID,e=this._bindings,f=e.length,g=0,h=arguments.length;g!==h;++g){var k= +arguments[g].uuid,m=d[k];if(void 0!==m)if(delete d[k],mb||0===c)return;this._startTime=null;b*=c}b*=this._updateTimeScale(a);c=this._updateTime(b);a=this._updateWeight(a);if(0c.parameterPositions[1]&&(this.stopFading(),0===d&&(this.enabled=!1))}}return this._effectiveWeight=b},_updateTimeScale:function(a){var b=0;if(!this.paused){b=this.timeScale;var c=this._timeScaleInterpolant;if(null!==c){var d=c.evaluate(a)[0];b*=d;a>c.parameterPositions[1]&&(this.stopWarping(),0===b?this.paused=!0:this.timeScale=b)}}return this._effectiveTimeScale=b},_updateTime:function(a){var b=this.time+a,c=this._clip.duration,d=this.loop,e=this._loopCount,f=2202===d;if(0===a)return-1=== +e?b:f&&1===(e&1)?c-b:b;if(2200===d)a:{if(-1===e&&(this._loopCount=0,this._setEndings(!0,!0,!1)),b>=c)b=c;else if(0>b)b=0;else{this.time=b;break a}this.clampWhenFinished?this.paused=!0:this.enabled=!1;this.time=b;this._mixer.dispatchEvent({type:"finished",action:this,direction:0>a?-1:1})}else{-1===e&&(0<=a?(e=0,this._setEndings(!0,0===this.repetitions,f)):this._setEndings(0===this.repetitions,!0,f));if(b>=c||0>b){d=Math.floor(b/c);b-=c*d;e+=Math.abs(d);var g=this.repetitions-e;0>=g?(this.clampWhenFinished? +this.paused=!0:this.enabled=!1,this.time=b=0a,this._setEndings(a,!a,f)):this._setEndings(!1,!1,f),this._loopCount=e,this.time=b,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:d}))}else this.time=b;if(f&&1===(e&1))return c-b}return b},_setEndings:function(a,b,c){var d=this._interpolantSettings;c?(d.endingStart=2401,d.endingEnd=2401):(d.endingStart=a?this.zeroSlopeAtStart?2401:2400:2402,d.endingEnd= +b?this.zeroSlopeAtEnd?2401:2400:2402)},_scheduleFading:function(a,b,c){var d=this._mixer,e=d.time,f=this._weightInterpolant;null===f&&(this._weightInterpolant=f=d._lendControlInterpolant());d=f.parameterPositions;f=f.sampleValues;d[0]=e;f[0]=b;d[1]=e+a;f[1]=c;return this}});Eg.prototype=Object.assign(Object.create(Ba.prototype),{constructor:Eg,_bindAction:function(a,b){var c=a._localRoot||this._root,d=a._clip.tracks,e=d.length,f=a._propertyBindings;a=a._interpolants;var g=c.uuid,h=this._bindingsByRootAndName, +k=h[g];void 0===k&&(k={},h[g]=k);for(h=0;h!==e;++h){var m=d[h],n=m.name,u=k[n];if(void 0===u){u=f[h];if(void 0!==u){null===u._cacheIndex&&(++u.referenceCount,this._addInactiveBinding(u,g,n));continue}u=new Dg(Aa.create(c,n,b&&b._propertyBindings[h].binding.parsedPath),m.ValueTypeName,m.getValueSize());++u.referenceCount;this._addInactiveBinding(u,g,n)}f[h]=u;a[h].resultBuffer=u.buffer}},_activateAction:function(a){if(!this._isActiveAction(a)){if(null===a._cacheIndex){var b=(a._localRoot||this._root).uuid, +c=a._clip.uuid,d=this._actionsByClip[c];this._bindAction(a,d&&d.knownActions[0]);this._addInactiveAction(a,c,b)}b=a._propertyBindings;c=0;for(d=b.length;c!==d;++c){var e=b[c];0===e.useCount++&&(this._lendBinding(e),e.saveOriginalState())}this._lendAction(a)}},_deactivateAction:function(a){if(this._isActiveAction(a)){for(var b=a._propertyBindings,c=0,d=b.length;c!==d;++c){var e=b[c];0===--e.useCount&&(e.restoreOriginalState(),this._takeBackBinding(e))}this._takeBackAction(a)}},_initMemoryManager:function(){this._actions= +[];this._nActiveActions=0;this._actionsByClip={};this._bindings=[];this._nActiveBindings=0;this._bindingsByRootAndName={};this._controlInterpolants=[];this._nActiveControlInterpolants=0;var a=this;this.stats={actions:{get total(){return a._actions.length},get inUse(){return a._nActiveActions}},bindings:{get total(){return a._bindings.length},get inUse(){return a._nActiveBindings}},controlInterpolants:{get total(){return a._controlInterpolants.length},get inUse(){return a._nActiveControlInterpolants}}}}, +_isActiveAction:function(a){a=a._cacheIndex;return null!==a&&athis.max.x||a.ythis.max.y?!1:!0},containsBox:function(a){return this.min.x<=a.min.x&&a.max.x<=this.max.x&&this.min.y<=a.min.y&&a.max.y<=this.max.y},getParameter:function(a,b){void 0===b&&(console.warn("THREE.Box2: .getParameter() target is now required"),b=new w);return b.set((a.x-this.min.x)/(this.max.x-this.min.x),(a.y-this.min.y)/(this.max.y-this.min.y))},intersectsBox:function(a){return a.max.xthis.max.x||a.max.ythis.max.y? +!1:!0},clampPoint:function(a,b){void 0===b&&(console.warn("THREE.Box2: .clampPoint() target is now required"),b=new w);return b.copy(a).clamp(this.min,this.max)},distanceToPoint:function(a){return Ei.copy(a).clamp(this.min,this.max).sub(a).length()},intersect:function(a){this.min.max(a.min);this.max.min(a.max);return this},union:function(a){this.min.min(a.min);this.max.max(a.max);return this},translate:function(a){this.min.add(a);this.max.add(a);return this},equals:function(a){return a.min.equals(this.min)&& +a.max.equals(this.max)}});var Fi=new n,Jf=new n;Object.assign(Ig.prototype,{set:function(a,b){this.start.copy(a);this.end.copy(b);return this},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.start.copy(a.start);this.end.copy(a.end);return this},getCenter:function(a){void 0===a&&(console.warn("THREE.Line3: .getCenter() target is now required"),a=new n);return a.addVectors(this.start,this.end).multiplyScalar(.5)},delta:function(a){void 0===a&&(console.warn("THREE.Line3: .delta() target is now required"), +a=new n);return a.subVectors(this.end,this.start)},distanceSq:function(){return this.start.distanceToSquared(this.end)},distance:function(){return this.start.distanceTo(this.end)},at:function(a,b){void 0===b&&(console.warn("THREE.Line3: .at() target is now required"),b=new n);return this.delta(b).multiplyScalar(a).add(this.start)},closestPointToPointParameter:function(a,b){Fi.subVectors(a,this.start);Jf.subVectors(this.end,this.start);a=Jf.dot(Jf);a=Jf.dot(Fi)/a;b&&(a=N.clamp(a,0,1));return a},closestPointToPoint:function(a, +b,c){a=this.closestPointToPointParameter(a,b);void 0===c&&(console.warn("THREE.Line3: .closestPointToPoint() target is now required"),c=new n);return this.delta(c).multiplyScalar(a).add(this.start)},applyMatrix4:function(a){this.start.applyMatrix4(a);this.end.applyMatrix4(a);return this},equals:function(a){return a.start.equals(this.start)&&a.end.equals(this.end)}});pe.prototype=Object.create(C.prototype);pe.prototype.constructor=pe;pe.prototype.isImmediateRenderObject=!0;var mb=new n,zb=new n,fh= +new S,Jk=["a","b","c"];qe.prototype=Object.create(T.prototype);qe.prototype.constructor=qe;qe.prototype.update=function(){this.object.updateMatrixWorld(!0);fh.getNormalMatrix(this.object.matrixWorld);var a=this.object.matrixWorld,b=this.geometry.attributes.position,c=this.object.geometry;if(c&&c.isGeometry)for(var d=c.vertices,e=c.faces,f=c=0,g=e.length;fMath.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);C.prototype.updateMatrixWorld.call(this,a)};var Mi=new n,pf,Jg;tb.prototype=Object.create(C.prototype);tb.prototype.constructor=tb;tb.prototype.setDirection=function(a){.99999a.y?this.quaternion.set(1,0,0,0):(Mi.set(a.z, +0,-a.x).normalize(),this.quaternion.setFromAxisAngle(Mi,Math.acos(a.y)))};tb.prototype.setLength=function(a,b,c){void 0===b&&(b=.2*a);void 0===c&&(c=.2*b);this.line.scale.set(1,Math.max(1E-4,a-b),1);this.line.updateMatrix();this.cone.scale.set(c,b,c);this.cone.position.y=a;this.cone.updateMatrix()};tb.prototype.setColor=function(a){this.line.material.color.set(a);this.cone.material.color.set(a)};tb.prototype.copy=function(a){C.prototype.copy.call(this,a,!1);this.line.copy(a.line);this.cone.copy(a.cone); +return this};tb.prototype.clone=function(){return(new this.constructor).copy(this)};ve.prototype=Object.create(T.prototype);ve.prototype.constructor=ve;E.create=function(a,b){console.log("THREE.Curve.create() has been deprecated");a.prototype=Object.create(E.prototype);a.prototype.constructor=a;a.prototype.getPoint=b;return a};Object.assign(rb.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 G,c=0,d=a.length;c