diff --git a/build/three.js b/build/three.js index ecc5f0443b88864e9ea2a9ca54de510b390fbd55..e42a2760c73f236d9f26aecb1704ace30ff8d9ba 100644 --- a/build/three.js +++ b/build/three.js @@ -5848,8 +5848,6 @@ // object specific properties - if ( this.isMesh && this.drawMode !== TrianglesDrawMode ) { object.drawMode = this.drawMode; } - if ( this.isInstancedMesh ) { object.type = 'InstancedMesh'; @@ -11056,8 +11054,6 @@ this.geometry = geometry !== undefined ? geometry : new BufferGeometry(); this.material = material !== undefined ? material : new MeshBasicMaterial( { color: Math.random() * 0xffffff } ); - this.drawMode = TrianglesDrawMode; - this.updateMorphTargets(); } @@ -11068,18 +11064,10 @@ isMesh: true, - setDrawMode: function ( value ) { - - this.drawMode = value; - - }, - copy: function ( source ) { Object3D.prototype.copy.call( this, source ); - this.drawMode = source.drawMode; - if ( source.morphTargetInfluences !== undefined ) { this.morphTargetInfluences = source.morphTargetInfluences.slice(); @@ -11172,15 +11160,6 @@ } - // check unsupported draw modes - - if ( this.drawMode !== TrianglesDrawMode ) { - - console.warn( 'THREE.Mesh: TriangleStripDrawMode and TriangleFanDrawMode are not supported by .raycast().' ); - return; - - } - var intersection; if ( geometry.isBufferGeometry ) { @@ -16215,11 +16194,6 @@ render.triangles += instanceCount * ( count / 3 ); break; - case 5: - case 6: - render.triangles += instanceCount * ( count - 2 ); - break; - case 1: render.lines += instanceCount * ( count / 2 ); break; @@ -24354,21 +24328,7 @@ } else { - switch ( object.drawMode ) { - - case TrianglesDrawMode: - renderer.setMode( 4 ); - break; - - case TriangleStripDrawMode: - renderer.setMode( 5 ); - break; - - case TriangleFanDrawMode: - renderer.setMode( 6 ); - break; - - } + renderer.setMode( 4 ); } @@ -40789,8 +40749,6 @@ if ( data.userData !== undefined ) { object.userData = data.userData; } if ( data.layers !== undefined ) { object.layers.mask = data.layers; } - if ( data.drawMode !== undefined ) { object.setDrawMode( data.drawMode ); } - if ( data.children !== undefined ) { var children = data.children; @@ -48938,6 +48896,34 @@ } ); + Object.assign( Mesh.prototype, { + + setDrawMode: function () { + + console.error( 'THREE.Mesh: .setDrawMode() has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.' ); + + }, + + } ); + + Object.defineProperties( Mesh.prototype, { + + drawMode: { + get: function () { + + console.error( 'THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode.' ); + return TrianglesDrawMode; + + }, + set: function () { + + console.error( 'THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.' ); + + } + } + + } ); + Object.defineProperties( LOD.prototype, { objects: { diff --git a/build/three.min.js b/build/three.min.js index f0fc0898d6a600f44776f0f875c8f3a210bd4bac..8c86c4631dca3c6f461b246e0a9c685eb4568b8a 100644 --- a/build/three.min.js +++ b/build/three.min.js @@ -1,11 +1,11 @@ // threejs.org/license -(function(k,na){"object"===typeof exports&&"undefined"!==typeof module?na(exports):"function"===typeof define&&define.amd?define(["exports"],na):(k=k||self,na(k.THREE={}))})(this,function(k){function na(){}function y(a,b){this.x=a||0;this.y=b||0}function va(a,b,c,d){this._x=a||0;this._y=b||0;this._z=c||0;this._w=void 0!==d?d:1}function n(a,b,c){this.x=a||0;this.y=b||0;this.z=c||0}function V(){this.elements=[1,0,0,0,1,0,0,0,1];0h)return!1}return!0}function lb(a,b){this.center=void 0!==a?a:new n;this.radius=void 0!==b?b:0}function Qb(a,b){this.origin=void 0!==a?a:new n;this.direction=void 0!==b?b:new n(0,0,-1)}function Ra(a,b){this.normal=void 0!==a?a:new n(1,0,0);this.constant=void 0!==b?b:0}function oa(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 A(a,b,c){return void 0===b&&void 0===c?this.set(a):this.setRGB(a,b,c)}function cg(a,b,c){0>c&&(c+=1);1c?b:c<2/3?a+6*(b-a)*(2/3-c):a}function dg(a){return.04045>a?.0773993808*a:Math.pow(.9478672986*a+.0521327014,2.4)}function eg(a){return.0031308>a?12.92*a:1.055*Math.pow(a,.41666)-.055}function uc(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 A;this.vertexColors=Array.isArray(e)?e:[];this.materialIndex=void 0!==f?f:0}function N(){Object.defineProperty(this,"id",{value:aj++});this.uuid=R.generateUUID();this.name="";this.type="Material";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= @@ -13,15 +13,15 @@ void 0!==b?b:new n;this.c=void 0!==c?c:new n}function A(a,b,c){return void 0===b {};this.version=0}function Ha(a){N.call(this);this.type="MeshBasicMaterial";this.color=new A(16777215);this.lightMap=this.map=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.envMap=this.alphaMap=this.specularMap=null;this.combine=0;this.reflectivity=1;this.refractionRatio=.98;this.wireframe=!1;this.wireframeLinewidth=1;this.wireframeLinejoin=this.wireframeLinecap="round";this.morphTargets=this.skinning=!1;this.setValues(a)}function P(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.usage=35044;this.updateRange={offset:0,count:-1};this.version=0}function wd(a,b,c){P.call(this,new Int8Array(a),b,c)}function xd(a,b,c){P.call(this,new Uint8Array(a),b,c)}function yd(a,b,c){P.call(this,new Uint8ClampedArray(a),b,c)}function zd(a,b,c){P.call(this,new Int16Array(a),b,c)}function Rb(a,b,c){P.call(this,new Uint16Array(a),b,c)}function Ad(a,b,c){P.call(this,new Int32Array(a),b,c)}function Sb(a, b,c){P.call(this,new Uint32Array(a),b,c)}function C(a,b,c){P.call(this,new Float32Array(a),b,c)}function Bd(a,b,c){P.call(this,new Float64Array(a),b,c)}function qh(){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 rh(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:bj+=2});this.uuid=R.generateUUID();this.name="";this.type="BufferGeometry";this.index=null;this.attributes={};this.morphAttributes={};this.morphTargetsRelative=!1;this.groups=[];this.boundingSphere=this.boundingBox=null;this.drawRange={start:0,count:Infinity};this.userData={}}function fa(a,b){E.call(this);this.type="Mesh";this.geometry=void 0!==a?a:new D;this.material=void 0!==b?b:new Ha({color:16777215* -Math.random()});this.drawMode=0;this.updateMorphTargets()}function sh(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;Ke.copy(h);Ke.applyMatrix4(a.matrixWorld);b=c.ray.origin.distanceTo(Ke);return bc.far?null:{distance:b,point:Ke.clone(),object:a}}function Le(a,b,c,d,e,f,g,h,l,m,p,t){Tb.fromBufferAttribute(e,m);Ub.fromBufferAttribute(e,p);Vb.fromBufferAttribute(e,t);e=a.morphTargetInfluences;if(b.morphTargets&& -f&&e){Me.set(0,0,0);Ne.set(0,0,0);Oe.set(0,0,0);for(var q=0,u=f.length;qb&&(b=a[c]);return b}function D(){Object.defineProperty(this,"id",{value:bj+=2});this.uuid=R.generateUUID();this.name="";this.type="BufferGeometry";this.index=null;this.attributes={};this.morphAttributes={};this.morphTargetsRelative=!1;this.groups=[];this.boundingSphere=this.boundingBox=null;this.drawRange={start:0,count:Infinity};this.userData={}}function V(a,b){E.call(this);this.type="Mesh";this.geometry=void 0!==a?a:new D;this.material=void 0!==b?b:new Ha({color:16777215* +Math.random()});this.updateMorphTargets()}function sh(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;Ke.copy(h);Ke.applyMatrix4(a.matrixWorld);b=c.ray.origin.distanceTo(Ke);return bc.far?null:{distance:b,point:Ke.clone(),object:a}}function Le(a,b,c,d,e,f,g,h,l,m,p,t){Tb.fromBufferAttribute(e,m);Ub.fromBufferAttribute(e,p);Vb.fromBufferAttribute(e,t);e=a.morphTargetInfluences;if(b.morphTargets&&f&&e){Me.set(0,0, +0);Ne.set(0,0,0);Oe.set(0,0,0);for(var q=0,u=f.length;qg;g++)a.setRenderTarget(f,g),a.clear(b,c,d);a.setRenderTarget(e)}}function zb(a, b,c){ja.call(this,a,b,c)}function Xb(a,b,c,d,e,f,g,h,l,m,p,t){T.call(this,null,f,g,h,l,m,d,e,p,t);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 Dd(a,b,c,d,e,f){this.planes=[void 0!==a?a:new Ra,void 0!==b?b:new Ra,void 0!==c?c:new Ra,void 0!==d?d:new Ra,void 0!==e?e:new Ra,void 0!==f?f:new Ra]}function ig(){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 dj(a){function b(b,c){var d=b.array,e=b.usage,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: @@ -29,54 +29,54 @@ d instanceof Int16Array?c=5122:d instanceof Uint32Array?c=5125:d instanceof Int3 (d=d.data);var f=c.get(d);if(void 0===f)c.set(d,b(d,e));else if(f.versionm;m++){if(t=d[m])if(l=t[0],t=t[1]){p&&e.setAttribute("morphTarget"+ -m,p[l]);f&&e.setAttribute("morphNormal"+m,f[l]);c[m]=t;h+=t;continue}c[m]=0}e=e.morphTargetsRelative?1:1-h;g.getUniforms().setValue(a,"morphTargetBaseInfluence",e);g.getUniforms().setValue(a,"morphTargetInfluences",c)}}}function oj(a,b,c,d){var e={};return{update:function(a){var f=d.render.frame,h=a.geometry,l=b.get(a,h);e[l.id]!==f&&(h.isGeometry&&l.updateFromObject(a),b.update(l),e[l.id]=f);a.isInstancedMesh&&c.update(a.instanceMatrix,34962);return l},dispose:function(){e={}}}}function mb(a,b,c, -d,e,f,g,h,l,m){a=void 0!==a?a:[];T.call(this,a,void 0!==b?b:301,c,d,e,f,void 0!==g?g:1022,h,l,m);this.flipY=!1}function zc(a,b,c,d){T.call(this,null);this.image={data:a||null,width:b||1,height:c||1,depth:d||1};this.minFilter=this.magFilter=1003;this.wrapR=1001;this.flipY=this.generateMipmaps=!1;this.needsUpdate=!0}function Ac(a,b,c,d){T.call(this,null);this.image={data:a||null,width:b||1,height:c||1,depth:d||1};this.minFilter=this.magFilter=1003;this.wrapR=1001;this.flipY=this.generateMipmaps=!1; -this.needsUpdate=!0}function Bc(a,b,c){var d=a[0];if(0>=d||0");return a.replace(lg,kg)}function Ih(a,b,c,d){a="";for(b=parseInt(b);bm;m++){if(t=d[m])if(l=t[0],t=t[1]){p&&e.setAttribute("morphTarget"+m,p[l]);f&&e.setAttribute("morphNormal"+ +m,f[l]);c[m]=t;h+=t;continue}c[m]=0}e=e.morphTargetsRelative?1:1-h;g.getUniforms().setValue(a,"morphTargetBaseInfluence",e);g.getUniforms().setValue(a,"morphTargetInfluences",c)}}}function oj(a,b,c,d){var e={};return{update:function(a){var f=d.render.frame,h=a.geometry,l=b.get(a,h);e[l.id]!==f&&(h.isGeometry&&l.updateFromObject(a),b.update(l),e[l.id]=f);a.isInstancedMesh&&c.update(a.instanceMatrix,34962);return l},dispose:function(){e={}}}}function mb(a,b,c,d,e,f,g,h,l,m){a=void 0!==a?a:[];T.call(this, +a,void 0!==b?b:301,c,d,e,f,void 0!==g?g:1022,h,l,m);this.flipY=!1}function zc(a,b,c,d){T.call(this,null);this.image={data:a||null,width:b||1,height:c||1,depth:d||1};this.minFilter=this.magFilter=1003;this.wrapR=1001;this.flipY=this.generateMipmaps=!1;this.needsUpdate=!0}function Ac(a,b,c,d){T.call(this,null);this.image={data:a||null,width:b||1,height:c||1,depth:d||1};this.minFilter=this.magFilter=1003;this.wrapR=1001;this.flipY=this.generateMipmaps=!1;this.needsUpdate=!0}function Bc(a,b,c){var d= +a[0];if(0>=d||0");return a.replace(lg,kg)}function Ih(a,b,c,d){a="";for(b=parseInt(b);b\nvoid main() {\n float mean = 0.0;\n float squared_mean = 0.0;\n\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy ) / resolution ) );\n for ( float i = -1.0; i < 1.0 ; i += SAMPLE_RATE) {\n #ifdef HORIZONAL_PASS\n vec2 distribution = unpack2HalfToRGBA ( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( i, 0.0 ) * radius ) / resolution ) );\n mean += distribution.x;\n squared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n #else\n float depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, i ) * radius ) / resolution ) );\n mean += depth;\n squared_mean += depth * depth;\n #endif\n }\n mean = mean * HALF_SAMPLE_RATE;\n squared_mean = squared_mean * HALF_SAMPLE_RATE;\n float std_dev = sqrt( squared_mean - mean * mean );\n gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}"}), -n=v.clone();n.defines.HORIZONAL_PASS=1;var w=new D;w.setAttribute("position",new P(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));var x=new fa(w,v),J=this;this.enabled=!1;this.autoUpdate=!0;this.needsUpdate=!1;this.type=1;this.render=function(d,e,f){if(!1!==J.enabled&&(!1!==J.autoUpdate||!1!==J.needsUpdate)&&0!==d.length){var t=a.getRenderTarget(),k=a.getActiveCubeFace(),q=a.getActiveMipmapLevel(),r=a.state;r.setBlending(0);r.buffers.color.setClear(1,1,1,1);r.buffers.depth.setTest(!0);r.setScissorTest(!1); +v))}else t.visible&&(u=f(c,t,l,e.near,e.far,m),a.renderBufferDirect(e,null,p,u,c,null))}c=c.children;p=0;for(t=c.length;p\nvoid main() {\n float mean = 0.0;\n float squared_mean = 0.0;\n\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy ) / resolution ) );\n for ( float i = -1.0; i < 1.0 ; i += SAMPLE_RATE) {\n #ifdef HORIZONAL_PASS\n vec2 distribution = unpack2HalfToRGBA ( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( i, 0.0 ) * radius ) / resolution ) );\n mean += distribution.x;\n squared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n #else\n float depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, i ) * radius ) / resolution ) );\n mean += depth;\n squared_mean += depth * depth;\n #endif\n }\n mean = mean * HALF_SAMPLE_RATE;\n squared_mean = squared_mean * HALF_SAMPLE_RATE;\n float std_dev = sqrt( squared_mean - mean * mean );\n gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}"}), +n=v.clone();n.defines.HORIZONAL_PASS=1;var w=new D;w.setAttribute("position",new P(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));var x=new V(w,v),J=this;this.enabled=!1;this.autoUpdate=!0;this.needsUpdate=!1;this.type=1;this.render=function(d,e,f){if(!1!==J.enabled&&(!1!==J.autoUpdate||!1!==J.needsUpdate)&&0!==d.length){var t=a.getRenderTarget(),k=a.getActiveCubeFace(),q=a.getActiveMipmapLevel(),r=a.state;r.setBlending(0);r.buffers.color.setClear(1,1,1,1);r.buffers.depth.setTest(!0);r.setScissorTest(!1); for(var u=0,w=d.length;uc||l.y>c)console.warn("THREE.WebGLShadowMap:",B,"has shadow exceeding max texture size, reducing"),l.x>c&&(m.x=Math.floor(c/H.x),l.x=m.x*H.x,z.mapSize.x=m.x),l.y>c&&(m.y=Math.floor(c/H.y),l.y=m.y*H.y,z.mapSize.y=m.y);null!==z.map||z.isPointLightShadow||3!==this.type||(H={minFilter:1006,magFilter:1006, format:1023},z.map=new ja(l.x,l.y,H),z.map.texture.name=B.name+".shadowMap",z.mapPass=new ja(l.x,l.y,H),z.camera.updateProjectionMatrix());null===z.map&&(H={minFilter:1003,magFilter:1003,format:1023},z.map=new ja(l.x,l.y,H),z.map.texture.name=B.name+".shadowMap",z.camera.updateProjectionMatrix());a.setRenderTarget(z.map);a.clear();H=z.getViewportCount();for(var Ca=0;Cau)return!1;for(var b=1,c=a.length;bu)return!1;for(var b=1,c=a.length;bf.matrixWorld.determinant();ba.setMaterial(e,h);var l=k(a,c,e,f),m=!1;if(b!==d.id||ia!==l.id||Re!==(!0===e.wireframe))b=d.id,ia=l.id,Re=!0===e.wireframe,m=!0;f.morphTargetInfluences&&(ya.update(f,d,e,l),m=!0);h=d.index;var p=d.attributes.position;if((null===h||0!==h.count)&&void 0!== -p&&0!==p.count){c=1;!0===e.wireframe&&(h=xa.getWireframeAttribute(d),c=2);a=za;if(null!==h){var t=oa.get(h);a=Ba;a.setIndex(t)}if(m){if(!1!==Fa.isWebGL2||!f.isInstancedMesh&&!d.isInstancedBufferGeometry||null!==sa.get("ANGLE_instanced_arrays")){ba.initAttributes();m=d.attributes;l=l.getAttributes();var q=e.defaultAttributeValues;for(H in l){var r=l[H];if(0<=r){var u=m[H];if(void 0!==u){var v=u.normalized,n=u.itemSize,w=oa.get(u);if(void 0!==w){var B=w.buffer,x=w.type;w=w.bytesPerElement;if(u.isInterleavedBufferAttribute){var z= -u.data,J=z.stride;u=u.offset;z&&z.isInstancedInterleavedBuffer?(ba.enableAttributeAndDivisor(r,z.meshPerAttribute),void 0===d.maxInstancedCount&&(d.maxInstancedCount=z.meshPerAttribute*z.count)):ba.enableAttribute(r);I.bindBuffer(34962,B);I.vertexAttribPointer(r,n,x,v,J*w,u*w)}else u.isInstancedBufferAttribute?(ba.enableAttributeAndDivisor(r,u.meshPerAttribute),void 0===d.maxInstancedCount&&(d.maxInstancedCount=u.meshPerAttribute*u.count)):ba.enableAttribute(r),I.bindBuffer(34962,B),I.vertexAttribPointer(r, -n,x,v,0,0)}}else if("instanceMatrix"===H)w=oa.get(f.instanceMatrix),void 0!==w&&(B=w.buffer,x=w.type,ba.enableAttributeAndDivisor(r+0,1),ba.enableAttributeAndDivisor(r+1,1),ba.enableAttributeAndDivisor(r+2,1),ba.enableAttributeAndDivisor(r+3,1),I.bindBuffer(34962,B),I.vertexAttribPointer(r+0,4,x,!1,64,0),I.vertexAttribPointer(r+1,4,x,!1,64,16),I.vertexAttribPointer(r+2,4,x,!1,64,32),I.vertexAttribPointer(r+3,4,x,!1,64,48));else if(void 0!==q&&(v=q[H],void 0!==v))switch(v.length){case 2:I.vertexAttrib2fv(r, -v);break;case 3:I.vertexAttrib3fv(r,v);break;case 4:I.vertexAttrib4fv(r,v);break;default:I.vertexAttrib1fv(r,v)}}}ba.disableUnusedAttributes()}null!==h&&I.bindBuffer(34963,t.buffer)}t=Infinity;null!==h?t=h.count:void 0!==p&&(t=p.count);h=d.drawRange.start*c;p=null!==g?g.start*c:0;var H=Math.max(h,p);g=Math.max(0,Math.min(t,h+d.drawRange.count*c,p+(null!==g?g.count*c:Infinity))-1-H+1);if(0!==g){if(f.isMesh)if(!0===e.wireframe)ba.setLineWidth(e.wireframeLinewidth*(null===O?U: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),ba.setLineWidth(e*(null===O?U:1)),f.isLineSegments?a.setMode(1):f.isLineLoop?a.setMode(2):a.setMode(3)):f.isPoints?a.setMode(0):f.isSprite&&a.setMode(4);f.isInstancedMesh?a.renderInstances(d,H,g,f.count):d.isInstancedBufferGeometry?a.renderInstances(d,H,g,d.maxInstancedCount):a.render(H,g)}}};this.compile=function(a,b){F=va.get(a,b);F.init();a.traverse(function(a){a.isLight&&(F.pushLight(a),a.castShadow&& -F.pushShadow(a))});F.setupLights(b);a.traverse(function(b){if(b.material)if(Array.isArray(b.material))for(var c=0;cf.matrixWorld.determinant();ba.setMaterial(e,h);var l=k(a,c,e,f),m=!1;if(b!==d.id||ia!==l.id||Re!==(!0===e.wireframe))b=d.id,ia=l.id,Re=!0===e.wireframe,m=!0;f.morphTargetInfluences&&(ya.update(f,d,e,l),m=!0);h=d.index;var p=d.attributes.position;if((null===h||0!==h.count)&&void 0!==p&&0!==p.count){c=1;!0===e.wireframe&&(h=xa.getWireframeAttribute(d),c= +2);a=za;if(null!==h){var t=oa.get(h);a=Ba;a.setIndex(t)}if(m){if(!1!==Fa.isWebGL2||!f.isInstancedMesh&&!d.isInstancedBufferGeometry||null!==sa.get("ANGLE_instanced_arrays")){ba.initAttributes();m=d.attributes;l=l.getAttributes();var q=e.defaultAttributeValues;for(H in l){var r=l[H];if(0<=r){var u=m[H];if(void 0!==u){var v=u.normalized,n=u.itemSize,w=oa.get(u);if(void 0!==w){var B=w.buffer,x=w.type;w=w.bytesPerElement;if(u.isInterleavedBufferAttribute){var z=u.data,J=z.stride;u=u.offset;z&&z.isInstancedInterleavedBuffer? +(ba.enableAttributeAndDivisor(r,z.meshPerAttribute),void 0===d.maxInstancedCount&&(d.maxInstancedCount=z.meshPerAttribute*z.count)):ba.enableAttribute(r);I.bindBuffer(34962,B);I.vertexAttribPointer(r,n,x,v,J*w,u*w)}else u.isInstancedBufferAttribute?(ba.enableAttributeAndDivisor(r,u.meshPerAttribute),void 0===d.maxInstancedCount&&(d.maxInstancedCount=u.meshPerAttribute*u.count)):ba.enableAttribute(r),I.bindBuffer(34962,B),I.vertexAttribPointer(r,n,x,v,0,0)}}else if("instanceMatrix"===H)w=oa.get(f.instanceMatrix), +void 0!==w&&(B=w.buffer,x=w.type,ba.enableAttributeAndDivisor(r+0,1),ba.enableAttributeAndDivisor(r+1,1),ba.enableAttributeAndDivisor(r+2,1),ba.enableAttributeAndDivisor(r+3,1),I.bindBuffer(34962,B),I.vertexAttribPointer(r+0,4,x,!1,64,0),I.vertexAttribPointer(r+1,4,x,!1,64,16),I.vertexAttribPointer(r+2,4,x,!1,64,32),I.vertexAttribPointer(r+3,4,x,!1,64,48));else if(void 0!==q&&(v=q[H],void 0!==v))switch(v.length){case 2:I.vertexAttrib2fv(r,v);break;case 3:I.vertexAttrib3fv(r,v);break;case 4:I.vertexAttrib4fv(r, +v);break;default:I.vertexAttrib1fv(r,v)}}}ba.disableUnusedAttributes()}null!==h&&I.bindBuffer(34963,t.buffer)}t=Infinity;null!==h?t=h.count:void 0!==p&&(t=p.count);h=d.drawRange.start*c;p=null!==g?g.start*c:0;var H=Math.max(h,p);g=Math.max(0,Math.min(t,h+d.drawRange.count*c,p+(null!==g?g.count*c:Infinity))-1-H+1);0!==g&&(f.isMesh?!0===e.wireframe?(ba.setLineWidth(e.wireframeLinewidth*(null===O?U:1)),a.setMode(1)):a.setMode(4):f.isLine?(e=e.linewidth,void 0===e&&(e=1),ba.setLineWidth(e*(null===O?U: +1)),f.isLineSegments?a.setMode(1):f.isLineLoop?a.setMode(2):a.setMode(3)):f.isPoints?a.setMode(0):f.isSprite&&a.setMode(4),f.isInstancedMesh?a.renderInstances(d,H,g,f.count):d.isInstancedBufferGeometry?a.renderInstances(d,H,g,d.maxInstancedCount):a.render(H,g))}};this.compile=function(a,b){F=va.get(a,b);F.init();a.traverse(function(a){a.isLight&&(F.pushLight(a),a.castShadow&&F.pushShadow(a))});F.setupLights(b);a.traverse(function(b){if(b.material)if(Array.isArray(b.material))for(var c=0;ce.far||f.push({distance:a,distanceToRay:Math.sqrt(h),point:c,index:b,face:null,object:g}))} function ug(a,b,c,d,e,f,g,h,l){T.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 Ic(a,b,c,d,e,f,g,h,l,m,p,k){T.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){T.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"); @@ -269,10 +269,10 @@ this.prev=null;this.steiner=!1}function $h(a){var b=a.length;2Number.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 y(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 y(f/e,d/e)}function h(a,b){for(K=a.length;0<= --K;){var c=K;var f=K-1;0>f&&(f=a.length-1);var g,h=x+2*D;for(g=0;ga;a++)this.coefficients.push(new n)}function Ya(a,b){ca.call(this,void 0,b);this.sh=void 0!==a?a:new wf}function Gg(a,b,c){Ya.call(this,void 0,c);a=(new A).set(a);c=(new A).set(b);b=new n(a.r,a.g,a.b);a=new n(c.r,c.g,c.b); -c=Math.sqrt(Math.PI);var d=c*Math.sqrt(.75);this.sh.coefficients[0].copy(b).add(a).multiplyScalar(c);this.sh.coefficients[1].copy(b).sub(a).multiplyScalar(d)}function Hg(a,b){Ya.call(this,void 0,b);a=(new A).set(a);this.sh.coefficients[0].set(a.r,a.g,a.b).multiplyScalar(2*Math.sqrt(Math.PI))}function fi(){this.type="StereoCamera";this.aspect=1;this.eyeSep=.064;this.cameraL=new da;this.cameraL.layers.enable(1);this.cameraL.matrixAutoUpdate=!1;this.cameraR=new da;this.cameraR.layers.enable(2);this.cameraR.matrixAutoUpdate= +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 Hg(a,b){Ya.call(this,void 0,b);a=(new A).set(a);this.sh.coefficients[0].set(a.r,a.g,a.b).multiplyScalar(2*Math.sqrt(Math.PI))}function fi(){this.type="StereoCamera";this.aspect=1;this.eyeSep=.064;this.cameraL=new ea;this.cameraL.layers.enable(1);this.cameraL.matrixAutoUpdate=!1;this.cameraR=new ea;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 Ig(a){this.autoStart=void 0!==a?a:!0;this.elapsedTime=this.oldTime=this.startTime=0;this.running=!1}function Jg(){E.call(this);this.type="AudioListener";this.context=Kg.getContext();this.gain=this.context.createGain();this.gain.connect(this.context.destination);this.filter=null;this.timeDelta=0;this._clock=new Ig}function ad(a){E.call(this);this.type="Audio";this.listener=a;this.context=a.context;this.gain= this.context.createGain();this.gain.connect(a.getInput());this.autoplay=!1;this.buffer=null;this.detune=0;this.loop=!1;this.offset=this.loopEnd=this.loopStart=0;this.duration=void 0;this.playbackRate=1;this.isPlaying=!1;this.hasPlaybackControl=!0;this.sourceType="empty";this._pausedAt=this._startedAt=0;this.filters=[]}function Lg(a){ad.call(this,a);this.panner=this.context.createPanner();this.panner.panningModel="HRTF";this.panner.connect(this.gain)}function Mg(a,b){this.analyser=a.context.createAnalyser(); this.analyser.fftSize=void 0!==b?b:2048;this.data=new Uint8Array(this.analyser.frequencyBinCount);a.getOutput().connect(this.analyser)}function Ng(a,b,c){this.binding=a;this.valueSize=c;a=Float64Array;switch(b){case "quaternion":b=this._slerp;break;case "string":case "bool":a=Array;b=this._select;break;default:b=this._lerp}this.buffer=new a(4*c);this._mixBufferRegion=b;this.referenceCount=this.useCount=this.cumulativeWeight=0}function gi(a,b,c){c=c||Ba.parseTrackName(b);this._targetGroup=a;this._bindings= @@ -328,21 +328,21 @@ 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.setAttribute("position",new C(b,3));b=new X({fog:!1});this.cone=new Y(a,b);this.add(this.cone);this.update()}function ni(a){var b=[];a&&a.isBone&&b.push(a);for(var c=0;ca?-1:0xe;xe++)wa[xe]=(16>xe?"0":"")+ @@ -382,8 +382,8 @@ this.crossVectors(a,b)):this.crossVectors(this,a)},crossVectors:function(a,b){va 0===b&&console.error("THREE.Vector3: angleTo() can't handle zero length vectors.");a=this.dot(a)/b;return Math.acos(R.clamp(a,-1,1))},distanceTo:function(a){return Math.sqrt(this.distanceToSquared(a))},distanceToSquared:function(a){var b=this.x-a.x,c=this.y-a.y;a=this.z-a.z;return b*b+c*c+a*a},manhattanDistanceTo:function(a){return Math.abs(this.x-a.x)+Math.abs(this.y-a.y)+Math.abs(this.z-a.z)},setFromSpherical:function(a){return this.setFromSphericalCoords(a.radius,a.phi,a.theta)},setFromSphericalCoords:function(a, b,c){var d=Math.sin(b)*a;this.x=d*Math.sin(c);this.y=Math.cos(b)*a;this.z=d*Math.cos(c);return this},setFromCylindrical:function(a){return this.setFromCylindricalCoords(a.radius,a.theta,a.y)},setFromCylindricalCoords:function(a,b,c){this.x=a*Math.sin(b);this.y=c;this.z=a*Math.cos(b);return this},setFromMatrixPosition:function(a){a=a.elements;this.x=a[12];this.y=a[13];this.z=a[14];return this},setFromMatrixScale:function(a){var b=this.setFromMatrixColumn(a,0).length(),c=this.setFromMatrixColumn(a, 1).length();a=this.setFromMatrixColumn(a,2).length();this.x=b;this.y=c;this.z=a;return this},setFromMatrixColumn:function(a,b){return this.fromArray(a.elements,4*b)},equals:function(a){return a.x===this.x&&a.y===this.y&&a.z===this.z},fromArray:function(a,b){void 0===b&&(b=0);this.x=a[b];this.y=a[b+1];this.z=a[b+2];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;return a},fromBufferAttribute:function(a,b,c){void 0!==c&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."); -this.x=a.getX(b);this.y=a.getY(b);this.z=a.getZ(b);return this}});var mc=new n;Object.assign(V.prototype,{isMatrix3:!0,set:function(a,b,c,d,e,f,g,h,l){var m=this.elements;m[0]=a;m[1]=d;m[2]=g;m[3]=b;m[4]=e;m[5]=h;m[6]=c;m[7]=f;m[8]=l;return this},identity:function(){this.set(1,0,0,0,1,0,0,0,1);return this},clone:function(){return(new this.constructor).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];return this},setFromMatrix4:function(a){a=a.elements;this.set(a[0],a[4],a[8],a[1],a[5],a[9],a[2],a[6],a[10]);return this},applyToBufferAttribute:function(a){for(var b=0,c=a.count;ba.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(T.prototype,"needsUpdate",{set:function(a){!0===a&&this.version++}});Object.defineProperties(W.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(W.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; +Math.floor(a.x);break;case 1001:a.x=0>a.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(T.prototype,"needsUpdate",{set:function(a){!0===a&&this.version++}});Object.defineProperties(fa.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(fa.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},addScalar:function(a){this.x+=a;this.y+=a;this.z+=a;this.w+=a;return this},addVectors:function(a,b){this.x=a.x+b.x;this.y=a.y+b.y;this.z=a.z+b.z;this.w=a.w+b.w;return this},addScaledVector:function(a,b){this.x+=a.x*b;this.y+=a.y*b;this.z+=a.z*b;this.w+=a.w*b;return this},sub:function(a,b){if(void 0!==b)return console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(a, b);this.x-=a.x;this.y-=a.y;this.z-=a.z;this.w-=a.w;return this},subScalar:function(a){this.x-=a;this.y-=a;this.z-=a;this.w-=a;return this},subVectors:function(a,b){this.x=a.x-b.x;this.y=a.y-b.y;this.z=a.z-b.z;this.w=a.w-b.w;return this},multiplyScalar:function(a){this.x*=a;this.y*=a;this.z*=a;this.w*=a;return this},applyMatrix4:function(a){var b=this.x,c=this.y,d=this.z,e=this.w;a=a.elements;this.x=a[0]*b+a[4]*c+a[8]*d+a[12]*e;this.y=a[1]*b+a[5]*c+a[9]*d+a[13]*e;this.z=a[2]*b+a[6]*c+a[10]*d+a[14]* @@ -408,7 +408,7 @@ this.y=-this.y;this.z=-this.z;this.w=-this.w;return this},dot:function(a){return 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}});ja.prototype=Object.assign(Object.create(na.prototype),{constructor:ja,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"})}});$f.prototype=Object.assign(Object.create(ja.prototype),{constructor:$f,isWebGLMultisampleRenderTarget:!0,copy:function(a){ja.prototype.copy.call(this, -a);this.samples=a.samples;return this}});var La=new n,ea=new M,Ak=new n(0,0,0),Bk=new n(1,1,1),Jb=new n,Cf=new n,ua=new n;Object.assign(M.prototype,{isMatrix4:!0,set:function(a,b,c,d,e,f,g,h,l,m,k,t,q,n,r,v){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]=t;p[3]=q;p[7]=n;p[11]=r;p[15]=v;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= +a);this.samples=a.samples;return this}});var La=new n,W=new M,Ak=new n(0,0,0),Bk=new n(1,1,1),Jb=new n,Cf=new n,ua=new n;Object.assign(M.prototype,{isMatrix4:!0,set:function(a,b,c,d,e,f,g,h,l,m,k,t,q,n,r,v){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]=t;p[3]=q;p[7]=n;p[11]=r;p[15]=v;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/La.setFromMatrixColumn(a,0).length(),e=1/La.setFromMatrixColumn(a,1).length();a=1/La.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]= @@ -423,7 +423,7 @@ y=v*n*k-t*w*k-v*m*r+h*w*r+t*m*d-h*n*d,A=t*B*k-v*q*k+v*l*r-h*B*r-t*l*d+h*q*d,z=v* b[4]*=d;b[8]*=a;b[1]*=c;b[5]*=d;b[9]*=a;b[2]*=c;b[6]*=d;b[10]*=a;b[3]*=c;b[7]*=d;b[11]*=a;return this},getMaxScaleOnAxis:function(){var a=this.elements;return Math.sqrt(Math.max(a[0]*a[0]+a[1]*a[1]+a[2]*a[2],a[4]*a[4]+a[5]*a[5]+a[6]*a[6],a[8]*a[8]+a[9]*a[9]+a[10]*a[10]))},makeTranslation:function(a,b,c){this.set(1,0,0,a,0,1,0,b,0,0,1,c,0,0,0,1);return this},makeRotationX:function(a){var b=Math.cos(a);a=Math.sin(a);this.set(1,0,0,0,0,b,-a,0,0,a,b,0,0,0,0,1);return this},makeRotationY:function(a){var b= Math.cos(a);a=Math.sin(a);this.set(b,0,a,0,0,1,0,0,-a,0,b,0,0,0,0,1);return this},makeRotationZ:function(a){var b=Math.cos(a);a=Math.sin(a);this.set(b,-a,0,0,a,b,0,0,0,0,1,0,0,0,0,1);return this},makeRotationAxis:function(a,b){var c=Math.cos(b);b=Math.sin(b);var d=1-c,e=a.x,f=a.y;a=a.z;var g=d*e,h=d*f;this.set(g*e+c,g*f-b*a,g*a+b*f,0,g*f+b*a,h*f+c,h*a-b*e,0,g*a-b*f,h*a+b*e,d*a*a+c,0,0,0,0,1);return this},makeScale:function(a,b,c){this.set(a,0,0,0,0,b,0,0,0,0,c,0,0,0,0,1);return this},makeShear:function(a, b,c){this.set(1,b,c,0,a,1,c,0,a,b,1,0,0,0,0,1);return this},compose:function(a,b,c){var d=this.elements,e=b._x,f=b._y,g=b._z,h=b._w,l=e+e,m=f+f,k=g+g;b=e*l;var t=e*m;e*=k;var n=f*m;f*=k;g*=k;l*=h;m*=h;h*=k;k=c.x;var u=c.y;c=c.z;d[0]=(1-(n+g))*k;d[1]=(t+h)*k;d[2]=(e-m)*k;d[3]=0;d[4]=(t-h)*u;d[5]=(1-(b+g))*u;d[6]=(f+l)*u;d[7]=0;d[8]=(e+m)*c;d[9]=(f-l)*c;d[10]=(1-(b+n))*c;d[11]=0;d[12]=a.x;d[13]=a.y;d[14]=a.z;d[15]=1;return this},decompose:function(a,b,c){var d=this.elements,e=La.set(d[0],d[1],d[2]).length(), -f=La.set(d[4],d[5],d[6]).length(),g=La.set(d[8],d[9],d[10]).length();0>this.determinant()&&(e=-e);a.x=d[12];a.y=d[13];a.z=d[14];ea.copy(this);a=1/e;d=1/f;var h=1/g;ea.elements[0]*=a;ea.elements[1]*=a;ea.elements[2]*=a;ea.elements[4]*=d;ea.elements[5]*=d;ea.elements[6]*=d;ea.elements[8]*=h;ea.elements[9]*=h;ea.elements[10]*=h;b.setFromRotationMatrix(ea);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."); +f=La.set(d[4],d[5],d[6]).length(),g=La.set(d[8],d[9],d[10]).length();0>this.determinant()&&(e=-e);a.x=d[12];a.y=d[13];a.z=d[14];W.copy(this);a=1/e;d=1/f;var h=1/g;W.elements[0]*=a;W.elements[1]*=a;W.elements[2]*=a;W.elements[4]*=d;W.elements[5]*=d;W.elements[6]*=d;W.elements[8]*=h;W.elements[9]*=h;W.elements[10]*=h;b.setFromRotationMatrix(W);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 ri=new M,si=new va;Ob.RotationOrders= "XYZ YZX ZXY XZY YXZ ZYX".split(" ");Ob.DefaultOrder="XYZ";Object.defineProperties(Ob.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(Ob.prototype,{isEuler:!0,set:function(a, @@ -443,150 +443,149 @@ a=new va);this.updateMatrixWorld(!0);this.matrixWorld.decompose(ye,a,Ck);return raycast:function(){},traverse:function(a){a(this);for(var b=this.children,c=0,d=b.length;ce&&(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,ze);return ze.distanceToSquared(a.center)<=a.radius*a.radius},intersectsPlane:function(a){if(0=-a.constant},intersectsTriangle:function(a){if(this.isEmpty())return!1;this.getCenter(Ae);Ff.subVectors(this.max,Ae);ld.subVectors(a.a,Ae);md.subVectors(a.b,Ae);nd.subVectors(a.c,Ae);Kb.subVectors(md, -ld);Lb.subVectors(nd,md);nc.subVectors(ld,nd);a=[0,-Kb.z,Kb.y,0,-Lb.z,Lb.y,0,-nc.z,nc.y,Kb.z,0,-Kb.x,Lb.z,0,-Lb.x,nc.z,0,-nc.x,-Kb.y,Kb.x,0,-Lb.y,Lb.x,0,-nc.y,nc.x,0];if(!bg(a,ld,md,nd,Ff))return!1;a=[1,0,0,0,1,0,0,0,1];if(!bg(a,ld,md,nd,Ff))return!1;Gf.crossVectors(Kb,Lb);a=[Gf.x,Gf.y,Gf.z];return bg(a,ld,md,nd,Ff)},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 ze.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(ze).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;ub[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(a); -ub[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(a);ub[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(a);ub[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(a);ub[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(a);ub[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(a);ub[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(a);ub[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(a);this.setFromPoints(ub);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 Gk=new Qa;Object.assign(lb.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):Gk.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 Qa);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 vb=new n,Wg=new n,Hf=new n,Mb=new n,Xg=new n,If=new n,Yg=new n;Object.assign(Qb.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,vb));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=vb.subVectors(a,this.origin).dot(this.direction);if(0>b)return this.origin.distanceToSquared(a);vb.copy(this.direction).multiplyScalar(b).add(this.origin);return vb.distanceToSquared(a)},distanceSqToSegment:function(a,b,c,d){Wg.copy(a).add(b).multiplyScalar(.5);Hf.copy(b).sub(a).normalize();Mb.copy(this.origin).sub(Wg); -var e=.5*a.distanceTo(b),f=-this.direction.dot(Hf),g=Mb.dot(this.direction),h=-Mb.dot(Hf),l=Mb.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,vb)},intersectTriangle:function(a, -b,c,d,e){Xg.subVectors(b,a);If.subVectors(c,a);Yg.crossVectors(Xg,If);b=this.direction.dot(Yg);if(0b)d=-1,b=-b;else return null;Mb.subVectors(this.origin,a);a=d*this.direction.dot(If.crossVectors(Mb,If));if(0>a)return null;c=d*this.direction.dot(Xg.cross(Mb));if(0>c||a+c>b)return null;a=-d*Mb.dot(Yg);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 Zg=new n,Hk=new n,Ik=new V;Object.assign(Ra.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=Zg.subVectors(c,b).cross(Hk.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(Zg),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&&0=xb.x+xb.y},getUV:function(a,b,c,d,e,f,g,h){this.getBarycoord(a,b,c,d,xb);h.set(0,0);h.addScaledVector(e,xb.x);h.addScaledVector(f,xb.y);h.addScaledVector(g,xb.z);return h},isFrontFacing:function(a,b,c,d){Za.subVectors(c,b);wb.subVectors(a,b);return 0>Za.cross(wb).dot(d)?!0:!1}});Object.assign(oa.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(){Za.subVectors(this.c,this.b);wb.subVectors(this.a,this.b);return.5*Za.cross(wb).length()},getMidpoint:function(a){void 0===a&&(console.warn("THREE.Triangle: .getMidpoint() target is now required"),a=new n);return a.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)},getNormal:function(a){return oa.getNormal(this.a,this.b, -this.c,a)},getPlane:function(a){void 0===a&&(console.warn("THREE.Triangle: .getPlane() target is now required"),a=new Ra);return a.setFromCoplanarPoints(this.a,this.b,this.c)},getBarycoord:function(a,b){return oa.getBarycoord(a,this.a,this.b,this.c,b)},getUV:function(a,b,c,d,e){return oa.getUV(a,this.a,this.b,this.c,b,c,d,e)},containsPoint:function(a){return oa.containsPoint(a,this.a,this.b,this.c)},isFrontFacing:function(a){return oa.isFrontFacing(this.a,this.b,this.c,a)},intersectsBox:function(a){return a.intersectsTriangle(this)}, -closestPointToPoint:function(a,b){void 0===b&&(console.warn("THREE.Triangle: .closestPointToPoint() target is now required"),b=new n);var c=this.a,d=this.b,e=this.c;od.subVectors(d,c);pd.subVectors(e,c);ah.subVectors(a,c);var f=od.dot(ah),g=pd.dot(ah);if(0>=f&&0>=g)return b.copy(c);bh.subVectors(a,d);var h=od.dot(bh),l=pd.dot(bh);if(0<=h&&l<=h)return b.copy(d);var m=f*l-h*g;if(0>=m&&0<=f&&0>=h)return d=f/(f-h),b.copy(c).addScaledVector(od,d);ch.subVectors(a,e);a=od.dot(ch);var k=pd.dot(ch);if(0<= -k&&a<=k)return b.copy(e);f=a*g-f*k;if(0>=f&&0<=g&&0>=k)return m=g/(g-k),b.copy(c).addScaledVector(pd,m);g=h*k-a*l;if(0>=g&&0<=l-h&&0<=a-k)return xi.subVectors(e,d),m=(l-h)/(l-h+(a-k)),b.copy(d).addScaledVector(xi,m);e=1/(g+f+m);d=f*e;m*=e;return b.copy(c).addScaledVector(od,d).addScaledVector(pd,m)},equals:function(a){return a.a.equals(this.a)&&a.b.equals(this.b)&&a.c.equals(this.c)}});var yi={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244, -black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347, -darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365, -lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683, -mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910, -purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074}, -Ga={h:0,s:0,l:0},Jf={h:0,s:0,l:0};Object.assign(A.prototype,{isColor:!0,r:1,g:1,b:1,set:function(a){a&&a.isColor?this.copy(a):"number"===typeof a?this.setHex(a):"string"===typeof a&&this.setStyle(a);return this},setScalar:function(a){this.b=this.g=this.r=a;return this},setHex:function(a){a=Math.floor(a);this.r=(a>>16&255)/255;this.g=(a>>8&255)/255;this.b=(a&255)/255;return this},setRGB:function(a,b,c){this.r=a;this.g=b;this.b=c;return this},setHSL:function(a,b,c){a=R.euclideanModulo(a,1);b=R.clamp(b, -0,1);c=R.clamp(c,0,1);0===b?this.r=this.g=this.b=c:(b=.5>=c?c*(1+b):c+b-c*b,c=2*c-b,this.r=cg(c,b,a+1/3),this.g=cg(c,b,a),this.b=cg(c,b,a-1/3));return this},setStyle:function(a){function b(b){void 0!==b&&1>parseFloat(b)&&console.warn("THREE.Color: Alpha component of "+a+" will be ignored.")}var c;if(c=/^((?:rgb|hsl)a?)\(\s*([^\)]*)\)/.exec(a)){var d=c[2];switch(c[1]){case "rgb":case "rgba":if(c=/^(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(d))return this.r=Math.min(255,parseInt(c[1], -10))/255,this.g=Math.min(255,parseInt(c[2],10))/255,this.b=Math.min(255,parseInt(c[3],10))/255,b(c[5]),this;if(c=/^(\d+)%\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(d))return this.r=Math.min(100,parseInt(c[1],10))/100,this.g=Math.min(100,parseInt(c[2],10))/100,this.b=Math.min(100,parseInt(c[3],10))/100,b(c[5]),this;break;case "hsl":case "hsla":if(c=/^([0-9]*\.?[0-9]+)\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(d)){d=parseFloat(c[1])/360;var e=parseInt(c[2], -10)/100,f=parseInt(c[3],10)/100;b(c[5]);return this.setHSL(d,e,f)}}}else if(c=/^#([A-Fa-f0-9]+)$/.exec(a)){c=c[1];d=c.length;if(3===d)return this.r=parseInt(c.charAt(0)+c.charAt(0),16)/255,this.g=parseInt(c.charAt(1)+c.charAt(1),16)/255,this.b=parseInt(c.charAt(2)+c.charAt(2),16)/255,this;if(6===d)return this.r=parseInt(c.charAt(0)+c.charAt(1),16)/255,this.g=parseInt(c.charAt(2)+c.charAt(3),16)/255,this.b=parseInt(c.charAt(4)+c.charAt(5),16)/255,this}return a&&0=h?l/(e+f):l/(2-e-f);switch(e){case b:g=(c-d)/l+(cthis.opacity&&(d.opacity=this.opacity);!0===this.transparent&&(d.transparent=this.transparent);d.depthFunc=this.depthFunc;d.depthTest=this.depthTest;d.depthWrite=this.depthWrite;d.stencilWrite=this.stencilWrite;d.stencilWriteMask=this.stencilWriteMask;d.stencilFunc=this.stencilFunc;d.stencilRef=this.stencilRef; -d.stencilFuncMask=this.stencilFuncMask;d.stencilFail=this.stencilFail;d.stencilZFail=this.stencilZFail;d.stencilZPass=this.stencilZPass;this.rotation&&0!==this.rotation&&(d.rotation=this.rotation);!0===this.polygonOffset&&(d.polygonOffset=!0);0!==this.polygonOffsetFactor&&(d.polygonOffsetFactor=this.polygonOffsetFactor);0!==this.polygonOffsetUnits&&(d.polygonOffsetUnits=this.polygonOffsetUnits);this.linewidth&&1!==this.linewidth&&(d.linewidth=this.linewidth);void 0!==this.dashSize&&(d.dashSize=this.dashSize); -void 0!==this.gapSize&&(d.gapSize=this.gapSize);void 0!==this.scale&&(d.scale=this.scale);!0===this.dithering&&(d.dithering=!0);0 -g;g++)if(d[g]===d[(g+1)%3]){a.push(f);break}for(f=a.length-1;0<=f;f--)for(d=a[f],this.faces.splice(d,1),c=0,e=this.faceVertexUvs.length;c\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 fa(new Fd(5, +this.name&&(f.name=this.name);!0===this.castShadow&&(f.castShadow=!0);!0===this.receiveShadow&&(f.receiveShadow=!0);!1===this.visible&&(f.visible=!1);!1===this.frustumCulled&&(f.frustumCulled=!1);0!==this.renderOrder&&(f.renderOrder=this.renderOrder);"{}"!==JSON.stringify(this.userData)&&(f.userData=this.userData);f.layers=this.layers.mask;f.matrix=this.matrix.toArray();!1===this.matrixAutoUpdate&&(f.matrixAutoUpdate=!1);this.isInstancedMesh&&(f.type="InstancedMesh",f.count=this.count,f.instanceMatrix= +this.instanceMatrix.toJSON());if(this.isMesh||this.isLine||this.isPoints){f.geometry=b(a.geometries,this.geometry);var g=this.geometry.parameters;if(void 0!==g&&void 0!==g.shapes)if(g=g.shapes,Array.isArray(g))for(var h=0,l=g.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,ze);return ze.distanceToSquared(a.center)<=a.radius*a.radius},intersectsPlane:function(a){if(0=-a.constant},intersectsTriangle:function(a){if(this.isEmpty())return!1;this.getCenter(Ae);Ff.subVectors(this.max,Ae);ld.subVectors(a.a,Ae);md.subVectors(a.b,Ae);nd.subVectors(a.c,Ae);Kb.subVectors(md,ld);Lb.subVectors(nd,md);nc.subVectors(ld,nd);a=[0,-Kb.z,Kb.y,0,-Lb.z,Lb.y,0,-nc.z, +nc.y,Kb.z,0,-Kb.x,Lb.z,0,-Lb.x,nc.z,0,-nc.x,-Kb.y,Kb.x,0,-Lb.y,Lb.x,0,-nc.y,nc.x,0];if(!bg(a,ld,md,nd,Ff))return!1;a=[1,0,0,0,1,0,0,0,1];if(!bg(a,ld,md,nd,Ff))return!1;Gf.crossVectors(Kb,Lb);a=[Gf.x,Gf.y,Gf.z];return bg(a,ld,md,nd,Ff)},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 ze.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(ze).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;ub[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(a);ub[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(a); +ub[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(a);ub[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(a);ub[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(a);ub[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(a);ub[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(a);ub[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(a);this.setFromPoints(ub);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 Gk=new Qa;Object.assign(lb.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):Gk.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 Qa);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 vb=new n,Wg=new n,Hf=new n,Mb=new n,Xg=new n,If=new n,Yg=new n;Object.assign(Qb.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,vb));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=vb.subVectors(a,this.origin).dot(this.direction);if(0>b)return this.origin.distanceToSquared(a);vb.copy(this.direction).multiplyScalar(b).add(this.origin);return vb.distanceToSquared(a)},distanceSqToSegment:function(a,b,c,d){Wg.copy(a).add(b).multiplyScalar(.5);Hf.copy(b).sub(a).normalize();Mb.copy(this.origin).sub(Wg);var e=.5*a.distanceTo(b),f=-this.direction.dot(Hf),g=Mb.dot(this.direction),h=-Mb.dot(Hf),l=Mb.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,vb)},intersectTriangle:function(a,b,c,d,e){Xg.subVectors(b,a);If.subVectors(c,a);Yg.crossVectors(Xg,If);b=this.direction.dot(Yg);if(0b)d=-1,b=-b;else return null; +Mb.subVectors(this.origin,a);a=d*this.direction.dot(If.crossVectors(Mb,If));if(0>a)return null;c=d*this.direction.dot(Xg.cross(Mb));if(0>c||a+c>b)return null;a=-d*Mb.dot(Yg);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 Zg=new n,Hk=new n,Ik=new da;Object.assign(Ra.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=Zg.subVectors(c,b).cross(Hk.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(Zg),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&&0=xb.x+xb.y},getUV:function(a,b,c,d,e,f,g,h){this.getBarycoord(a,b,c,d,xb);h.set(0,0);h.addScaledVector(e,xb.x);h.addScaledVector(f,xb.y);h.addScaledVector(g,xb.z);return h},isFrontFacing:function(a, +b,c,d){Za.subVectors(c,b);wb.subVectors(a,b);return 0>Za.cross(wb).dot(d)?!0:!1}});Object.assign(oa.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(){Za.subVectors(this.c,this.b);wb.subVectors(this.a, +this.b);return.5*Za.cross(wb).length()},getMidpoint:function(a){void 0===a&&(console.warn("THREE.Triangle: .getMidpoint() target is now required"),a=new n);return a.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)},getNormal:function(a){return oa.getNormal(this.a,this.b,this.c,a)},getPlane:function(a){void 0===a&&(console.warn("THREE.Triangle: .getPlane() target is now required"),a=new Ra);return a.setFromCoplanarPoints(this.a,this.b,this.c)},getBarycoord:function(a,b){return oa.getBarycoord(a, +this.a,this.b,this.c,b)},getUV:function(a,b,c,d,e){return oa.getUV(a,this.a,this.b,this.c,b,c,d,e)},containsPoint:function(a){return oa.containsPoint(a,this.a,this.b,this.c)},isFrontFacing:function(a){return oa.isFrontFacing(this.a,this.b,this.c,a)},intersectsBox:function(a){return a.intersectsTriangle(this)},closestPointToPoint:function(a,b){void 0===b&&(console.warn("THREE.Triangle: .closestPointToPoint() target is now required"),b=new n);var c=this.a,d=this.b,e=this.c;od.subVectors(d,c);pd.subVectors(e, +c);ah.subVectors(a,c);var f=od.dot(ah),g=pd.dot(ah);if(0>=f&&0>=g)return b.copy(c);bh.subVectors(a,d);var h=od.dot(bh),l=pd.dot(bh);if(0<=h&&l<=h)return b.copy(d);var m=f*l-h*g;if(0>=m&&0<=f&&0>=h)return d=f/(f-h),b.copy(c).addScaledVector(od,d);ch.subVectors(a,e);a=od.dot(ch);var k=pd.dot(ch);if(0<=k&&a<=k)return b.copy(e);f=a*g-f*k;if(0>=f&&0<=g&&0>=k)return m=g/(g-k),b.copy(c).addScaledVector(pd,m);g=h*k-a*l;if(0>=g&&0<=l-h&&0<=a-k)return xi.subVectors(e,d),m=(l-h)/(l-h+(a-k)),b.copy(d).addScaledVector(xi, +m);e=1/(g+f+m);d=f*e;m*=e;return b.copy(c).addScaledVector(od,d).addScaledVector(pd,m)},equals:function(a){return a.a.equals(this.a)&&a.b.equals(this.b)&&a.c.equals(this.c)}});var yi={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388, +crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146, +floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323, +lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273, +moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638, +sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},Ga={h:0,s:0,l:0},Jf={h:0,s:0,l:0};Object.assign(A.prototype,{isColor:!0,r:1,g:1,b:1,set:function(a){a&&a.isColor?this.copy(a):"number"===typeof a?this.setHex(a):"string"=== +typeof a&&this.setStyle(a);return this},setScalar:function(a){this.b=this.g=this.r=a;return this},setHex:function(a){a=Math.floor(a);this.r=(a>>16&255)/255;this.g=(a>>8&255)/255;this.b=(a&255)/255;return this},setRGB:function(a,b,c){this.r=a;this.g=b;this.b=c;return this},setHSL:function(a,b,c){a=R.euclideanModulo(a,1);b=R.clamp(b,0,1);c=R.clamp(c,0,1);0===b?this.r=this.g=this.b=c:(b=.5>=c?c*(1+b):c+b-c*b,c=2*c-b,this.r=cg(c,b,a+1/3),this.g=cg(c,b,a),this.b=cg(c,b,a-1/3));return this},setStyle:function(a){function b(b){void 0!== +b&&1>parseFloat(b)&&console.warn("THREE.Color: Alpha component of "+a+" will be ignored.")}var c;if(c=/^((?:rgb|hsl)a?)\(\s*([^\)]*)\)/.exec(a)){var d=c[2];switch(c[1]){case "rgb":case "rgba":if(c=/^(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(d))return this.r=Math.min(255,parseInt(c[1],10))/255,this.g=Math.min(255,parseInt(c[2],10))/255,this.b=Math.min(255,parseInt(c[3],10))/255,b(c[5]),this;if(c=/^(\d+)%\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(d))return this.r= +Math.min(100,parseInt(c[1],10))/100,this.g=Math.min(100,parseInt(c[2],10))/100,this.b=Math.min(100,parseInt(c[3],10))/100,b(c[5]),this;break;case "hsl":case "hsla":if(c=/^([0-9]*\.?[0-9]+)\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(d)){d=parseFloat(c[1])/360;var e=parseInt(c[2],10)/100,f=parseInt(c[3],10)/100;b(c[5]);return this.setHSL(d,e,f)}}}else if(c=/^#([A-Fa-f0-9]+)$/.exec(a)){c=c[1];d=c.length;if(3===d)return this.r=parseInt(c.charAt(0)+c.charAt(0),16)/255,this.g=parseInt(c.charAt(1)+ +c.charAt(1),16)/255,this.b=parseInt(c.charAt(2)+c.charAt(2),16)/255,this;if(6===d)return this.r=parseInt(c.charAt(0)+c.charAt(1),16)/255,this.g=parseInt(c.charAt(2)+c.charAt(3),16)/255,this.b=parseInt(c.charAt(4)+c.charAt(5),16)/255,this}return a&&0=h?l/(e+f):l/(2-e-f);switch(e){case b:g=(c-d)/l+(cthis.opacity&&(d.opacity=this.opacity);!0===this.transparent&&(d.transparent=this.transparent);d.depthFunc=this.depthFunc;d.depthTest=this.depthTest;d.depthWrite=this.depthWrite;d.stencilWrite=this.stencilWrite;d.stencilWriteMask=this.stencilWriteMask;d.stencilFunc=this.stencilFunc;d.stencilRef=this.stencilRef;d.stencilFuncMask=this.stencilFuncMask;d.stencilFail=this.stencilFail;d.stencilZFail=this.stencilZFail;d.stencilZPass=this.stencilZPass;this.rotation&&0!==this.rotation&& +(d.rotation=this.rotation);!0===this.polygonOffset&&(d.polygonOffset=!0);0!==this.polygonOffsetFactor&&(d.polygonOffsetFactor=this.polygonOffsetFactor);0!==this.polygonOffsetUnits&&(d.polygonOffsetUnits=this.polygonOffsetUnits);this.linewidth&&1!==this.linewidth&&(d.linewidth=this.linewidth);void 0!==this.dashSize&&(d.dashSize=this.dashSize);void 0!==this.gapSize&&(d.gapSize=this.gapSize);void 0!==this.scale&&(d.scale=this.scale);!0===this.dithering&&(d.dithering=!0);0g;g++)if(d[g]===d[(g+1)%3]){a.push(f);break}for(f=a.length-1;0<=f;f--)for(d=a[f],this.faces.splice(d,1),c=0,e=this.faceVertexUvs.length;c\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 V(new Fd(5, 5,5),d);c.add(b);d=new yc(1,10,1);d.renderTarget=this;d.renderTarget.texture.name="CubeCameraTexture";d.update(a,c);b.geometry.dispose();b.material.dispose();return this};Xb.prototype=Object.create(T.prototype);Xb.prototype.constructor=Xb;Xb.prototype.isDataTexture=!0;var rd=new lb,Lf=new n;Object.assign(Dd.prototype,{set:function(a,b,c,d,e,f){var g=this.planes;g[0].copy(a);g[1].copy(b);g[2].copy(c);g[3].copy(d);g[4].copy(e);g[5].copy(f);return this},clone:function(){return(new this.constructor).copy(this)}, copy:function(a){for(var b=this.planes,c=0;6>c;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],q=c[10],u=c[11],r=c[12],v=c[13],B=c[14];c=c[15];b[0].setComponents(f-a,k-g,u-p,c-r).normalize();b[1].setComponents(f+a,k+g,u+p,c+r).normalize();b[2].setComponents(f+d,k+h,u+n,c+v).normalize();b[3].setComponents(f-d,k-h,u-n,c-v).normalize();b[4].setComponents(f-e,k-l,u-q,c-B).normalize(); b[5].setComponents(f+e,k+l,u+q,c+B).normalize();return this},intersectsObject:function(a){var b=a.geometry;null===b.boundingSphere&&b.computeBoundingSphere();rd.copy(b.boundingSphere).applyMatrix4(a.matrixWorld);return this.intersectsSphere(rd)},intersectsSprite:function(a){rd.center.set(0,0,0);rd.radius=.7071067811865476;rd.applyMatrix4(a.matrixWorld);return this.intersectsSphere(rd)},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)< @@ -663,22 +662,22 @@ points_vert:"uniform float size;\nuniform float scale;\n#include \n#incl shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include \n}",shadow_vert:"#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}", sprite_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n}", sprite_vert:"uniform float rotation;\nuniform vec2 center;\n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n\tvec2 scale;\n\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\t#endif\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include \n\t#include \n\t#include \n}"}, -G={common:{diffuse:{value:new A(15658734)},opacity:{value:1},map:{value:null},uvTransform:{value:new V},alphaMap:{value:null}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},refractionRatio:{value:.98},maxMipLevel:{value:0}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null}, +G={common:{diffuse:{value:new A(15658734)},opacity:{value:1},map:{value:null},uvTransform:{value:new da},alphaMap:{value:null}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},refractionRatio:{value:.98},maxMipLevel:{value:0}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null}, normalScale:{value:new y(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 A(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 A(15658734)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},uvTransform:{value:new V}},sprite:{diffuse:{value:new A(15658734)},opacity:{value:1},center:{value:new y(.5,.5)},rotation:{value:0},map:{value:null},alphaMap:{value:null}, -uvTransform:{value:new V}}},bb={basic:{uniforms:pa([G.common,G.specularmap,G.envmap,G.aomap,G.lightmap,G.fog]),vertexShader:O.meshbasic_vert,fragmentShader:O.meshbasic_frag},lambert:{uniforms:pa([G.common,G.specularmap,G.envmap,G.aomap,G.lightmap,G.emissivemap,G.fog,G.lights,{emissive:{value:new A(0)}}]),vertexShader:O.meshlambert_vert,fragmentShader:O.meshlambert_frag},phong:{uniforms:pa([G.common,G.specularmap,G.envmap,G.aomap,G.lightmap,G.emissivemap,G.bumpmap,G.normalmap,G.displacementmap,G.fog, +pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}}},points:{diffuse:{value:new A(15658734)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},uvTransform:{value:new da}},sprite:{diffuse:{value:new A(15658734)},opacity:{value:1},center:{value:new y(.5,.5)},rotation:{value:0},map:{value:null},alphaMap:{value:null}, +uvTransform:{value:new da}}},bb={basic:{uniforms:pa([G.common,G.specularmap,G.envmap,G.aomap,G.lightmap,G.fog]),vertexShader:O.meshbasic_vert,fragmentShader:O.meshbasic_frag},lambert:{uniforms:pa([G.common,G.specularmap,G.envmap,G.aomap,G.lightmap,G.emissivemap,G.fog,G.lights,{emissive:{value:new A(0)}}]),vertexShader:O.meshlambert_vert,fragmentShader:O.meshlambert_frag},phong:{uniforms:pa([G.common,G.specularmap,G.envmap,G.aomap,G.lightmap,G.emissivemap,G.bumpmap,G.normalmap,G.displacementmap,G.fog, G.lights,{emissive:{value:new A(0)},specular:{value:new A(1118481)},shininess:{value:30}}]),vertexShader:O.meshphong_vert,fragmentShader:O.meshphong_frag},standard:{uniforms:pa([G.common,G.envmap,G.aomap,G.lightmap,G.emissivemap,G.bumpmap,G.normalmap,G.displacementmap,G.roughnessmap,G.metalnessmap,G.fog,G.lights,{emissive:{value:new A(0)},roughness:{value:.5},metalness:{value:.5},envMapIntensity:{value:1}}]),vertexShader:O.meshphysical_vert,fragmentShader:O.meshphysical_frag},toon:{uniforms:pa([G.common, G.specularmap,G.aomap,G.lightmap,G.emissivemap,G.bumpmap,G.normalmap,G.displacementmap,G.gradientmap,G.fog,G.lights,{emissive:{value:new A(0)},specular:{value:new A(1118481)},shininess:{value:30}}]),vertexShader:O.meshtoon_vert,fragmentShader:O.meshtoon_frag},matcap:{uniforms:pa([G.common,G.bumpmap,G.normalmap,G.displacementmap,G.fog,{matcap:{value:null}}]),vertexShader:O.meshmatcap_vert,fragmentShader:O.meshmatcap_frag},points:{uniforms:pa([G.points,G.fog]),vertexShader:O.points_vert,fragmentShader:O.points_frag}, dashed:{uniforms:pa([G.common,G.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:O.linedashed_vert,fragmentShader:O.linedashed_frag},depth:{uniforms:pa([G.common,G.displacementmap]),vertexShader:O.depth_vert,fragmentShader:O.depth_frag},normal:{uniforms:pa([G.common,G.bumpmap,G.normalmap,G.displacementmap,{opacity:{value:1}}]),vertexShader:O.normal_vert,fragmentShader:O.normal_frag},sprite:{uniforms:pa([G.sprite,G.fog]),vertexShader:O.sprite_vert,fragmentShader:O.sprite_frag}, -background:{uniforms:{uvTransform:{value:new V},t2D:{value:null}},vertexShader:O.background_vert,fragmentShader:O.background_frag},cube:{uniforms:pa([G.envmap,{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:pa([G.common,G.displacementmap,{referencePosition:{value:new n},nearDistance:{value:1},farDistance:{value:1E3}}]),vertexShader:O.distanceRGBA_vert, +background:{uniforms:{uvTransform:{value:new da},t2D:{value:null}},vertexShader:O.background_vert,fragmentShader:O.background_frag},cube:{uniforms:pa([G.envmap,{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:pa([G.common,G.displacementmap,{referencePosition:{value:new n},nearDistance:{value:1},farDistance:{value:1E3}}]),vertexShader:O.distanceRGBA_vert, fragmentShader:O.distanceRGBA_frag},shadow:{uniforms:pa([G.lights,G.fog,{color:{value:new A(0)},opacity:{value:1}}]),vertexShader:O.shadow_vert,fragmentShader:O.shadow_frag}};bb.physical={uniforms:pa([bb.standard.uniforms,{transparency:{value:0},clearcoat:{value:0},clearcoatRoughness:{value:0},sheen:{value:new A(0)},clearcoatNormalScale:{value:new y(1,1)},clearcoatNormalMap:{value:null}}]),vertexShader:O.meshphysical_vert,fragmentShader:O.meshphysical_frag};Ed.prototype=Object.create(Q.prototype); Ed.prototype.constructor=Ed;Yb.prototype=Object.create(D.prototype);Yb.prototype.constructor=Yb;mb.prototype=Object.create(T.prototype);mb.prototype.constructor=mb;mb.prototype.isCubeTexture=!0;Object.defineProperty(mb.prototype,"images",{get:function(){return this.image},set:function(a){this.image=a}});zc.prototype=Object.create(T.prototype);zc.prototype.constructor=zc;zc.prototype.isDataTexture2DArray=!0;Ac.prototype=Object.create(T.prototype);Ac.prototype.constructor=Ac;Ac.prototype.isDataTexture3D= !0;var zh=new T,yj=new zc,Aj=new Ac,Ah=new mb,th=[],vh=[],yh=new Float32Array(16),xh=new Float32Array(9),wh=new Float32Array(4);Bh.prototype.updateCache=function(a){var b=this.cache;a instanceof Float32Array&&b.length!==a.length&&(this.cache=new Float32Array(a.length));Ia(b,a)};Ch.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 jg=/([\w\d_]+)(\])?(\[|\.)?/g;Ab.prototype.setValue=function(a,b,c,d){b=this.map[b];void 0!==b&&b.setValue(a, c,d)};Ab.prototype.setOptional=function(a,b,c){b=b[c];void 0!==b&&this.setValue(a,c,b)};Ab.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)}};Ab.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 fk=0,lg=/^[ \t]*#include +<([\w\d./]+)>/gm,Kh=/#pragma unroll_loop[\s]+?for \( int i = (\d+); i < (\d+); i \+\+ \) \{([\s\S]+?)(?=\})\}/g,ok=0;Bb.prototype=Object.create(N.prototype); Bb.prototype.constructor=Bb;Bb.prototype.isMeshDepthMaterial=!0;Bb.prototype.copy=function(a){N.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};Cb.prototype=Object.create(N.prototype); Cb.prototype.constructor=Cb;Cb.prototype.isMeshDistanceMaterial=!0;Cb.prototype.copy=function(a){N.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};og.prototype=Object.assign(Object.create(ja.prototype), -{constructor:og,isWebGLMultiviewRenderTarget:!0,copy:function(a){ja.prototype.copy.call(this,a);this.numViews=a.numViews;return this},setNumViews:function(a){this.numViews!==a&&(this.numViews=a,this.dispose());return this}});Ec.prototype=Object.assign(Object.create(E.prototype),{constructor:Ec,isGroup:!0});Jd.prototype=Object.assign(Object.create(da.prototype),{constructor:Jd,isArrayCamera:!0});var Rh=new n,Sh=new n;Object.assign(pg.prototype,na.prototype);Object.assign(Th.prototype,na.prototype); +{constructor:og,isWebGLMultiviewRenderTarget:!0,copy:function(a){ja.prototype.copy.call(this,a);this.numViews=a.numViews;return this},setNumViews:function(a){this.numViews!==a&&(this.numViews=a,this.dispose());return this}});Ec.prototype=Object.assign(Object.create(E.prototype),{constructor:Ec,isGroup:!0});Jd.prototype=Object.assign(Object.create(ea.prototype),{constructor:Jd,isArrayCamera:!0});var Rh=new n,Sh=new n;Object.assign(pg.prototype,na.prototype);Object.assign(Th.prototype,na.prototype); Object.assign(Te.prototype,{isFogExp2:!0,clone:function(){return new Te(this.color,this.density)},toJSON:function(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}}});Object.assign(Ue.prototype,{isFog:!0,clone:function(){return new Ue(this.color,this.near,this.far)},toJSON:function(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}}});Object.defineProperty(nb.prototype,"needsUpdate",{set:function(a){!0===a&&this.version++}});Object.assign(nb.prototype, {isInterleavedBuffer:!0,onUploadCallback:function(){},setUsage:function(a){this.usage=a;return this},copy:function(a){this.array=new a.array.constructor(a.array);this.count=a.count;this.stride=a.stride;this.usage=a.usage;return this},copyAt:function(a,b,c){a*=this.stride;c*=b.stride;for(var d=0,e=this.stride;da.far||b.push({distance:e,point:Ce.clone(),uv:oa.getUV(Ce,Mf,De,Nf,Ai,hh,Bi,new y),face:null,object:this})},clone:function(){return(new this.constructor(this.material)).copy(this)},copy:function(a){E.prototype.copy.call(this,a);void 0!==a.center&&this.center.copy(a.center);return this}});var Of=new n,Ci=new n;Nd.prototype=Object.assign(Object.create(E.prototype),{constructor:Nd,isLOD:!0,copy:function(a){E.prototype.copy.call(this, a,!1);for(var b=a.levels,c=0,d=b.length;c=b[c].distance)b[c-1].object.visible=!1,b[c].object.visible=!0;else break;for(;cNumber.EPSILON){if(0>l&&(g=b[f],k=-k,h=b[e],l=-l),!(a.yh.y))if(a.y===g.y){if(a.x===g.x)return!0}else{e=l*(a.x-g.x)-k*(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=ob.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 Hb;h.curves=g.curves;b.push(h);return b}var l=!e(f[0].getPoints());l=a?!l:l;h=[];var k=[],n=[],t=0;k[t]=void 0;n[t]=[];for(var q=0,u=f.length;q