Browse Source

Updated builds.

Mr.doob 5 years ago
parent
commit
49b9a6cc1f
3 changed files with 247 additions and 215 deletions
  1. 20 4
      build/three.js
  2. 207 207
      build/three.min.js
  3. 20 4
      build/three.module.js

+ 20 - 4
build/three.js

@@ -24525,6 +24525,8 @@
 
 			currentRenderState.setupLights( camera );
 
+			var compiled = {};
+
 			scene.traverse( function ( object ) {
 
 				if ( object.material ) {
@@ -24533,13 +24535,19 @@
 
 						for ( var i = 0; i < object.material.length; i ++ ) {
 
-							initMaterial( object.material[ i ], scene, object );
+							if ( ! object.material[ i ].uuid in compiled ) {
+
+								initMaterial( object.material[ i ], scene, object );
+								compiled[ object.material[ i ].uuid ] = true;
+
+							}
 
 						}
 
-					} else {
+					} else if ( ! object.material.uuid in compiled ) {
 
 						initMaterial( object.material, scene, object );
+						compiled[ object.material.uuid ] = true;
 
 					}
 
@@ -27371,6 +27379,8 @@
 
 		this.count = count;
 
+		this.frustumCulled = false;
+
 	}
 
 	InstancedMesh.prototype = Object.assign( Object.create( Mesh.prototype ), {
@@ -34762,8 +34772,9 @@
 		// (0,0,0,0,1,1,1,0,0,0,0,0,0,0) --> (0,0,1,1,0,0)
 		optimize: function () {
 
-			var times = this.times,
-				values = this.values,
+			// times or values may be shared with other tracks, so overwriting is unsafe
+			var times = AnimationUtils.arraySlice( this.times ),
+				values = AnimationUtils.arraySlice( this.values ),
 				stride = this.getValueSize(),
 
 				smoothInterpolation = this.getInterpolation() === InterpolateSmooth,
@@ -34858,6 +34869,11 @@
 				this.times = AnimationUtils.arraySlice( times, 0, writeIndex );
 				this.values = AnimationUtils.arraySlice( values, 0, writeIndex * stride );
 
+			} else {
+
+				this.times = times;
+				this.values = values;
+
 			}
 
 			return this;

+ 207 - 207
build/three.min.js

@@ -1,13 +1,13 @@
 // threejs.org/license
 (function(h,Fa){"object"===typeof exports&&"undefined"!==typeof module?Fa(exports):"function"===typeof define&&define.amd?define(["exports"],Fa):(h=h||self,Fa(h.THREE={}))})(this,function(h){function Fa(){}function w(a,b){this.x=a||0;this.y=b||0}function za(){this.elements=[1,0,0,0,1,0,0,0,1];0<arguments.length&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")}function Z(a,b,c,d,e,f,g,k,l,m){Object.defineProperty(this,"id",{value:pj++});this.uuid=P.generateUUID();
 this.name="";this.image=void 0!==a?a:Z.DEFAULT_IMAGE;this.mipmaps=[];this.mapping=void 0!==b?b:Z.DEFAULT_MAPPING;this.wrapS=void 0!==c?c:1001;this.wrapT=void 0!==d?d:1001;this.magFilter=void 0!==e?e:1006;this.minFilter=void 0!==f?f:1008;this.anisotropy=void 0!==l?l:1;this.format=void 0!==g?g:1023;this.internalFormat=null;this.type=void 0!==k?k:1009;this.offset=new w(0,0);this.repeat=new w(1,1);this.center=new w(0,0);this.rotation=0;this.matrixAutoUpdate=!0;this.matrix=new za;this.generateMipmaps=
-!0;this.premultiplyAlpha=!1;this.flipY=!0;this.unpackAlignment=4;this.encoding=void 0!==m?m:3E3;this.version=0;this.onUpdate=null}function R(a,b,c,d){this.x=a||0;this.y=b||0;this.z=c||0;this.w=void 0!==d?d:1}function wa(a,b,c){this.width=a;this.height=b;this.scissor=new R(0,0,a,b);this.scissorTest=!1;this.viewport=new R(0,0,a,b);c=c||{};this.texture=new Z(void 0,c.mapping,c.wrapS,c.wrapT,c.magFilter,c.minFilter,c.format,c.type,c.anisotropy,c.encoding);this.texture.image={};this.texture.image.width=
+!0;this.premultiplyAlpha=!1;this.flipY=!0;this.unpackAlignment=4;this.encoding=void 0!==m?m:3E3;this.version=0;this.onUpdate=null}function ia(a,b,c,d){this.x=a||0;this.y=b||0;this.z=c||0;this.w=void 0!==d?d:1}function wa(a,b,c){this.width=a;this.height=b;this.scissor=new ia(0,0,a,b);this.scissorTest=!1;this.viewport=new ia(0,0,a,b);c=c||{};this.texture=new Z(void 0,c.mapping,c.wrapS,c.wrapT,c.magFilter,c.minFilter,c.format,c.type,c.anisotropy,c.encoding);this.texture.image={};this.texture.image.width=
 a;this.texture.image.height=b;this.texture.generateMipmaps=void 0!==c.generateMipmaps?c.generateMipmaps:!1;this.texture.minFilter=void 0!==c.minFilter?c.minFilter:1006;this.depthBuffer=void 0!==c.depthBuffer?c.depthBuffer:!0;this.stencilBuffer=void 0!==c.stencilBuffer?c.stencilBuffer:!0;this.depthTexture=void 0!==c.depthTexture?c.depthTexture:null}function $f(a,b,c){wa.call(this,a,b,c);this.samples=4}function Da(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 O(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];0<arguments.length&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}function Ub(a,b,c,d){this._x=a||0;this._y=b||0;this._z=c||0;this._order=d||Ub.DefaultOrder}function ag(){this.mask=1}function D(){Object.defineProperty(this,"id",{value:qj++});this.uuid=P.generateUUID();this.name="";this.type="Object3D";this.parent=null;this.children=[];this.up=D.DefaultUp.clone();
 var a=new n,b=new Ub,c=new Da,d=new n(1,1,1);b._onChange(function(){c.setFromEuler(b,!1)});c._onChange(function(){b.setFromQuaternion(c,void 0,!1)});Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:a},rotation:{configurable:!0,enumerable:!0,value:b},quaternion:{configurable:!0,enumerable:!0,value:c},scale:{configurable:!0,enumerable:!0,value:d},modelViewMatrix:{value:new O},normalMatrix:{value:new za}});this.matrix=new O;this.matrixWorld=new O;this.matrixAutoUpdate=D.DefaultMatrixAutoUpdate;
 this.matrixWorldNeedsUpdate=!1;this.layers=new ag;this.visible=!0;this.receiveShadow=this.castShadow=!1;this.frustumCulled=!0;this.renderOrder=0;this.userData={}}function pb(){D.call(this);this.type="Scene";this.overrideMaterial=this.fog=this.environment=this.background=null;this.autoUpdate=!0;"undefined"!==typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}function Ta(a,b){this.min=void 0!==a?a:new n(Infinity,Infinity,Infinity);this.max=void 0!==
 b?b:new n(-Infinity,-Infinity,-Infinity)}function bg(a,b,c,d,e){var f;var g=0;for(f=a.length-3;g<=f;g+=3){Vb.fromArray(a,g);var k=e.x*Math.abs(Vb.x)+e.y*Math.abs(Vb.y)+e.z*Math.abs(Vb.z),l=b.dot(Vb),m=c.dot(Vb),x=d.dot(Vb);if(Math.max(-Math.max(l,m,x),Math.min(l,m,x))>k)return!1}return!0}function qb(a,b){this.center=void 0!==a?a:new n;this.radius=void 0!==b?b:0}function Wb(a,b){this.origin=void 0!==a?a:new n;this.direction=void 0!==b?b:new n(0,0,-1)}function Ua(a,b){this.normal=void 0!==a?a:new n(1,
-0,0);this.constant=void 0!==b?b:0}function na(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 B(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);1<c&&--c;return c<1/6?a+6*(b-a)*c:.5>c?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 Bc(a,b,c,d,e,f){this.a=a;this.b=
+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 B(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);1<c&&--c;return c<1/6?a+6*(b-a)*c:.5>c?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 Bc(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 B;this.vertexColors=Array.isArray(e)?e:[];this.materialIndex=void 0!==f?f:0}function K(){Object.defineProperty(this,"id",{value:rj++});this.uuid=P.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=3;this.depthWrite=this.depthTest=!0;this.stencilWriteMask=255;this.stencilFunc=519;this.stencilRef=0;this.stencilFuncMask=255;this.stencilZPass=this.stencilZFail=this.stencilFail=7680;this.stencilWrite=!1;this.clippingPlanes=null;this.clipShadows=this.clipIntersection=!1;this.shadowSide=null;this.colorWrite=!0;this.precision=null;this.polygonOffset=!1;this.polygonOffsetUnits=this.polygonOffsetFactor=0;this.dithering=
 !1;this.alphaTest=0;this.premultipliedAlpha=!1;this.toneMapped=this.visible=!0;this.userData={};this.version=0}function Pa(a){K.call(this);this.type="MeshBasicMaterial";this.color=new B(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=
@@ -16,12 +16,12 @@ b,c){M.call(this,new Int16Array(a),b,c)}function Xb(a,b,c){M.call(this,new Uint1
 null;this.groupsNeedUpdate=this.uvsNeedUpdate=this.colorsNeedUpdate=this.normalsNeedUpdate=this.verticesNeedUpdate=!1}function yh(a){if(0===a.length)return-Infinity;for(var b=a[0],c=1,d=a.length;c<d;++c)a[c]>b&&(b=a[c]);return b}function A(){Object.defineProperty(this,"id",{value:sj+=2});this.uuid=P.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 ca(a,b){D.call(this);this.type="Mesh";this.geometry=void 0!==a?a:new A;this.material=void 0!==b?b:new Pa;this.updateMorphTargets()}function zh(a,b,c,d,e,f,g,k){if(null===(1===b.side?d.intersectTriangle(g,f,e,!0,k):d.intersectTriangle(e,f,g,2!==b.side,k)))return null;Ke.copy(k);Ke.applyMatrix4(a.matrixWorld);b=c.ray.origin.distanceTo(Ke);return b<c.near||b>c.far?null:{distance:b,point:Ke.clone(),object:a}}function Le(a,b,c,d,e,f,g,k,
 l,m,x,p){Zb.fromBufferAttribute(e,m);$b.fromBufferAttribute(e,x);ac.fromBufferAttribute(e,p);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,t=f.length;q<t;q++){var r=e[q],h=f[q];0!==r&&(fg.fromBufferAttribute(h,m),gg.fromBufferAttribute(h,x),hg.fromBufferAttribute(h,p),g?(Me.addScaledVector(fg,r),Ne.addScaledVector(gg,r),Oe.addScaledVector(hg,r)):(Me.addScaledVector(fg.sub(Zb),r),Ne.addScaledVector(gg.sub($b),r),Oe.addScaledVector(hg.sub(ac),
-r)))}Zb.add(Me);$b.add(Ne);ac.add(Oe)}if(a=zh(a,b,c,d,Zb,$b,ac,Id))k&&(Cc.fromBufferAttribute(k,m),Dc.fromBufferAttribute(k,x),Ec.fromBufferAttribute(k,p),a.uv=na.getUV(Id,Zb,$b,ac,Cc,Dc,Ec,new w)),l&&(Cc.fromBufferAttribute(l,m),Dc.fromBufferAttribute(l,x),Ec.fromBufferAttribute(l,p),a.uv2=na.getUV(Id,Zb,$b,ac,Cc,Dc,Ec,new w)),k=new Bc(m,x,p),na.getNormal(Zb,$b,ac,k.normal),a.face=k;return a}function L(){Object.defineProperty(this,"id",{value:tj+=2});this.uuid=P.generateUUID();this.name="";this.type=
+r)))}Zb.add(Me);$b.add(Ne);ac.add(Oe)}if(a=zh(a,b,c,d,Zb,$b,ac,Id))k&&(Cc.fromBufferAttribute(k,m),Dc.fromBufferAttribute(k,x),Ec.fromBufferAttribute(k,p),a.uv=oa.getUV(Id,Zb,$b,ac,Cc,Dc,Ec,new w)),l&&(Cc.fromBufferAttribute(l,m),Dc.fromBufferAttribute(l,x),Ec.fromBufferAttribute(l,p),a.uv2=oa.getUV(Id,Zb,$b,ac,Cc,Dc,Ec,new w)),k=new Bc(m,x,p),oa.getNormal(Zb,$b,ac,k.normal),a.face=k;return a}function L(){Object.defineProperty(this,"id",{value:tj+=2});this.uuid=P.generateUUID();this.name="";this.type=
 "Geometry";this.vertices=[];this.colors=[];this.faces=[];this.faceVertexUvs=[[]];this.morphTargets=[];this.morphNormals=[];this.skinWeights=[];this.skinIndices=[];this.lineDistances=[];this.boundingSphere=this.boundingBox=null;this.groupsNeedUpdate=this.lineDistancesNeedUpdate=this.colorsNeedUpdate=this.normalsNeedUpdate=this.uvsNeedUpdate=this.verticesNeedUpdate=this.elementsNeedUpdate=!1}function Fc(a){var b={},c;for(c in a){b[c]={};for(var d in a[c]){var e=a[c][d];e&&(e.isColor||e.isMatrix3||e.isMatrix4||
-e.isVector2||e.isVector3||e.isVector4||e.isTexture)?b[c][d]=e.clone():Array.isArray(e)?b[c][d]=e.slice():b[c][d]=e}}return b}function oa(a){for(var b={},c=0;c<a.length;c++){var d=Fc(a[c]),e;for(e in d)b[e]=d[e]}return b}function pa(a){K.call(this);this.type="ShaderMaterial";this.defines={};this.uniforms={};this.vertexShader="void main() {\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}";this.fragmentShader="void main() {\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}";
+e.isVector2||e.isVector3||e.isVector4||e.isTexture)?b[c][d]=e.clone():Array.isArray(e)?b[c][d]=e.slice():b[c][d]=e}}return b}function pa(a){for(var b={},c=0;c<a.length;c++){var d=Fc(a[c]),e;for(e in d)b[e]=d[e]}return b}function qa(a){K.call(this);this.type="ShaderMaterial";this.defines={};this.uniforms={};this.vertexShader="void main() {\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}";this.fragmentShader="void main() {\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}";
 this.linewidth=1;this.wireframe=!1;this.wireframeLinewidth=1;this.morphNormals=this.morphTargets=this.skinning=this.clipping=this.lights=this.fog=!1;this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1};this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv2:[0,0]};this.index0AttributeName=void 0;this.uniformsNeedUpdate=!1;void 0!==a&&(void 0!==a.attributes&&console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."),this.setValues(a))}
-function eb(){D.call(this);this.type="Camera";this.matrixWorldInverse=new O;this.projectionMatrix=new O;this.projectionMatrixInverse=new O}function qa(a,b,c,d){eb.call(this);this.type="PerspectiveCamera";this.fov=void 0!==a?a:50;this.zoom=1;this.near=void 0!==c?c:.1;this.far=void 0!==d?d:2E3;this.focus=10;this.aspect=void 0!==b?b:1;this.view=null;this.filmGauge=35;this.filmOffset=0;this.updateProjectionMatrix()}function Gc(a,b,c,d){D.call(this);this.type="CubeCamera";var e=new qa(90,1,a,b);e.up.set(0,
--1,0);e.lookAt(new n(1,0,0));this.add(e);var f=new qa(90,1,a,b);f.up.set(0,-1,0);f.lookAt(new n(-1,0,0));this.add(f);var g=new qa(90,1,a,b);g.up.set(0,0,1);g.lookAt(new n(0,1,0));this.add(g);var k=new qa(90,1,a,b);k.up.set(0,0,-1);k.lookAt(new n(0,-1,0));this.add(k);var l=new qa(90,1,a,b);l.up.set(0,-1,0);l.lookAt(new n(0,0,1));this.add(l);var m=new qa(90,1,a,b);m.up.set(0,-1,0);m.lookAt(new n(0,0,-1));this.add(m);d=d||{format:1022,magFilter:1006,minFilter:1006};this.renderTarget=new Eb(c,d);this.renderTarget.texture.name=
+function eb(){D.call(this);this.type="Camera";this.matrixWorldInverse=new O;this.projectionMatrix=new O;this.projectionMatrixInverse=new O}function da(a,b,c,d){eb.call(this);this.type="PerspectiveCamera";this.fov=void 0!==a?a:50;this.zoom=1;this.near=void 0!==c?c:.1;this.far=void 0!==d?d:2E3;this.focus=10;this.aspect=void 0!==b?b:1;this.view=null;this.filmGauge=35;this.filmOffset=0;this.updateProjectionMatrix()}function Gc(a,b,c,d){D.call(this);this.type="CubeCamera";var e=new da(90,1,a,b);e.up.set(0,
+-1,0);e.lookAt(new n(1,0,0));this.add(e);var f=new da(90,1,a,b);f.up.set(0,-1,0);f.lookAt(new n(-1,0,0));this.add(f);var g=new da(90,1,a,b);g.up.set(0,0,1);g.lookAt(new n(0,1,0));this.add(g);var k=new da(90,1,a,b);k.up.set(0,0,-1);k.lookAt(new n(0,-1,0));this.add(k);var l=new da(90,1,a,b);l.up.set(0,-1,0);l.lookAt(new n(0,0,1));this.add(l);var m=new da(90,1,a,b);m.up.set(0,-1,0);m.lookAt(new n(0,0,-1));this.add(m);d=d||{format:1022,magFilter:1006,minFilter:1006};this.renderTarget=new Eb(c,d);this.renderTarget.texture.name=
 "CubeCamera";this.update=function(a,b){null===this.parent&&this.updateMatrixWorld();var c=a.getRenderTarget(),d=this.renderTarget,p=d.texture.generateMipmaps;d.texture.generateMipmaps=!1;a.setRenderTarget(d,0);a.render(b,e);a.setRenderTarget(d,1);a.render(b,f);a.setRenderTarget(d,2);a.render(b,g);a.setRenderTarget(d,3);a.render(b,k);a.setRenderTarget(d,4);a.render(b,l);d.texture.generateMipmaps=p;a.setRenderTarget(d,5);a.render(b,m);a.setRenderTarget(c)};this.clear=function(a,b,c,d){for(var e=a.getRenderTarget(),
 f=this.renderTarget,g=0;6>g;g++)a.setRenderTarget(f,g),a.clear(b,c,d);a.setRenderTarget(e)}}function Eb(a,b,c){Number.isInteger(b)&&(console.warn("THREE.WebGLCubeRenderTarget: constructor signature is now WebGLCubeRenderTarget( size, options )"),b=c);wa.call(this,a,a,b)}function bc(a,b,c,d,e,f,g,k,l,m,x,p){Z.call(this,null,f,g,k,l,m,d,e,x,p);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 Hc(a,b,c,d,e,f){this.planes=[void 0!==a?a:new Ua,void 0!==b?b:new Ua,void 0!==c?c:new Ua,void 0!==d?d:new Ua,void 0!==e?e:new Ua,void 0!==f?f:new Ua]}function Ah(){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 uj(a,b){function c(b,c){var d=b.array,e=b.usage,f=a.createBuffer();
@@ -30,8 +30,8 @@ return{get:function(a){a.isInterleavedBufferAttribute&&(a=a.data);return e.get(a
 a.bufferSubData(g,m.offset*l.BYTES_PER_ELEMENT,l.subarray(m.offset,m.offset+m.count)),m.count=-1);f.version=b.version}}}}function Jd(a,b,c,d){L.call(this);this.type="PlaneGeometry";this.parameters={width:a,height:b,widthSegments:c,heightSegments:d};this.fromBufferGeometry(new cc(a,b,c,d));this.mergeVertices()}function cc(a,b,c,d){A.call(this);this.type="PlaneBufferGeometry";this.parameters={width:a,height:b,widthSegments:c,heightSegments:d};a=a||1;b=b||1;var e=a/2,f=b/2;c=Math.floor(c)||1;d=Math.floor(d)||
 1;var g=c+1,k=d+1,l=a/c,m=b/d,x=[],p=[],q=[],t=[];for(a=0;a<k;a++){var r=a*m-f;for(b=0;b<g;b++)p.push(b*l-e,-r,0),q.push(0,0,1),t.push(b/c),t.push(1-a/d)}for(a=0;a<d;a++)for(b=0;b<c;b++)e=b+g*(a+1),f=b+1+g*(a+1),k=b+1+g*a,x.push(b+g*a,e,k),x.push(e,f,k);this.setIndex(x);this.setAttribute("position",new E(p,3));this.setAttribute("normal",new E(q,3));this.setAttribute("uv",new E(t,2))}function vj(a,b,c,d){function e(a,c){b.buffers.color.setClear(a.r,a.g,a.b,c,d)}var f=new B(0),g=0,k,l,m=null,x=0,p=
 null;return{getClearColor:function(){return f},setClearColor:function(a,b){f.set(a);g=void 0!==b?b:1;e(f,g)},getClearAlpha:function(){return g},setClearAlpha:function(a){g=a;e(f,g)},render:function(b,d,r,h){d=d.background;r=a.xr;(r=r.getSession&&r.getSession())&&"additive"===r.environmentBlendMode&&(d=null);null===d?e(f,g):d&&d.isColor&&(e(d,1),h=!0);(a.autoClear||h)&&a.clear(a.autoClearColor,a.autoClearDepth,a.autoClearStencil);if(d&&(d.isCubeTexture||d.isWebGLCubeRenderTarget||306===d.mapping)){void 0===
-l&&(l=new ca(new Kd(1,1,1),new pa({type:"BackgroundCubeMaterial",uniforms:Fc(fb.cube.uniforms),vertexShader:fb.cube.vertexShader,fragmentShader:fb.cube.fragmentShader,side:1,depthTest:!1,depthWrite:!1,fog:!1})),l.geometry.deleteAttribute("normal"),l.geometry.deleteAttribute("uv"),l.onBeforeRender=function(a,b,c){this.matrixWorld.copyPosition(c.matrixWorld)},Object.defineProperty(l.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),c.update(l));h=d.isWebGLCubeRenderTarget?d.texture:
-d;l.material.uniforms.envMap.value=h;l.material.uniforms.flipEnvMap.value=h.isCubeTexture?-1:1;if(m!==d||x!==h.version||p!==a.toneMapping)l.material.needsUpdate=!0,m=d,x=h.version,p=a.toneMapping;b.unshift(l,l.geometry,l.material,0,0,null)}else if(d&&d.isTexture){void 0===k&&(k=new ca(new cc(2,2),new pa({type:"BackgroundMaterial",uniforms:Fc(fb.background.uniforms),vertexShader:fb.background.vertexShader,fragmentShader:fb.background.fragmentShader,side:0,depthTest:!1,depthWrite:!1,fog:!1})),k.geometry.deleteAttribute("normal"),
+l&&(l=new ca(new Kd(1,1,1),new qa({type:"BackgroundCubeMaterial",uniforms:Fc(fb.cube.uniforms),vertexShader:fb.cube.vertexShader,fragmentShader:fb.cube.fragmentShader,side:1,depthTest:!1,depthWrite:!1,fog:!1})),l.geometry.deleteAttribute("normal"),l.geometry.deleteAttribute("uv"),l.onBeforeRender=function(a,b,c){this.matrixWorld.copyPosition(c.matrixWorld)},Object.defineProperty(l.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),c.update(l));h=d.isWebGLCubeRenderTarget?d.texture:
+d;l.material.uniforms.envMap.value=h;l.material.uniforms.flipEnvMap.value=h.isCubeTexture?-1:1;if(m!==d||x!==h.version||p!==a.toneMapping)l.material.needsUpdate=!0,m=d,x=h.version,p=a.toneMapping;b.unshift(l,l.geometry,l.material,0,0,null)}else if(d&&d.isTexture){void 0===k&&(k=new ca(new cc(2,2),new qa({type:"BackgroundMaterial",uniforms:Fc(fb.background.uniforms),vertexShader:fb.background.vertexShader,fragmentShader:fb.background.fragmentShader,side:0,depthTest:!1,depthWrite:!1,fog:!1})),k.geometry.deleteAttribute("normal"),
 Object.defineProperty(k.material,"map",{get:function(){return this.uniforms.t2D.value}}),c.update(k));k.material.uniforms.t2D.value=d;!0===d.matrixAutoUpdate&&d.updateMatrix();k.material.uniforms.uvTransform.value.copy(d.matrix);if(m!==d||x!==d.version||p!==a.toneMapping)k.material.needsUpdate=!0,m=d,x=d.version,p=a.toneMapping;b.unshift(k,k.geometry,k.material,0,0,null)}}}}function wj(a,b,c,d){var e=d.isWebGL2,f;this.setMode=function(a){f=a};this.render=function(b,d){a.drawArrays(f,b,d);c.update(d,
 f)};this.renderInstances=function(d,k,l,m){if(0!==m){if(e){d=a;var g="drawArraysInstanced"}else if(d=b.get("ANGLE_instanced_arrays"),g="drawArraysInstancedANGLE",null===d){console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");return}d[g](f,k,l,m);c.update(l,f,m)}}}function xj(a,b,c){function d(b){if("highp"===b){if(0<a.getShaderPrecisionFormat(35633,36338).precision&&0<a.getShaderPrecisionFormat(35632,36338).precision)return"highp";
 b="mediump"}return"mediump"===b&&0<a.getShaderPrecisionFormat(35633,36337).precision&&0<a.getShaderPrecisionFormat(35632,36337).precision?"mediump":"lowp"}var e,f="undefined"!==typeof WebGL2RenderingContext&&a instanceof WebGL2RenderingContext||"undefined"!==typeof WebGL2ComputeRenderingContext&&a instanceof WebGL2ComputeRenderingContext,g=void 0!==c.precision?c.precision:"highp",k=d(g);k!==g&&(console.warn("THREE.WebGLRenderer:",g,"not supported, using",k,"instead."),g=k);c=!0===c.logarithmicDepthBuffer;
@@ -112,7 +112,7 @@ a)}else!1===b.get(c).has(d)?(e=new Vh,b.get(c).set(d,e)):e=b.get(c).get(d);retur
 !0===f.isPointLight&&(p=e,x=b.customDistanceMaterial);void 0===x?(x=!1,!0===c.morphTargets&&(!0===m.isBufferGeometry?x=m.morphAttributes&&m.morphAttributes.position&&0<m.morphAttributes.position.length:!0===m.isGeometry&&(x=m.morphTargets&&0<m.morphTargets.length)),m=!1,!0===b.isSkinnedMesh&&(!0===c.skinning?m=!0:console.warn("THREE.WebGLShadowMap: THREE.SkinnedMesh with material.skinning set to false:",b)),b=p(x,m,!0===b.isInstancedMesh)):b=x;a.localClippingEnabled&&!0===c.clipShadows&&0!==c.clippingPlanes.length&&
 (x=b.uuid,p=c.uuid,m=t[x],void 0===m&&(m={},t[x]=m),x=m[p],void 0===x&&(x=b.clone(),m[p]=x),b=x);b.visible=c.visible;b.wireframe=c.wireframe;b.side=3===l?null!==c.shadowSide?c.shadowSide:c.side:null!==c.shadowSide?c.shadowSide:r[c.side];b.clipShadows=c.clipShadows;b.clippingPlanes=c.clippingPlanes;b.clipIntersection=c.clipIntersection;b.wireframeLinewidth=c.wireframeLinewidth;b.linewidth=c.linewidth;!0===f.isPointLight&&!0===b.isMeshDistanceMaterial&&(b.referencePosition.setFromMatrixPosition(f.matrixWorld),
 b.nearDistance=g,b.farDistance=k);return b}function g(c,d,e,l,m){if(!1!==c.visible){if(c.layers.test(d.layers)&&(c.isMesh||c.isLine||c.isPoints)&&(c.castShadow||c.receiveShadow&&3===m)&&(!c.frustumCulled||k.intersectsObject(c))){c.modelViewMatrix.multiplyMatrices(e.matrixWorldInverse,c.matrixWorld);var p=b.update(c),x=c.material;if(Array.isArray(x))for(var h=p.groups,r=0,q=h.length;r<q;r++){var t=h[r],u=x[t.materialIndex];u&&u.visible&&(u=f(c,u,l,e.near,e.far,m),a.renderBufferDirect(e,null,p,u,c,
-t))}else x.visible&&(u=f(c,x,l,e.near,e.far,m),a.renderBufferDirect(e,null,p,u,c,null))}c=c.children;p=0;for(x=c.length;p<x;p++)g(c[p],d,e,l,m)}}var k=new Hc,l=new w,m=new w,x=new R,p=[],h=[],t={},r={0:1,1:0,2:2},u=new pa({defines:{SAMPLE_RATE:.25,HALF_SAMPLE_RATE:.125},uniforms:{shadow_pass:{value:null},resolution:{value:new w},radius:{value:4}},vertexShader:"void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",fragmentShader:"uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include <packing>\nvoid main() {\n  float mean = 0.0;\n  float squared_mean = 0.0;\n\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy  ) / resolution ) );\n  for ( float i = -1.0; i < 1.0 ; i += SAMPLE_RATE) {\n    #ifdef HORIZONAL_PASS\n      vec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( i, 0.0 ) * radius ) / resolution ) );\n      mean += distribution.x;\n      squared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n    #else\n      float depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0,  i )  * radius ) / resolution ) );\n      mean += depth;\n      squared_mean += depth * depth;\n    #endif\n  }\n  mean = mean * HALF_SAMPLE_RATE;\n  squared_mean = squared_mean * HALF_SAMPLE_RATE;\n  float std_dev = sqrt( squared_mean - mean * mean );\n  gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}"}),
+t))}else x.visible&&(u=f(c,x,l,e.near,e.far,m),a.renderBufferDirect(e,null,p,u,c,null))}c=c.children;p=0;for(x=c.length;p<x;p++)g(c[p],d,e,l,m)}}var k=new Hc,l=new w,m=new w,x=new ia,p=[],h=[],t={},r={0:1,1:0,2:2},u=new qa({defines:{SAMPLE_RATE:.25,HALF_SAMPLE_RATE:.125},uniforms:{shadow_pass:{value:null},resolution:{value:new w},radius:{value:4}},vertexShader:"void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",fragmentShader:"uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include <packing>\nvoid main() {\n  float mean = 0.0;\n  float squared_mean = 0.0;\n\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy  ) / resolution ) );\n  for ( float i = -1.0; i < 1.0 ; i += SAMPLE_RATE) {\n    #ifdef HORIZONAL_PASS\n      vec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( i, 0.0 ) * radius ) / resolution ) );\n      mean += distribution.x;\n      squared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n    #else\n      float depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0,  i )  * radius ) / resolution ) );\n      mean += depth;\n      squared_mean += depth * depth;\n    #endif\n  }\n  mean = mean * HALF_SAMPLE_RATE;\n  squared_mean = squared_mean * HALF_SAMPLE_RATE;\n  float std_dev = sqrt( squared_mean - mean * mean );\n  gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}"}),
 n=u.clone();n.defines.HORIZONAL_PASS=1;var v=new A;v.setAttribute("position",new M(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));var C=new ca(v,u),W=this;this.enabled=!1;this.autoUpdate=!0;this.needsUpdate=!1;this.type=1;this.render=function(d,e,f){if(!1!==W.enabled&&(!1!==W.autoUpdate||!1!==W.needsUpdate)&&0!==d.length){var p=a.getRenderTarget(),h=a.getActiveCubeFace(),r=a.getActiveMipmapLevel(),q=a.state;q.setBlending(0);q.buffers.color.setClear(1,1,1,1);q.buffers.depth.setTest(!0);q.setScissorTest(!1);
 for(var t=0,y=d.length;t<y;t++){var v=d[t],z=v.shadow;if(void 0===z)console.warn("THREE.WebGLShadowMap:",v,"has no shadow.");else{l.copy(z.mapSize);var w=z.getFrameExtents();l.multiply(w);m.copy(z.mapSize);if(l.x>c||l.y>c)console.warn("THREE.WebGLShadowMap:",v,"has shadow exceeding max texture size, reducing"),l.x>c&&(m.x=Math.floor(c/w.x),l.x=m.x*w.x,z.mapSize.x=m.x),l.y>c&&(m.y=Math.floor(c/w.y),l.y=m.y*w.y,z.mapSize.y=m.y);null!==z.map||z.isPointLightShadow||3!==this.type||(w={minFilter:1006,magFilter:1006,
 format:1023},z.map=new wa(l.x,l.y,w),z.map.texture.name=v.name+".shadowMap",z.mapPass=new wa(l.x,l.y,w),z.camera.updateProjectionMatrix());null===z.map&&(w={minFilter:1003,magFilter:1003,format:1023},z.map=new wa(l.x,l.y,w),z.map.texture.name=v.name+".shadowMap",z.camera.updateProjectionMatrix());a.setRenderTarget(z.map);a.clear();w=z.getViewportCount();for(var ja=0;ja<w;ja++){var ra=z.getViewport(ja);x.set(m.x*ra.x,m.y*ra.y,m.x*ra.z,m.y*ra.w);q.viewport(x);z.updateMatrices(v,ja);k=z.getFrustum();
@@ -120,11 +120,11 @@ g(e,f,z.camera,v,this.type)}z.isPointLightShadow||3!==this.type||(v=z,z=f,w=b.up
 h,r)}}}function Hk(a,b,c){function d(b,c,d){var e=new Uint8Array(4),f=a.createTexture();a.bindTexture(b,f);a.texParameteri(b,10241,9728);a.texParameteri(b,10240,9728);for(b=0;b<d;b++)a.texImage2D(c+b,0,6408,1,1,0,6408,5121,e);return f}function e(c,d){n[c]=1;0===v[c]&&(a.enableVertexAttribArray(c),v[c]=1);C[c]!==d&&((h?a:b.get("ANGLE_instanced_arrays"))[h?"vertexAttribDivisor":"vertexAttribDivisorANGLE"](c,d),C[c]=d)}function f(b){!0!==W[b]&&(a.enable(b),W[b]=!0)}function g(b){!1!==W[b]&&(a.disable(b),
 W[b]=!1)}function k(b,c,d,e,k,l,m,p){if(0===b)z&&(g(3042),z=!1);else if(z||(f(3042),z=!0),5!==b){if(b!==ra||p!==F){if(100!==fa||100!==G)a.blendEquation(32774),G=fa=100;if(p)switch(b){case 1:a.blendFuncSeparate(1,771,1,771);break;case 2:a.blendFunc(1,1);break;case 3:a.blendFuncSeparate(0,0,769,771);break;case 4:a.blendFuncSeparate(0,768,0,770);break;default:console.error("THREE.WebGLState: Invalid blending: ",b)}else switch(b){case 1:a.blendFuncSeparate(770,771,1,771);break;case 2:a.blendFunc(770,
 1);break;case 3:a.blendFunc(0,769);break;case 4:a.blendFunc(0,768);break;default:console.error("THREE.WebGLState: Invalid blending: ",b)}E=Nd=Ha=Ga=null;ra=b;F=p}}else{k=k||c;l=l||d;m=m||e;if(c!==fa||k!==G)a.blendEquationSeparate(Lc[c],Lc[k]),fa=c,G=k;if(d!==Ga||e!==Ha||l!==Nd||m!==E)a.blendFuncSeparate(J[d],J[e],J[l],J[m]),Ga=d,Ha=e,Nd=l,E=m;ra=b;F=null}}function l(b){D!==b&&(b?a.frontFace(2304):a.frontFace(2305),D=b)}function m(b){0!==b?(f(2884),b!==B&&(1===b?a.cullFace(1029):2===b?a.cullFace(1028):
-a.cullFace(1032))):g(2884);B=b}function x(b,c,d){if(b){if(f(32823),I!==c||K!==d)a.polygonOffset(c,d),I=c,K=d}else g(32823)}function p(b){void 0===b&&(b=33984+M-1);P!==b&&(a.activeTexture(b),P=b)}var h=c.isWebGL2,t=new function(){var b=!1,c=new R,d=null,e=new R(0,0,0,0);return{setMask:function(c){d===c||b||(a.colorMask(c,c,c,c),d=c)},setLocked:function(a){b=a},setClear:function(b,d,f,g,k){!0===k&&(b*=g,d*=g,f*=g);c.set(b,d,f,g);!1===e.equals(c)&&(a.clearColor(b,d,f,g),e.copy(c))},reset:function(){b=
+a.cullFace(1032))):g(2884);B=b}function x(b,c,d){if(b){if(f(32823),I!==c||K!==d)a.polygonOffset(c,d),I=c,K=d}else g(32823)}function p(b){void 0===b&&(b=33984+M-1);P!==b&&(a.activeTexture(b),P=b)}var h=c.isWebGL2,t=new function(){var b=!1,c=new ia,d=null,e=new ia(0,0,0,0);return{setMask:function(c){d===c||b||(a.colorMask(c,c,c,c),d=c)},setLocked:function(a){b=a},setClear:function(b,d,f,g,k){!0===k&&(b*=g,d*=g,f*=g);c.set(b,d,f,g);!1===e.equals(c)&&(a.clearColor(b,d,f,g),e.copy(c))},reset:function(){b=
 !1;d=null;e.set(-1,0,0,0)}}},r=new function(){var b=!1,c=null,d=null,e=null;return{setTest:function(a){a?f(2929):g(2929)},setMask:function(d){c===d||b||(a.depthMask(d),c=d)},setFunc:function(b){if(d!==b){if(b)switch(b){case 0:a.depthFunc(512);break;case 1:a.depthFunc(519);break;case 2:a.depthFunc(513);break;case 3:a.depthFunc(515);break;case 4:a.depthFunc(514);break;case 5:a.depthFunc(518);break;case 6:a.depthFunc(516);break;case 7:a.depthFunc(517);break;default:a.depthFunc(515)}else a.depthFunc(515);
 d=b}},setLocked:function(a){b=a},setClear:function(b){e!==b&&(a.clearDepth(b),e=b)},reset:function(){b=!1;e=d=c=null}}},u=new function(){var b=!1,c=null,d=null,e=null,k=null,l=null,m=null,p=null,x=null;return{setTest:function(a){b||(a?f(2960):g(2960))},setMask:function(d){c===d||b||(a.stencilMask(d),c=d)},setFunc:function(b,c,f){if(d!==b||e!==c||k!==f)a.stencilFunc(b,c,f),d=b,e=c,k=f},setOp:function(b,c,d){if(l!==b||m!==c||p!==d)a.stencilOp(b,c,d),l=b,m=c,p=d},setLocked:function(a){b=a},setClear:function(b){x!==
 b&&(a.clearStencil(b),x=b)},reset:function(){b=!1;x=p=m=l=k=e=d=c=null}}};c=a.getParameter(34921);var n=new Uint8Array(c),v=new Uint8Array(c),C=new Uint8Array(c),W={},w=null,z=null,ra=null,fa=null,Ga=null,Ha=null,G=null,Nd=null,E=null,F=!1,D=null,B=null,A=null,I=null,K=null,M=a.getParameter(35661),L=!1;c=0;c=a.getParameter(7938);-1!==c.indexOf("WebGL")?(c=parseFloat(/^WebGL ([0-9])/.exec(c)[1]),L=1<=c):-1!==c.indexOf("OpenGL ES")&&(c=parseFloat(/^OpenGL ES ([0-9])/.exec(c)[1]),L=2<=c);var P=null,
-Pd={},X=new R,Xh=new R,og={};og[3553]=d(3553,3553,1);og[34067]=d(34067,34069,6);t.setClear(0,0,0,1);r.setClear(1);u.setClear(0);f(2929);r.setFunc(3);l(!1);m(1);f(2884);k(0);var Lc={100:32774,101:32778,102:32779};h?(Lc[103]=32775,Lc[104]=32776):(c=b.get("EXT_blend_minmax"),null!==c&&(Lc[103]=c.MIN_EXT,Lc[104]=c.MAX_EXT));var J={200:0,201:1,202:768,204:770,210:776,208:774,206:772,203:769,205:771,209:775,207:773};return{buffers:{color:t,depth:r,stencil:u},initAttributes:function(){for(var a=0,b=n.length;a<
+Pd={},X=new ia,Xh=new ia,og={};og[3553]=d(3553,3553,1);og[34067]=d(34067,34069,6);t.setClear(0,0,0,1);r.setClear(1);u.setClear(0);f(2929);r.setFunc(3);l(!1);m(1);f(2884);k(0);var Lc={100:32774,101:32778,102:32779};h?(Lc[103]=32775,Lc[104]=32776):(c=b.get("EXT_blend_minmax"),null!==c&&(Lc[103]=c.MIN_EXT,Lc[104]=c.MAX_EXT));var J={200:0,201:1,202:768,204:770,210:776,208:774,206:772,203:769,205:771,209:775,207:773};return{buffers:{color:t,depth:r,stencil:u},initAttributes:function(){for(var a=0,b=n.length;a<
 b;a++)n[a]=0},enableAttribute:function(a){e(a,0)},enableAttributeAndDivisor:e,disableUnusedAttributes:function(){for(var b=0,c=v.length;b!==c;++b)v[b]!==n[b]&&(a.disableVertexAttribArray(b),v[b]=0)},enable:f,disable:g,useProgram:function(b){return w!==b?(a.useProgram(b),w=b,!0):!1},setBlending:k,setMaterial:function(a,b){2===a.side?g(2884):f(2884);var c=1===a.side;b&&(c=!c);l(c);1===a.blending&&!1===a.transparent?k(0):k(a.blending,a.blendEquation,a.blendSrc,a.blendDst,a.blendEquationAlpha,a.blendSrcAlpha,
 a.blendDstAlpha,a.premultipliedAlpha);r.setFunc(a.depthFunc);r.setTest(a.depthTest);r.setMask(a.depthWrite);t.setMask(a.colorWrite);b=a.stencilWrite;u.setTest(b);b&&(u.setMask(a.stencilWriteMask),u.setFunc(a.stencilFunc,a.stencilRef,a.stencilFuncMask),u.setOp(a.stencilFail,a.stencilZFail,a.stencilZPass));x(a.polygonOffset,a.polygonOffsetFactor,a.polygonOffsetUnits)},setFlipSided:l,setCullFace:m,setLineWidth:function(b){b!==A&&(L&&a.lineWidth(b),A=b)},setPolygonOffset:x,setScissorTest:function(a){a?
 f(3089):g(3089)},activeTexture:p,bindTexture:function(b,c){null===P&&p();var d=Pd[P];void 0===d&&(d={type:void 0,texture:void 0},Pd[P]=d);if(d.type!==b||d.texture!==c)a.bindTexture(b,c||og[b]),d.type=b,d.texture=c},unbindTexture:function(){var b=Pd[P];void 0!==b&&void 0!==b.type&&(a.bindTexture(b.type,null),b.type=void 0,b.texture=void 0)},compressedTexImage2D:function(){try{a.compressedTexImage2D.apply(a,arguments)}catch(Q){console.error("THREE.WebGLState:",Q)}},texImage2D:function(){try{a.texImage2D.apply(a,
@@ -165,17 +165,17 @@ a||37814===a||37815===a||37816===a||37817===a||37818===a||37819===a||37820===a||
 if(a.length>t)return!1;for(var b=1,c=a.length;b<c;b++)if(a[0].viewport.z!==a[b].viewport.z||a[0].viewport.w!==a[b].viewport.w)return!1;return!0}var e=a.extensions,f=a.properties,g,k,l,m,x,p,h,t=0;this.isAvailable=function(){if(void 0===h){var a=e.get("OVR_multiview2");if(h=null!==a&&!1===b.getContextAttributes().antialias)for(t=b.getParameter(a.MAX_VIEWS_OVR),g=new pg(0,0,2),p=new w,m=[],l=[],x=[],a=0;a<t;a++)m[a]=new O,l[a]=new za}return h};this.attachCamera=function(b){if(!1!==d(b)){(k=a.getRenderTarget())?
 p.set(k.width,k.height):a.getDrawingBufferSize(p);if(b.isArrayCamera){var c=b.cameras[0].viewport;g.setSize(c.z,c.w);g.setNumViews(b.cameras.length)}else g.setSize(p.x,p.y),g.setNumViews(2);a.setRenderTarget(g)}};this.detachCamera=function(c){if(g===a.getRenderTarget()){a.setRenderTarget(k);var d=g,e=d.numViews,l=f.get(d).__webglViewFramebuffers,m=d.width;d=d.height;if(c.isArrayCamera)for(var x=0;x<e;x++){var h=c.cameras[x].viewport,q=h.x,r=h.y,t=q+h.z;h=r+h.w;b.bindFramebuffer(36008,l[x]);b.blitFramebuffer(0,
 0,m,d,q,r,t,h,16384,9728)}else b.bindFramebuffer(36008,l[0]),b.blitFramebuffer(0,0,m,d,0,0,p.x,p.y,16384,9728)}};this.updateCameraProjectionMatricesUniform=function(a,d){a=c(a);for(var e=0;e<a.length;e++)m[e].copy(a[e].projectionMatrix);d.setValue(b,"projectionMatrices",m)};this.updateCameraViewMatricesUniform=function(a,d){a=c(a);for(var e=0;e<a.length;e++)m[e].copy(a[e].matrixWorldInverse);d.setValue(b,"viewMatrices",m)};this.updateObjectMatricesUniforms=function(a,d,e){d=c(d);for(var f=0;f<d.length;f++)m[f].multiplyMatrices(d[f].matrixWorldInverse,
-a.matrixWorld),l[f].getNormalMatrix(m[f]);e.setValue(b,"modelViewMatrices",m);e.setValue(b,"normalMatrices",l)}}function Qe(a){qa.call(this);this.cameras=a||[]}function Mc(){D.call(this);this.type="Group"}function Zh(a,b){function c(a){var b=t.get(a.inputSource);b&&(b.targetRay&&b.targetRay.dispatchEvent({type:a.type}),b.grip&&b.grip.dispatchEvent({type:a.type}))}function d(){t.forEach(function(a,b){a.targetRay&&(a.targetRay.dispatchEvent({type:"disconnected",data:b}),a.targetRay.visible=!1);a.grip&&
+a.matrixWorld),l[f].getNormalMatrix(m[f]);e.setValue(b,"modelViewMatrices",m);e.setValue(b,"normalMatrices",l)}}function Qe(a){da.call(this);this.cameras=a||[]}function Mc(){D.call(this);this.type="Group"}function Zh(a,b){function c(a){var b=t.get(a.inputSource);b&&(b.targetRay&&b.targetRay.dispatchEvent({type:a.type}),b.grip&&b.grip.dispatchEvent({type:a.type}))}function d(){t.forEach(function(a,b){a.targetRay&&(a.targetRay.dispatchEvent({type:"disconnected",data:b}),a.targetRay.visible=!1);a.grip&&
 (a.grip.dispatchEvent({type:"disconnected",data:b}),a.grip.visible=!1)});t.clear();a.setFramebuffer(null);a.setRenderTarget(a.getRenderTarget());ra.stop();k.isPresenting=!1;k.dispatchEvent({type:"sessionend"})}function e(a){m=a;ra.setContext(l);ra.start();k.isPresenting=!0;k.dispatchEvent({type:"sessionstart"})}function f(a){for(var b=l.inputSources,c=0;c<h.length;c++)t.set(b[c],h[c]);for(c=0;c<a.removed.length;c++){b=a.removed[c];var d=t.get(b);d&&(d.targetRay&&d.targetRay.dispatchEvent({type:"disconnected",
-data:b}),d.grip&&d.grip.dispatchEvent({type:"disconnected",data:b}),t.delete(b))}for(c=0;c<a.added.length;c++)if(b=a.added[c],d=t.get(b))d.targetRay&&d.targetRay.dispatchEvent({type:"connected",data:b}),d.grip&&d.grip.dispatchEvent({type:"connected",data:b})}function g(a,b){null===b?a.matrixWorld.copy(a.matrix):a.matrixWorld.multiplyMatrices(b.matrixWorld,a.matrix);a.matrixWorldInverse.getInverse(a.matrixWorld)}var k=this,l=null,m=null,x="local-floor",p=null,h=[],t=new Map,r=new qa;r.layers.enable(1);
-r.viewport=new R;var u=new qa;u.layers.enable(2);u.viewport=new R;var y=new Qe([r,u]);y.layers.enable(1);y.layers.enable(2);var v=null,C=null;this.isPresenting=this.enabled=!1;this.getController=function(a){var b=h[a];void 0===b&&(b={},h[a]=b);void 0===b.targetRay&&(b.targetRay=new Mc,b.targetRay.matrixAutoUpdate=!1,b.targetRay.visible=!1);return b.targetRay};this.getControllerGrip=function(a){var b=h[a];void 0===b&&(b={},h[a]=b);void 0===b.grip&&(b.grip=new Mc,b.grip.matrixAutoUpdate=!1,b.grip.visible=
+data:b}),d.grip&&d.grip.dispatchEvent({type:"disconnected",data:b}),t.delete(b))}for(c=0;c<a.added.length;c++)if(b=a.added[c],d=t.get(b))d.targetRay&&d.targetRay.dispatchEvent({type:"connected",data:b}),d.grip&&d.grip.dispatchEvent({type:"connected",data:b})}function g(a,b){null===b?a.matrixWorld.copy(a.matrix):a.matrixWorld.multiplyMatrices(b.matrixWorld,a.matrix);a.matrixWorldInverse.getInverse(a.matrixWorld)}var k=this,l=null,m=null,x="local-floor",p=null,h=[],t=new Map,r=new da;r.layers.enable(1);
+r.viewport=new ia;var u=new da;u.layers.enable(2);u.viewport=new ia;var y=new Qe([r,u]);y.layers.enable(1);y.layers.enable(2);var v=null,C=null;this.isPresenting=this.enabled=!1;this.getController=function(a){var b=h[a];void 0===b&&(b={},h[a]=b);void 0===b.targetRay&&(b.targetRay=new Mc,b.targetRay.matrixAutoUpdate=!1,b.targetRay.visible=!1);return b.targetRay};this.getControllerGrip=function(a){var b=h[a];void 0===b&&(b={},h[a]=b);void 0===b.grip&&(b.grip=new Mc,b.grip.matrixAutoUpdate=!1,b.grip.visible=
 !1);return b.grip};this.setFramebufferScaleFactor=function(){};this.setReferenceSpaceType=function(a){x=a};this.getReferenceSpace=function(){return m};this.getSession=function(){return l};this.setSession=function(a){l=a;null!==l&&(l.addEventListener("select",c),l.addEventListener("selectstart",c),l.addEventListener("selectend",c),l.addEventListener("squeeze",c),l.addEventListener("squeezestart",c),l.addEventListener("squeezeend",c),l.addEventListener("end",d),a=b.getContextAttributes(),a=new XRWebGLLayer(l,
 b,{antialias:a.antialias,alpha:a.alpha,depth:a.depth,stencil:a.stencil}),l.updateRenderState({baseLayer:a}),l.requestReferenceSpace(x).then(e),l.addEventListener("inputsourceschange",f))};var w=new n,ja=new n;this.getCamera=function(a){y.near=u.near=r.near=a.near;y.far=u.far=r.far=a.far;if(v!==y.near||C!==y.far)l.updateRenderState({depthNear:y.near,depthFar:y.far}),v=y.near,C=y.far;var b=a.parent,c=y.cameras;g(y,b);for(var d=0;d<c.length;d++)g(c[d],b);a.matrixWorld.copy(y.matrixWorld);a=a.children;
 d=0;for(b=a.length;d<b;d++)a[d].updateMatrixWorld(!0);w.setFromMatrixPosition(r.matrixWorld);ja.setFromMatrixPosition(u.matrixWorld);d=w.distanceTo(ja);var e=r.projectionMatrix.elements,f=u.projectionMatrix.elements,k=e[14]/(e[10]-1);a=e[14]/(e[10]+1);b=(e[9]+1)/e[5];c=(e[9]-1)/e[5];var m=(e[8]-1)/e[0],p=(f[8]+1)/f[0];f=k*m;e=k*p;p=d/(-m+p);m=p*-m;r.matrixWorld.decompose(y.position,y.quaternion,y.scale);y.translateX(m);y.translateZ(p);y.matrixWorld.compose(y.position,y.quaternion,y.scale);y.matrixWorldInverse.getInverse(y.matrixWorld);
 k+=p;p=a+p;y.projectionMatrix.makePerspective(f-m,e+(d-m),b*a/p*k,c*a/p*k,k,p);return y};var z=null,ra=new Ah;ra.setAnimationLoop(function(b,c){p=c.getViewerPose(m);if(null!==p){var d=p.views,e=l.renderState.baseLayer;a.setFramebuffer(e.framebuffer);for(var f=0;f<d.length;f++){var g=d[f],k=e.getViewport(g),x=y.cameras[f];x.matrix.fromArray(g.transform.matrix);x.projectionMatrix.fromArray(g.projectionMatrix);x.viewport.set(k.x,k.y,k.width,k.height);0===f&&y.matrix.copy(x.matrix)}}d=l.inputSources;
 for(f=0;f<h.length;f++)e=h[f],g=d[f],x=k=null,g&&(e.targetRay&&(k=c.getPose(g.targetRaySpace,m),null!==k&&(e.targetRay.matrix.fromArray(k.transform.matrix),e.targetRay.matrix.decompose(e.targetRay.position,e.targetRay.rotation,e.targetRay.scale))),e.grip&&g.gripSpace&&(x=c.getPose(g.gripSpace,m),null!==x&&(e.grip.matrix.fromArray(x.transform.matrix),e.grip.matrix.decompose(e.grip.position,e.grip.rotation,e.grip.scale)))),e.targetRay&&(e.targetRay.visible=null!==k),e.grip&&(e.grip.visible=null!==x);
-z&&z(b,c)});this.setAnimationLoop=function(a){z=a};this.dispose=function(){}}function qg(a){var b;function c(){sa=new zj(H);Ia=new xj(H,sa,a);!1===Ia.isWebGL2&&(sa.get("WEBGL_depth_texture"),sa.get("OES_texture_float"),sa.get("OES_texture_half_float"),sa.get("OES_texture_half_float_linear"),sa.get("OES_standard_derivatives"),sa.get("OES_element_index_uint"),sa.get("ANGLE_instanced_arrays"));sa.get("OES_texture_float_linear");pa=new Yh(H,sa,Ia);aa=new Hk(H,sa,Ia);aa.scissor(Y.copy(ia).multiplyScalar(Q).floor());
-aa.viewport(X.copy(ea).multiplyScalar(Q).floor());da=new Cj(H);S=new yk;U=new Ik(H,sa,aa,S,Ia,pa,da);na=new uj(H,Ia);za=new Aj(H,na,da);ta=new Fj(H,za,na,da);Aa=new Ej(H);ua=new xk(A,sa,Ia);ya=new Bk;wa=new Gk;oa=new vj(A,aa,ta,z);Ba=new wj(H,sa,da,Ia);Da=new Bj(H,sa,da,Ia);da.programs=ua.programs;A.capabilities=Ia;A.extensions=sa;A.properties=S;A.renderLists=ya;A.state=aa;A.info=da}function d(a){a.preventDefault();console.log("THREE.WebGLRenderer: Context Lost.");I=!0}function e(){console.log("THREE.WebGLRenderer: Context Restored.");
+z&&z(b,c)});this.setAnimationLoop=function(a){z=a};this.dispose=function(){}}function qg(a){var b;function c(){sa=new zj(H);Ia=new xj(H,sa,a);!1===Ia.isWebGL2&&(sa.get("WEBGL_depth_texture"),sa.get("OES_texture_float"),sa.get("OES_texture_half_float"),sa.get("OES_texture_half_float_linear"),sa.get("OES_standard_derivatives"),sa.get("OES_element_index_uint"),sa.get("ANGLE_instanced_arrays"));sa.get("OES_texture_float_linear");qa=new Yh(H,sa,Ia);aa=new Hk(H,sa,Ia);aa.scissor(Y.copy(R).multiplyScalar(Q).floor());
+aa.viewport(X.copy(ea).multiplyScalar(Q).floor());da=new Cj(H);S=new yk;U=new Ik(H,sa,aa,S,Ia,qa,da);oa=new uj(H,Ia);za=new Aj(H,oa,da);ta=new Fj(H,za,oa,da);Aa=new Ej(H);ua=new xk(A,sa,Ia);ya=new Bk;wa=new Gk;pa=new vj(A,aa,ta,z);Ba=new wj(H,sa,da,Ia);Da=new Bj(H,sa,da,Ia);da.programs=ua.programs;A.capabilities=Ia;A.extensions=sa;A.properties=S;A.renderLists=ya;A.state=aa;A.info=da}function d(a){a.preventDefault();console.log("THREE.WebGLRenderer: Context Lost.");I=!0}function e(){console.log("THREE.WebGLRenderer: Context Restored.");
 I=!1;c()}function f(a){a=a.target;a.removeEventListener("dispose",f);g(a);S.remove(a)}function g(a){var b=S.get(a).program;a.program=void 0;void 0!==b&&ua.releaseProgram(b)}function k(a,b){a.render(function(a){A.renderBufferImmediate(a,b)})}function l(a,b,c,d){if(!1!==a.visible){if(a.layers.test(b.layers))if(a.isGroup)c=a.renderOrder;else if(a.isLOD)!0===a.autoUpdate&&a.update(b);else if(a.isLight)G.pushLight(a),a.castShadow&&G.pushShadow(a);else if(a.isSprite){if(!a.frustumCulled||mg.intersectsSprite(a)){d&&
 Ib.setFromMatrixPosition(a.matrixWorld).applyMatrix4(Od);var e=ta.update(a),f=a.material;f.visible&&B.push(a,e,f,c,Ib.z,null)}}else if(a.isImmediateRenderObject)d&&Ib.setFromMatrixPosition(a.matrixWorld).applyMatrix4(Od),B.push(a,null,a.material,c,Ib.z,null);else if(a.isMesh||a.isLine||a.isPoints)if(a.isSkinnedMesh&&a.skeleton.frame!==da.render.frame&&(a.skeleton.update(),a.skeleton.frame=da.render.frame),!a.frustumCulled||mg.intersectsObject(a))if(d&&Ib.setFromMatrixPosition(a.matrixWorld).applyMatrix4(Od),
 e=ta.update(a),f=a.material,Array.isArray(f))for(var g=e.groups,k=0,m=g.length;k<m;k++){var p=g[k],x=f[p.materialIndex];x&&x.visible&&B.push(a,e,x,c,Ib.z,p)}else f.visible&&B.push(a,e,f,c,Ib.z,null);a=a.children;k=0;for(m=a.length;k<m;k++)l(a[k],b,c,d)}}function m(a,b,c,d){for(var e=0,f=a.length;e<f;e++){var g=a[e],k=g.object,l=g.geometry,m=void 0===d?g.material:d;g=g.group;if(c.isArrayCamera)if(T=c,la.enabled&&va.isAvailable())x(k,b,c,l,m,g);else for(var p=c.cameras,h=0,q=p.length;h<q;h++){var r=
@@ -183,7 +183,7 @@ p[h];k.layers.test(r.layers)&&(aa.viewport(X.copy(r.viewport)),G.setupLights(r),
 b,c){var d=S.get(a),e=G.state.lights,k=e.state.version;c=ua.getParameters(a,e.state,G.state.shadowsArray,b,Va.numPlanes,Va.numIntersection,c);var l=ua.getProgramCacheKey(c),m=d.program,p=!0;if(void 0===m)a.addEventListener("dispose",f);else if(m.cacheKey!==l)g(a);else{if(d.lightsStateVersion!==k)d.lightsStateVersion=k;else if(void 0!==c.shaderID)return;p=!1}p&&(m=ua.acquireProgram(c,l),d.program=m,d.uniforms=c.uniforms,d.environment=a.isMeshStandardMaterial?b.environment:null,d.outputEncoding=A.outputEncoding,
 a.program=m);c=m.getAttributes();if(a.morphTargets)for(l=a.numSupportedMorphTargets=0;l<A.maxMorphTargets;l++)0<=c["morphTarget"+l]&&a.numSupportedMorphTargets++;if(a.morphNormals)for(l=a.numSupportedMorphNormals=0;l<A.maxMorphNormals;l++)0<=c["morphNormal"+l]&&a.numSupportedMorphNormals++;c=d.uniforms;if(!a.isShaderMaterial&&!a.isRawShaderMaterial||!0===a.clipping)d.numClippingPlanes=Va.numPlanes,d.numIntersection=Va.numIntersection,c.clippingPlanes=Va.uniform;d.fog=b.fog;d.needsLights=a.isMeshLambertMaterial||
 a.isMeshToonMaterial||a.isMeshPhongMaterial||a.isMeshStandardMaterial||a.isShadowMaterial||a.isShaderMaterial&&!0===a.lights;d.lightsStateVersion=k;d.needsLights&&(c.ambientLightColor.value=e.state.ambient,c.lightProbe.value=e.state.probe,c.directionalLights.value=e.state.directional,c.spotLights.value=e.state.spot,c.rectAreaLights.value=e.state.rectArea,c.pointLights.value=e.state.point,c.hemisphereLights.value=e.state.hemi,c.directionalShadowMap.value=e.state.directionalShadowMap,c.directionalShadowMatrix.value=
-e.state.directionalShadowMatrix,c.spotShadowMap.value=e.state.spotShadowMap,c.spotShadowMatrix.value=e.state.spotShadowMatrix,c.pointShadowMap.value=e.state.pointShadowMap,c.pointShadowMatrix.value=e.state.pointShadowMatrix);a=d.program.getUniforms();a=Fb.seqWithValue(a.seq,c);d.uniformsList=a}function h(a,b,c,d){U.resetTextureUnits();var e=b.fog,f=c.isMeshStandardMaterial?b.environment:null,g=S.get(c),k=G.state.lights;qa&&(ng||a!==Z)&&Va.setState(c.clippingPlanes,c.clipIntersection,c.clipShadows,
+e.state.directionalShadowMatrix,c.spotShadowMap.value=e.state.spotShadowMap,c.spotShadowMatrix.value=e.state.spotShadowMatrix,c.pointShadowMap.value=e.state.pointShadowMap,c.pointShadowMatrix.value=e.state.pointShadowMatrix);a=d.program.getUniforms();a=Fb.seqWithValue(a.seq,c);d.uniformsList=a}function h(a,b,c,d){U.resetTextureUnits();var e=b.fog,f=c.isMeshStandardMaterial?b.environment:null,g=S.get(c),k=G.state.lights;na&&(ng||a!==Z)&&Va.setState(c.clippingPlanes,c.clipIntersection,c.clipShadows,
 a,g,a===Z&&c.id===Pe);c.version===g.__version?void 0===g.program?p(c,b,d):c.fog&&g.fog!==e?p(c,b,d):g.environment!==f?p(c,b,d):g.needsLights&&g.lightsStateVersion!==k.state.version?p(c,b,d):void 0===g.numClippingPlanes||g.numClippingPlanes===Va.numPlanes&&g.numIntersection===Va.numIntersection?g.outputEncoding!==A.outputEncoding&&p(c,b,d):p(c,b,d):(p(c,b,d),g.__version=c.version);var l=!1,m=!1,x=!1;b=g.program;k=b.getUniforms();var h=g.uniforms;aa.useProgram(b.program)&&(x=m=l=!0);c.id!==Pe&&(Pe=
 c.id,m=!0);if(l||Z!==a){0<b.numMultiviewViews?va.updateCameraProjectionMatricesUniform(a,k):k.setValue(H,"projectionMatrix",a.projectionMatrix);Ia.logarithmicDepthBuffer&&k.setValue(H,"logDepthBufFC",2/(Math.log(a.far+1)/Math.LN2));Z!==a&&(Z=a,x=m=!0);if(c.isShaderMaterial||c.isMeshPhongMaterial||c.isMeshToonMaterial||c.isMeshStandardMaterial||c.envMap)l=k.map.cameraPosition,void 0!==l&&l.setValue(H,Ib.setFromMatrixPosition(a.matrixWorld));(c.isMeshPhongMaterial||c.isMeshToonMaterial||c.isMeshLambertMaterial||
 c.isMeshBasicMaterial||c.isMeshStandardMaterial||c.isShaderMaterial)&&k.setValue(H,"isOrthographic",!0===a.isOrthographicCamera);if(c.isMeshPhongMaterial||c.isMeshToonMaterial||c.isMeshLambertMaterial||c.isMeshBasicMaterial||c.isMeshStandardMaterial||c.isShaderMaterial||c.skinning)0<b.numMultiviewViews?va.updateCameraViewMatricesUniform(a,k):k.setValue(H,"viewMatrix",a.matrixWorldInverse)}if(c.skinning&&(k.setOptional(H,d,"bindMatrix"),k.setOptional(H,d,"bindMatrixInverse"),l=d.skeleton)){var q=l.bones;
@@ -203,142 +203,142 @@ d=b.specularMap:b.displacementMap?d=b.displacementMap:b.normalMap?d=b.normalMap:
 function r(a,b,c){a.roughness.value=b.roughness;a.metalness.value=b.metalness;b.roughnessMap&&(a.roughnessMap.value=b.roughnessMap);b.metalnessMap&&(a.metalnessMap.value=b.metalnessMap);b.emissiveMap&&(a.emissiveMap.value=b.emissiveMap);b.bumpMap&&(a.bumpMap.value=b.bumpMap,a.bumpScale.value=b.bumpScale,1===b.side&&(a.bumpScale.value*=-1));b.normalMap&&(a.normalMap.value=b.normalMap,a.normalScale.value.copy(b.normalScale),1===b.side&&a.normalScale.value.negate());b.displacementMap&&(a.displacementMap.value=
 b.displacementMap,a.displacementScale.value=b.displacementScale,a.displacementBias.value=b.displacementBias);if(b.envMap||c)a.envMapIntensity.value=b.envMapIntensity}a=a||{};var u=void 0!==a.canvas?a.canvas:document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),y=void 0!==a.context?a.context:null,v=void 0!==a.alpha?a.alpha:!1,C=void 0!==a.depth?a.depth:!0,W=void 0!==a.stencil?a.stencil:!0,ja=void 0!==a.antialias?a.antialias:!1,z=void 0!==a.premultipliedAlpha?a.premultipliedAlpha:!0,ra=
 void 0!==a.preserveDrawingBuffer?a.preserveDrawingBuffer:!1,D=void 0!==a.powerPreference?a.powerPreference:"default",E=void 0!==a.failIfMajorPerformanceCaveat?a.failIfMajorPerformanceCaveat:!1,B=null,G=null;this.domElement=u;this.debug={checkShaderErrors:!0};this.sortObjects=this.autoClearStencil=this.autoClearDepth=this.autoClearColor=this.autoClear=!0;this.clippingPlanes=[];this.localClippingEnabled=!1;this.gammaFactor=2;this.outputEncoding=3E3;this.physicallyCorrectLights=!1;this.toneMappingWhitePoint=
-this.toneMappingExposure=this.toneMapping=1;this.maxMorphTargets=8;this.maxMorphNormals=4;var A=this,I=!1,K=null,L=0,M=0,N=null,V=null,Pe=-1;var ha=b=null;var xa=!1;var Z=null,T=null,X=new R,Y=new R,ba=null,ca=u.width,J=u.height,Q=1,ka=null,ma=null,ea=new R(0,0,ca,J),ia=new R(0,0,ca,J),lg=!1,mg=new Hc,Va=new yj,qa=!1,ng=!1,Od=new O,Ib=new n;try{v={alpha:v,depth:C,stencil:W,antialias:ja,premultipliedAlpha:z,preserveDrawingBuffer:ra,powerPreference:D,failIfMajorPerformanceCaveat:E,xrCompatible:!0};
+this.toneMappingExposure=this.toneMapping=1;this.maxMorphTargets=8;this.maxMorphNormals=4;var A=this,I=!1,K=null,L=0,M=0,N=null,V=null,Pe=-1;var ha=b=null;var xa=!1;var Z=null,T=null,X=new ia,Y=new ia,ba=null,ca=u.width,J=u.height,Q=1,ka=null,ma=null,ea=new ia(0,0,ca,J),R=new ia(0,0,ca,J),lg=!1,mg=new Hc,Va=new yj,na=!1,ng=!1,Od=new O,Ib=new n;try{v={alpha:v,depth:C,stencil:W,antialias:ja,premultipliedAlpha:z,preserveDrawingBuffer:ra,powerPreference:D,failIfMajorPerformanceCaveat:E,xrCompatible:!0};
 u.addEventListener("webglcontextlost",d,!1);u.addEventListener("webglcontextrestored",e,!1);var H=y||u.getContext("webgl",v)||u.getContext("experimental-webgl",v);if(null===H){if(null!==u.getContext("webgl"))throw Error("Error creating WebGL context with your selected attributes.");throw Error("Error creating WebGL context.");}void 0===H.getShaderPrecisionFormat&&(H.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch($h){throw console.error("THREE.WebGLRenderer: "+
-$h.message),$h;}var sa,Ia,aa,da,S,U,na,za,ta,ua,ya,wa,oa,Aa,Ba,Da,pa;c();var la=new Zh(A,H);this.xr=la;var va=new Jk(A,H),Fa=new Wh(A,ta,Ia.maxTextureSize);this.shadowMap=Fa;this.getContext=function(){return H};this.getContextAttributes=function(){return H.getContextAttributes()};this.forceContextLoss=function(){var a=sa.get("WEBGL_lose_context");a&&a.loseContext()};this.forceContextRestore=function(){var a=sa.get("WEBGL_lose_context");a&&a.restoreContext()};this.getPixelRatio=function(){return Q};
+$h.message),$h;}var sa,Ia,aa,da,S,U,oa,za,ta,ua,ya,wa,pa,Aa,Ba,Da,qa;c();var la=new Zh(A,H);this.xr=la;var va=new Jk(A,H),Fa=new Wh(A,ta,Ia.maxTextureSize);this.shadowMap=Fa;this.getContext=function(){return H};this.getContextAttributes=function(){return H.getContextAttributes()};this.forceContextLoss=function(){var a=sa.get("WEBGL_lose_context");a&&a.loseContext()};this.forceContextRestore=function(){var a=sa.get("WEBGL_lose_context");a&&a.restoreContext()};this.getPixelRatio=function(){return Q};
 this.setPixelRatio=function(a){void 0!==a&&(Q=a,this.setSize(ca,J,!1))};this.getSize=function(a){void 0===a&&(console.warn("WebGLRenderer: .getsize() now requires a Vector2 as an argument"),a=new w);return a.set(ca,J)};this.setSize=function(a,b,c){la.isPresenting?console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting."):(ca=a,J=b,u.width=Math.floor(a*Q),u.height=Math.floor(b*Q),!1!==c&&(u.style.width=a+"px",u.style.height=b+"px"),this.setViewport(0,0,a,b))};this.getDrawingBufferSize=
-function(a){void 0===a&&(console.warn("WebGLRenderer: .getdrawingBufferSize() now requires a Vector2 as an argument"),a=new w);return a.set(ca*Q,J*Q).floor()};this.setDrawingBufferSize=function(a,b,c){ca=a;J=b;Q=c;u.width=Math.floor(a*c);u.height=Math.floor(b*c);this.setViewport(0,0,a,b)};this.getCurrentViewport=function(a){void 0===a&&(console.warn("WebGLRenderer: .getCurrentViewport() now requires a Vector4 as an argument"),a=new R);return a.copy(X)};this.getViewport=function(a){return a.copy(ea)};
-this.setViewport=function(a,b,c,d){a.isVector4?ea.set(a.x,a.y,a.z,a.w):ea.set(a,b,c,d);aa.viewport(X.copy(ea).multiplyScalar(Q).floor())};this.getScissor=function(a){return a.copy(ia)};this.setScissor=function(a,b,c,d){a.isVector4?ia.set(a.x,a.y,a.z,a.w):ia.set(a,b,c,d);aa.scissor(Y.copy(ia).multiplyScalar(Q).floor())};this.getScissorTest=function(){return lg};this.setScissorTest=function(a){aa.setScissorTest(lg=a)};this.setOpaqueSort=function(a){ka=a};this.setTransparentSort=function(a){ma=a};this.getClearColor=
-function(){return oa.getClearColor()};this.setClearColor=function(){oa.setClearColor.apply(oa,arguments)};this.getClearAlpha=function(){return oa.getClearAlpha()};this.setClearAlpha=function(){oa.setClearAlpha.apply(oa,arguments)};this.clear=function(a,b,c){var d=0;if(void 0===a||a)d|=16384;if(void 0===b||b)d|=256;if(void 0===c||c)d|=1024;H.clear(d)};this.clearColor=function(){this.clear(!0,!1,!1)};this.clearDepth=function(){this.clear(!1,!0,!1)};this.clearStencil=function(){this.clear(!1,!1,!0)};
+function(a){void 0===a&&(console.warn("WebGLRenderer: .getdrawingBufferSize() now requires a Vector2 as an argument"),a=new w);return a.set(ca*Q,J*Q).floor()};this.setDrawingBufferSize=function(a,b,c){ca=a;J=b;Q=c;u.width=Math.floor(a*c);u.height=Math.floor(b*c);this.setViewport(0,0,a,b)};this.getCurrentViewport=function(a){void 0===a&&(console.warn("WebGLRenderer: .getCurrentViewport() now requires a Vector4 as an argument"),a=new ia);return a.copy(X)};this.getViewport=function(a){return a.copy(ea)};
+this.setViewport=function(a,b,c,d){a.isVector4?ea.set(a.x,a.y,a.z,a.w):ea.set(a,b,c,d);aa.viewport(X.copy(ea).multiplyScalar(Q).floor())};this.getScissor=function(a){return a.copy(R)};this.setScissor=function(a,b,c,d){a.isVector4?R.set(a.x,a.y,a.z,a.w):R.set(a,b,c,d);aa.scissor(Y.copy(R).multiplyScalar(Q).floor())};this.getScissorTest=function(){return lg};this.setScissorTest=function(a){aa.setScissorTest(lg=a)};this.setOpaqueSort=function(a){ka=a};this.setTransparentSort=function(a){ma=a};this.getClearColor=
+function(){return pa.getClearColor()};this.setClearColor=function(){pa.setClearColor.apply(pa,arguments)};this.getClearAlpha=function(){return pa.getClearAlpha()};this.setClearAlpha=function(){pa.setClearAlpha.apply(pa,arguments)};this.clear=function(a,b,c){var d=0;if(void 0===a||a)d|=16384;if(void 0===b||b)d|=256;if(void 0===c||c)d|=1024;H.clear(d)};this.clearColor=function(){this.clear(!0,!1,!1)};this.clearDepth=function(){this.clear(!1,!0,!1)};this.clearStencil=function(){this.clear(!1,!1,!0)};
 this.dispose=function(){u.removeEventListener("webglcontextlost",d,!1);u.removeEventListener("webglcontextrestored",e,!1);ya.dispose();wa.dispose();S.dispose();ta.dispose();la.dispose();Ca.stop()};this.renderBufferImmediate=function(a,b){aa.initAttributes();var c=S.get(a);a.hasPositions&&!c.position&&(c.position=H.createBuffer());a.hasNormals&&!c.normal&&(c.normal=H.createBuffer());a.hasUvs&&!c.uv&&(c.uv=H.createBuffer());a.hasColors&&!c.color&&(c.color=H.createBuffer());b=b.getAttributes();a.hasPositions&&
 (H.bindBuffer(34962,c.position),H.bufferData(34962,a.positionArray,35048),aa.enableAttribute(b.position),H.vertexAttribPointer(b.position,3,5126,!1,0,0));a.hasNormals&&(H.bindBuffer(34962,c.normal),H.bufferData(34962,a.normalArray,35048),aa.enableAttribute(b.normal),H.vertexAttribPointer(b.normal,3,5126,!1,0,0));a.hasUvs&&(H.bindBuffer(34962,c.uv),H.bufferData(34962,a.uvArray,35048),aa.enableAttribute(b.uv),H.vertexAttribPointer(b.uv,2,5126,!1,0,0));a.hasColors&&(H.bindBuffer(34962,c.color),H.bufferData(34962,
 a.colorArray,35048),aa.enableAttribute(b.color),H.vertexAttribPointer(b.color,3,5126,!1,0,0));aa.disableUnusedAttributes();H.drawArrays(4,0,a.count);a.count=0};var Ja=new pb;this.renderBufferDirect=function(a,c,d,e,f,g){null===c&&(c=Ja);var k=f.isMesh&&0>f.matrixWorld.determinant(),l=h(a,c,e,f);aa.setMaterial(e,k);var m=!1;if(b!==d.id||ha!==l.id||xa!==(!0===e.wireframe))b=d.id,ha=l.id,xa=!0===e.wireframe,m=!0;if(e.morphTargets||e.morphNormals)Aa.update(f,d,e,l),m=!0;a=d.index;c=d.attributes.position;
-if(null===a){if(void 0===c||0===c.count)return}else if(0===a.count)return;var p=1;!0===e.wireframe&&(a=za.getWireframeAttribute(d),p=2);k=Ba;if(null!==a){var x=na.get(a);k=Da;k.setIndex(x)}if(m){if(!1!==Ia.isWebGL2||!f.isInstancedMesh&&!d.isInstancedBufferGeometry||null!==sa.get("ANGLE_instanced_arrays")){aa.initAttributes();m=d.attributes;l=l.getAttributes();var q=e.defaultAttributeValues;for(W in l){var r=l[W];if(0<=r){var t=m[W];if(void 0!==t){var n=t.normalized,u=t.itemSize,v=na.get(t);if(void 0!==
+if(null===a){if(void 0===c||0===c.count)return}else if(0===a.count)return;var p=1;!0===e.wireframe&&(a=za.getWireframeAttribute(d),p=2);k=Ba;if(null!==a){var x=oa.get(a);k=Da;k.setIndex(x)}if(m){if(!1!==Ia.isWebGL2||!f.isInstancedMesh&&!d.isInstancedBufferGeometry||null!==sa.get("ANGLE_instanced_arrays")){aa.initAttributes();m=d.attributes;l=l.getAttributes();var q=e.defaultAttributeValues;for(W in l){var r=l[W];if(0<=r){var t=m[W];if(void 0!==t){var n=t.normalized,u=t.itemSize,v=oa.get(t);if(void 0!==
 v){var y=v.buffer,z=v.type;v=v.bytesPerElement;if(t.isInterleavedBufferAttribute){var C=t.data,w=C.stride;t=t.offset;C&&C.isInstancedInterleavedBuffer?(aa.enableAttributeAndDivisor(r,C.meshPerAttribute),void 0===d.maxInstancedCount&&(d.maxInstancedCount=C.meshPerAttribute*C.count)):aa.enableAttribute(r);H.bindBuffer(34962,y);H.vertexAttribPointer(r,u,z,n,w*v,t*v)}else t.isInstancedBufferAttribute?(aa.enableAttributeAndDivisor(r,t.meshPerAttribute),void 0===d.maxInstancedCount&&(d.maxInstancedCount=
-t.meshPerAttribute*t.count)):aa.enableAttribute(r),H.bindBuffer(34962,y),H.vertexAttribPointer(r,u,z,n,0,0)}}else if("instanceMatrix"===W)v=na.get(f.instanceMatrix),void 0!==v&&(y=v.buffer,z=v.type,aa.enableAttributeAndDivisor(r+0,1),aa.enableAttributeAndDivisor(r+1,1),aa.enableAttributeAndDivisor(r+2,1),aa.enableAttributeAndDivisor(r+3,1),H.bindBuffer(34962,y),H.vertexAttribPointer(r+0,4,z,!1,64,0),H.vertexAttribPointer(r+1,4,z,!1,64,16),H.vertexAttribPointer(r+2,4,z,!1,64,32),H.vertexAttribPointer(r+
+t.meshPerAttribute*t.count)):aa.enableAttribute(r),H.bindBuffer(34962,y),H.vertexAttribPointer(r,u,z,n,0,0)}}else if("instanceMatrix"===W)v=oa.get(f.instanceMatrix),void 0!==v&&(y=v.buffer,z=v.type,aa.enableAttributeAndDivisor(r+0,1),aa.enableAttributeAndDivisor(r+1,1),aa.enableAttributeAndDivisor(r+2,1),aa.enableAttributeAndDivisor(r+3,1),H.bindBuffer(34962,y),H.vertexAttribPointer(r+0,4,z,!1,64,0),H.vertexAttribPointer(r+1,4,z,!1,64,16),H.vertexAttribPointer(r+2,4,z,!1,64,32),H.vertexAttribPointer(r+
 3,4,z,!1,64,48));else if(void 0!==q&&(n=q[W],void 0!==n))switch(n.length){case 2:H.vertexAttrib2fv(r,n);break;case 3:H.vertexAttrib3fv(r,n);break;case 4:H.vertexAttrib4fv(r,n);break;default:H.vertexAttrib1fv(r,n)}}}aa.disableUnusedAttributes()}null!==a&&H.bindBuffer(34963,x.buffer)}var W=d.drawRange.start*p;m=null!==g?g.start*p:0;x=Math.max(W,m);g=Math.max(0,Math.min(null!==a?a.count:c.count,W+d.drawRange.count*p,m+(null!==g?g.count*p:Infinity))-1-x+1);0!==g&&(f.isMesh?!0===e.wireframe?(aa.setLineWidth(e.wireframeLinewidth*
 (null===N?Q:1)),k.setMode(1)):k.setMode(4):f.isLine?(e=e.linewidth,void 0===e&&(e=1),aa.setLineWidth(e*(null===N?Q:1)),f.isLineSegments?k.setMode(1):f.isLineLoop?k.setMode(2):k.setMode(3)):f.isPoints?k.setMode(0):f.isSprite&&k.setMode(4),f.isInstancedMesh?k.renderInstances(d,x,g,f.count):d.isInstancedBufferGeometry?k.renderInstances(d,x,g,d.maxInstancedCount):k.render(x,g))};this.compile=function(a,b){G=wa.get(a,b);G.init();a.traverse(function(a){a.isLight&&(G.pushLight(a),a.castShadow&&G.pushShadow(a))});
-G.setupLights(b);a.traverse(function(b){if(b.material)if(Array.isArray(b.material))for(var c=0;c<b.material.length;c++)p(b.material[c],a,b);else p(b.material,a,b)})};var Ea=null,Ca=new Ah;Ca.setAnimationLoop(function(a){la.isPresenting||Ea&&Ea(a)});"undefined"!==typeof window&&Ca.setContext(window);this.setAnimationLoop=function(a){Ea=a;la.setAnimationLoop(a);Ca.start()};this.render=function(a,c,d,e){if(void 0!==d){console.warn("THREE.WebGLRenderer.render(): the renderTarget argument has been removed. Use .setRenderTarget() instead.");
-var f=d}if(void 0!==e){console.warn("THREE.WebGLRenderer.render(): the forceClear argument has been removed. Use .clear() instead.");var g=e}c&&c.isCamera?I||(ha=b=null,xa=!1,Pe=-1,Z=null,!0===a.autoUpdate&&a.updateMatrixWorld(),null===c.parent&&c.updateMatrixWorld(),la.enabled&&la.isPresenting&&(c=la.getCamera(c)),G=wa.get(a,c),G.init(),a.onBeforeRender(A,a,c,f||N),Od.multiplyMatrices(c.projectionMatrix,c.matrixWorldInverse),mg.setFromProjectionMatrix(Od),ng=this.localClippingEnabled,qa=Va.init(this.clippingPlanes,
-ng,c),B=ya.get(a,c),B.init(),l(a,c,0,A.sortObjects),!0===A.sortObjects&&B.sort(ka,ma),qa&&Va.beginShadows(),Fa.render(G.state.shadowsArray,a,c),G.setupLights(c),qa&&Va.endShadows(),this.info.autoReset&&this.info.reset(),void 0!==f&&this.setRenderTarget(f),la.enabled&&va.isAvailable()&&va.attachCamera(c),oa.render(B,a,c,g),d=B.opaque,e=B.transparent,a.overrideMaterial?(f=a.overrideMaterial,d.length&&m(d,a,c,f),e.length&&m(e,a,c,f)):(d.length&&m(d,a,c),e.length&&m(e,a,c)),a.onAfterRender(A,a,c),null!==
-N&&(U.updateRenderTargetMipmap(N),U.updateMultisampleRenderTarget(N)),aa.buffers.depth.setTest(!0),aa.buffers.depth.setMask(!0),aa.buffers.color.setMask(!0),aa.setPolygonOffset(!1),la.enabled&&va.isAvailable()&&va.detachCamera(c),G=B=null):console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.")};this.setFramebuffer=function(a){K!==a&&null===N&&H.bindFramebuffer(36160,a);K=a};this.getActiveCubeFace=function(){return L};this.getActiveMipmapLevel=function(){return M};
-this.getRenderTarget=function(){return N};this.setRenderTarget=function(a,b,c){N=a;L=b;M=c;a&&void 0===S.get(a).__webglFramebuffer&&U.setupRenderTarget(a);var d=K,e=!1;a?(d=S.get(a).__webglFramebuffer,a.isWebGLCubeRenderTarget?(d=d[b||0],e=!0):d=a.isWebGLMultisampleRenderTarget?S.get(a).__webglMultisampledFramebuffer:d,X.copy(a.viewport),Y.copy(a.scissor),ba=a.scissorTest):(X.copy(ea).multiplyScalar(Q).floor(),Y.copy(ia).multiplyScalar(Q).floor(),ba=lg);V!==d&&(H.bindFramebuffer(36160,d),V=d);aa.viewport(X);
-aa.scissor(Y);aa.setScissorTest(ba);e&&(a=S.get(a.texture),H.framebufferTexture2D(36160,36064,34069+(b||0),a.__webglTexture,c||0))};this.readRenderTargetPixels=function(a,b,c,d,e,f,g){if(a&&a.isWebGLRenderTarget){var k=S.get(a).__webglFramebuffer;a.isWebGLCubeRenderTarget&&void 0!==g&&(k=k[g]);if(k){g=!1;k!==V&&(H.bindFramebuffer(36160,k),g=!0);try{var l=a.texture,m=l.format,h=l.type;1023!==m&&pa.convert(m)!==H.getParameter(35739)?console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format."):
-1009===h||pa.convert(h)===H.getParameter(35738)||1015===h&&(Ia.isWebGL2||sa.get("OES_texture_float")||sa.get("WEBGL_color_buffer_float"))||1016===h&&(Ia.isWebGL2?sa.get("EXT_color_buffer_float"):sa.get("EXT_color_buffer_half_float"))?36053===H.checkFramebufferStatus(36160)?0<=b&&b<=a.width-d&&0<=c&&c<=a.height-e&&H.readPixels(b,c,d,e,pa.convert(m),pa.convert(h),f):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete."):console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.")}finally{g&&
-H.bindFramebuffer(36160,V)}}}else console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.")};this.copyFramebufferToTexture=function(a,b,c){void 0===c&&(c=0);var d=Math.pow(2,-c),e=Math.floor(b.image.width*d);d=Math.floor(b.image.height*d);var f=pa.convert(b.format);U.setTexture2D(b,0);H.copyTexImage2D(3553,c,f,a.x,a.y,e,d,0);aa.unbindTexture()};this.copyTextureToTexture=function(a,b,c,d){var e=b.image.width,f=b.image.height,g=pa.convert(c.format),k=
-pa.convert(c.type);U.setTexture2D(c,0);b.isDataTexture?H.texSubImage2D(3553,d||0,a.x,a.y,e,f,g,k,b.image.data):H.texSubImage2D(3553,d||0,a.x,a.y,g,k,b.image);aa.unbindTexture()};this.initTexture=function(a){U.setTexture2D(a,0);aa.unbindTexture()};"undefined"!==typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}function Re(a,b){this.name="";this.color=new B(a);this.density=void 0!==b?b:2.5E-4}function Se(a,b,c){this.name="";this.color=new B(a);this.near=
-void 0!==b?b:1;this.far=void 0!==c?c:1E3}function sb(a,b){this.array=a;this.stride=b;this.count=void 0!==a?a.length/b:0;this.usage=35044;this.updateRange={offset:0,count:-1};this.version=0}function Qd(a,b,c,d){this.data=a;this.itemSize=b;this.offset=c;this.normalized=!0===d}function Jb(a){K.call(this);this.type="SpriteMaterial";this.color=new B(16777215);this.alphaMap=this.map=null;this.rotation=0;this.transparent=this.sizeAttenuation=!0;this.setValues(a)}function Rd(a){D.call(this);this.type="Sprite";
-if(void 0===Nc){Nc=new A;var b=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]);b=new sb(b,5);Nc.setIndex([0,1,2,0,2,3]);Nc.setAttribute("position",new Qd(b,3,0,!1));Nc.setAttribute("uv",new Qd(b,2,3,!1))}this.geometry=Nc;this.material=void 0!==a?a:new Jb;this.center=new w(.5,.5)}function Te(a,b,c,d,e,f){Oc.subVectors(a,c).addScalar(.5).multiply(d);void 0!==e?(Sd.x=f*Oc.x-e*Oc.y,Sd.y=e*Oc.x+f*Oc.y):Sd.copy(Oc);a.copy(b);a.x+=Sd.x;a.y+=Sd.y;a.applyMatrix4(ai)}function Td(){D.call(this);
-this.type="LOD";Object.defineProperties(this,{levels:{enumerable:!0,value:[]}});this.autoUpdate=!0}function Ud(a,b){a&&a.isGeometry&&console.error("THREE.SkinnedMesh no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");ca.call(this,a,b);this.type="SkinnedMesh";this.bindMode="attached";this.bindMatrix=new O;this.bindMatrixInverse=new O}function Ue(a,b){a=a||[];this.bones=a.slice(0);this.boneMatrices=new Float32Array(16*this.bones.length);this.frame=-1;if(void 0===b)this.calculateInverses();
-else if(this.bones.length===b.length)this.boneInverses=b.slice(0);else for(console.warn("THREE.Skeleton boneInverses is the wrong length."),this.boneInverses=[],a=0,b=this.bones.length;a<b;a++)this.boneInverses.push(new O)}function rg(){D.call(this);this.type="Bone"}function Ve(a,b,c){ca.call(this,a,b);this.instanceMatrix=new M(new Float32Array(16*c),16);this.count=c}function ka(a){K.call(this);this.type="LineBasicMaterial";this.color=new B(16777215);this.linewidth=1;this.linejoin=this.linecap="round";
-this.setValues(a)}function La(a,b,c){1===c&&console.error("THREE.Line: parameter THREE.LinePieces no longer supported. Use THREE.LineSegments instead.");D.call(this);this.type="Line";this.geometry=void 0!==a?a:new A;this.material=void 0!==b?b:new ka}function ma(a,b){La.call(this,a,b);this.type="LineSegments"}function We(a,b){La.call(this,a,b);this.type="LineLoop"}function Wa(a){K.call(this);this.type="PointsMaterial";this.color=new B(16777215);this.alphaMap=this.map=null;this.size=1;this.sizeAttenuation=
-!0;this.morphTargets=!1;this.setValues(a)}function Pc(a,b){D.call(this);this.type="Points";this.geometry=void 0!==a?a:new A;this.material=void 0!==b?b:new Wa;this.updateMorphTargets()}function sg(a,b,c,d,e,f,g){var k=tg.distanceSqToPoint(a);k<c&&(c=new n,tg.closestPointToPoint(a,c),c.applyMatrix4(d),a=e.ray.origin.distanceTo(c),a<e.near||a>e.far||f.push({distance:a,distanceToRay:Math.sqrt(k),point:c,index:b,face:null,object:g}))}function ug(a,b,c,d,e,f,g,k,l){Z.call(this,a,b,c,d,e,f,g,k,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 Qc(a,b,c,d,e,f,g,k,l,m,h,p){Z.call(this,null,f,g,k,l,m,d,e,h,p);this.image={width:b,height:c};this.mipmaps=a;this.generateMipmaps=this.flipY=!1}function Vd(a,b,c,d,e,f,g,k,l){Z.call(this,a,b,c,d,e,f,g,k,l);this.needsUpdate=!0}function Wd(a,b,c,d,e,f,g,k,l,m){m=void 0!==m?m:1026;if(1026!==m&&1027!==m)throw Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");
-void 0===c&&1026===m&&(c=1012);void 0===c&&1027===m&&(c=1020);Z.call(this,null,d,e,f,g,k,m,c,l);this.image={width:a,height:b};this.magFilter=void 0!==g?g:1003;this.minFilter=void 0!==k?k:1003;this.generateMipmaps=this.flipY=!1}function Rc(a){A.call(this);this.type="WireframeGeometry";var b=[],c,d,e,f=[0,0],g={},k=["a","b","c"];if(a&&a.isGeometry){var l=a.faces;var m=0;for(d=l.length;m<d;m++){var h=l[m];for(c=0;3>c;c++){var p=h[k[c]];var q=h[k[(c+1)%3]];f[0]=Math.min(p,q);f[1]=Math.max(p,q);p=f[0]+
-","+f[1];void 0===g[p]&&(g[p]={index1:f[0],index2:f[1]})}}for(p in g)m=g[p],k=a.vertices[m.index1],b.push(k.x,k.y,k.z),k=a.vertices[m.index2],b.push(k.x,k.y,k.z)}else if(a&&a.isBufferGeometry)if(k=new n,null!==a.index){l=a.attributes.position;h=a.index;var t=a.groups;0===t.length&&(t=[{start:0,count:h.count,materialIndex:0}]);a=0;for(e=t.length;a<e;++a)for(m=t[a],c=m.start,d=m.count,m=c,d=c+d;m<d;m+=3)for(c=0;3>c;c++)p=h.getX(m+c),q=h.getX(m+(c+1)%3),f[0]=Math.min(p,q),f[1]=Math.max(p,q),p=f[0]+","+
-f[1],void 0===g[p]&&(g[p]={index1:f[0],index2:f[1]});for(p in g)m=g[p],k.fromBufferAttribute(l,m.index1),b.push(k.x,k.y,k.z),k.fromBufferAttribute(l,m.index2),b.push(k.x,k.y,k.z)}else for(l=a.attributes.position,m=0,d=l.count/3;m<d;m++)for(c=0;3>c;c++)g=3*m+c,k.fromBufferAttribute(l,g),b.push(k.x,k.y,k.z),g=3*m+(c+1)%3,k.fromBufferAttribute(l,g),b.push(k.x,k.y,k.z);this.setAttribute("position",new E(b,3))}function Xd(a,b,c){L.call(this);this.type="ParametricGeometry";this.parameters={func:a,slices:b,
-stacks:c};this.fromBufferGeometry(new Sc(a,b,c));this.mergeVertices()}function Sc(a,b,c){A.call(this);this.type="ParametricBufferGeometry";this.parameters={func:a,slices:b,stacks:c};var d=[],e=[],f=[],g=[],k=new n,l=new n,m=new n,h=new n,p=new n,q,t;3>a.length&&console.error("THREE.ParametricGeometry: Function must now modify a Vector3 as third parameter.");var r=b+1;for(q=0;q<=c;q++){var u=q/c;for(t=0;t<=b;t++){var y=t/b;a(y,u,l);e.push(l.x,l.y,l.z);0<=y-1E-5?(a(y-1E-5,u,m),h.subVectors(l,m)):(a(y+
-1E-5,u,m),h.subVectors(m,l));0<=u-1E-5?(a(y,u-1E-5,m),p.subVectors(l,m)):(a(y,u+1E-5,m),p.subVectors(m,l));k.crossVectors(h,p).normalize();f.push(k.x,k.y,k.z);g.push(y,u)}}for(q=0;q<c;q++)for(t=0;t<b;t++)a=q*r+t+1,k=(q+1)*r+t+1,l=(q+1)*r+t,d.push(q*r+t,a,l),d.push(a,k,l);this.setIndex(d);this.setAttribute("position",new E(e,3));this.setAttribute("normal",new E(f,3));this.setAttribute("uv",new E(g,2))}function Yd(a,b,c,d){L.call(this);this.type="PolyhedronGeometry";this.parameters={vertices:a,indices:b,
-radius:c,detail:d};this.fromBufferGeometry(new Ja(a,b,c,d));this.mergeVertices()}function Ja(a,b,c,d){function e(a){k.push(a.x,a.y,a.z)}function f(b,c){b*=3;c.x=a[b+0];c.y=a[b+1];c.z=a[b+2]}function g(a,b,c,d){0>d&&1===a.x&&(l[b]=a.x-1);0===c.x&&0===c.z&&(l[b]=d/2/Math.PI+.5)}A.call(this);this.type="PolyhedronBufferGeometry";this.parameters={vertices:a,indices:b,radius:c,detail:d};c=c||1;d=d||0;var k=[],l=[];(function(a){for(var c=new n,d=new n,g=new n,k=0;k<b.length;k+=3){f(b[k+0],c);f(b[k+1],d);
-f(b[k+2],g);var l,m,h=c,v=d,C=g,w=Math.pow(2,a),ja=[];for(m=0;m<=w;m++){ja[m]=[];var z=h.clone().lerp(C,m/w),A=v.clone().lerp(C,m/w),B=w-m;for(l=0;l<=B;l++)ja[m][l]=0===l&&m===w?z:z.clone().lerp(A,l/B)}for(m=0;m<w;m++)for(l=0;l<2*(w-m)-1;l++)h=Math.floor(l/2),0===l%2?(e(ja[m][h+1]),e(ja[m+1][h]),e(ja[m][h])):(e(ja[m][h+1]),e(ja[m+1][h+1]),e(ja[m+1][h]))}})(d);(function(a){for(var b=new n,c=0;c<k.length;c+=3)b.x=k[c+0],b.y=k[c+1],b.z=k[c+2],b.normalize().multiplyScalar(a),k[c+0]=b.x,k[c+1]=b.y,k[c+
-2]=b.z})(c);(function(){for(var a=new n,b=0;b<k.length;b+=3)a.x=k[b+0],a.y=k[b+1],a.z=k[b+2],l.push(Math.atan2(a.z,-a.x)/2/Math.PI+.5,1-(Math.atan2(-a.y,Math.sqrt(a.x*a.x+a.z*a.z))/Math.PI+.5));a=new n;b=new n;for(var c=new n,d=new n,e=new w,f=new w,h=new w,y=0,v=0;y<k.length;y+=9,v+=6){a.set(k[y+0],k[y+1],k[y+2]);b.set(k[y+3],k[y+4],k[y+5]);c.set(k[y+6],k[y+7],k[y+8]);e.set(l[v+0],l[v+1]);f.set(l[v+2],l[v+3]);h.set(l[v+4],l[v+5]);d.copy(a).add(b).add(c).divideScalar(3);var C=Math.atan2(d.z,-d.x);
-g(e,v+0,a,C);g(f,v+2,b,C);g(h,v+4,c,C)}for(a=0;a<l.length;a+=6)b=l[a+0],c=l[a+2],d=l[a+4],e=Math.min(b,c,d),.9<Math.max(b,c,d)&&.1>e&&(.2>b&&(l[a+0]+=1),.2>c&&(l[a+2]+=1),.2>d&&(l[a+4]+=1))})();this.setAttribute("position",new E(k,3));this.setAttribute("normal",new E(k.slice(),3));this.setAttribute("uv",new E(l,2));0===d?this.computeVertexNormals():this.normalizeNormals()}function Zd(a,b){L.call(this);this.type="TetrahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new Tc(a,
-b));this.mergeVertices()}function Tc(a,b){Ja.call(this,[1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],[2,1,0,0,3,2,1,3,0,2,3,1],a,b);this.type="TetrahedronBufferGeometry";this.parameters={radius:a,detail:b}}function $d(a,b){L.call(this);this.type="OctahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new dc(a,b));this.mergeVertices()}function dc(a,b){Ja.call(this,[1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2],a,b);this.type="OctahedronBufferGeometry";
-this.parameters={radius:a,detail:b}}function ae(a,b){L.call(this);this.type="IcosahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new Uc(a,b));this.mergeVertices()}function Uc(a,b){var c=(1+Math.sqrt(5))/2;Ja.call(this,[-1,c,0,1,c,0,-1,-c,0,1,-c,0,0,-1,c,0,1,c,0,-1,-c,0,1,-c,c,0,-1,c,0,1,-c,0,-1,-c,0,1],[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1],a,b);this.type="IcosahedronBufferGeometry";
-this.parameters={radius:a,detail:b}}function be(a,b){L.call(this);this.type="DodecahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new Vc(a,b));this.mergeVertices()}function Vc(a,b){var c=(1+Math.sqrt(5))/2,d=1/c;Ja.call(this,[-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-d,-c,0,-d,c,0,d,-c,0,d,c,-d,-c,0,-d,c,0,d,-c,0,d,c,0,-c,0,-d,c,0,-d,-c,0,d,c,0,d],[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,
-0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9],a,b);this.type="DodecahedronBufferGeometry";this.parameters={radius:a,detail:b}}function ce(a,b,c,d,e,f){L.call(this);this.type="TubeGeometry";this.parameters={path:a,tubularSegments:b,radius:c,radialSegments:d,closed:e};void 0!==f&&console.warn("THREE.TubeGeometry: taper has been removed.");a=new ec(a,b,c,d,e);this.tangents=a.tangents;
-this.normals=a.normals;this.binormals=a.binormals;this.fromBufferGeometry(a);this.mergeVertices()}function ec(a,b,c,d,e){function f(e){h=a.getPointAt(e/b,h);var f=g.normals[e];e=g.binormals[e];for(q=0;q<=d;q++){var m=q/d*Math.PI*2,p=Math.sin(m);m=-Math.cos(m);l.x=m*f.x+p*e.x;l.y=m*f.y+p*e.y;l.z=m*f.z+p*e.z;l.normalize();r.push(l.x,l.y,l.z);k.x=h.x+c*l.x;k.y=h.y+c*l.y;k.z=h.z+c*l.z;t.push(k.x,k.y,k.z)}}A.call(this);this.type="TubeBufferGeometry";this.parameters={path:a,tubularSegments:b,radius:c,radialSegments:d,
-closed:e};b=b||64;c=c||1;d=d||8;e=e||!1;var g=a.computeFrenetFrames(b,e);this.tangents=g.tangents;this.normals=g.normals;this.binormals=g.binormals;var k=new n,l=new n,m=new w,h=new n,p,q,t=[],r=[],u=[],y=[];for(p=0;p<b;p++)f(p);f(!1===e?b:0);for(p=0;p<=b;p++)for(q=0;q<=d;q++)m.x=p/b,m.y=q/d,u.push(m.x,m.y);(function(){for(q=1;q<=b;q++)for(p=1;p<=d;p++){var a=(d+1)*q+(p-1),c=(d+1)*q+p,e=(d+1)*(q-1)+p;y.push((d+1)*(q-1)+(p-1),a,e);y.push(a,c,e)}})();this.setIndex(y);this.setAttribute("position",new E(t,
-3));this.setAttribute("normal",new E(r,3));this.setAttribute("uv",new E(u,2))}function de(a,b,c,d,e,f,g){L.call(this);this.type="TorusKnotGeometry";this.parameters={radius:a,tube:b,tubularSegments:c,radialSegments:d,p:e,q:f};void 0!==g&&console.warn("THREE.TorusKnotGeometry: heightScale has been deprecated. Use .scale( x, y, z ) instead.");this.fromBufferGeometry(new Wc(a,b,c,d,e,f));this.mergeVertices()}function Wc(a,b,c,d,e,f){function g(a,b,c,d,e){var f=Math.sin(a);b=c/b*a;c=Math.cos(b);e.x=d*
-(2+c)*.5*Math.cos(a);e.y=d*(2+c)*f*.5;e.z=d*Math.sin(b)*.5}A.call(this);this.type="TorusKnotBufferGeometry";this.parameters={radius:a,tube:b,tubularSegments:c,radialSegments:d,p:e,q:f};a=a||1;b=b||.4;c=Math.floor(c)||64;d=Math.floor(d)||8;e=e||2;f=f||3;var k=[],l=[],m=[],h=[],p,q=new n,t=new n,r=new n,u=new n,y=new n,v=new n,C=new n;for(p=0;p<=c;++p){var w=p/c*e*Math.PI*2;g(w,e,f,a,r);g(w+.01,e,f,a,u);v.subVectors(u,r);C.addVectors(u,r);y.crossVectors(v,C);C.crossVectors(y,v);y.normalize();C.normalize();
-for(w=0;w<=d;++w){var ja=w/d*Math.PI*2,z=-b*Math.cos(ja);ja=b*Math.sin(ja);q.x=r.x+(z*C.x+ja*y.x);q.y=r.y+(z*C.y+ja*y.y);q.z=r.z+(z*C.z+ja*y.z);l.push(q.x,q.y,q.z);t.subVectors(q,r).normalize();m.push(t.x,t.y,t.z);h.push(p/c);h.push(w/d)}}for(w=1;w<=c;w++)for(p=1;p<=d;p++)a=(d+1)*w+(p-1),b=(d+1)*w+p,e=(d+1)*(w-1)+p,k.push((d+1)*(w-1)+(p-1),a,e),k.push(a,b,e);this.setIndex(k);this.setAttribute("position",new E(l,3));this.setAttribute("normal",new E(m,3));this.setAttribute("uv",new E(h,2))}function ee(a,
-b,c,d,e){L.call(this);this.type="TorusGeometry";this.parameters={radius:a,tube:b,radialSegments:c,tubularSegments:d,arc:e};this.fromBufferGeometry(new Xc(a,b,c,d,e));this.mergeVertices()}function Xc(a,b,c,d,e){A.call(this);this.type="TorusBufferGeometry";this.parameters={radius:a,tube:b,radialSegments:c,tubularSegments:d,arc:e};a=a||1;b=b||.4;c=Math.floor(c)||8;d=Math.floor(d)||6;e=e||2*Math.PI;var f=[],g=[],k=[],l=[],m=new n,h=new n,p=new n,q,t;for(q=0;q<=c;q++)for(t=0;t<=d;t++){var r=t/d*e,u=q/
-c*Math.PI*2;h.x=(a+b*Math.cos(u))*Math.cos(r);h.y=(a+b*Math.cos(u))*Math.sin(r);h.z=b*Math.sin(u);g.push(h.x,h.y,h.z);m.x=a*Math.cos(r);m.y=a*Math.sin(r);p.subVectors(h,m).normalize();k.push(p.x,p.y,p.z);l.push(t/d);l.push(q/c)}for(q=1;q<=c;q++)for(t=1;t<=d;t++)a=(d+1)*(q-1)+t-1,b=(d+1)*(q-1)+t,e=(d+1)*q+t,f.push((d+1)*q+t-1,a,e),f.push(a,b,e);this.setIndex(f);this.setAttribute("position",new E(g,3));this.setAttribute("normal",new E(k,3));this.setAttribute("uv",new E(l,2))}function bi(a,b,c,d,e){for(var f,
-g=0,k=b,l=c-d;k<c;k+=d)g+=(a[l]-a[k])*(a[k+1]+a[l+1]),l=k;if(e===0<g)for(e=b;e<c;e+=d)f=ci(e,a[e],a[e+1],f);else for(e=c-d;e>=b;e-=d)f=ci(e,a[e],a[e+1],f);f&&fc(f,f.next)&&(fe(f),f=f.next);return f}function ge(a,b){if(!a)return a;b||(b=a);do{var c=!1;if(a.steiner||!fc(a,a.next)&&0!==ta(a.prev,a,a.next))a=a.next;else{fe(a);a=b=a.prev;if(a===a.next)break;c=!0}}while(c||a!==b);return b}function he(a,b,c,d,e,f,g){if(a){if(!g&&f){var k=a,l=k;do null===l.z&&(l.z=vg(l.x,l.y,d,e,f)),l.prevZ=l.prev,l=l.nextZ=
-l.next;while(l!==k);l.prevZ.nextZ=null;l.prevZ=null;k=l;var m,h,p,q,t=1;do{l=k;var r=k=null;for(h=0;l;){h++;var n=l;for(m=p=0;m<t&&(p++,n=n.nextZ,n);m++);for(q=t;0<p||0<q&&n;)0!==p&&(0===q||!n||l.z<=n.z)?(m=l,l=l.nextZ,p--):(m=n,n=n.nextZ,q--),r?r.nextZ=m:k=m,m.prevZ=r,r=m;l=n}r.nextZ=null;t*=2}while(1<h)}for(k=a;a.prev!==a.next;){l=a.prev;n=a.next;if(f)r=Kk(a,d,e,f);else a:if(r=a,h=r.prev,p=r,t=r.next,0<=ta(h,p,t))r=!1;else{for(m=r.next.next;m!==r.prev;){if(Yc(h.x,h.y,p.x,p.y,t.x,t.y,m.x,m.y)&&0<=
-ta(m.prev,m,m.next)){r=!1;break a}m=m.next}r=!0}if(r)b.push(l.i/c),b.push(a.i/c),b.push(n.i/c),fe(a),k=a=n.next;else if(a=n,a===k){if(!g)he(ge(a),b,c,d,e,f,1);else if(1===g){g=b;k=c;l=a;do n=l.prev,r=l.next.next,!fc(n,r)&&di(n,l,l.next,r)&&ie(n,r)&&ie(r,n)&&(g.push(n.i/k),g.push(l.i/k),g.push(r.i/k),fe(l),fe(l.next),l=a=r),l=l.next;while(l!==a);a=l;he(a,b,c,d,e,f,2)}else if(2===g)a:{g=a;do{for(k=g.next.next;k!==g.prev;){if(l=g.i!==k.i){l=g;n=k;if(r=l.next.i!==n.i&&l.prev.i!==n.i){b:{r=l;do{if(r.i!==
-l.i&&r.next.i!==l.i&&r.i!==n.i&&r.next.i!==n.i&&di(r,r.next,l,n)){r=!0;break b}r=r.next}while(r!==l);r=!1}r=!r}if(r=r&&ie(l,n)&&ie(n,l)){r=l;h=!1;p=(l.x+n.x)/2;n=(l.y+n.y)/2;do r.y>n!==r.next.y>n&&r.next.y!==r.y&&p<(r.next.x-r.x)*(n-r.y)/(r.next.y-r.y)+r.x&&(h=!h),r=r.next;while(r!==l);r=h}l=r}if(l){a=ei(g,k);g=ge(g,g.next);a=ge(a,a.next);he(g,b,c,d,e,f);he(a,b,c,d,e,f);break a}k=k.next}g=g.next}while(g!==a)}break}}}}function Kk(a,b,c,d){var e=a.prev,f=a.next;if(0<=ta(e,a,f))return!1;var g=e.x>a.x?
-e.x>f.x?e.x:f.x:a.x>f.x?a.x:f.x,k=e.y>a.y?e.y>f.y?e.y:f.y:a.y>f.y?a.y:f.y,l=vg(e.x<a.x?e.x<f.x?e.x:f.x:a.x<f.x?a.x:f.x,e.y<a.y?e.y<f.y?e.y:f.y:a.y<f.y?a.y:f.y,b,c,d);b=vg(g,k,b,c,d);c=a.prevZ;for(d=a.nextZ;c&&c.z>=l&&d&&d.z<=b;){if(c!==a.prev&&c!==a.next&&Yc(e.x,e.y,a.x,a.y,f.x,f.y,c.x,c.y)&&0<=ta(c.prev,c,c.next))return!1;c=c.prevZ;if(d!==a.prev&&d!==a.next&&Yc(e.x,e.y,a.x,a.y,f.x,f.y,d.x,d.y)&&0<=ta(d.prev,d,d.next))return!1;d=d.nextZ}for(;c&&c.z>=l;){if(c!==a.prev&&c!==a.next&&Yc(e.x,e.y,a.x,a.y,
-f.x,f.y,c.x,c.y)&&0<=ta(c.prev,c,c.next))return!1;c=c.prevZ}for(;d&&d.z<=b;){if(d!==a.prev&&d!==a.next&&Yc(e.x,e.y,a.x,a.y,f.x,f.y,d.x,d.y)&&0<=ta(d.prev,d,d.next))return!1;d=d.nextZ}return!0}function Lk(a,b){return a.x-b.x}function Mk(a,b){var c=b,d=a.x,e=a.y,f=-Infinity;do{if(e<=c.y&&e>=c.next.y&&c.next.y!==c.y){var g=c.x+(e-c.y)*(c.next.x-c.x)/(c.next.y-c.y);if(g<=d&&g>f){f=g;if(g===d){if(e===c.y)return c;if(e===c.next.y)return c.next}var k=c.x<c.next.x?c:c.next}}c=c.next}while(c!==b);if(!k)return null;
-if(d===f)return k.prev;b=k;g=k.x;var l=k.y,m=Infinity;for(c=k.next;c!==b;){if(d>=c.x&&c.x>=g&&d!==c.x&&Yc(e<l?d:f,e,g,l,e<l?f:d,e,c.x,c.y)){var h=Math.abs(e-c.y)/(d-c.x);(h<m||h===m&&c.x>k.x)&&ie(c,a)&&(k=c,m=h)}c=c.next}return k}function vg(a,b,c,d,e){a=32767*(a-c)*e;b=32767*(b-d)*e;a=(a|a<<8)&16711935;a=(a|a<<4)&252645135;a=(a|a<<2)&858993459;b=(b|b<<8)&16711935;b=(b|b<<4)&252645135;b=(b|b<<2)&858993459;return(a|a<<1)&1431655765|((b|b<<1)&1431655765)<<1}function Nk(a){var b=a,c=a;do{if(b.x<c.x||
-b.x===c.x&&b.y<c.y)c=b;b=b.next}while(b!==a);return c}function Yc(a,b,c,d,e,f,g,k){return 0<=(e-g)*(b-k)-(a-g)*(f-k)&&0<=(a-g)*(d-k)-(c-g)*(b-k)&&0<=(c-g)*(f-k)-(e-g)*(d-k)}function ta(a,b,c){return(b.y-a.y)*(c.x-b.x)-(b.x-a.x)*(c.y-b.y)}function fc(a,b){return a.x===b.x&&a.y===b.y}function di(a,b,c,d){return fc(a,c)&&fc(b,d)||fc(a,d)&&fc(c,b)?!0:0<ta(a,b,c)!==0<ta(a,b,d)&&0<ta(c,d,a)!==0<ta(c,d,b)}function ie(a,b){return 0>ta(a.prev,a,a.next)?0<=ta(a,b,a.next)&&0<=ta(a,a.prev,b):0>ta(a,b,a.prev)||
-0>ta(a,a.next,b)}function ei(a,b){var c=new wg(a.i,a.x,a.y),d=new wg(b.i,b.x,b.y),e=a.next,f=b.prev;a.next=b;b.prev=a;c.next=e;e.prev=c;d.next=c;c.prev=d;f.next=d;d.prev=f;return d}function ci(a,b,c,d){a=new wg(a,b,c);d?(a.next=d.next,a.prev=d,d.next.prev=a,d.next=a):(a.prev=a,a.next=a);return a}function fe(a){a.next.prev=a.prev;a.prev.next=a.next;a.prevZ&&(a.prevZ.nextZ=a.nextZ);a.nextZ&&(a.nextZ.prevZ=a.prevZ)}function wg(a,b,c){this.i=a;this.x=b;this.y=c;this.nextZ=this.prevZ=this.z=this.next=
-this.prev=null;this.steiner=!1}function fi(a){var b=a.length;2<b&&a[b-1].equals(a[0])&&a.pop()}function gi(a,b){for(var c=0;c<b.length;c++)a.push(b[c].x),a.push(b[c].y)}function gc(a,b){L.call(this);this.type="ExtrudeGeometry";this.parameters={shapes:a,options:b};this.fromBufferGeometry(new gb(a,b));this.mergeVertices()}function gb(a,b){function c(a){function c(a,b,c){b||console.error("THREE.ExtrudeGeometry: vec does not exist");return b.clone().multiplyScalar(c).add(a)}function g(a,b,c){var d=a.x-
-b.x;var e=a.y-b.y;var f=c.x-a.x;var g=c.y-a.y,k=d*d+e*e;if(Math.abs(d*g-e*f)>Number.EPSILON){var l=Math.sqrt(k),m=Math.sqrt(f*f+g*g);k=b.x-e/l;b=b.y+d/l;g=((c.x-g/m-k)*g-(c.y+f/m-b)*f)/(d*g-e*f);f=k+d*g-a.x;d=b+e*g-a.y;e=f*f+d*d;if(2>=e)return new w(f,d);e=Math.sqrt(e/2)}else a=!1,d>Number.EPSILON?f>Number.EPSILON&&(a=!0):d<-Number.EPSILON?f<-Number.EPSILON&&(a=!0):Math.sign(e)===Math.sign(g)&&(a=!0),a?(f=-e,e=Math.sqrt(k)):(f=d,d=e,e=Math.sqrt(k/2));return new w(f/e,d/e)}function k(a,b){for(J=a.length;0<=
---J;){var c=J;var f=J-1;0>f&&(f=a.length-1);var g,k=C+2*E;for(g=0;g<k;g++){var l=Y*g,m=Y*(g+1),h=b+f+l,p=b+f+m;m=b+c+m;r(b+c+l);r(h);r(m);r(h);r(p);r(m);l=e.length/3;l=G.generateSideWallUV(d,e,l-6,l-3,l-2,l-1);u(l[0]);u(l[1]);u(l[3]);u(l[1]);u(l[2]);u(l[3])}}}function l(a,b,c){y.push(a);y.push(b);y.push(c)}function h(a,b,c){r(a);r(b);r(c);a=e.length/3;a=G.generateTopUV(d,e,a-3,a-2,a-1);u(a[0]);u(a[1]);u(a[2])}function r(a){e.push(y[3*a]);e.push(y[3*a+1]);e.push(y[3*a+2])}function u(a){f.push(a.x);
-f.push(a.y)}var y=[],v=void 0!==b.curveSegments?b.curveSegments:12,C=void 0!==b.steps?b.steps:1,W=void 0!==b.depth?b.depth:100,A=void 0!==b.bevelEnabled?b.bevelEnabled:!0,z=void 0!==b.bevelThickness?b.bevelThickness:6,B=void 0!==b.bevelSize?b.bevelSize:z-2,D=void 0!==b.bevelOffset?b.bevelOffset:0,E=void 0!==b.bevelSegments?b.bevelSegments:3,F=b.extrudePath,G=void 0!==b.UVGenerator?b.UVGenerator:Ok;void 0!==b.amount&&(console.warn("THREE.ExtrudeBufferGeometry: amount has been renamed to depth."),W=
-b.amount);var I=!1;if(F){var K=F.getSpacedPoints(C);I=!0;A=!1;var L=F.computeFrenetFrames(C,!1);var M=new n;var P=new n;var N=new n}A||(D=B=z=E=0);var O;v=a.extractPoints(v);a=v.shape;var S=v.holes;if(!tb.isClockWise(a)){a=a.reverse();var ha=0;for(O=S.length;ha<O;ha++){var xa=S[ha];tb.isClockWise(xa)&&(S[ha]=xa.reverse())}}var Z=tb.triangulateShape(a,S),V=a;ha=0;for(O=S.length;ha<O;ha++)xa=S[ha],a=a.concat(xa);var X,Y=a.length,T,ca=Z.length;v=[];var J=0;var Q=V.length;var U=Q-1;for(X=J+1;J<Q;J++,
-U++,X++)U===Q&&(U=0),X===Q&&(X=0),v[J]=g(V[J],V[U],V[X]);F=[];var da=v.concat();ha=0;for(O=S.length;ha<O;ha++){xa=S[ha];var ba=[];J=0;Q=xa.length;U=Q-1;for(X=J+1;J<Q;J++,U++,X++)U===Q&&(U=0),X===Q&&(X=0),ba[J]=g(xa[J],xa[U],xa[X]);F.push(ba);da=da.concat(ba)}for(U=0;U<E;U++){Q=U/E;var ea=z*Math.cos(Q*Math.PI/2);X=B*Math.sin(Q*Math.PI/2)+D;J=0;for(Q=V.length;J<Q;J++){var R=c(V[J],v[J],X);l(R.x,R.y,-ea)}ha=0;for(O=S.length;ha<O;ha++)for(xa=S[ha],ba=F[ha],J=0,Q=xa.length;J<Q;J++)R=c(xa[J],ba[J],X),l(R.x,
-R.y,-ea)}X=B+D;for(J=0;J<Y;J++)R=A?c(a[J],da[J],X):a[J],I?(P.copy(L.normals[0]).multiplyScalar(R.x),M.copy(L.binormals[0]).multiplyScalar(R.y),N.copy(K[0]).add(P).add(M),l(N.x,N.y,N.z)):l(R.x,R.y,0);for(Q=1;Q<=C;Q++)for(J=0;J<Y;J++)R=A?c(a[J],da[J],X):a[J],I?(P.copy(L.normals[Q]).multiplyScalar(R.x),M.copy(L.binormals[Q]).multiplyScalar(R.y),N.copy(K[Q]).add(P).add(M),l(N.x,N.y,N.z)):l(R.x,R.y,W/C*Q);for(U=E-1;0<=U;U--){Q=U/E;ea=z*Math.cos(Q*Math.PI/2);X=B*Math.sin(Q*Math.PI/2)+D;J=0;for(Q=V.length;J<
-Q;J++)R=c(V[J],v[J],X),l(R.x,R.y,W+ea);ha=0;for(O=S.length;ha<O;ha++)for(xa=S[ha],ba=F[ha],J=0,Q=xa.length;J<Q;J++)R=c(xa[J],ba[J],X),I?l(R.x,R.y+K[C-1].y,K[C-1].x+ea):l(R.x,R.y,W+ea)}(function(){var a=e.length/3;if(A){var b=0*Y;for(J=0;J<ca;J++)T=Z[J],h(T[2]+b,T[1]+b,T[0]+b);b=Y*(C+2*E);for(J=0;J<ca;J++)T=Z[J],h(T[0]+b,T[1]+b,T[2]+b)}else{for(J=0;J<ca;J++)T=Z[J],h(T[2],T[1],T[0]);for(J=0;J<ca;J++)T=Z[J],h(T[0]+Y*C,T[1]+Y*C,T[2]+Y*C)}d.addGroup(a,e.length/3-a,0)})();(function(){var a=e.length/3,b=
-0;k(V,b);b+=V.length;ha=0;for(O=S.length;ha<O;ha++)xa=S[ha],k(xa,b),b+=xa.length;d.addGroup(a,e.length/3-a,1)})()}A.call(this);this.type="ExtrudeBufferGeometry";this.parameters={shapes:a,options:b};a=Array.isArray(a)?a:[a];for(var d=this,e=[],f=[],g=0,k=a.length;g<k;g++)c(a[g]);this.setAttribute("position",new E(e,3));this.setAttribute("uv",new E(f,2));this.computeVertexNormals()}function hi(a,b,c){c.shapes=[];if(Array.isArray(a))for(var d=0,e=a.length;d<e;d++)c.shapes.push(a[d].uuid);else c.shapes.push(a.uuid);
-void 0!==b.extrudePath&&(c.options.extrudePath=b.extrudePath.toJSON());return c}function je(a,b){L.call(this);this.type="TextGeometry";this.parameters={text:a,parameters:b};this.fromBufferGeometry(new Zc(a,b));this.mergeVertices()}function Zc(a,b){b=b||{};var c=b.font;if(!c||!c.isFont)return console.error("THREE.TextGeometry: font parameter is not an instance of THREE.Font."),new L;a=c.generateShapes(a,b.size);b.depth=void 0!==b.height?b.height:50;void 0===b.bevelThickness&&(b.bevelThickness=10);
-void 0===b.bevelSize&&(b.bevelSize=8);void 0===b.bevelEnabled&&(b.bevelEnabled=!1);gb.call(this,a,b);this.type="TextBufferGeometry"}function ke(a,b,c,d,e,f,g){L.call(this);this.type="SphereGeometry";this.parameters={radius:a,widthSegments:b,heightSegments:c,phiStart:d,phiLength:e,thetaStart:f,thetaLength:g};this.fromBufferGeometry(new hc(a,b,c,d,e,f,g));this.mergeVertices()}function hc(a,b,c,d,e,f,g){A.call(this);this.type="SphereBufferGeometry";this.parameters={radius:a,widthSegments:b,heightSegments:c,
-phiStart:d,phiLength:e,thetaStart:f,thetaLength:g};a=a||1;b=Math.max(3,Math.floor(b)||8);c=Math.max(2,Math.floor(c)||6);d=void 0!==d?d:0;e=void 0!==e?e:2*Math.PI;f=void 0!==f?f:0;g=void 0!==g?g:Math.PI;var k=Math.min(f+g,Math.PI),l,m,h=0,p=[],q=new n,t=new n,r=[],u=[],y=[],v=[];for(m=0;m<=c;m++){var w=[],W=m/c,B=0;0==m&&0==f?B=.5/b:m==c&&k==Math.PI&&(B=-.5/b);for(l=0;l<=b;l++){var z=l/b;q.x=-a*Math.cos(d+z*e)*Math.sin(f+W*g);q.y=a*Math.cos(f+W*g);q.z=a*Math.sin(d+z*e)*Math.sin(f+W*g);u.push(q.x,q.y,
-q.z);t.copy(q).normalize();y.push(t.x,t.y,t.z);v.push(z+B,1-W);w.push(h++)}p.push(w)}for(m=0;m<c;m++)for(l=0;l<b;l++)a=p[m][l+1],d=p[m][l],e=p[m+1][l],g=p[m+1][l+1],(0!==m||0<f)&&r.push(a,d,g),(m!==c-1||k<Math.PI)&&r.push(d,e,g);this.setIndex(r);this.setAttribute("position",new E(u,3));this.setAttribute("normal",new E(y,3));this.setAttribute("uv",new E(v,2))}function le(a,b,c,d,e,f){L.call(this);this.type="RingGeometry";this.parameters={innerRadius:a,outerRadius:b,thetaSegments:c,phiSegments:d,thetaStart:e,
-thetaLength:f};this.fromBufferGeometry(new $c(a,b,c,d,e,f));this.mergeVertices()}function $c(a,b,c,d,e,f){A.call(this);this.type="RingBufferGeometry";this.parameters={innerRadius:a,outerRadius:b,thetaSegments:c,phiSegments:d,thetaStart:e,thetaLength:f};a=a||.5;b=b||1;e=void 0!==e?e:0;f=void 0!==f?f:2*Math.PI;c=void 0!==c?Math.max(3,c):8;d=void 0!==d?Math.max(1,d):1;var g=[],k=[],l=[],m=[],h=a,p=(b-a)/d,q=new n,t=new w,r,u;for(r=0;r<=d;r++){for(u=0;u<=c;u++)a=e+u/c*f,q.x=h*Math.cos(a),q.y=h*Math.sin(a),
-k.push(q.x,q.y,q.z),l.push(0,0,1),t.x=(q.x/b+1)/2,t.y=(q.y/b+1)/2,m.push(t.x,t.y);h+=p}for(r=0;r<d;r++)for(b=r*(c+1),u=0;u<c;u++)a=u+b,e=a+c+1,f=a+c+2,h=a+1,g.push(a,e,h),g.push(e,f,h);this.setIndex(g);this.setAttribute("position",new E(k,3));this.setAttribute("normal",new E(l,3));this.setAttribute("uv",new E(m,2))}function me(a,b,c,d){L.call(this);this.type="LatheGeometry";this.parameters={points:a,segments:b,phiStart:c,phiLength:d};this.fromBufferGeometry(new ad(a,b,c,d));this.mergeVertices()}function ad(a,
-b,c,d){A.call(this);this.type="LatheBufferGeometry";this.parameters={points:a,segments:b,phiStart:c,phiLength:d};b=Math.floor(b)||12;c=c||0;d=d||2*Math.PI;d=P.clamp(d,0,2*Math.PI);var e=[],f=[],g=[],k=1/b,l=new n,m=new w,h;for(h=0;h<=b;h++){var p=c+h*k*d;var q=Math.sin(p),t=Math.cos(p);for(p=0;p<=a.length-1;p++)l.x=a[p].x*q,l.y=a[p].y,l.z=a[p].x*t,f.push(l.x,l.y,l.z),m.x=h/b,m.y=p/(a.length-1),g.push(m.x,m.y)}for(h=0;h<b;h++)for(p=0;p<a.length-1;p++)c=p+h*a.length,k=c+a.length,l=c+a.length+1,m=c+
-1,e.push(c,k,m),e.push(k,l,m);this.setIndex(e);this.setAttribute("position",new E(f,3));this.setAttribute("uv",new E(g,2));this.computeVertexNormals();if(d===2*Math.PI)for(d=this.attributes.normal.array,e=new n,f=new n,g=new n,c=b*a.length*3,p=h=0;h<a.length;h++,p+=3)e.x=d[p+0],e.y=d[p+1],e.z=d[p+2],f.x=d[c+p+0],f.y=d[c+p+1],f.z=d[c+p+2],g.addVectors(e,f).normalize(),d[p+0]=d[c+p+0]=g.x,d[p+1]=d[c+p+1]=g.y,d[p+2]=d[c+p+2]=g.z}function ic(a,b){L.call(this);this.type="ShapeGeometry";"object"===typeof b&&
-(console.warn("THREE.ShapeGeometry: Options parameter has been removed."),b=b.curveSegments);this.parameters={shapes:a,curveSegments:b};this.fromBufferGeometry(new jc(a,b));this.mergeVertices()}function jc(a,b){function c(a){var c,k=e.length/3;a=a.extractPoints(b);var m=a.shape,h=a.holes;!1===tb.isClockWise(m)&&(m=m.reverse());a=0;for(c=h.length;a<c;a++){var x=h[a];!0===tb.isClockWise(x)&&(h[a]=x.reverse())}var n=tb.triangulateShape(m,h);a=0;for(c=h.length;a<c;a++)x=h[a],m=m.concat(x);a=0;for(c=m.length;a<
-c;a++)x=m[a],e.push(x.x,x.y,0),f.push(0,0,1),g.push(x.x,x.y);a=0;for(c=n.length;a<c;a++)m=n[a],d.push(m[0]+k,m[1]+k,m[2]+k),l+=3}A.call(this);this.type="ShapeBufferGeometry";this.parameters={shapes:a,curveSegments:b};b=b||12;var d=[],e=[],f=[],g=[],k=0,l=0;if(!1===Array.isArray(a))c(a);else for(var m=0;m<a.length;m++)c(a[m]),this.addGroup(k,l,m),k+=l,l=0;this.setIndex(d);this.setAttribute("position",new E(e,3));this.setAttribute("normal",new E(f,3));this.setAttribute("uv",new E(g,2))}function ii(a,
-b){b.shapes=[];if(Array.isArray(a))for(var c=0,d=a.length;c<d;c++)b.shapes.push(a[c].uuid);else b.shapes.push(a.uuid);return b}function bd(a,b){A.call(this);this.type="EdgesGeometry";this.parameters={thresholdAngle:b};var c=[];b=Math.cos(P.DEG2RAD*(void 0!==b?b:1));var d=[0,0],e={},f=["a","b","c"];if(a.isBufferGeometry){var g=new L;g.fromBufferGeometry(a)}else g=a.clone();g.mergeVertices();g.computeFaceNormals();a=g.vertices;g=g.faces;for(var k=0,l=g.length;k<l;k++)for(var m=g[k],h=0;3>h;h++){var p=
-m[f[h]];var q=m[f[(h+1)%3]];d[0]=Math.min(p,q);d[1]=Math.max(p,q);p=d[0]+","+d[1];void 0===e[p]?e[p]={index1:d[0],index2:d[1],face1:k,face2:void 0}:e[p].face2=k}for(p in e)if(d=e[p],void 0===d.face2||g[d.face1].normal.dot(g[d.face2].normal)<=b)f=a[d.index1],c.push(f.x,f.y,f.z),f=a[d.index2],c.push(f.x,f.y,f.z);this.setAttribute("position",new E(c,3))}function kc(a,b,c,d,e,f,g,k){L.call(this);this.type="CylinderGeometry";this.parameters={radiusTop:a,radiusBottom:b,height:c,radialSegments:d,heightSegments:e,
-openEnded:f,thetaStart:g,thetaLength:k};this.fromBufferGeometry(new ub(a,b,c,d,e,f,g,k));this.mergeVertices()}function ub(a,b,c,d,e,f,g,k){function l(c){var e,f=new w,l=new n,x=0,u=!0===c?a:b,C=!0===c?1:-1;var A=r;for(e=1;e<=d;e++)p.push(0,y*C,0),q.push(0,C,0),t.push(.5,.5),r++;var B=r;for(e=0;e<=d;e++){var E=e/d*k+g,D=Math.cos(E);E=Math.sin(E);l.x=u*E;l.y=y*C;l.z=u*D;p.push(l.x,l.y,l.z);q.push(0,C,0);f.x=.5*D+.5;f.y=.5*E*C+.5;t.push(f.x,f.y);r++}for(e=0;e<d;e++)f=A+e,l=B+e,!0===c?h.push(l,l+1,f):
-h.push(l+1,l,f),x+=3;m.addGroup(v,x,!0===c?1:2);v+=x}A.call(this);this.type="CylinderBufferGeometry";this.parameters={radiusTop:a,radiusBottom:b,height:c,radialSegments:d,heightSegments:e,openEnded:f,thetaStart:g,thetaLength:k};var m=this;a=void 0!==a?a:1;b=void 0!==b?b:1;c=c||1;d=Math.floor(d)||8;e=Math.floor(e)||1;f=void 0!==f?f:!1;g=void 0!==g?g:0;k=void 0!==k?k:2*Math.PI;var h=[],p=[],q=[],t=[],r=0,u=[],y=c/2,v=0;(function(){var f,l,x=new n,z=new n,w=0,A=(b-a)/c;for(l=0;l<=e;l++){var B=[],E=l/
-e,G=E*(b-a)+a;for(f=0;f<=d;f++){var D=f/d,F=D*k+g,I=Math.sin(F);F=Math.cos(F);z.x=G*I;z.y=-E*c+y;z.z=G*F;p.push(z.x,z.y,z.z);x.set(I,A,F).normalize();q.push(x.x,x.y,x.z);t.push(D,1-E);B.push(r++)}u.push(B)}for(f=0;f<d;f++)for(l=0;l<e;l++)x=u[l+1][f],z=u[l+1][f+1],A=u[l][f+1],h.push(u[l][f],x,A),h.push(x,z,A),w+=6;m.addGroup(v,w,0);v+=w})();!1===f&&(0<a&&l(!0),0<b&&l(!1));this.setIndex(h);this.setAttribute("position",new E(p,3));this.setAttribute("normal",new E(q,3));this.setAttribute("uv",new E(t,
-2))}function ne(a,b,c,d,e,f,g){kc.call(this,0,a,b,c,d,e,f,g);this.type="ConeGeometry";this.parameters={radius:a,height:b,radialSegments:c,heightSegments:d,openEnded:e,thetaStart:f,thetaLength:g}}function oe(a,b,c,d,e,f,g){ub.call(this,0,a,b,c,d,e,f,g);this.type="ConeBufferGeometry";this.parameters={radius:a,height:b,radialSegments:c,heightSegments:d,openEnded:e,thetaStart:f,thetaLength:g}}function pe(a,b,c,d){L.call(this);this.type="CircleGeometry";this.parameters={radius:a,segments:b,thetaStart:c,
-thetaLength:d};this.fromBufferGeometry(new cd(a,b,c,d));this.mergeVertices()}function cd(a,b,c,d){A.call(this);this.type="CircleBufferGeometry";this.parameters={radius:a,segments:b,thetaStart:c,thetaLength:d};a=a||1;b=void 0!==b?Math.max(3,b):8;c=void 0!==c?c:0;d=void 0!==d?d:2*Math.PI;var e=[],f=[],g=[],k=[],l,m=new n,h=new w;f.push(0,0,0);g.push(0,0,1);k.push(.5,.5);var p=0;for(l=3;p<=b;p++,l+=3){var q=c+p/b*d;m.x=a*Math.cos(q);m.y=a*Math.sin(q);f.push(m.x,m.y,m.z);g.push(0,0,1);h.x=(f[l]/a+1)/
-2;h.y=(f[l+1]/a+1)/2;k.push(h.x,h.y)}for(l=1;l<=b;l++)e.push(l,l+1,0);this.setIndex(e);this.setAttribute("position",new E(f,3));this.setAttribute("normal",new E(g,3));this.setAttribute("uv",new E(k,2))}function lc(a){K.call(this);this.type="ShadowMaterial";this.color=new B(0);this.transparent=!0;this.setValues(a)}function vb(a){pa.call(this,a);this.type="RawShaderMaterial"}function hb(a){K.call(this);this.defines={STANDARD:""};this.type="MeshStandardMaterial";this.color=new B(16777215);this.roughness=
-1;this.metalness=0;this.lightMap=this.map=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.emissive=new B(0);this.emissiveIntensity=1;this.bumpMap=this.emissiveMap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=0;this.normalScale=new w(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.envMap=this.alphaMap=this.metalnessMap=this.roughnessMap=null;this.envMapIntensity=1;this.refractionRatio=.98;this.wireframe=!1;this.wireframeLinewidth=
-1;this.wireframeLinejoin=this.wireframeLinecap="round";this.morphNormals=this.morphTargets=this.skinning=!1;this.setValues(a)}function mc(a){hb.call(this);this.defines={STANDARD:"",PHYSICAL:""};this.type="MeshPhysicalMaterial";this.reflectivity=.5;this.clearcoatRoughness=this.clearcoat=0;this.sheen=null;this.clearcoatNormalScale=new w(1,1);this.clearcoatNormalMap=null;this.transparency=0;this.setValues(a)}function Kb(a){K.call(this);this.type="MeshPhongMaterial";this.color=new B(16777215);this.specular=
-new B(1118481);this.shininess=30;this.lightMap=this.map=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.emissive=new B(0);this.emissiveIntensity=1;this.bumpMap=this.emissiveMap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=0;this.normalScale=new w(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.envMap=this.alphaMap=this.specularMap=null;this.combine=0;this.reflectivity=1;this.refractionRatio=.98;this.wireframe=!1;this.wireframeLinewidth=
-1;this.wireframeLinejoin=this.wireframeLinecap="round";this.morphNormals=this.morphTargets=this.skinning=!1;this.setValues(a)}function nc(a){K.call(this);this.defines={TOON:""};this.type="MeshToonMaterial";this.color=new B(16777215);this.specular=new B(1118481);this.shininess=30;this.lightMap=this.gradientMap=this.map=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.emissive=new B(0);this.emissiveIntensity=1;this.bumpMap=this.emissiveMap=null;this.bumpScale=1;this.normalMap=
-null;this.normalMapType=0;this.normalScale=new w(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.alphaMap=this.specularMap=null;this.wireframe=!1;this.wireframeLinewidth=1;this.wireframeLinejoin=this.wireframeLinecap="round";this.morphNormals=this.morphTargets=this.skinning=!1;this.setValues(a)}function oc(a){K.call(this);this.type="MeshNormalMaterial";this.bumpMap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=0;this.normalScale=new w(1,1);this.displacementMap=
-null;this.displacementScale=1;this.displacementBias=0;this.wireframe=!1;this.wireframeLinewidth=1;this.morphNormals=this.morphTargets=this.skinning=this.fog=!1;this.setValues(a)}function pc(a){K.call(this);this.type="MeshLambertMaterial";this.color=new B(16777215);this.lightMap=this.map=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.emissive=new B(0);this.emissiveIntensity=1;this.envMap=this.alphaMap=this.specularMap=this.emissiveMap=null;this.combine=0;this.reflectivity=
-1;this.refractionRatio=.98;this.wireframe=!1;this.wireframeLinewidth=1;this.wireframeLinejoin=this.wireframeLinecap="round";this.morphNormals=this.morphTargets=this.skinning=!1;this.setValues(a)}function qc(a){K.call(this);this.defines={MATCAP:""};this.type="MeshMatcapMaterial";this.color=new B(16777215);this.bumpMap=this.map=this.matcap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=0;this.normalScale=new w(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=
-0;this.alphaMap=null;this.morphNormals=this.morphTargets=this.skinning=!1;this.setValues(a)}function rc(a){ka.call(this);this.type="LineDashedMaterial";this.scale=1;this.dashSize=3;this.gapSize=1;this.setValues(a)}function Ma(a,b,c,d){this.parameterPositions=a;this._cachedIndex=0;this.resultBuffer=void 0!==d?d:new b.constructor(c);this.sampleValues=b;this.valueSize=c}function Xe(a,b,c,d){Ma.call(this,a,b,c,d);this._offsetNext=this._weightNext=this._offsetPrev=this._weightPrev=-0}function qe(a,b,c,
-d){Ma.call(this,a,b,c,d)}function Ye(a,b,c,d){Ma.call(this,a,b,c,d)}function ua(a,b,c,d){if(void 0===a)throw Error("THREE.KeyframeTrack: track name is undefined");if(void 0===b||0===b.length)throw Error("THREE.KeyframeTrack: no keyframes in track named "+a);this.name=a;this.times=da.convertArray(b,this.TimeBufferType);this.values=da.convertArray(c,this.ValueBufferType);this.setInterpolation(d||this.DefaultInterpolation)}function Ze(a,b,c){ua.call(this,a,b,c)}function $e(a,b,c,d){ua.call(this,a,b,
-c,d)}function dd(a,b,c,d){ua.call(this,a,b,c,d)}function af(a,b,c,d){Ma.call(this,a,b,c,d)}function re(a,b,c,d){ua.call(this,a,b,c,d)}function bf(a,b,c,d){ua.call(this,a,b,c,d)}function ed(a,b,c,d){ua.call(this,a,b,c,d)}function Ra(a,b,c){this.name=a;this.tracks=c;this.duration=void 0!==b?b:-1;this.uuid=P.generateUUID();0>this.duration&&this.resetDuration()}function Pk(a){switch(a.toLowerCase()){case "scalar":case "double":case "float":case "number":case "integer":return dd;case "vector":case "vector2":case "vector3":case "vector4":return ed;
-case "color":return $e;case "quaternion":return re;case "bool":case "boolean":return Ze;case "string":return bf}throw Error("THREE.KeyframeTrack: Unsupported typeName: "+a);}function Qk(a){if(void 0===a.type)throw Error("THREE.KeyframeTrack: track type undefined, can not parse");var b=Pk(a.type);if(void 0===a.times){var c=[],d=[];da.flattenJSON(a.keys,c,d,"value");a.times=c;a.values=d}return void 0!==b.parse?b.parse(a):new b(a.name,a.times,a.values,a.interpolation)}function xg(a,b,c){var d=this,e=
-!1,f=0,g=0,k=void 0,l=[];this.onStart=void 0;this.onLoad=a;this.onProgress=b;this.onError=c;this.itemStart=function(a){g++;if(!1===e&&void 0!==d.onStart)d.onStart(a,f,g);e=!0};this.itemEnd=function(a){f++;if(void 0!==d.onProgress)d.onProgress(a,f,g);if(f===g&&(e=!1,void 0!==d.onLoad))d.onLoad()};this.itemError=function(a){if(void 0!==d.onError)d.onError(a)};this.resolveURL=function(a){return k?k(a):a};this.setURLModifier=function(a){k=a;return this};this.addHandler=function(a,b){l.push(a,b);return this};
-this.removeHandler=function(a){a=l.indexOf(a);-1!==a&&l.splice(a,2);return this};this.getHandler=function(a){for(var b=0,c=l.length;b<c;b+=2){var d=l[b],e=l[b+1];d.global&&(d.lastIndex=0);if(d.test(a))return e}return null}}function V(a){this.manager=void 0!==a?a:ji;this.crossOrigin="anonymous";this.resourcePath=this.path=""}function Sa(a){V.call(this,a)}function yg(a){V.call(this,a)}function zg(a){V.call(this,a)}function cf(a){V.call(this,a)}function fd(a){V.call(this,a)}function df(a){V.call(this,
-a)}function ef(a){V.call(this,a)}function I(){this.type="Curve";this.arcLengthDivisions=200}function Na(a,b,c,d,e,f,g,k){I.call(this);this.type="EllipseCurve";this.aX=a||0;this.aY=b||0;this.xRadius=c||1;this.yRadius=d||1;this.aStartAngle=e||0;this.aEndAngle=f||2*Math.PI;this.aClockwise=g||!1;this.aRotation=k||0}function gd(a,b,c,d,e,f){Na.call(this,a,b,c,c,d,e,f);this.type="ArcCurve"}function Ag(){var a=0,b=0,c=0,d=0;return{initCatmullRom:function(e,f,g,k,l){e=l*(g-e);k=l*(k-f);a=f;b=e;c=-3*f+3*g-
-2*e-k;d=2*f-2*g+e+k},initNonuniformCatmullRom:function(e,f,g,k,l,m,h){e=((f-e)/l-(g-e)/(l+m)+(g-f)/m)*m;k=((g-f)/m-(k-f)/(m+h)+(k-g)/h)*m;a=f;b=e;c=-3*f+3*g-2*e-k;d=2*f-2*g+e+k},calc:function(e){var f=e*e;return a+b*e+c*f+d*f*e}}}function Aa(a,b,c,d){I.call(this);this.type="CatmullRomCurve3";this.points=a||[];this.closed=b||!1;this.curveType=c||"centripetal";this.tension=d||.5}function ki(a,b,c,d,e){b=.5*(d-b);e=.5*(e-c);var f=a*a;return(2*c-2*d+b+e)*a*f+(-3*c+3*d-2*b-e)*f+b*a+c}function se(a,b,c,
-d){var e=1-a;return e*e*b+2*(1-a)*a*c+a*a*d}function te(a,b,c,d,e){var f=1-a,g=1-a;return f*f*f*b+3*g*g*a*c+3*(1-a)*a*a*d+a*a*a*e}function Xa(a,b,c,d){I.call(this);this.type="CubicBezierCurve";this.v0=a||new w;this.v1=b||new w;this.v2=c||new w;this.v3=d||new w}function ib(a,b,c,d){I.call(this);this.type="CubicBezierCurve3";this.v0=a||new n;this.v1=b||new n;this.v2=c||new n;this.v3=d||new n}function Ea(a,b){I.call(this);this.type="LineCurve";this.v1=a||new w;this.v2=b||new w}function Ya(a,b){I.call(this);
-this.type="LineCurve3";this.v1=a||new n;this.v2=b||new n}function Za(a,b,c){I.call(this);this.type="QuadraticBezierCurve";this.v0=a||new w;this.v1=b||new w;this.v2=c||new w}function jb(a,b,c){I.call(this);this.type="QuadraticBezierCurve3";this.v0=a||new n;this.v1=b||new n;this.v2=c||new n}function $a(a){I.call(this);this.type="SplineCurve";this.points=a||[]}function wb(){I.call(this);this.type="CurvePath";this.curves=[];this.autoClose=!1}function ab(a){wb.call(this);this.type="Path";this.currentPoint=
-new w;a&&this.setFromPoints(a)}function Lb(a){ab.call(this,a);this.uuid=P.generateUUID();this.type="Shape";this.holes=[]}function ba(a,b){D.call(this);this.type="Light";this.color=new B(a);this.intensity=void 0!==b?b:1;this.receiveShadow=void 0}function ff(a,b,c){ba.call(this,a,c);this.type="HemisphereLight";this.castShadow=void 0;this.position.copy(D.DefaultUp);this.updateMatrix();this.groundColor=new B(b)}function kb(a){this.camera=a;this.bias=0;this.radius=1;this.mapSize=new w(512,512);this.mapPass=
-this.map=null;this.matrix=new O;this._frustum=new Hc;this._frameExtents=new w(1,1);this._viewportCount=1;this._viewports=[new R(0,0,1,1)]}function gf(){kb.call(this,new qa(50,1,.5,500))}function hf(a,b,c,d,e,f){ba.call(this,a,b);this.type="SpotLight";this.position.copy(D.DefaultUp);this.updateMatrix();this.target=new D;Object.defineProperty(this,"power",{get:function(){return this.intensity*Math.PI},set:function(a){this.intensity=a/Math.PI}});this.distance=void 0!==c?c:0;this.angle=void 0!==d?d:Math.PI/
-3;this.penumbra=void 0!==e?e:0;this.decay=void 0!==f?f:1;this.shadow=new gf}function Bg(){kb.call(this,new qa(90,1,.5,500));this._frameExtents=new w(4,2);this._viewportCount=6;this._viewports=[new R(2,1,1,1),new R(0,1,1,1),new R(3,1,1,1),new R(1,1,1,1),new R(3,0,1,1),new R(1,0,1,1)];this._cubeDirections=[new n(1,0,0),new n(-1,0,0),new n(0,0,1),new n(0,0,-1),new n(0,1,0),new n(0,-1,0)];this._cubeUps=[new n(0,1,0),new n(0,1,0),new n(0,1,0),new n(0,1,0),new n(0,0,1),new n(0,0,-1)]}function jf(a,b,c,
-d){ba.call(this,a,b);this.type="PointLight";Object.defineProperty(this,"power",{get:function(){return 4*this.intensity*Math.PI},set:function(a){this.intensity=a/(4*Math.PI)}});this.distance=void 0!==c?c:0;this.decay=void 0!==d?d:1;this.shadow=new Bg}function hd(a,b,c,d,e,f){eb.call(this);this.type="OrthographicCamera";this.zoom=1;this.view=null;this.left=void 0!==a?a:-1;this.right=void 0!==b?b:1;this.top=void 0!==c?c:1;this.bottom=void 0!==d?d:-1;this.near=void 0!==e?e:.1;this.far=void 0!==f?f:2E3;
-this.updateProjectionMatrix()}function kf(){kb.call(this,new hd(-5,5,5,-5,.5,500))}function lf(a,b){ba.call(this,a,b);this.type="DirectionalLight";this.position.copy(D.DefaultUp);this.updateMatrix();this.target=new D;this.shadow=new kf}function mf(a,b){ba.call(this,a,b);this.type="AmbientLight";this.castShadow=void 0}function nf(a,b,c,d){ba.call(this,a,b);this.type="RectAreaLight";this.width=void 0!==c?c:10;this.height=void 0!==d?d:10}function of(a){V.call(this,a);this.textures={}}function pf(){A.call(this);
-this.type="InstancedBufferGeometry";this.maxInstancedCount=void 0}function qf(a,b,c,d){"number"===typeof c&&(d=c,c=!1,console.error("THREE.InstancedBufferAttribute: The constructor now expects normalized as the third argument."));M.call(this,a,b,c);this.meshPerAttribute=d||1}function rf(a){V.call(this,a)}function sf(a){V.call(this,a)}function Cg(a){"undefined"===typeof createImageBitmap&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported.");"undefined"===typeof fetch&&console.warn("THREE.ImageBitmapLoader: fetch() not supported.");
-V.call(this,a);this.options=void 0}function Dg(){this.type="ShapePath";this.color=new B;this.subPaths=[];this.currentPath=null}function Eg(a){this.type="Font";this.data=a}function Fg(a){V.call(this,a)}function tf(a){V.call(this,a)}function uf(){this.coefficients=[];for(var a=0;9>a;a++)this.coefficients.push(new n)}function bb(a,b){ba.call(this,void 0,b);this.sh=void 0!==a?a:new uf}function Gg(a,b,c){bb.call(this,void 0,c);a=(new B).set(a);c=(new B).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){bb.call(this,void 0,b);a=(new B).set(a);this.sh.coefficients[0].set(a.r,a.g,a.b).multiplyScalar(2*Math.sqrt(Math.PI))}function li(){this.type="StereoCamera";this.aspect=1;this.eyeSep=.064;this.cameraL=new qa;this.cameraL.layers.enable(1);this.cameraL.matrixAutoUpdate=!1;this.cameraR=new qa;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(){D.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 id(a){D.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){id.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 mi(a,b,c){c=c||Ba.parseTrackName(b);this._targetGroup=a;this._bindings=
-a.subscribe_(b,c)}function Ba(a,b,c){this.path=b;this.parsedPath=c||Ba.parseTrackName(b);this.node=Ba.findNode(a,this.parsedPath.nodeName)||a;this.rootNode=a}function ni(){this.uuid=P.generateUUID();this._objects=Array.prototype.slice.call(arguments);this.nCachedObjects_=0;var a={};this._indicesByUUID=a;for(var b=0,c=arguments.length;b!==c;++b)a[arguments[b].uuid]=b;this._paths=[];this._parsedPaths=[];this._bindings=[];this._bindingsIndicesByPath={};var d=this;this.stats={objects:{get total(){return d._objects.length},
-get inUse(){return this.total-d.nCachedObjects_}},get bindingsPerObject(){return d._bindings.length}}}function oi(a,b,c){this._mixer=a;this._clip=b;this._localRoot=c||null;a=b.tracks;b=a.length;c=Array(b);for(var d={endingStart:2400,endingEnd:2400},e=0;e!==b;++e){var f=a[e].createInterpolant(null);c[e]=f;f.settings=d}this._interpolantSettings=d;this._interpolants=c;this._propertyBindings=Array(b);this._weightInterpolant=this._timeScaleInterpolant=this._byClipCacheIndex=this._cacheIndex=null;this.loop=
-2201;this._loopCount=-1;this._startTime=null;this.time=0;this._effectiveWeight=this.weight=this._effectiveTimeScale=this.timeScale=1;this.repetitions=Infinity;this.paused=!1;this.enabled=!0;this.clampWhenFinished=!1;this.zeroSlopeAtEnd=this.zeroSlopeAtStart=!0}function Og(a){this._root=a;this._initMemoryManager();this.time=this._accuIndex=0;this.timeScale=1}function vf(a,b){"string"===typeof a&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),a=b);this.value=a}function Pg(a,b,c){sb.call(this,
-a,b);this.meshPerAttribute=c||1}function pi(a,b,c,d){this.ray=new Wb(a,b);this.near=c||0;this.far=d||Infinity;this.camera=null;this.params={Mesh:{},Line:{},LOD:{},Points:{threshold:1},Sprite:{}};Object.defineProperties(this.params,{PointCloud:{get:function(){console.warn("THREE.Raycaster: params.PointCloud has been renamed to params.Points.");return this.Points}}})}function qi(a,b){return a.distance-b.distance}function Qg(a,b,c,d){if(!1!==a.visible&&(a.raycast(b,c),!0===d)){a=a.children;d=0;for(var e=
-a.length;d<e;d++)Qg(a[d],b,c,!0)}}function ri(a,b,c){this.radius=void 0!==a?a:1;this.phi=void 0!==b?b:0;this.theta=void 0!==c?c:0;return this}function si(a,b,c){this.radius=void 0!==a?a:1;this.theta=void 0!==b?b:0;this.y=void 0!==c?c:0;return this}function Rg(a,b){this.min=void 0!==a?a:new w(Infinity,Infinity);this.max=void 0!==b?b:new w(-Infinity,-Infinity)}function Sg(a,b){this.start=void 0!==a?a:new n;this.end=void 0!==b?b:new n}function ue(a){D.call(this);this.material=a;this.render=function(){}}
-function jd(a,b){D.call(this);this.light=a;this.light.updateMatrixWorld();this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1;this.color=b;a=new A;b=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(var c=0,d=1;32>c;c++,d++){var e=c/32*Math.PI*2,f=d/32*Math.PI*2;b.push(Math.cos(e),Math.sin(e),1,Math.cos(f),Math.sin(f),1)}a.setAttribute("position",new E(b,3));b=new ka({fog:!1});this.cone=new ma(a,b);this.add(this.cone);this.update()}function ti(a){var b=[];a&&a.isBone&&b.push(a);for(var c=
-0;c<a.children.length;c++)b.push.apply(b,ti(a.children[c]));return b}function kd(a){for(var b=ti(a),c=new A,d=[],e=[],f=new B(0,0,1),g=new B(0,1,0),k=0;k<b.length;k++){var l=b[k];l.parent&&l.parent.isBone&&(d.push(0,0,0),d.push(0,0,0),e.push(f.r,f.g,f.b),e.push(g.r,g.g,g.b))}c.setAttribute("position",new E(d,3));c.setAttribute("color",new E(e,3));d=new ka({vertexColors:2,depthTest:!1,depthWrite:!1,transparent:!0});ma.call(this,c,d);this.root=a;this.bones=b;this.matrix=a.matrixWorld;this.matrixAutoUpdate=
-!1}function ld(a,b,c){this.light=a;this.light.updateMatrixWorld();this.color=c;a=new hc(b,4,2);b=new Pa({wireframe:!0,fog:!1});ca.call(this,a,b);this.matrix=this.light.matrixWorld;this.matrixAutoUpdate=!1;this.update()}function md(a,b,c){D.call(this);this.light=a;this.light.updateMatrixWorld();this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1;this.color=c;a=new dc(b);a.rotateY(.5*Math.PI);this.material=new Pa({wireframe:!0,fog:!1});void 0===this.color&&(this.material.vertexColors=2);b=a.getAttribute("position");
-b=new Float32Array(3*b.count);a.setAttribute("color",new M(b,3));this.add(new ca(a,this.material));this.update()}function wf(a,b,c,d){a=a||10;b=b||10;c=new B(void 0!==c?c:4473924);d=new B(void 0!==d?d:8947848);var e=b/2,f=a/b,g=a/2;a=[];for(var k=[],l=0,m=0,h=-g;l<=b;l++,h+=f){a.push(-g,0,h,g,0,h);a.push(h,0,-g,h,0,g);var p=l===e?c:d;p.toArray(k,m);m+=3;p.toArray(k,m);m+=3;p.toArray(k,m);m+=3;p.toArray(k,m);m+=3}b=new A;b.setAttribute("position",new E(a,3));b.setAttribute("color",new E(k,3));c=new ka({vertexColors:2});
-ma.call(this,b,c)}function xf(a,b,c,d,e,f){a=a||10;b=b||16;c=c||8;d=d||64;e=new B(void 0!==e?e:4473924);f=new B(void 0!==f?f:8947848);var g=[],k=[],l;for(l=0;l<=b;l++){var m=l/b*2*Math.PI;var h=Math.sin(m)*a;m=Math.cos(m)*a;g.push(0,0,0);g.push(h,0,m);var p=l&1?e:f;k.push(p.r,p.g,p.b);k.push(p.r,p.g,p.b)}for(l=0;l<=c;l++){p=l&1?e:f;var q=a-a/c*l;for(b=0;b<d;b++)m=b/d*2*Math.PI,h=Math.sin(m)*q,m=Math.cos(m)*q,g.push(h,0,m),k.push(p.r,p.g,p.b),m=(b+1)/d*2*Math.PI,h=Math.sin(m)*q,m=Math.cos(m)*q,g.push(h,
-0,m),k.push(p.r,p.g,p.b)}a=new A;a.setAttribute("position",new E(g,3));a.setAttribute("color",new E(k,3));g=new ka({vertexColors:2});ma.call(this,a,g)}function nd(a,b,c){D.call(this);this.light=a;this.light.updateMatrixWorld();this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1;this.color=c;void 0===b&&(b=1);a=new A;a.setAttribute("position",new E([-b,b,0,b,b,0,b,-b,0,-b,-b,0,-b,b,0],3));b=new ka({fog:!1});this.lightPlane=new La(a,b);this.add(this.lightPlane);a=new A;a.setAttribute("position",new E([0,
-0,0,0,0,1],3));this.targetLine=new La(a,b);this.add(this.targetLine);this.update()}function ve(a){function b(a,b,d){c(a,d);c(b,d)}function c(a,b){f.push(0,0,0);g.push(b.r,b.g,b.b);void 0===k[a]&&(k[a]=[]);k[a].push(f.length/3-1)}var d=new A,e=new ka({color:16777215,vertexColors:1}),f=[],g=[],k={},l=new B(16755200),m=new B(16711680),h=new B(43775),p=new B(16777215),q=new B(3355443);b("n1","n2",l);b("n2","n4",l);b("n4","n3",l);b("n3","n1",l);b("f1","f2",l);b("f2","f4",l);b("f4","f3",l);b("f3","f1",
-l);b("n1","f1",l);b("n2","f2",l);b("n3","f3",l);b("n4","f4",l);b("p","n1",m);b("p","n2",m);b("p","n3",m);b("p","n4",m);b("u1","u2",h);b("u2","u3",h);b("u3","u1",h);b("c","t",p);b("p","c",q);b("cn1","cn2",q);b("cn3","cn4",q);b("cf1","cf2",q);b("cf3","cf4",q);d.setAttribute("position",new E(f,3));d.setAttribute("color",new E(g,3));ma.call(this,d,e);this.camera=a;this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix();this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1;this.pointMap=
-k;this.update()}function ia(a,b,c,d,e,f,g){yf.set(e,f,g).unproject(d);a=b[a];if(void 0!==a)for(c=c.getAttribute("position"),b=0,d=a.length;b<d;b++)c.setXYZ(a[b],yf.x,yf.y,yf.z)}function xb(a,b){this.object=a;void 0===b&&(b=16776960);a=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]);var c=new Float32Array(24),d=new A;d.setIndex(new M(a,1));d.setAttribute("position",new M(c,3));ma.call(this,d,new ka({color:b}));this.matrixAutoUpdate=!1;this.update()}function we(a,b){this.type="Box3Helper";
-this.box=a;b=b||16776960;a=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]);var c=new A;c.setIndex(new M(a,1));c.setAttribute("position",new E([1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1],3));ma.call(this,c,new ka({color:b}));this.geometry.computeBoundingSphere()}function xe(a,b,c){this.type="PlaneHelper";this.plane=a;this.size=void 0===b?1:b;a=void 0!==c?c:16776960;b=new A;b.setAttribute("position",new E([1,-1,1,-1,1,1,-1,-1,1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,
-0,0,1,0,0,0],3));b.computeBoundingSphere();La.call(this,b,new ka({color:a}));b=new A;b.setAttribute("position",new E([1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1],3));b.computeBoundingSphere();this.add(new ca(b,new Pa({color:a,opacity:.2,transparent:!0,depthWrite:!1})))}function yb(a,b,c,d,e,f){D.call(this);void 0===a&&(a=new n(0,0,1));void 0===b&&(b=new n(0,0,0));void 0===c&&(c=1);void 0===d&&(d=16776960);void 0===e&&(e=.2*c);void 0===f&&(f=.2*e);void 0===zf&&(zf=new A,zf.setAttribute("position",new E([0,
-0,0,0,1,0],3)),Tg=new ub(0,.5,1,5,1),Tg.translate(0,-.5,0));this.position.copy(b);this.line=new La(zf,new ka({color:d}));this.line.matrixAutoUpdate=!1;this.add(this.line);this.cone=new ca(Tg,new Pa({color:d}));this.cone.matrixAutoUpdate=!1;this.add(this.cone);this.setDirection(a);this.setLength(c,e,f)}function ye(a){a=a||1;var b=[0,0,0,a,0,0,0,0,0,0,a,0,0,0,0,0,0,a];a=new A;a.setAttribute("position",new E(b,3));a.setAttribute("color",new E([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],3));b=new ka({vertexColors:2});
-ma.call(this,a,b)}function Ug(a){Y=a;Vg(Af)}function ui(a){var b={magFilter:1003,minFilter:1003,generateMipmaps:!1,type:a?a.type:1009,format:a?a.format:1023,encoding:a?a.encoding:3002,depthBuffer:!1,stencilBuffer:!1},c=vi(b);c.depthBuffer=a?!1:!0;Bf=vi(b);return c}function wi(a){Bf.dispose();Y.setRenderTarget(Wg);a.scissorTest=!1;a.setSize(a.width,a.height)}function Vg(a){var b=new pb;b.add(new ca(ze[0],a));Y.compile(b,Xg)}function vi(a){a=new wa(3*lb,3*lb,a);a.texture.mapping=306;a.texture.name=
-"PMREM.cubeUv";a.scissorTest=!0;return a}function Yg(a,b,c,d,e){a.viewport.set(b,c,d,e);a.scissor.set(b,c,d,e)}function xi(a){var b=Y.autoClear;Y.autoClear=!1;for(var c=1;c<yi;c++)zi(a,c-1,c,Math.sqrt(Cf[c]*Cf[c]-Cf[c-1]*Cf[c-1]),Ai[(c-1)%Ai.length]);Y.autoClear=b}function zi(a,b,c,d,e){Bi(a,Bf,b,c,d,"latitudinal",e);Bi(Bf,a,c,c,d,"longitudinal",e)}function Bi(a,b,c,d,e,f,g){"latitudinal"!==f&&"longitudinal"!==f&&console.error("blur direction must be either latitudinal or longitudinal!");var k=new pb;
-k.add(new ca(ze[d],Af));var l=Af.uniforms,m=Ci[c]-1;m=isFinite(e)?Math.PI/(2*m):2*Math.PI/39;var h=e/m,p=isFinite(e)?1+Math.floor(3*h):20;20<p&&console.warn("sigmaRadians, "+e+", is too large and will clip, as it requested "+p+" samples when the maximum is set to 20");e=[];for(var q=0,n=0;20>n;++n){var r=n/h;r=Math.exp(-r*r/2);e.push(r);0==n?q+=r:n<p&&(q+=2*r)}for(n=0;n<e.length;n++)e[n]/=q;l.envMap.value=a.texture;l.samples.value=p;l.weights.value=e;l.latitudinal.value="latitudinal"===f;g&&(l.poleAxis.value=
-g);l.dTheta.value=m;l.mipInt.value=8-c;l.inputEncoding.value=mb[a.texture.encoding];l.outputEncoding.value=mb[a.texture.encoding];a=Ci[d];r=3*Math.max(0,lb-2*a);Yg(b,r,(0===d?0:2*lb)+2*a*(4<d?d-8+4:0),3*a,2*a);Y.setRenderTarget(b);Y.render(k,Xg)}function Di(){var a=new w(1,1);a=new vb({uniforms:{envMap:{value:null},texelSize:{value:a},inputEncoding:{value:mb[3E3]},outputEncoding:{value:mb[3E3]}},vertexShader:Zg(),fragmentShader:"\nprecision mediump float;\nprecision mediump int;\nvarying vec3 vOutputDirection;\nuniform sampler2D envMap;\nuniform vec2 texelSize;\n\n"+
+G.setupLights(b);var c={};a.traverse(function(b){if(b.material)if(Array.isArray(b.material))for(var d=0;d<b.material.length;d++)!b.material[d].uuid in c&&(p(b.material[d],a,b),c[b.material[d].uuid]=!0);else!b.material.uuid in c&&(p(b.material,a,b),c[b.material.uuid]=!0)})};var Ea=null,Ca=new Ah;Ca.setAnimationLoop(function(a){la.isPresenting||Ea&&Ea(a)});"undefined"!==typeof window&&Ca.setContext(window);this.setAnimationLoop=function(a){Ea=a;la.setAnimationLoop(a);Ca.start()};this.render=function(a,
+c,d,e){if(void 0!==d){console.warn("THREE.WebGLRenderer.render(): the renderTarget argument has been removed. Use .setRenderTarget() instead.");var f=d}if(void 0!==e){console.warn("THREE.WebGLRenderer.render(): the forceClear argument has been removed. Use .clear() instead.");var g=e}c&&c.isCamera?I||(ha=b=null,xa=!1,Pe=-1,Z=null,!0===a.autoUpdate&&a.updateMatrixWorld(),null===c.parent&&c.updateMatrixWorld(),la.enabled&&la.isPresenting&&(c=la.getCamera(c)),G=wa.get(a,c),G.init(),a.onBeforeRender(A,
+a,c,f||N),Od.multiplyMatrices(c.projectionMatrix,c.matrixWorldInverse),mg.setFromProjectionMatrix(Od),ng=this.localClippingEnabled,na=Va.init(this.clippingPlanes,ng,c),B=ya.get(a,c),B.init(),l(a,c,0,A.sortObjects),!0===A.sortObjects&&B.sort(ka,ma),na&&Va.beginShadows(),Fa.render(G.state.shadowsArray,a,c),G.setupLights(c),na&&Va.endShadows(),this.info.autoReset&&this.info.reset(),void 0!==f&&this.setRenderTarget(f),la.enabled&&va.isAvailable()&&va.attachCamera(c),pa.render(B,a,c,g),d=B.opaque,e=B.transparent,
+a.overrideMaterial?(f=a.overrideMaterial,d.length&&m(d,a,c,f),e.length&&m(e,a,c,f)):(d.length&&m(d,a,c),e.length&&m(e,a,c)),a.onAfterRender(A,a,c),null!==N&&(U.updateRenderTargetMipmap(N),U.updateMultisampleRenderTarget(N)),aa.buffers.depth.setTest(!0),aa.buffers.depth.setMask(!0),aa.buffers.color.setMask(!0),aa.setPolygonOffset(!1),la.enabled&&va.isAvailable()&&va.detachCamera(c),G=B=null):console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.")};this.setFramebuffer=
+function(a){K!==a&&null===N&&H.bindFramebuffer(36160,a);K=a};this.getActiveCubeFace=function(){return L};this.getActiveMipmapLevel=function(){return M};this.getRenderTarget=function(){return N};this.setRenderTarget=function(a,b,c){N=a;L=b;M=c;a&&void 0===S.get(a).__webglFramebuffer&&U.setupRenderTarget(a);var d=K,e=!1;a?(d=S.get(a).__webglFramebuffer,a.isWebGLCubeRenderTarget?(d=d[b||0],e=!0):d=a.isWebGLMultisampleRenderTarget?S.get(a).__webglMultisampledFramebuffer:d,X.copy(a.viewport),Y.copy(a.scissor),
+ba=a.scissorTest):(X.copy(ea).multiplyScalar(Q).floor(),Y.copy(R).multiplyScalar(Q).floor(),ba=lg);V!==d&&(H.bindFramebuffer(36160,d),V=d);aa.viewport(X);aa.scissor(Y);aa.setScissorTest(ba);e&&(a=S.get(a.texture),H.framebufferTexture2D(36160,36064,34069+(b||0),a.__webglTexture,c||0))};this.readRenderTargetPixels=function(a,b,c,d,e,f,g){if(a&&a.isWebGLRenderTarget){var k=S.get(a).__webglFramebuffer;a.isWebGLCubeRenderTarget&&void 0!==g&&(k=k[g]);if(k){g=!1;k!==V&&(H.bindFramebuffer(36160,k),g=!0);
+try{var l=a.texture,m=l.format,h=l.type;1023!==m&&qa.convert(m)!==H.getParameter(35739)?console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format."):1009===h||qa.convert(h)===H.getParameter(35738)||1015===h&&(Ia.isWebGL2||sa.get("OES_texture_float")||sa.get("WEBGL_color_buffer_float"))||1016===h&&(Ia.isWebGL2?sa.get("EXT_color_buffer_float"):sa.get("EXT_color_buffer_half_float"))?36053===H.checkFramebufferStatus(36160)?0<=b&&b<=a.width-
+d&&0<=c&&c<=a.height-e&&H.readPixels(b,c,d,e,qa.convert(m),qa.convert(h),f):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete."):console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.")}finally{g&&H.bindFramebuffer(36160,V)}}}else console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.")};this.copyFramebufferToTexture=
+function(a,b,c){void 0===c&&(c=0);var d=Math.pow(2,-c),e=Math.floor(b.image.width*d);d=Math.floor(b.image.height*d);var f=qa.convert(b.format);U.setTexture2D(b,0);H.copyTexImage2D(3553,c,f,a.x,a.y,e,d,0);aa.unbindTexture()};this.copyTextureToTexture=function(a,b,c,d){var e=b.image.width,f=b.image.height,g=qa.convert(c.format),k=qa.convert(c.type);U.setTexture2D(c,0);b.isDataTexture?H.texSubImage2D(3553,d||0,a.x,a.y,e,f,g,k,b.image.data):H.texSubImage2D(3553,d||0,a.x,a.y,g,k,b.image);aa.unbindTexture()};
+this.initTexture=function(a){U.setTexture2D(a,0);aa.unbindTexture()};"undefined"!==typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}function Re(a,b){this.name="";this.color=new B(a);this.density=void 0!==b?b:2.5E-4}function Se(a,b,c){this.name="";this.color=new B(a);this.near=void 0!==b?b:1;this.far=void 0!==c?c:1E3}function sb(a,b){this.array=a;this.stride=b;this.count=void 0!==a?a.length/b:0;this.usage=35044;this.updateRange={offset:0,count:-1};
+this.version=0}function Qd(a,b,c,d){this.data=a;this.itemSize=b;this.offset=c;this.normalized=!0===d}function Jb(a){K.call(this);this.type="SpriteMaterial";this.color=new B(16777215);this.alphaMap=this.map=null;this.rotation=0;this.transparent=this.sizeAttenuation=!0;this.setValues(a)}function Rd(a){D.call(this);this.type="Sprite";if(void 0===Nc){Nc=new A;var b=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]);b=new sb(b,5);Nc.setIndex([0,1,2,0,2,3]);Nc.setAttribute("position",
+new Qd(b,3,0,!1));Nc.setAttribute("uv",new Qd(b,2,3,!1))}this.geometry=Nc;this.material=void 0!==a?a:new Jb;this.center=new w(.5,.5)}function Te(a,b,c,d,e,f){Oc.subVectors(a,c).addScalar(.5).multiply(d);void 0!==e?(Sd.x=f*Oc.x-e*Oc.y,Sd.y=e*Oc.x+f*Oc.y):Sd.copy(Oc);a.copy(b);a.x+=Sd.x;a.y+=Sd.y;a.applyMatrix4(ai)}function Td(){D.call(this);this.type="LOD";Object.defineProperties(this,{levels:{enumerable:!0,value:[]}});this.autoUpdate=!0}function Ud(a,b){a&&a.isGeometry&&console.error("THREE.SkinnedMesh no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");
+ca.call(this,a,b);this.type="SkinnedMesh";this.bindMode="attached";this.bindMatrix=new O;this.bindMatrixInverse=new O}function Ue(a,b){a=a||[];this.bones=a.slice(0);this.boneMatrices=new Float32Array(16*this.bones.length);this.frame=-1;if(void 0===b)this.calculateInverses();else if(this.bones.length===b.length)this.boneInverses=b.slice(0);else for(console.warn("THREE.Skeleton boneInverses is the wrong length."),this.boneInverses=[],a=0,b=this.bones.length;a<b;a++)this.boneInverses.push(new O)}function rg(){D.call(this);
+this.type="Bone"}function Ve(a,b,c){ca.call(this,a,b);this.instanceMatrix=new M(new Float32Array(16*c),16);this.count=c;this.frustumCulled=!1}function ka(a){K.call(this);this.type="LineBasicMaterial";this.color=new B(16777215);this.linewidth=1;this.linejoin=this.linecap="round";this.setValues(a)}function La(a,b,c){1===c&&console.error("THREE.Line: parameter THREE.LinePieces no longer supported. Use THREE.LineSegments instead.");D.call(this);this.type="Line";this.geometry=void 0!==a?a:new A;this.material=
+void 0!==b?b:new ka}function ma(a,b){La.call(this,a,b);this.type="LineSegments"}function We(a,b){La.call(this,a,b);this.type="LineLoop"}function Wa(a){K.call(this);this.type="PointsMaterial";this.color=new B(16777215);this.alphaMap=this.map=null;this.size=1;this.sizeAttenuation=!0;this.morphTargets=!1;this.setValues(a)}function Pc(a,b){D.call(this);this.type="Points";this.geometry=void 0!==a?a:new A;this.material=void 0!==b?b:new Wa;this.updateMorphTargets()}function sg(a,b,c,d,e,f,g){var k=tg.distanceSqToPoint(a);
+k<c&&(c=new n,tg.closestPointToPoint(a,c),c.applyMatrix4(d),a=e.ray.origin.distanceTo(c),a<e.near||a>e.far||f.push({distance:a,distanceToRay:Math.sqrt(k),point:c,index:b,face:null,object:g}))}function ug(a,b,c,d,e,f,g,k,l){Z.call(this,a,b,c,d,e,f,g,k,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 Qc(a,b,c,d,e,f,g,k,l,m,h,p){Z.call(this,null,f,g,k,l,m,d,e,h,p);this.image={width:b,height:c};this.mipmaps=a;this.generateMipmaps=
+this.flipY=!1}function Vd(a,b,c,d,e,f,g,k,l){Z.call(this,a,b,c,d,e,f,g,k,l);this.needsUpdate=!0}function Wd(a,b,c,d,e,f,g,k,l,m){m=void 0!==m?m:1026;if(1026!==m&&1027!==m)throw Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===c&&1026===m&&(c=1012);void 0===c&&1027===m&&(c=1020);Z.call(this,null,d,e,f,g,k,m,c,l);this.image={width:a,height:b};this.magFilter=void 0!==g?g:1003;this.minFilter=void 0!==k?k:1003;this.generateMipmaps=this.flipY=!1}function Rc(a){A.call(this);
+this.type="WireframeGeometry";var b=[],c,d,e,f=[0,0],g={},k=["a","b","c"];if(a&&a.isGeometry){var l=a.faces;var m=0;for(d=l.length;m<d;m++){var h=l[m];for(c=0;3>c;c++){var p=h[k[c]];var q=h[k[(c+1)%3]];f[0]=Math.min(p,q);f[1]=Math.max(p,q);p=f[0]+","+f[1];void 0===g[p]&&(g[p]={index1:f[0],index2:f[1]})}}for(p in g)m=g[p],k=a.vertices[m.index1],b.push(k.x,k.y,k.z),k=a.vertices[m.index2],b.push(k.x,k.y,k.z)}else if(a&&a.isBufferGeometry)if(k=new n,null!==a.index){l=a.attributes.position;h=a.index;var t=
+a.groups;0===t.length&&(t=[{start:0,count:h.count,materialIndex:0}]);a=0;for(e=t.length;a<e;++a)for(m=t[a],c=m.start,d=m.count,m=c,d=c+d;m<d;m+=3)for(c=0;3>c;c++)p=h.getX(m+c),q=h.getX(m+(c+1)%3),f[0]=Math.min(p,q),f[1]=Math.max(p,q),p=f[0]+","+f[1],void 0===g[p]&&(g[p]={index1:f[0],index2:f[1]});for(p in g)m=g[p],k.fromBufferAttribute(l,m.index1),b.push(k.x,k.y,k.z),k.fromBufferAttribute(l,m.index2),b.push(k.x,k.y,k.z)}else for(l=a.attributes.position,m=0,d=l.count/3;m<d;m++)for(c=0;3>c;c++)g=3*
+m+c,k.fromBufferAttribute(l,g),b.push(k.x,k.y,k.z),g=3*m+(c+1)%3,k.fromBufferAttribute(l,g),b.push(k.x,k.y,k.z);this.setAttribute("position",new E(b,3))}function Xd(a,b,c){L.call(this);this.type="ParametricGeometry";this.parameters={func:a,slices:b,stacks:c};this.fromBufferGeometry(new Sc(a,b,c));this.mergeVertices()}function Sc(a,b,c){A.call(this);this.type="ParametricBufferGeometry";this.parameters={func:a,slices:b,stacks:c};var d=[],e=[],f=[],g=[],k=new n,l=new n,m=new n,h=new n,p=new n,q,t;3>
+a.length&&console.error("THREE.ParametricGeometry: Function must now modify a Vector3 as third parameter.");var r=b+1;for(q=0;q<=c;q++){var u=q/c;for(t=0;t<=b;t++){var y=t/b;a(y,u,l);e.push(l.x,l.y,l.z);0<=y-1E-5?(a(y-1E-5,u,m),h.subVectors(l,m)):(a(y+1E-5,u,m),h.subVectors(m,l));0<=u-1E-5?(a(y,u-1E-5,m),p.subVectors(l,m)):(a(y,u+1E-5,m),p.subVectors(m,l));k.crossVectors(h,p).normalize();f.push(k.x,k.y,k.z);g.push(y,u)}}for(q=0;q<c;q++)for(t=0;t<b;t++)a=q*r+t+1,k=(q+1)*r+t+1,l=(q+1)*r+t,d.push(q*
+r+t,a,l),d.push(a,k,l);this.setIndex(d);this.setAttribute("position",new E(e,3));this.setAttribute("normal",new E(f,3));this.setAttribute("uv",new E(g,2))}function Yd(a,b,c,d){L.call(this);this.type="PolyhedronGeometry";this.parameters={vertices:a,indices:b,radius:c,detail:d};this.fromBufferGeometry(new Ja(a,b,c,d));this.mergeVertices()}function Ja(a,b,c,d){function e(a){k.push(a.x,a.y,a.z)}function f(b,c){b*=3;c.x=a[b+0];c.y=a[b+1];c.z=a[b+2]}function g(a,b,c,d){0>d&&1===a.x&&(l[b]=a.x-1);0===c.x&&
+0===c.z&&(l[b]=d/2/Math.PI+.5)}A.call(this);this.type="PolyhedronBufferGeometry";this.parameters={vertices:a,indices:b,radius:c,detail:d};c=c||1;d=d||0;var k=[],l=[];(function(a){for(var c=new n,d=new n,g=new n,k=0;k<b.length;k+=3){f(b[k+0],c);f(b[k+1],d);f(b[k+2],g);var l,m,h=c,v=d,C=g,w=Math.pow(2,a),ja=[];for(m=0;m<=w;m++){ja[m]=[];var z=h.clone().lerp(C,m/w),A=v.clone().lerp(C,m/w),B=w-m;for(l=0;l<=B;l++)ja[m][l]=0===l&&m===w?z:z.clone().lerp(A,l/B)}for(m=0;m<w;m++)for(l=0;l<2*(w-m)-1;l++)h=Math.floor(l/
+2),0===l%2?(e(ja[m][h+1]),e(ja[m+1][h]),e(ja[m][h])):(e(ja[m][h+1]),e(ja[m+1][h+1]),e(ja[m+1][h]))}})(d);(function(a){for(var b=new n,c=0;c<k.length;c+=3)b.x=k[c+0],b.y=k[c+1],b.z=k[c+2],b.normalize().multiplyScalar(a),k[c+0]=b.x,k[c+1]=b.y,k[c+2]=b.z})(c);(function(){for(var a=new n,b=0;b<k.length;b+=3)a.x=k[b+0],a.y=k[b+1],a.z=k[b+2],l.push(Math.atan2(a.z,-a.x)/2/Math.PI+.5,1-(Math.atan2(-a.y,Math.sqrt(a.x*a.x+a.z*a.z))/Math.PI+.5));a=new n;b=new n;for(var c=new n,d=new n,e=new w,f=new w,h=new w,
+y=0,v=0;y<k.length;y+=9,v+=6){a.set(k[y+0],k[y+1],k[y+2]);b.set(k[y+3],k[y+4],k[y+5]);c.set(k[y+6],k[y+7],k[y+8]);e.set(l[v+0],l[v+1]);f.set(l[v+2],l[v+3]);h.set(l[v+4],l[v+5]);d.copy(a).add(b).add(c).divideScalar(3);var C=Math.atan2(d.z,-d.x);g(e,v+0,a,C);g(f,v+2,b,C);g(h,v+4,c,C)}for(a=0;a<l.length;a+=6)b=l[a+0],c=l[a+2],d=l[a+4],e=Math.min(b,c,d),.9<Math.max(b,c,d)&&.1>e&&(.2>b&&(l[a+0]+=1),.2>c&&(l[a+2]+=1),.2>d&&(l[a+4]+=1))})();this.setAttribute("position",new E(k,3));this.setAttribute("normal",
+new E(k.slice(),3));this.setAttribute("uv",new E(l,2));0===d?this.computeVertexNormals():this.normalizeNormals()}function Zd(a,b){L.call(this);this.type="TetrahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new Tc(a,b));this.mergeVertices()}function Tc(a,b){Ja.call(this,[1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],[2,1,0,0,3,2,1,3,0,2,3,1],a,b);this.type="TetrahedronBufferGeometry";this.parameters={radius:a,detail:b}}function $d(a,b){L.call(this);this.type="OctahedronGeometry";this.parameters=
+{radius:a,detail:b};this.fromBufferGeometry(new dc(a,b));this.mergeVertices()}function dc(a,b){Ja.call(this,[1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2],a,b);this.type="OctahedronBufferGeometry";this.parameters={radius:a,detail:b}}function ae(a,b){L.call(this);this.type="IcosahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new Uc(a,b));this.mergeVertices()}function Uc(a,b){var c=(1+Math.sqrt(5))/2;Ja.call(this,[-1,c,0,1,c,0,
+-1,-c,0,1,-c,0,0,-1,c,0,1,c,0,-1,-c,0,1,-c,c,0,-1,c,0,1,-c,0,-1,-c,0,1],[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1],a,b);this.type="IcosahedronBufferGeometry";this.parameters={radius:a,detail:b}}function be(a,b){L.call(this);this.type="DodecahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new Vc(a,b));this.mergeVertices()}function Vc(a,b){var c=(1+Math.sqrt(5))/2,d=1/c;Ja.call(this,
+[-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-d,-c,0,-d,c,0,d,-c,0,d,c,-d,-c,0,-d,c,0,d,-c,0,d,c,0,-c,0,-d,c,0,-d,-c,0,d,c,0,d],[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9],a,b);this.type="DodecahedronBufferGeometry";this.parameters={radius:a,detail:b}}function ce(a,
+b,c,d,e,f){L.call(this);this.type="TubeGeometry";this.parameters={path:a,tubularSegments:b,radius:c,radialSegments:d,closed:e};void 0!==f&&console.warn("THREE.TubeGeometry: taper has been removed.");a=new ec(a,b,c,d,e);this.tangents=a.tangents;this.normals=a.normals;this.binormals=a.binormals;this.fromBufferGeometry(a);this.mergeVertices()}function ec(a,b,c,d,e){function f(e){h=a.getPointAt(e/b,h);var f=g.normals[e];e=g.binormals[e];for(q=0;q<=d;q++){var m=q/d*Math.PI*2,p=Math.sin(m);m=-Math.cos(m);
+l.x=m*f.x+p*e.x;l.y=m*f.y+p*e.y;l.z=m*f.z+p*e.z;l.normalize();r.push(l.x,l.y,l.z);k.x=h.x+c*l.x;k.y=h.y+c*l.y;k.z=h.z+c*l.z;t.push(k.x,k.y,k.z)}}A.call(this);this.type="TubeBufferGeometry";this.parameters={path:a,tubularSegments:b,radius:c,radialSegments:d,closed:e};b=b||64;c=c||1;d=d||8;e=e||!1;var g=a.computeFrenetFrames(b,e);this.tangents=g.tangents;this.normals=g.normals;this.binormals=g.binormals;var k=new n,l=new n,m=new w,h=new n,p,q,t=[],r=[],u=[],y=[];for(p=0;p<b;p++)f(p);f(!1===e?b:0);for(p=
+0;p<=b;p++)for(q=0;q<=d;q++)m.x=p/b,m.y=q/d,u.push(m.x,m.y);(function(){for(q=1;q<=b;q++)for(p=1;p<=d;p++){var a=(d+1)*q+(p-1),c=(d+1)*q+p,e=(d+1)*(q-1)+p;y.push((d+1)*(q-1)+(p-1),a,e);y.push(a,c,e)}})();this.setIndex(y);this.setAttribute("position",new E(t,3));this.setAttribute("normal",new E(r,3));this.setAttribute("uv",new E(u,2))}function de(a,b,c,d,e,f,g){L.call(this);this.type="TorusKnotGeometry";this.parameters={radius:a,tube:b,tubularSegments:c,radialSegments:d,p:e,q:f};void 0!==g&&console.warn("THREE.TorusKnotGeometry: heightScale has been deprecated. Use .scale( x, y, z ) instead.");
+this.fromBufferGeometry(new Wc(a,b,c,d,e,f));this.mergeVertices()}function Wc(a,b,c,d,e,f){function g(a,b,c,d,e){var f=Math.sin(a);b=c/b*a;c=Math.cos(b);e.x=d*(2+c)*.5*Math.cos(a);e.y=d*(2+c)*f*.5;e.z=d*Math.sin(b)*.5}A.call(this);this.type="TorusKnotBufferGeometry";this.parameters={radius:a,tube:b,tubularSegments:c,radialSegments:d,p:e,q:f};a=a||1;b=b||.4;c=Math.floor(c)||64;d=Math.floor(d)||8;e=e||2;f=f||3;var k=[],l=[],m=[],h=[],p,q=new n,t=new n,r=new n,u=new n,y=new n,v=new n,C=new n;for(p=0;p<=
+c;++p){var w=p/c*e*Math.PI*2;g(w,e,f,a,r);g(w+.01,e,f,a,u);v.subVectors(u,r);C.addVectors(u,r);y.crossVectors(v,C);C.crossVectors(y,v);y.normalize();C.normalize();for(w=0;w<=d;++w){var ja=w/d*Math.PI*2,z=-b*Math.cos(ja);ja=b*Math.sin(ja);q.x=r.x+(z*C.x+ja*y.x);q.y=r.y+(z*C.y+ja*y.y);q.z=r.z+(z*C.z+ja*y.z);l.push(q.x,q.y,q.z);t.subVectors(q,r).normalize();m.push(t.x,t.y,t.z);h.push(p/c);h.push(w/d)}}for(w=1;w<=c;w++)for(p=1;p<=d;p++)a=(d+1)*w+(p-1),b=(d+1)*w+p,e=(d+1)*(w-1)+p,k.push((d+1)*(w-1)+(p-
+1),a,e),k.push(a,b,e);this.setIndex(k);this.setAttribute("position",new E(l,3));this.setAttribute("normal",new E(m,3));this.setAttribute("uv",new E(h,2))}function ee(a,b,c,d,e){L.call(this);this.type="TorusGeometry";this.parameters={radius:a,tube:b,radialSegments:c,tubularSegments:d,arc:e};this.fromBufferGeometry(new Xc(a,b,c,d,e));this.mergeVertices()}function Xc(a,b,c,d,e){A.call(this);this.type="TorusBufferGeometry";this.parameters={radius:a,tube:b,radialSegments:c,tubularSegments:d,arc:e};a=a||
+1;b=b||.4;c=Math.floor(c)||8;d=Math.floor(d)||6;e=e||2*Math.PI;var f=[],g=[],k=[],l=[],m=new n,h=new n,p=new n,q,t;for(q=0;q<=c;q++)for(t=0;t<=d;t++){var r=t/d*e,u=q/c*Math.PI*2;h.x=(a+b*Math.cos(u))*Math.cos(r);h.y=(a+b*Math.cos(u))*Math.sin(r);h.z=b*Math.sin(u);g.push(h.x,h.y,h.z);m.x=a*Math.cos(r);m.y=a*Math.sin(r);p.subVectors(h,m).normalize();k.push(p.x,p.y,p.z);l.push(t/d);l.push(q/c)}for(q=1;q<=c;q++)for(t=1;t<=d;t++)a=(d+1)*(q-1)+t-1,b=(d+1)*(q-1)+t,e=(d+1)*q+t,f.push((d+1)*q+t-1,a,e),f.push(a,
+b,e);this.setIndex(f);this.setAttribute("position",new E(g,3));this.setAttribute("normal",new E(k,3));this.setAttribute("uv",new E(l,2))}function bi(a,b,c,d,e){for(var f,g=0,k=b,l=c-d;k<c;k+=d)g+=(a[l]-a[k])*(a[k+1]+a[l+1]),l=k;if(e===0<g)for(e=b;e<c;e+=d)f=ci(e,a[e],a[e+1],f);else for(e=c-d;e>=b;e-=d)f=ci(e,a[e],a[e+1],f);f&&fc(f,f.next)&&(fe(f),f=f.next);return f}function ge(a,b){if(!a)return a;b||(b=a);do{var c=!1;if(a.steiner||!fc(a,a.next)&&0!==ta(a.prev,a,a.next))a=a.next;else{fe(a);a=b=a.prev;
+if(a===a.next)break;c=!0}}while(c||a!==b);return b}function he(a,b,c,d,e,f,g){if(a){if(!g&&f){var k=a,l=k;do null===l.z&&(l.z=vg(l.x,l.y,d,e,f)),l.prevZ=l.prev,l=l.nextZ=l.next;while(l!==k);l.prevZ.nextZ=null;l.prevZ=null;k=l;var m,h,p,q,t=1;do{l=k;var r=k=null;for(h=0;l;){h++;var n=l;for(m=p=0;m<t&&(p++,n=n.nextZ,n);m++);for(q=t;0<p||0<q&&n;)0!==p&&(0===q||!n||l.z<=n.z)?(m=l,l=l.nextZ,p--):(m=n,n=n.nextZ,q--),r?r.nextZ=m:k=m,m.prevZ=r,r=m;l=n}r.nextZ=null;t*=2}while(1<h)}for(k=a;a.prev!==a.next;){l=
+a.prev;n=a.next;if(f)r=Kk(a,d,e,f);else a:if(r=a,h=r.prev,p=r,t=r.next,0<=ta(h,p,t))r=!1;else{for(m=r.next.next;m!==r.prev;){if(Yc(h.x,h.y,p.x,p.y,t.x,t.y,m.x,m.y)&&0<=ta(m.prev,m,m.next)){r=!1;break a}m=m.next}r=!0}if(r)b.push(l.i/c),b.push(a.i/c),b.push(n.i/c),fe(a),k=a=n.next;else if(a=n,a===k){if(!g)he(ge(a),b,c,d,e,f,1);else if(1===g){g=b;k=c;l=a;do n=l.prev,r=l.next.next,!fc(n,r)&&di(n,l,l.next,r)&&ie(n,r)&&ie(r,n)&&(g.push(n.i/k),g.push(l.i/k),g.push(r.i/k),fe(l),fe(l.next),l=a=r),l=l.next;
+while(l!==a);a=l;he(a,b,c,d,e,f,2)}else if(2===g)a:{g=a;do{for(k=g.next.next;k!==g.prev;){if(l=g.i!==k.i){l=g;n=k;if(r=l.next.i!==n.i&&l.prev.i!==n.i){b:{r=l;do{if(r.i!==l.i&&r.next.i!==l.i&&r.i!==n.i&&r.next.i!==n.i&&di(r,r.next,l,n)){r=!0;break b}r=r.next}while(r!==l);r=!1}r=!r}if(r=r&&ie(l,n)&&ie(n,l)){r=l;h=!1;p=(l.x+n.x)/2;n=(l.y+n.y)/2;do r.y>n!==r.next.y>n&&r.next.y!==r.y&&p<(r.next.x-r.x)*(n-r.y)/(r.next.y-r.y)+r.x&&(h=!h),r=r.next;while(r!==l);r=h}l=r}if(l){a=ei(g,k);g=ge(g,g.next);a=ge(a,
+a.next);he(g,b,c,d,e,f);he(a,b,c,d,e,f);break a}k=k.next}g=g.next}while(g!==a)}break}}}}function Kk(a,b,c,d){var e=a.prev,f=a.next;if(0<=ta(e,a,f))return!1;var g=e.x>a.x?e.x>f.x?e.x:f.x:a.x>f.x?a.x:f.x,k=e.y>a.y?e.y>f.y?e.y:f.y:a.y>f.y?a.y:f.y,l=vg(e.x<a.x?e.x<f.x?e.x:f.x:a.x<f.x?a.x:f.x,e.y<a.y?e.y<f.y?e.y:f.y:a.y<f.y?a.y:f.y,b,c,d);b=vg(g,k,b,c,d);c=a.prevZ;for(d=a.nextZ;c&&c.z>=l&&d&&d.z<=b;){if(c!==a.prev&&c!==a.next&&Yc(e.x,e.y,a.x,a.y,f.x,f.y,c.x,c.y)&&0<=ta(c.prev,c,c.next))return!1;c=c.prevZ;
+if(d!==a.prev&&d!==a.next&&Yc(e.x,e.y,a.x,a.y,f.x,f.y,d.x,d.y)&&0<=ta(d.prev,d,d.next))return!1;d=d.nextZ}for(;c&&c.z>=l;){if(c!==a.prev&&c!==a.next&&Yc(e.x,e.y,a.x,a.y,f.x,f.y,c.x,c.y)&&0<=ta(c.prev,c,c.next))return!1;c=c.prevZ}for(;d&&d.z<=b;){if(d!==a.prev&&d!==a.next&&Yc(e.x,e.y,a.x,a.y,f.x,f.y,d.x,d.y)&&0<=ta(d.prev,d,d.next))return!1;d=d.nextZ}return!0}function Lk(a,b){return a.x-b.x}function Mk(a,b){var c=b,d=a.x,e=a.y,f=-Infinity;do{if(e<=c.y&&e>=c.next.y&&c.next.y!==c.y){var g=c.x+(e-c.y)*
+(c.next.x-c.x)/(c.next.y-c.y);if(g<=d&&g>f){f=g;if(g===d){if(e===c.y)return c;if(e===c.next.y)return c.next}var k=c.x<c.next.x?c:c.next}}c=c.next}while(c!==b);if(!k)return null;if(d===f)return k.prev;b=k;g=k.x;var l=k.y,m=Infinity;for(c=k.next;c!==b;){if(d>=c.x&&c.x>=g&&d!==c.x&&Yc(e<l?d:f,e,g,l,e<l?f:d,e,c.x,c.y)){var h=Math.abs(e-c.y)/(d-c.x);(h<m||h===m&&c.x>k.x)&&ie(c,a)&&(k=c,m=h)}c=c.next}return k}function vg(a,b,c,d,e){a=32767*(a-c)*e;b=32767*(b-d)*e;a=(a|a<<8)&16711935;a=(a|a<<4)&252645135;
+a=(a|a<<2)&858993459;b=(b|b<<8)&16711935;b=(b|b<<4)&252645135;b=(b|b<<2)&858993459;return(a|a<<1)&1431655765|((b|b<<1)&1431655765)<<1}function Nk(a){var b=a,c=a;do{if(b.x<c.x||b.x===c.x&&b.y<c.y)c=b;b=b.next}while(b!==a);return c}function Yc(a,b,c,d,e,f,g,k){return 0<=(e-g)*(b-k)-(a-g)*(f-k)&&0<=(a-g)*(d-k)-(c-g)*(b-k)&&0<=(c-g)*(f-k)-(e-g)*(d-k)}function ta(a,b,c){return(b.y-a.y)*(c.x-b.x)-(b.x-a.x)*(c.y-b.y)}function fc(a,b){return a.x===b.x&&a.y===b.y}function di(a,b,c,d){return fc(a,c)&&fc(b,
+d)||fc(a,d)&&fc(c,b)?!0:0<ta(a,b,c)!==0<ta(a,b,d)&&0<ta(c,d,a)!==0<ta(c,d,b)}function ie(a,b){return 0>ta(a.prev,a,a.next)?0<=ta(a,b,a.next)&&0<=ta(a,a.prev,b):0>ta(a,b,a.prev)||0>ta(a,a.next,b)}function ei(a,b){var c=new wg(a.i,a.x,a.y),d=new wg(b.i,b.x,b.y),e=a.next,f=b.prev;a.next=b;b.prev=a;c.next=e;e.prev=c;d.next=c;c.prev=d;f.next=d;d.prev=f;return d}function ci(a,b,c,d){a=new wg(a,b,c);d?(a.next=d.next,a.prev=d,d.next.prev=a,d.next=a):(a.prev=a,a.next=a);return a}function fe(a){a.next.prev=
+a.prev;a.prev.next=a.next;a.prevZ&&(a.prevZ.nextZ=a.nextZ);a.nextZ&&(a.nextZ.prevZ=a.prevZ)}function wg(a,b,c){this.i=a;this.x=b;this.y=c;this.nextZ=this.prevZ=this.z=this.next=this.prev=null;this.steiner=!1}function fi(a){var b=a.length;2<b&&a[b-1].equals(a[0])&&a.pop()}function gi(a,b){for(var c=0;c<b.length;c++)a.push(b[c].x),a.push(b[c].y)}function gc(a,b){L.call(this);this.type="ExtrudeGeometry";this.parameters={shapes:a,options:b};this.fromBufferGeometry(new gb(a,b));this.mergeVertices()}function gb(a,
+b){function c(a){function c(a,b,c){b||console.error("THREE.ExtrudeGeometry: vec does not exist");return b.clone().multiplyScalar(c).add(a)}function g(a,b,c){var d=a.x-b.x;var e=a.y-b.y;var f=c.x-a.x;var g=c.y-a.y,k=d*d+e*e;if(Math.abs(d*g-e*f)>Number.EPSILON){var l=Math.sqrt(k),m=Math.sqrt(f*f+g*g);k=b.x-e/l;b=b.y+d/l;g=((c.x-g/m-k)*g-(c.y+f/m-b)*f)/(d*g-e*f);f=k+d*g-a.x;d=b+e*g-a.y;e=f*f+d*d;if(2>=e)return new w(f,d);e=Math.sqrt(e/2)}else a=!1,d>Number.EPSILON?f>Number.EPSILON&&(a=!0):d<-Number.EPSILON?
+f<-Number.EPSILON&&(a=!0):Math.sign(e)===Math.sign(g)&&(a=!0),a?(f=-e,e=Math.sqrt(k)):(f=d,d=e,e=Math.sqrt(k/2));return new w(f/e,d/e)}function k(a,b){for(J=a.length;0<=--J;){var c=J;var f=J-1;0>f&&(f=a.length-1);var g,k=C+2*E;for(g=0;g<k;g++){var l=Y*g,m=Y*(g+1),h=b+f+l,p=b+f+m;m=b+c+m;r(b+c+l);r(h);r(m);r(h);r(p);r(m);l=e.length/3;l=G.generateSideWallUV(d,e,l-6,l-3,l-2,l-1);u(l[0]);u(l[1]);u(l[3]);u(l[1]);u(l[2]);u(l[3])}}}function l(a,b,c){y.push(a);y.push(b);y.push(c)}function h(a,b,c){r(a);r(b);
+r(c);a=e.length/3;a=G.generateTopUV(d,e,a-3,a-2,a-1);u(a[0]);u(a[1]);u(a[2])}function r(a){e.push(y[3*a]);e.push(y[3*a+1]);e.push(y[3*a+2])}function u(a){f.push(a.x);f.push(a.y)}var y=[],v=void 0!==b.curveSegments?b.curveSegments:12,C=void 0!==b.steps?b.steps:1,W=void 0!==b.depth?b.depth:100,A=void 0!==b.bevelEnabled?b.bevelEnabled:!0,z=void 0!==b.bevelThickness?b.bevelThickness:6,B=void 0!==b.bevelSize?b.bevelSize:z-2,D=void 0!==b.bevelOffset?b.bevelOffset:0,E=void 0!==b.bevelSegments?b.bevelSegments:
+3,F=b.extrudePath,G=void 0!==b.UVGenerator?b.UVGenerator:Ok;void 0!==b.amount&&(console.warn("THREE.ExtrudeBufferGeometry: amount has been renamed to depth."),W=b.amount);var I=!1;if(F){var K=F.getSpacedPoints(C);I=!0;A=!1;var L=F.computeFrenetFrames(C,!1);var M=new n;var P=new n;var N=new n}A||(D=B=z=E=0);var O;v=a.extractPoints(v);a=v.shape;var S=v.holes;if(!tb.isClockWise(a)){a=a.reverse();var ha=0;for(O=S.length;ha<O;ha++){var xa=S[ha];tb.isClockWise(xa)&&(S[ha]=xa.reverse())}}var Z=tb.triangulateShape(a,
+S),V=a;ha=0;for(O=S.length;ha<O;ha++)xa=S[ha],a=a.concat(xa);var X,Y=a.length,T,ca=Z.length;v=[];var J=0;var Q=V.length;var U=Q-1;for(X=J+1;J<Q;J++,U++,X++)U===Q&&(U=0),X===Q&&(X=0),v[J]=g(V[J],V[U],V[X]);F=[];var da=v.concat();ha=0;for(O=S.length;ha<O;ha++){xa=S[ha];var ba=[];J=0;Q=xa.length;U=Q-1;for(X=J+1;J<Q;J++,U++,X++)U===Q&&(U=0),X===Q&&(X=0),ba[J]=g(xa[J],xa[U],xa[X]);F.push(ba);da=da.concat(ba)}for(U=0;U<E;U++){Q=U/E;var ea=z*Math.cos(Q*Math.PI/2);X=B*Math.sin(Q*Math.PI/2)+D;J=0;for(Q=V.length;J<
+Q;J++){var R=c(V[J],v[J],X);l(R.x,R.y,-ea)}ha=0;for(O=S.length;ha<O;ha++)for(xa=S[ha],ba=F[ha],J=0,Q=xa.length;J<Q;J++)R=c(xa[J],ba[J],X),l(R.x,R.y,-ea)}X=B+D;for(J=0;J<Y;J++)R=A?c(a[J],da[J],X):a[J],I?(P.copy(L.normals[0]).multiplyScalar(R.x),M.copy(L.binormals[0]).multiplyScalar(R.y),N.copy(K[0]).add(P).add(M),l(N.x,N.y,N.z)):l(R.x,R.y,0);for(Q=1;Q<=C;Q++)for(J=0;J<Y;J++)R=A?c(a[J],da[J],X):a[J],I?(P.copy(L.normals[Q]).multiplyScalar(R.x),M.copy(L.binormals[Q]).multiplyScalar(R.y),N.copy(K[Q]).add(P).add(M),
+l(N.x,N.y,N.z)):l(R.x,R.y,W/C*Q);for(U=E-1;0<=U;U--){Q=U/E;ea=z*Math.cos(Q*Math.PI/2);X=B*Math.sin(Q*Math.PI/2)+D;J=0;for(Q=V.length;J<Q;J++)R=c(V[J],v[J],X),l(R.x,R.y,W+ea);ha=0;for(O=S.length;ha<O;ha++)for(xa=S[ha],ba=F[ha],J=0,Q=xa.length;J<Q;J++)R=c(xa[J],ba[J],X),I?l(R.x,R.y+K[C-1].y,K[C-1].x+ea):l(R.x,R.y,W+ea)}(function(){var a=e.length/3;if(A){var b=0*Y;for(J=0;J<ca;J++)T=Z[J],h(T[2]+b,T[1]+b,T[0]+b);b=Y*(C+2*E);for(J=0;J<ca;J++)T=Z[J],h(T[0]+b,T[1]+b,T[2]+b)}else{for(J=0;J<ca;J++)T=Z[J],
+h(T[2],T[1],T[0]);for(J=0;J<ca;J++)T=Z[J],h(T[0]+Y*C,T[1]+Y*C,T[2]+Y*C)}d.addGroup(a,e.length/3-a,0)})();(function(){var a=e.length/3,b=0;k(V,b);b+=V.length;ha=0;for(O=S.length;ha<O;ha++)xa=S[ha],k(xa,b),b+=xa.length;d.addGroup(a,e.length/3-a,1)})()}A.call(this);this.type="ExtrudeBufferGeometry";this.parameters={shapes:a,options:b};a=Array.isArray(a)?a:[a];for(var d=this,e=[],f=[],g=0,k=a.length;g<k;g++)c(a[g]);this.setAttribute("position",new E(e,3));this.setAttribute("uv",new E(f,2));this.computeVertexNormals()}
+function hi(a,b,c){c.shapes=[];if(Array.isArray(a))for(var d=0,e=a.length;d<e;d++)c.shapes.push(a[d].uuid);else c.shapes.push(a.uuid);void 0!==b.extrudePath&&(c.options.extrudePath=b.extrudePath.toJSON());return c}function je(a,b){L.call(this);this.type="TextGeometry";this.parameters={text:a,parameters:b};this.fromBufferGeometry(new Zc(a,b));this.mergeVertices()}function Zc(a,b){b=b||{};var c=b.font;if(!c||!c.isFont)return console.error("THREE.TextGeometry: font parameter is not an instance of THREE.Font."),
+new L;a=c.generateShapes(a,b.size);b.depth=void 0!==b.height?b.height:50;void 0===b.bevelThickness&&(b.bevelThickness=10);void 0===b.bevelSize&&(b.bevelSize=8);void 0===b.bevelEnabled&&(b.bevelEnabled=!1);gb.call(this,a,b);this.type="TextBufferGeometry"}function ke(a,b,c,d,e,f,g){L.call(this);this.type="SphereGeometry";this.parameters={radius:a,widthSegments:b,heightSegments:c,phiStart:d,phiLength:e,thetaStart:f,thetaLength:g};this.fromBufferGeometry(new hc(a,b,c,d,e,f,g));this.mergeVertices()}function hc(a,
+b,c,d,e,f,g){A.call(this);this.type="SphereBufferGeometry";this.parameters={radius:a,widthSegments:b,heightSegments:c,phiStart:d,phiLength:e,thetaStart:f,thetaLength:g};a=a||1;b=Math.max(3,Math.floor(b)||8);c=Math.max(2,Math.floor(c)||6);d=void 0!==d?d:0;e=void 0!==e?e:2*Math.PI;f=void 0!==f?f:0;g=void 0!==g?g:Math.PI;var k=Math.min(f+g,Math.PI),l,m,h=0,p=[],q=new n,t=new n,r=[],u=[],y=[],v=[];for(m=0;m<=c;m++){var w=[],W=m/c,B=0;0==m&&0==f?B=.5/b:m==c&&k==Math.PI&&(B=-.5/b);for(l=0;l<=b;l++){var z=
+l/b;q.x=-a*Math.cos(d+z*e)*Math.sin(f+W*g);q.y=a*Math.cos(f+W*g);q.z=a*Math.sin(d+z*e)*Math.sin(f+W*g);u.push(q.x,q.y,q.z);t.copy(q).normalize();y.push(t.x,t.y,t.z);v.push(z+B,1-W);w.push(h++)}p.push(w)}for(m=0;m<c;m++)for(l=0;l<b;l++)a=p[m][l+1],d=p[m][l],e=p[m+1][l],g=p[m+1][l+1],(0!==m||0<f)&&r.push(a,d,g),(m!==c-1||k<Math.PI)&&r.push(d,e,g);this.setIndex(r);this.setAttribute("position",new E(u,3));this.setAttribute("normal",new E(y,3));this.setAttribute("uv",new E(v,2))}function le(a,b,c,d,e,
+f){L.call(this);this.type="RingGeometry";this.parameters={innerRadius:a,outerRadius:b,thetaSegments:c,phiSegments:d,thetaStart:e,thetaLength:f};this.fromBufferGeometry(new $c(a,b,c,d,e,f));this.mergeVertices()}function $c(a,b,c,d,e,f){A.call(this);this.type="RingBufferGeometry";this.parameters={innerRadius:a,outerRadius:b,thetaSegments:c,phiSegments:d,thetaStart:e,thetaLength:f};a=a||.5;b=b||1;e=void 0!==e?e:0;f=void 0!==f?f:2*Math.PI;c=void 0!==c?Math.max(3,c):8;d=void 0!==d?Math.max(1,d):1;var g=
+[],k=[],l=[],m=[],h=a,p=(b-a)/d,q=new n,t=new w,r,u;for(r=0;r<=d;r++){for(u=0;u<=c;u++)a=e+u/c*f,q.x=h*Math.cos(a),q.y=h*Math.sin(a),k.push(q.x,q.y,q.z),l.push(0,0,1),t.x=(q.x/b+1)/2,t.y=(q.y/b+1)/2,m.push(t.x,t.y);h+=p}for(r=0;r<d;r++)for(b=r*(c+1),u=0;u<c;u++)a=u+b,e=a+c+1,f=a+c+2,h=a+1,g.push(a,e,h),g.push(e,f,h);this.setIndex(g);this.setAttribute("position",new E(k,3));this.setAttribute("normal",new E(l,3));this.setAttribute("uv",new E(m,2))}function me(a,b,c,d){L.call(this);this.type="LatheGeometry";
+this.parameters={points:a,segments:b,phiStart:c,phiLength:d};this.fromBufferGeometry(new ad(a,b,c,d));this.mergeVertices()}function ad(a,b,c,d){A.call(this);this.type="LatheBufferGeometry";this.parameters={points:a,segments:b,phiStart:c,phiLength:d};b=Math.floor(b)||12;c=c||0;d=d||2*Math.PI;d=P.clamp(d,0,2*Math.PI);var e=[],f=[],g=[],k=1/b,l=new n,m=new w,h;for(h=0;h<=b;h++){var p=c+h*k*d;var q=Math.sin(p),t=Math.cos(p);for(p=0;p<=a.length-1;p++)l.x=a[p].x*q,l.y=a[p].y,l.z=a[p].x*t,f.push(l.x,l.y,
+l.z),m.x=h/b,m.y=p/(a.length-1),g.push(m.x,m.y)}for(h=0;h<b;h++)for(p=0;p<a.length-1;p++)c=p+h*a.length,k=c+a.length,l=c+a.length+1,m=c+1,e.push(c,k,m),e.push(k,l,m);this.setIndex(e);this.setAttribute("position",new E(f,3));this.setAttribute("uv",new E(g,2));this.computeVertexNormals();if(d===2*Math.PI)for(d=this.attributes.normal.array,e=new n,f=new n,g=new n,c=b*a.length*3,p=h=0;h<a.length;h++,p+=3)e.x=d[p+0],e.y=d[p+1],e.z=d[p+2],f.x=d[c+p+0],f.y=d[c+p+1],f.z=d[c+p+2],g.addVectors(e,f).normalize(),
+d[p+0]=d[c+p+0]=g.x,d[p+1]=d[c+p+1]=g.y,d[p+2]=d[c+p+2]=g.z}function ic(a,b){L.call(this);this.type="ShapeGeometry";"object"===typeof b&&(console.warn("THREE.ShapeGeometry: Options parameter has been removed."),b=b.curveSegments);this.parameters={shapes:a,curveSegments:b};this.fromBufferGeometry(new jc(a,b));this.mergeVertices()}function jc(a,b){function c(a){var c,k=e.length/3;a=a.extractPoints(b);var m=a.shape,h=a.holes;!1===tb.isClockWise(m)&&(m=m.reverse());a=0;for(c=h.length;a<c;a++){var x=h[a];
+!0===tb.isClockWise(x)&&(h[a]=x.reverse())}var n=tb.triangulateShape(m,h);a=0;for(c=h.length;a<c;a++)x=h[a],m=m.concat(x);a=0;for(c=m.length;a<c;a++)x=m[a],e.push(x.x,x.y,0),f.push(0,0,1),g.push(x.x,x.y);a=0;for(c=n.length;a<c;a++)m=n[a],d.push(m[0]+k,m[1]+k,m[2]+k),l+=3}A.call(this);this.type="ShapeBufferGeometry";this.parameters={shapes:a,curveSegments:b};b=b||12;var d=[],e=[],f=[],g=[],k=0,l=0;if(!1===Array.isArray(a))c(a);else for(var m=0;m<a.length;m++)c(a[m]),this.addGroup(k,l,m),k+=l,l=0;this.setIndex(d);
+this.setAttribute("position",new E(e,3));this.setAttribute("normal",new E(f,3));this.setAttribute("uv",new E(g,2))}function ii(a,b){b.shapes=[];if(Array.isArray(a))for(var c=0,d=a.length;c<d;c++)b.shapes.push(a[c].uuid);else b.shapes.push(a.uuid);return b}function bd(a,b){A.call(this);this.type="EdgesGeometry";this.parameters={thresholdAngle:b};var c=[];b=Math.cos(P.DEG2RAD*(void 0!==b?b:1));var d=[0,0],e={},f=["a","b","c"];if(a.isBufferGeometry){var g=new L;g.fromBufferGeometry(a)}else g=a.clone();
+g.mergeVertices();g.computeFaceNormals();a=g.vertices;g=g.faces;for(var k=0,l=g.length;k<l;k++)for(var m=g[k],h=0;3>h;h++){var p=m[f[h]];var q=m[f[(h+1)%3]];d[0]=Math.min(p,q);d[1]=Math.max(p,q);p=d[0]+","+d[1];void 0===e[p]?e[p]={index1:d[0],index2:d[1],face1:k,face2:void 0}:e[p].face2=k}for(p in e)if(d=e[p],void 0===d.face2||g[d.face1].normal.dot(g[d.face2].normal)<=b)f=a[d.index1],c.push(f.x,f.y,f.z),f=a[d.index2],c.push(f.x,f.y,f.z);this.setAttribute("position",new E(c,3))}function kc(a,b,c,d,
+e,f,g,k){L.call(this);this.type="CylinderGeometry";this.parameters={radiusTop:a,radiusBottom:b,height:c,radialSegments:d,heightSegments:e,openEnded:f,thetaStart:g,thetaLength:k};this.fromBufferGeometry(new ub(a,b,c,d,e,f,g,k));this.mergeVertices()}function ub(a,b,c,d,e,f,g,k){function l(c){var e,f=new w,l=new n,x=0,u=!0===c?a:b,C=!0===c?1:-1;var A=r;for(e=1;e<=d;e++)p.push(0,y*C,0),q.push(0,C,0),t.push(.5,.5),r++;var B=r;for(e=0;e<=d;e++){var E=e/d*k+g,D=Math.cos(E);E=Math.sin(E);l.x=u*E;l.y=y*C;
+l.z=u*D;p.push(l.x,l.y,l.z);q.push(0,C,0);f.x=.5*D+.5;f.y=.5*E*C+.5;t.push(f.x,f.y);r++}for(e=0;e<d;e++)f=A+e,l=B+e,!0===c?h.push(l,l+1,f):h.push(l+1,l,f),x+=3;m.addGroup(v,x,!0===c?1:2);v+=x}A.call(this);this.type="CylinderBufferGeometry";this.parameters={radiusTop:a,radiusBottom:b,height:c,radialSegments:d,heightSegments:e,openEnded:f,thetaStart:g,thetaLength:k};var m=this;a=void 0!==a?a:1;b=void 0!==b?b:1;c=c||1;d=Math.floor(d)||8;e=Math.floor(e)||1;f=void 0!==f?f:!1;g=void 0!==g?g:0;k=void 0!==
+k?k:2*Math.PI;var h=[],p=[],q=[],t=[],r=0,u=[],y=c/2,v=0;(function(){var f,l,x=new n,z=new n,w=0,A=(b-a)/c;for(l=0;l<=e;l++){var B=[],E=l/e,G=E*(b-a)+a;for(f=0;f<=d;f++){var D=f/d,F=D*k+g,I=Math.sin(F);F=Math.cos(F);z.x=G*I;z.y=-E*c+y;z.z=G*F;p.push(z.x,z.y,z.z);x.set(I,A,F).normalize();q.push(x.x,x.y,x.z);t.push(D,1-E);B.push(r++)}u.push(B)}for(f=0;f<d;f++)for(l=0;l<e;l++)x=u[l+1][f],z=u[l+1][f+1],A=u[l][f+1],h.push(u[l][f],x,A),h.push(x,z,A),w+=6;m.addGroup(v,w,0);v+=w})();!1===f&&(0<a&&l(!0),0<
+b&&l(!1));this.setIndex(h);this.setAttribute("position",new E(p,3));this.setAttribute("normal",new E(q,3));this.setAttribute("uv",new E(t,2))}function ne(a,b,c,d,e,f,g){kc.call(this,0,a,b,c,d,e,f,g);this.type="ConeGeometry";this.parameters={radius:a,height:b,radialSegments:c,heightSegments:d,openEnded:e,thetaStart:f,thetaLength:g}}function oe(a,b,c,d,e,f,g){ub.call(this,0,a,b,c,d,e,f,g);this.type="ConeBufferGeometry";this.parameters={radius:a,height:b,radialSegments:c,heightSegments:d,openEnded:e,
+thetaStart:f,thetaLength:g}}function pe(a,b,c,d){L.call(this);this.type="CircleGeometry";this.parameters={radius:a,segments:b,thetaStart:c,thetaLength:d};this.fromBufferGeometry(new cd(a,b,c,d));this.mergeVertices()}function cd(a,b,c,d){A.call(this);this.type="CircleBufferGeometry";this.parameters={radius:a,segments:b,thetaStart:c,thetaLength:d};a=a||1;b=void 0!==b?Math.max(3,b):8;c=void 0!==c?c:0;d=void 0!==d?d:2*Math.PI;var e=[],f=[],g=[],k=[],l,m=new n,h=new w;f.push(0,0,0);g.push(0,0,1);k.push(.5,
+.5);var p=0;for(l=3;p<=b;p++,l+=3){var q=c+p/b*d;m.x=a*Math.cos(q);m.y=a*Math.sin(q);f.push(m.x,m.y,m.z);g.push(0,0,1);h.x=(f[l]/a+1)/2;h.y=(f[l+1]/a+1)/2;k.push(h.x,h.y)}for(l=1;l<=b;l++)e.push(l,l+1,0);this.setIndex(e);this.setAttribute("position",new E(f,3));this.setAttribute("normal",new E(g,3));this.setAttribute("uv",new E(k,2))}function lc(a){K.call(this);this.type="ShadowMaterial";this.color=new B(0);this.transparent=!0;this.setValues(a)}function vb(a){qa.call(this,a);this.type="RawShaderMaterial"}
+function hb(a){K.call(this);this.defines={STANDARD:""};this.type="MeshStandardMaterial";this.color=new B(16777215);this.roughness=1;this.metalness=0;this.lightMap=this.map=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.emissive=new B(0);this.emissiveIntensity=1;this.bumpMap=this.emissiveMap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=0;this.normalScale=new w(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.envMap=this.alphaMap=
+this.metalnessMap=this.roughnessMap=null;this.envMapIntensity=1;this.refractionRatio=.98;this.wireframe=!1;this.wireframeLinewidth=1;this.wireframeLinejoin=this.wireframeLinecap="round";this.morphNormals=this.morphTargets=this.skinning=!1;this.setValues(a)}function mc(a){hb.call(this);this.defines={STANDARD:"",PHYSICAL:""};this.type="MeshPhysicalMaterial";this.reflectivity=.5;this.clearcoatRoughness=this.clearcoat=0;this.sheen=null;this.clearcoatNormalScale=new w(1,1);this.clearcoatNormalMap=null;
+this.transparency=0;this.setValues(a)}function Kb(a){K.call(this);this.type="MeshPhongMaterial";this.color=new B(16777215);this.specular=new B(1118481);this.shininess=30;this.lightMap=this.map=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.emissive=new B(0);this.emissiveIntensity=1;this.bumpMap=this.emissiveMap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=0;this.normalScale=new w(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=
+0;this.envMap=this.alphaMap=this.specularMap=null;this.combine=0;this.reflectivity=1;this.refractionRatio=.98;this.wireframe=!1;this.wireframeLinewidth=1;this.wireframeLinejoin=this.wireframeLinecap="round";this.morphNormals=this.morphTargets=this.skinning=!1;this.setValues(a)}function nc(a){K.call(this);this.defines={TOON:""};this.type="MeshToonMaterial";this.color=new B(16777215);this.specular=new B(1118481);this.shininess=30;this.lightMap=this.gradientMap=this.map=null;this.lightMapIntensity=1;
+this.aoMap=null;this.aoMapIntensity=1;this.emissive=new B(0);this.emissiveIntensity=1;this.bumpMap=this.emissiveMap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=0;this.normalScale=new w(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.alphaMap=this.specularMap=null;this.wireframe=!1;this.wireframeLinewidth=1;this.wireframeLinejoin=this.wireframeLinecap="round";this.morphNormals=this.morphTargets=this.skinning=!1;this.setValues(a)}function oc(a){K.call(this);
+this.type="MeshNormalMaterial";this.bumpMap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=0;this.normalScale=new w(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.wireframe=!1;this.wireframeLinewidth=1;this.morphNormals=this.morphTargets=this.skinning=this.fog=!1;this.setValues(a)}function pc(a){K.call(this);this.type="MeshLambertMaterial";this.color=new B(16777215);this.lightMap=this.map=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=
+1;this.emissive=new B(0);this.emissiveIntensity=1;this.envMap=this.alphaMap=this.specularMap=this.emissiveMap=null;this.combine=0;this.reflectivity=1;this.refractionRatio=.98;this.wireframe=!1;this.wireframeLinewidth=1;this.wireframeLinejoin=this.wireframeLinecap="round";this.morphNormals=this.morphTargets=this.skinning=!1;this.setValues(a)}function qc(a){K.call(this);this.defines={MATCAP:""};this.type="MeshMatcapMaterial";this.color=new B(16777215);this.bumpMap=this.map=this.matcap=null;this.bumpScale=
+1;this.normalMap=null;this.normalMapType=0;this.normalScale=new w(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.alphaMap=null;this.morphNormals=this.morphTargets=this.skinning=!1;this.setValues(a)}function rc(a){ka.call(this);this.type="LineDashedMaterial";this.scale=1;this.dashSize=3;this.gapSize=1;this.setValues(a)}function Ma(a,b,c,d){this.parameterPositions=a;this._cachedIndex=0;this.resultBuffer=void 0!==d?d:new b.constructor(c);this.sampleValues=b;this.valueSize=
+c}function Xe(a,b,c,d){Ma.call(this,a,b,c,d);this._offsetNext=this._weightNext=this._offsetPrev=this._weightPrev=-0}function qe(a,b,c,d){Ma.call(this,a,b,c,d)}function Ye(a,b,c,d){Ma.call(this,a,b,c,d)}function ua(a,b,c,d){if(void 0===a)throw Error("THREE.KeyframeTrack: track name is undefined");if(void 0===b||0===b.length)throw Error("THREE.KeyframeTrack: no keyframes in track named "+a);this.name=a;this.times=ea.convertArray(b,this.TimeBufferType);this.values=ea.convertArray(c,this.ValueBufferType);
+this.setInterpolation(d||this.DefaultInterpolation)}function Ze(a,b,c){ua.call(this,a,b,c)}function $e(a,b,c,d){ua.call(this,a,b,c,d)}function dd(a,b,c,d){ua.call(this,a,b,c,d)}function af(a,b,c,d){Ma.call(this,a,b,c,d)}function re(a,b,c,d){ua.call(this,a,b,c,d)}function bf(a,b,c,d){ua.call(this,a,b,c,d)}function ed(a,b,c,d){ua.call(this,a,b,c,d)}function Ra(a,b,c){this.name=a;this.tracks=c;this.duration=void 0!==b?b:-1;this.uuid=P.generateUUID();0>this.duration&&this.resetDuration()}function Pk(a){switch(a.toLowerCase()){case "scalar":case "double":case "float":case "number":case "integer":return dd;
+case "vector":case "vector2":case "vector3":case "vector4":return ed;case "color":return $e;case "quaternion":return re;case "bool":case "boolean":return Ze;case "string":return bf}throw Error("THREE.KeyframeTrack: Unsupported typeName: "+a);}function Qk(a){if(void 0===a.type)throw Error("THREE.KeyframeTrack: track type undefined, can not parse");var b=Pk(a.type);if(void 0===a.times){var c=[],d=[];ea.flattenJSON(a.keys,c,d,"value");a.times=c;a.values=d}return void 0!==b.parse?b.parse(a):new b(a.name,
+a.times,a.values,a.interpolation)}function xg(a,b,c){var d=this,e=!1,f=0,g=0,k=void 0,l=[];this.onStart=void 0;this.onLoad=a;this.onProgress=b;this.onError=c;this.itemStart=function(a){g++;if(!1===e&&void 0!==d.onStart)d.onStart(a,f,g);e=!0};this.itemEnd=function(a){f++;if(void 0!==d.onProgress)d.onProgress(a,f,g);if(f===g&&(e=!1,void 0!==d.onLoad))d.onLoad()};this.itemError=function(a){if(void 0!==d.onError)d.onError(a)};this.resolveURL=function(a){return k?k(a):a};this.setURLModifier=function(a){k=
+a;return this};this.addHandler=function(a,b){l.push(a,b);return this};this.removeHandler=function(a){a=l.indexOf(a);-1!==a&&l.splice(a,2);return this};this.getHandler=function(a){for(var b=0,c=l.length;b<c;b+=2){var d=l[b],e=l[b+1];d.global&&(d.lastIndex=0);if(d.test(a))return e}return null}}function V(a){this.manager=void 0!==a?a:ji;this.crossOrigin="anonymous";this.resourcePath=this.path=""}function Sa(a){V.call(this,a)}function yg(a){V.call(this,a)}function zg(a){V.call(this,a)}function cf(a){V.call(this,
+a)}function fd(a){V.call(this,a)}function df(a){V.call(this,a)}function ef(a){V.call(this,a)}function I(){this.type="Curve";this.arcLengthDivisions=200}function Na(a,b,c,d,e,f,g,k){I.call(this);this.type="EllipseCurve";this.aX=a||0;this.aY=b||0;this.xRadius=c||1;this.yRadius=d||1;this.aStartAngle=e||0;this.aEndAngle=f||2*Math.PI;this.aClockwise=g||!1;this.aRotation=k||0}function gd(a,b,c,d,e,f){Na.call(this,a,b,c,c,d,e,f);this.type="ArcCurve"}function Ag(){var a=0,b=0,c=0,d=0;return{initCatmullRom:function(e,
+f,g,k,l){e=l*(g-e);k=l*(k-f);a=f;b=e;c=-3*f+3*g-2*e-k;d=2*f-2*g+e+k},initNonuniformCatmullRom:function(e,f,g,k,l,m,h){e=((f-e)/l-(g-e)/(l+m)+(g-f)/m)*m;k=((g-f)/m-(k-f)/(m+h)+(k-g)/h)*m;a=f;b=e;c=-3*f+3*g-2*e-k;d=2*f-2*g+e+k},calc:function(e){var f=e*e;return a+b*e+c*f+d*f*e}}}function Aa(a,b,c,d){I.call(this);this.type="CatmullRomCurve3";this.points=a||[];this.closed=b||!1;this.curveType=c||"centripetal";this.tension=d||.5}function ki(a,b,c,d,e){b=.5*(d-b);e=.5*(e-c);var f=a*a;return(2*c-2*d+b+e)*
+a*f+(-3*c+3*d-2*b-e)*f+b*a+c}function se(a,b,c,d){var e=1-a;return e*e*b+2*(1-a)*a*c+a*a*d}function te(a,b,c,d,e){var f=1-a,g=1-a;return f*f*f*b+3*g*g*a*c+3*(1-a)*a*a*d+a*a*a*e}function Xa(a,b,c,d){I.call(this);this.type="CubicBezierCurve";this.v0=a||new w;this.v1=b||new w;this.v2=c||new w;this.v3=d||new w}function ib(a,b,c,d){I.call(this);this.type="CubicBezierCurve3";this.v0=a||new n;this.v1=b||new n;this.v2=c||new n;this.v3=d||new n}function Ea(a,b){I.call(this);this.type="LineCurve";this.v1=a||
+new w;this.v2=b||new w}function Ya(a,b){I.call(this);this.type="LineCurve3";this.v1=a||new n;this.v2=b||new n}function Za(a,b,c){I.call(this);this.type="QuadraticBezierCurve";this.v0=a||new w;this.v1=b||new w;this.v2=c||new w}function jb(a,b,c){I.call(this);this.type="QuadraticBezierCurve3";this.v0=a||new n;this.v1=b||new n;this.v2=c||new n}function $a(a){I.call(this);this.type="SplineCurve";this.points=a||[]}function wb(){I.call(this);this.type="CurvePath";this.curves=[];this.autoClose=!1}function ab(a){wb.call(this);
+this.type="Path";this.currentPoint=new w;a&&this.setFromPoints(a)}function Lb(a){ab.call(this,a);this.uuid=P.generateUUID();this.type="Shape";this.holes=[]}function ba(a,b){D.call(this);this.type="Light";this.color=new B(a);this.intensity=void 0!==b?b:1;this.receiveShadow=void 0}function ff(a,b,c){ba.call(this,a,c);this.type="HemisphereLight";this.castShadow=void 0;this.position.copy(D.DefaultUp);this.updateMatrix();this.groundColor=new B(b)}function kb(a){this.camera=a;this.bias=0;this.radius=1;
+this.mapSize=new w(512,512);this.mapPass=this.map=null;this.matrix=new O;this._frustum=new Hc;this._frameExtents=new w(1,1);this._viewportCount=1;this._viewports=[new ia(0,0,1,1)]}function gf(){kb.call(this,new da(50,1,.5,500))}function hf(a,b,c,d,e,f){ba.call(this,a,b);this.type="SpotLight";this.position.copy(D.DefaultUp);this.updateMatrix();this.target=new D;Object.defineProperty(this,"power",{get:function(){return this.intensity*Math.PI},set:function(a){this.intensity=a/Math.PI}});this.distance=
+void 0!==c?c:0;this.angle=void 0!==d?d:Math.PI/3;this.penumbra=void 0!==e?e:0;this.decay=void 0!==f?f:1;this.shadow=new gf}function Bg(){kb.call(this,new da(90,1,.5,500));this._frameExtents=new w(4,2);this._viewportCount=6;this._viewports=[new ia(2,1,1,1),new ia(0,1,1,1),new ia(3,1,1,1),new ia(1,1,1,1),new ia(3,0,1,1),new ia(1,0,1,1)];this._cubeDirections=[new n(1,0,0),new n(-1,0,0),new n(0,0,1),new n(0,0,-1),new n(0,1,0),new n(0,-1,0)];this._cubeUps=[new n(0,1,0),new n(0,1,0),new n(0,1,0),new n(0,
+1,0),new n(0,0,1),new n(0,0,-1)]}function jf(a,b,c,d){ba.call(this,a,b);this.type="PointLight";Object.defineProperty(this,"power",{get:function(){return 4*this.intensity*Math.PI},set:function(a){this.intensity=a/(4*Math.PI)}});this.distance=void 0!==c?c:0;this.decay=void 0!==d?d:1;this.shadow=new Bg}function hd(a,b,c,d,e,f){eb.call(this);this.type="OrthographicCamera";this.zoom=1;this.view=null;this.left=void 0!==a?a:-1;this.right=void 0!==b?b:1;this.top=void 0!==c?c:1;this.bottom=void 0!==d?d:-1;
+this.near=void 0!==e?e:.1;this.far=void 0!==f?f:2E3;this.updateProjectionMatrix()}function kf(){kb.call(this,new hd(-5,5,5,-5,.5,500))}function lf(a,b){ba.call(this,a,b);this.type="DirectionalLight";this.position.copy(D.DefaultUp);this.updateMatrix();this.target=new D;this.shadow=new kf}function mf(a,b){ba.call(this,a,b);this.type="AmbientLight";this.castShadow=void 0}function nf(a,b,c,d){ba.call(this,a,b);this.type="RectAreaLight";this.width=void 0!==c?c:10;this.height=void 0!==d?d:10}function of(a){V.call(this,
+a);this.textures={}}function pf(){A.call(this);this.type="InstancedBufferGeometry";this.maxInstancedCount=void 0}function qf(a,b,c,d){"number"===typeof c&&(d=c,c=!1,console.error("THREE.InstancedBufferAttribute: The constructor now expects normalized as the third argument."));M.call(this,a,b,c);this.meshPerAttribute=d||1}function rf(a){V.call(this,a)}function sf(a){V.call(this,a)}function Cg(a){"undefined"===typeof createImageBitmap&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported.");
+"undefined"===typeof fetch&&console.warn("THREE.ImageBitmapLoader: fetch() not supported.");V.call(this,a);this.options=void 0}function Dg(){this.type="ShapePath";this.color=new B;this.subPaths=[];this.currentPath=null}function Eg(a){this.type="Font";this.data=a}function Fg(a){V.call(this,a)}function tf(a){V.call(this,a)}function uf(){this.coefficients=[];for(var a=0;9>a;a++)this.coefficients.push(new n)}function bb(a,b){ba.call(this,void 0,b);this.sh=void 0!==a?a:new uf}function Gg(a,b,c){bb.call(this,
+void 0,c);a=(new B).set(a);c=(new B).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){bb.call(this,void 0,b);a=(new B).set(a);this.sh.coefficients[0].set(a.r,a.g,a.b).multiplyScalar(2*Math.sqrt(Math.PI))}function li(){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=!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(){D.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 id(a){D.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){id.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 mi(a,
+b,c){c=c||Ba.parseTrackName(b);this._targetGroup=a;this._bindings=a.subscribe_(b,c)}function Ba(a,b,c){this.path=b;this.parsedPath=c||Ba.parseTrackName(b);this.node=Ba.findNode(a,this.parsedPath.nodeName)||a;this.rootNode=a}function ni(){this.uuid=P.generateUUID();this._objects=Array.prototype.slice.call(arguments);this.nCachedObjects_=0;var a={};this._indicesByUUID=a;for(var b=0,c=arguments.length;b!==c;++b)a[arguments[b].uuid]=b;this._paths=[];this._parsedPaths=[];this._bindings=[];this._bindingsIndicesByPath=
+{};var d=this;this.stats={objects:{get total(){return d._objects.length},get inUse(){return this.total-d.nCachedObjects_}},get bindingsPerObject(){return d._bindings.length}}}function oi(a,b,c){this._mixer=a;this._clip=b;this._localRoot=c||null;a=b.tracks;b=a.length;c=Array(b);for(var d={endingStart:2400,endingEnd:2400},e=0;e!==b;++e){var f=a[e].createInterpolant(null);c[e]=f;f.settings=d}this._interpolantSettings=d;this._interpolants=c;this._propertyBindings=Array(b);this._weightInterpolant=this._timeScaleInterpolant=
+this._byClipCacheIndex=this._cacheIndex=null;this.loop=2201;this._loopCount=-1;this._startTime=null;this.time=0;this._effectiveWeight=this.weight=this._effectiveTimeScale=this.timeScale=1;this.repetitions=Infinity;this.paused=!1;this.enabled=!0;this.clampWhenFinished=!1;this.zeroSlopeAtEnd=this.zeroSlopeAtStart=!0}function Og(a){this._root=a;this._initMemoryManager();this.time=this._accuIndex=0;this.timeScale=1}function vf(a,b){"string"===typeof a&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),
+a=b);this.value=a}function Pg(a,b,c){sb.call(this,a,b);this.meshPerAttribute=c||1}function pi(a,b,c,d){this.ray=new Wb(a,b);this.near=c||0;this.far=d||Infinity;this.camera=null;this.params={Mesh:{},Line:{},LOD:{},Points:{threshold:1},Sprite:{}};Object.defineProperties(this.params,{PointCloud:{get:function(){console.warn("THREE.Raycaster: params.PointCloud has been renamed to params.Points.");return this.Points}}})}function qi(a,b){return a.distance-b.distance}function Qg(a,b,c,d){if(!1!==a.visible&&
+(a.raycast(b,c),!0===d)){a=a.children;d=0;for(var e=a.length;d<e;d++)Qg(a[d],b,c,!0)}}function ri(a,b,c){this.radius=void 0!==a?a:1;this.phi=void 0!==b?b:0;this.theta=void 0!==c?c:0;return this}function si(a,b,c){this.radius=void 0!==a?a:1;this.theta=void 0!==b?b:0;this.y=void 0!==c?c:0;return this}function Rg(a,b){this.min=void 0!==a?a:new w(Infinity,Infinity);this.max=void 0!==b?b:new w(-Infinity,-Infinity)}function Sg(a,b){this.start=void 0!==a?a:new n;this.end=void 0!==b?b:new n}function ue(a){D.call(this);
+this.material=a;this.render=function(){}}function jd(a,b){D.call(this);this.light=a;this.light.updateMatrixWorld();this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1;this.color=b;a=new A;b=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(var c=0,d=1;32>c;c++,d++){var e=c/32*Math.PI*2,f=d/32*Math.PI*2;b.push(Math.cos(e),Math.sin(e),1,Math.cos(f),Math.sin(f),1)}a.setAttribute("position",new E(b,3));b=new ka({fog:!1});this.cone=new ma(a,b);this.add(this.cone);this.update()}function ti(a){var b=
+[];a&&a.isBone&&b.push(a);for(var c=0;c<a.children.length;c++)b.push.apply(b,ti(a.children[c]));return b}function kd(a){for(var b=ti(a),c=new A,d=[],e=[],f=new B(0,0,1),g=new B(0,1,0),k=0;k<b.length;k++){var l=b[k];l.parent&&l.parent.isBone&&(d.push(0,0,0),d.push(0,0,0),e.push(f.r,f.g,f.b),e.push(g.r,g.g,g.b))}c.setAttribute("position",new E(d,3));c.setAttribute("color",new E(e,3));d=new ka({vertexColors:2,depthTest:!1,depthWrite:!1,transparent:!0});ma.call(this,c,d);this.root=a;this.bones=b;this.matrix=
+a.matrixWorld;this.matrixAutoUpdate=!1}function ld(a,b,c){this.light=a;this.light.updateMatrixWorld();this.color=c;a=new hc(b,4,2);b=new Pa({wireframe:!0,fog:!1});ca.call(this,a,b);this.matrix=this.light.matrixWorld;this.matrixAutoUpdate=!1;this.update()}function md(a,b,c){D.call(this);this.light=a;this.light.updateMatrixWorld();this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1;this.color=c;a=new dc(b);a.rotateY(.5*Math.PI);this.material=new Pa({wireframe:!0,fog:!1});void 0===this.color&&(this.material.vertexColors=
+2);b=a.getAttribute("position");b=new Float32Array(3*b.count);a.setAttribute("color",new M(b,3));this.add(new ca(a,this.material));this.update()}function wf(a,b,c,d){a=a||10;b=b||10;c=new B(void 0!==c?c:4473924);d=new B(void 0!==d?d:8947848);var e=b/2,f=a/b,g=a/2;a=[];for(var k=[],l=0,m=0,h=-g;l<=b;l++,h+=f){a.push(-g,0,h,g,0,h);a.push(h,0,-g,h,0,g);var p=l===e?c:d;p.toArray(k,m);m+=3;p.toArray(k,m);m+=3;p.toArray(k,m);m+=3;p.toArray(k,m);m+=3}b=new A;b.setAttribute("position",new E(a,3));b.setAttribute("color",
+new E(k,3));c=new ka({vertexColors:2});ma.call(this,b,c)}function xf(a,b,c,d,e,f){a=a||10;b=b||16;c=c||8;d=d||64;e=new B(void 0!==e?e:4473924);f=new B(void 0!==f?f:8947848);var g=[],k=[],l;for(l=0;l<=b;l++){var m=l/b*2*Math.PI;var h=Math.sin(m)*a;m=Math.cos(m)*a;g.push(0,0,0);g.push(h,0,m);var p=l&1?e:f;k.push(p.r,p.g,p.b);k.push(p.r,p.g,p.b)}for(l=0;l<=c;l++){p=l&1?e:f;var q=a-a/c*l;for(b=0;b<d;b++)m=b/d*2*Math.PI,h=Math.sin(m)*q,m=Math.cos(m)*q,g.push(h,0,m),k.push(p.r,p.g,p.b),m=(b+1)/d*2*Math.PI,
+h=Math.sin(m)*q,m=Math.cos(m)*q,g.push(h,0,m),k.push(p.r,p.g,p.b)}a=new A;a.setAttribute("position",new E(g,3));a.setAttribute("color",new E(k,3));g=new ka({vertexColors:2});ma.call(this,a,g)}function nd(a,b,c){D.call(this);this.light=a;this.light.updateMatrixWorld();this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1;this.color=c;void 0===b&&(b=1);a=new A;a.setAttribute("position",new E([-b,b,0,b,b,0,b,-b,0,-b,-b,0,-b,b,0],3));b=new ka({fog:!1});this.lightPlane=new La(a,b);this.add(this.lightPlane);
+a=new A;a.setAttribute("position",new E([0,0,0,0,0,1],3));this.targetLine=new La(a,b);this.add(this.targetLine);this.update()}function ve(a){function b(a,b,d){c(a,d);c(b,d)}function c(a,b){f.push(0,0,0);g.push(b.r,b.g,b.b);void 0===k[a]&&(k[a]=[]);k[a].push(f.length/3-1)}var d=new A,e=new ka({color:16777215,vertexColors:1}),f=[],g=[],k={},l=new B(16755200),m=new B(16711680),h=new B(43775),p=new B(16777215),q=new B(3355443);b("n1","n2",l);b("n2","n4",l);b("n4","n3",l);b("n3","n1",l);b("f1","f2",l);
+b("f2","f4",l);b("f4","f3",l);b("f3","f1",l);b("n1","f1",l);b("n2","f2",l);b("n3","f3",l);b("n4","f4",l);b("p","n1",m);b("p","n2",m);b("p","n3",m);b("p","n4",m);b("u1","u2",h);b("u2","u3",h);b("u3","u1",h);b("c","t",p);b("p","c",q);b("cn1","cn2",q);b("cn3","cn4",q);b("cf1","cf2",q);b("cf3","cf4",q);d.setAttribute("position",new E(f,3));d.setAttribute("color",new E(g,3));ma.call(this,d,e);this.camera=a;this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix();this.matrix=a.matrixWorld;
+this.matrixAutoUpdate=!1;this.pointMap=k;this.update()}function na(a,b,c,d,e,f,g){yf.set(e,f,g).unproject(d);a=b[a];if(void 0!==a)for(c=c.getAttribute("position"),b=0,d=a.length;b<d;b++)c.setXYZ(a[b],yf.x,yf.y,yf.z)}function xb(a,b){this.object=a;void 0===b&&(b=16776960);a=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]);var c=new Float32Array(24),d=new A;d.setIndex(new M(a,1));d.setAttribute("position",new M(c,3));ma.call(this,d,new ka({color:b}));this.matrixAutoUpdate=!1;this.update()}
+function we(a,b){this.type="Box3Helper";this.box=a;b=b||16776960;a=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]);var c=new A;c.setIndex(new M(a,1));c.setAttribute("position",new E([1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1],3));ma.call(this,c,new ka({color:b}));this.geometry.computeBoundingSphere()}function xe(a,b,c){this.type="PlaneHelper";this.plane=a;this.size=void 0===b?1:b;a=void 0!==c?c:16776960;b=new A;b.setAttribute("position",new E([1,-1,1,-1,1,1,-1,
+-1,1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,0,0,1,0,0,0],3));b.computeBoundingSphere();La.call(this,b,new ka({color:a}));b=new A;b.setAttribute("position",new E([1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1],3));b.computeBoundingSphere();this.add(new ca(b,new Pa({color:a,opacity:.2,transparent:!0,depthWrite:!1})))}function yb(a,b,c,d,e,f){D.call(this);void 0===a&&(a=new n(0,0,1));void 0===b&&(b=new n(0,0,0));void 0===c&&(c=1);void 0===d&&(d=16776960);void 0===e&&(e=.2*c);void 0===f&&(f=.2*e);void 0===zf&&
+(zf=new A,zf.setAttribute("position",new E([0,0,0,0,1,0],3)),Tg=new ub(0,.5,1,5,1),Tg.translate(0,-.5,0));this.position.copy(b);this.line=new La(zf,new ka({color:d}));this.line.matrixAutoUpdate=!1;this.add(this.line);this.cone=new ca(Tg,new Pa({color:d}));this.cone.matrixAutoUpdate=!1;this.add(this.cone);this.setDirection(a);this.setLength(c,e,f)}function ye(a){a=a||1;var b=[0,0,0,a,0,0,0,0,0,0,a,0,0,0,0,0,0,a];a=new A;a.setAttribute("position",new E(b,3));a.setAttribute("color",new E([1,0,0,1,.6,
+0,0,1,0,.6,1,0,0,0,1,0,.6,1],3));b=new ka({vertexColors:2});ma.call(this,a,b)}function Ug(a){Y=a;Vg(Af)}function ui(a){var b={magFilter:1003,minFilter:1003,generateMipmaps:!1,type:a?a.type:1009,format:a?a.format:1023,encoding:a?a.encoding:3002,depthBuffer:!1,stencilBuffer:!1},c=vi(b);c.depthBuffer=a?!1:!0;Bf=vi(b);return c}function wi(a){Bf.dispose();Y.setRenderTarget(Wg);a.scissorTest=!1;a.setSize(a.width,a.height)}function Vg(a){var b=new pb;b.add(new ca(ze[0],a));Y.compile(b,Xg)}function vi(a){a=
+new wa(3*lb,3*lb,a);a.texture.mapping=306;a.texture.name="PMREM.cubeUv";a.scissorTest=!0;return a}function Yg(a,b,c,d,e){a.viewport.set(b,c,d,e);a.scissor.set(b,c,d,e)}function xi(a){var b=Y.autoClear;Y.autoClear=!1;for(var c=1;c<yi;c++)zi(a,c-1,c,Math.sqrt(Cf[c]*Cf[c]-Cf[c-1]*Cf[c-1]),Ai[(c-1)%Ai.length]);Y.autoClear=b}function zi(a,b,c,d,e){Bi(a,Bf,b,c,d,"latitudinal",e);Bi(Bf,a,c,c,d,"longitudinal",e)}function Bi(a,b,c,d,e,f,g){"latitudinal"!==f&&"longitudinal"!==f&&console.error("blur direction must be either latitudinal or longitudinal!");
+var k=new pb;k.add(new ca(ze[d],Af));var l=Af.uniforms,m=Ci[c]-1;m=isFinite(e)?Math.PI/(2*m):2*Math.PI/39;var h=e/m,p=isFinite(e)?1+Math.floor(3*h):20;20<p&&console.warn("sigmaRadians, "+e+", is too large and will clip, as it requested "+p+" samples when the maximum is set to 20");e=[];for(var q=0,n=0;20>n;++n){var r=n/h;r=Math.exp(-r*r/2);e.push(r);0==n?q+=r:n<p&&(q+=2*r)}for(n=0;n<e.length;n++)e[n]/=q;l.envMap.value=a.texture;l.samples.value=p;l.weights.value=e;l.latitudinal.value="latitudinal"===
+f;g&&(l.poleAxis.value=g);l.dTheta.value=m;l.mipInt.value=8-c;l.inputEncoding.value=mb[a.texture.encoding];l.outputEncoding.value=mb[a.texture.encoding];a=Ci[d];r=3*Math.max(0,lb-2*a);Yg(b,r,(0===d?0:2*lb)+2*a*(4<d?d-8+4:0),3*a,2*a);Y.setRenderTarget(b);Y.render(k,Xg)}function Di(){var a=new w(1,1);a=new vb({uniforms:{envMap:{value:null},texelSize:{value:a},inputEncoding:{value:mb[3E3]},outputEncoding:{value:mb[3E3]}},vertexShader:Zg(),fragmentShader:"\nprecision mediump float;\nprecision mediump int;\nvarying vec3 vOutputDirection;\nuniform sampler2D envMap;\nuniform vec2 texelSize;\n\n"+
 $g()+"\n\n#define RECIPROCAL_PI 0.31830988618\n#define RECIPROCAL_PI2 0.15915494\n\nvoid main() {\n\tgl_FragColor = vec4(0.0);\n\tvec3 outputDirection = normalize(vOutputDirection);\n\tvec2 uv;\n\tuv.y = asin(clamp(outputDirection.y, -1.0, 1.0)) * RECIPROCAL_PI + 0.5;\n\tuv.x = atan(outputDirection.z, outputDirection.x) * RECIPROCAL_PI2 + 0.5;\n\tvec2 f = fract(uv / texelSize - 0.5);\n\tuv -= f * texelSize;\n\tvec3 tl = envMapTexelToLinear(texture2D(envMap, uv)).rgb;\n\tuv.x += texelSize.x;\n\tvec3 tr = envMapTexelToLinear(texture2D(envMap, uv)).rgb;\n\tuv.y += texelSize.y;\n\tvec3 br = envMapTexelToLinear(texture2D(envMap, uv)).rgb;\n\tuv.x -= texelSize.x;\n\tvec3 bl = envMapTexelToLinear(texture2D(envMap, uv)).rgb;\n\tvec3 tm = mix(tl, tr, f.x);\n\tvec3 bm = mix(bl, br, f.x);\n\tgl_FragColor.rgb = mix(tm, bm, f.y);\n\tgl_FragColor = linearToOutputTexel(gl_FragColor);\n}\n\t\t",
 blending:0,depthTest:!1,depthWrite:!1});a.type="EquirectangularToCubeUV";return a}function Ei(){var a=new vb({uniforms:{envMap:{value:null},inputEncoding:{value:mb[3E3]},outputEncoding:{value:mb[3E3]}},vertexShader:Zg(),fragmentShader:"\nprecision mediump float;\nprecision mediump int;\nvarying vec3 vOutputDirection;\nuniform samplerCube envMap;\n\n"+$g()+"\n\nvoid main() {\n\tgl_FragColor = vec4(0.0);\n\tgl_FragColor.rgb = envMapTexelToLinear(textureCube(envMap, vec3( - vOutputDirection.x, vOutputDirection.yz ))).rgb;\n\tgl_FragColor = linearToOutputTexel(gl_FragColor);\n}\n\t\t",
 blending:0,depthTest:!1,depthWrite:!1});a.type="CubemapToCubeUV";return a}function Zg(){return"\nprecision mediump float;\nprecision mediump int;\nattribute vec3 position;\nattribute vec2 uv;\nattribute float faceIndex;\nvarying vec3 vOutputDirection;\nvec3 getDirection(vec2 uv, float face) {\n\tuv = 2.0 * uv - 1.0;\n\tvec3 direction = vec3(uv, 1.0);\n\tif (face == 0.0) {\n\t\tdirection = direction.zyx;\n\t\tdirection.z *= -1.0;\n\t} else if (face == 1.0) {\n\t\tdirection = direction.xzy;\n\t\tdirection.z *= -1.0;\n\t} else if (face == 3.0) {\n\t\tdirection = direction.zyx;\n\t\tdirection.x *= -1.0;\n\t} else if (face == 4.0) {\n\t\tdirection = direction.xzy;\n\t\tdirection.y *= -1.0;\n\t} else if (face == 5.0) {\n\t\tdirection.xz *= -1.0;\n\t}\n\treturn direction;\n}\nvoid main() {\n\tvOutputDirection = getDirection(uv, faceIndex);\n\tgl_Position = vec4( position, 1.0 );\n}\n\t"}
@@ -370,8 +370,8 @@ typeof HTMLCanvasElement)return a.src;if(!(a instanceof HTMLCanvasElement)){void
 a.internalFormat;this.type=a.type;this.offset.copy(a.offset);this.repeat.copy(a.repeat);this.center.copy(a.center);this.rotation=a.rotation;this.matrixAutoUpdate=a.matrixAutoUpdate;this.matrix.copy(a.matrix);this.generateMipmaps=a.generateMipmaps;this.premultiplyAlpha=a.premultiplyAlpha;this.flipY=a.flipY;this.unpackAlignment=a.unpackAlignment;this.encoding=a.encoding;return this},toJSON:function(a){var b=void 0===a||"string"===typeof a;if(!b&&void 0!==a.textures[this.uuid])return a.textures[this.uuid];
 var c={metadata:{version:4.5,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,mapping:this.mapping,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,type:this.type,encoding:this.encoding,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};
 if(void 0!==this.image){var d=this.image;void 0===d.uuid&&(d.uuid=P.generateUUID());if(!b&&void 0===a.images[d.uuid]){if(Array.isArray(d)){var e=[];for(var f=0,g=d.length;f<g;f++)e.push(Mb.getDataURL(d[f]))}else e=Mb.getDataURL(d);a.images[d.uuid]={uuid:d.uuid,url:e}}c.image=d.uuid}b||(a.textures[this.uuid]=c);return c},dispose:function(){this.dispatchEvent({type:"dispose"})},transformUv:function(a){if(300!==this.mapping)return a;a.applyMatrix3(this.matrix);if(0>a.x||1<a.x)switch(this.wrapS){case 1E3:a.x-=
-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||1<a.y)switch(this.wrapT){case 1E3:a.y-=Math.floor(a.y);break;case 1001:a.y=0>a.y?0:1;break;case 1002:a.y=1===Math.abs(Math.floor(a.y)%2)?Math.ceil(a.y)-a.y:a.y-Math.floor(a.y)}this.flipY&&(a.y=1-a.y);return a}});Object.defineProperty(Z.prototype,"needsUpdate",{set:function(a){!0===a&&this.version++}});Object.defineProperties(R.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(R.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||1<a.y)switch(this.wrapT){case 1E3:a.y-=Math.floor(a.y);break;case 1001:a.y=0>a.y?0:1;break;case 1002:a.y=1===Math.abs(Math.floor(a.y)%2)?Math.ceil(a.y)-a.y:a.y-Math.floor(a.y)}this.flipY&&(a.y=1-a.y);return a}});Object.defineProperty(Z.prototype,"needsUpdate",{set:function(a){!0===a&&this.version++}});Object.defineProperties(ia.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(ia.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]*
@@ -476,11 +476,11 @@ return this},setComponents:function(a,b,c,d){this.normal.set(a,b,c);this.constan
 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(fh),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||1<d))return b.copy(c).multiplyScalar(d).add(a.start)},intersectsLine:function(a){var b=this.distanceToPoint(a.start);a=this.distanceToPoint(a.end);return 0>b&&0<a||0>a&&0<b},intersectsBox:function(a){return a.intersectsPlane(this)},intersectsSphere:function(a){return a.intersectsPlane(this)},
 coplanarPoint:function(a){void 0===a&&(console.warn("THREE.Plane: .coplanarPoint() target is now required"),a=new n);return a.copy(this.normal).multiplyScalar(-this.constant)},applyMatrix4:function(a,b){b=b||Zk.getNormalMatrix(a);a=this.coplanarPoint(fh).applyMatrix4(a);b=this.normal.applyMatrix3(b).normalize();this.constant=-a.dot(b);return this},translate:function(a){this.constant-=a.dot(this.normal);return this},equals:function(a){return a.normal.equals(this.normal)&&a.constant===this.constant}});
-var cb=new n,Cb=new n,gh=new n,Db=new n,ud=new n,vd=new n,Oi=new n,hh=new n,ih=new n,jh=new n;Object.assign(na,{getNormal:function(a,b,c,d){void 0===d&&(console.warn("THREE.Triangle: .getNormal() target is now required"),d=new n);d.subVectors(c,b);cb.subVectors(a,b);d.cross(cb);a=d.lengthSq();return 0<a?d.multiplyScalar(1/Math.sqrt(a)):d.set(0,0,0)},getBarycoord:function(a,b,c,d,e){cb.subVectors(d,b);Cb.subVectors(c,b);gh.subVectors(a,b);a=cb.dot(cb);b=cb.dot(Cb);c=cb.dot(gh);var f=Cb.dot(Cb);d=Cb.dot(gh);
-var g=a*f-b*b;void 0===e&&(console.warn("THREE.Triangle: .getBarycoord() target is now required"),e=new n);if(0===g)return e.set(-2,-1,-1);g=1/g;f=(f*c-b*d)*g;a=(a*d-b*c)*g;return e.set(1-f-a,a,f)},containsPoint:function(a,b,c,d){na.getBarycoord(a,b,c,d,Db);return 0<=Db.x&&0<=Db.y&&1>=Db.x+Db.y},getUV:function(a,b,c,d,e,f,g,k){this.getBarycoord(a,b,c,d,Db);k.set(0,0);k.addScaledVector(e,Db.x);k.addScaledVector(f,Db.y);k.addScaledVector(g,Db.z);return k},isFrontFacing:function(a,b,c,d){cb.subVectors(c,
-b);Cb.subVectors(a,b);return 0>cb.cross(Cb).dot(d)?!0:!1}});Object.assign(na.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(){cb.subVectors(this.c,this.b);Cb.subVectors(this.a,this.b);return.5*cb.cross(Cb).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 na.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 Ua);return a.setFromCoplanarPoints(this.a,this.b,this.c)},getBarycoord:function(a,b){return na.getBarycoord(a,this.a,this.b,this.c,b)},getUV:function(a,
-b,c,d,e){return na.getUV(a,this.a,this.b,this.c,b,c,d,e)},containsPoint:function(a){return na.containsPoint(a,this.a,this.b,this.c)},isFrontFacing:function(a){return na.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;ud.subVectors(d,c);vd.subVectors(e,c);hh.subVectors(a,c);var f=ud.dot(hh),
+var cb=new n,Cb=new n,gh=new n,Db=new n,ud=new n,vd=new n,Oi=new n,hh=new n,ih=new n,jh=new n;Object.assign(oa,{getNormal:function(a,b,c,d){void 0===d&&(console.warn("THREE.Triangle: .getNormal() target is now required"),d=new n);d.subVectors(c,b);cb.subVectors(a,b);d.cross(cb);a=d.lengthSq();return 0<a?d.multiplyScalar(1/Math.sqrt(a)):d.set(0,0,0)},getBarycoord:function(a,b,c,d,e){cb.subVectors(d,b);Cb.subVectors(c,b);gh.subVectors(a,b);a=cb.dot(cb);b=cb.dot(Cb);c=cb.dot(gh);var f=Cb.dot(Cb);d=Cb.dot(gh);
+var g=a*f-b*b;void 0===e&&(console.warn("THREE.Triangle: .getBarycoord() target is now required"),e=new n);if(0===g)return e.set(-2,-1,-1);g=1/g;f=(f*c-b*d)*g;a=(a*d-b*c)*g;return e.set(1-f-a,a,f)},containsPoint:function(a,b,c,d){oa.getBarycoord(a,b,c,d,Db);return 0<=Db.x&&0<=Db.y&&1>=Db.x+Db.y},getUV:function(a,b,c,d,e,f,g,k){this.getBarycoord(a,b,c,d,Db);k.set(0,0);k.addScaledVector(e,Db.x);k.addScaledVector(f,Db.y);k.addScaledVector(g,Db.z);return k},isFrontFacing:function(a,b,c,d){cb.subVectors(c,
+b);Cb.subVectors(a,b);return 0>cb.cross(Cb).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(){cb.subVectors(this.c,this.b);Cb.subVectors(this.a,this.b);return.5*cb.cross(Cb).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 Ua);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;ud.subVectors(d,c);vd.subVectors(e,c);hh.subVectors(a,c);var f=ud.dot(hh),
 g=vd.dot(hh);if(0>=f&&0>=g)return b.copy(c);ih.subVectors(a,d);var k=ud.dot(ih),l=vd.dot(ih);if(0<=k&&l<=k)return b.copy(d);var h=f*l-k*g;if(0>=h&&0<=f&&0>=k)return d=f/(f-k),b.copy(c).addScaledVector(ud,d);jh.subVectors(a,e);a=ud.dot(jh);var x=vd.dot(jh);if(0<=x&&a<=x)return b.copy(e);f=a*g-f*x;if(0>=f&&0<=g&&0>=x)return h=g/(g-x),b.copy(c).addScaledVector(vd,h);g=k*x-a*l;if(0>=g&&0<=l-k&&0<=a-x)return Oi.subVectors(e,d),h=(l-k)/(l-k+(a-x)),b.copy(d).addScaledVector(Oi,h);e=1/(g+f+h);d=f*e;h*=e;
 return b.copy(c).addScaledVector(ud,d).addScaledVector(vd,h)},equals:function(a){return a.a.equals(this.a)&&a.b.equals(this.b)&&a.c.equals(this.c)}});var Pi={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,
@@ -515,7 +515,7 @@ a.dithering;this.alphaTest=a.alphaTest;this.premultipliedAlpha=a.premultipliedAl
 a);this.color.copy(a.color);this.map=a.map;this.lightMap=a.lightMap;this.lightMapIntensity=a.lightMapIntensity;this.aoMap=a.aoMap;this.aoMapIntensity=a.aoMapIntensity;this.specularMap=a.specularMap;this.alphaMap=a.alphaMap;this.envMap=a.envMap;this.combine=a.combine;this.reflectivity=a.reflectivity;this.refractionRatio=a.refractionRatio;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.wireframeLinecap=a.wireframeLinecap;this.wireframeLinejoin=a.wireframeLinejoin;this.skinning=
 a.skinning;this.morphTargets=a.morphTargets;return this};var T=new n;Object.defineProperty(M.prototype,"needsUpdate",{set:function(a){!0===a&&this.version++}});Object.assign(M.prototype,{isBufferAttribute:!0,onUploadCallback:function(){},setUsage:function(a){this.usage=a;return this},copy:function(a){this.name=a.name;this.array=new a.array.constructor(a.array);this.itemSize=a.itemSize;this.count=a.count;this.normalized=a.normalized;this.usage=a.usage;return this},copyAt:function(a,b,c){a*=this.itemSize;
 c*=b.itemSize;for(var d=0,e=this.itemSize;d<e;d++)this.array[a+d]=b.array[c+d];return this},copyArray:function(a){this.array.set(a);return this},copyColorsArray:function(a){for(var b=this.array,c=0,d=0,e=a.length;d<e;d++){var f=a[d];void 0===f&&(console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined",d),f=new B);b[c++]=f.r;b[c++]=f.g;b[c++]=f.b}return this},copyVector2sArray:function(a){for(var b=this.array,c=0,d=0,e=a.length;d<e;d++){var f=a[d];void 0===f&&(console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",
-d),f=new w);b[c++]=f.x;b[c++]=f.y}return this},copyVector3sArray:function(a){for(var b=this.array,c=0,d=0,e=a.length;d<e;d++){var f=a[d];void 0===f&&(console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",d),f=new n);b[c++]=f.x;b[c++]=f.y;b[c++]=f.z}return this},copyVector4sArray:function(a){for(var b=this.array,c=0,d=0,e=a.length;d<e;d++){var f=a[d];void 0===f&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",d),f=new R);b[c++]=f.x;b[c++]=f.y;
+d),f=new w);b[c++]=f.x;b[c++]=f.y}return this},copyVector3sArray:function(a){for(var b=this.array,c=0,d=0,e=a.length;d<e;d++){var f=a[d];void 0===f&&(console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",d),f=new n);b[c++]=f.x;b[c++]=f.y;b[c++]=f.z}return this},copyVector4sArray:function(a){for(var b=this.array,c=0,d=0,e=a.length;d<e;d++){var f=a[d];void 0===f&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",d),f=new ia);b[c++]=f.x;b[c++]=f.y;
 b[c++]=f.z;b[c++]=f.w}return this},applyMatrix3:function(a){for(var b=0,c=this.count;b<c;b++)T.x=this.getX(b),T.y=this.getY(b),T.z=this.getZ(b),T.applyMatrix3(a),this.setXYZ(b,T.x,T.y,T.z);return this},applyMatrix4:function(a){for(var b=0,c=this.count;b<c;b++)T.x=this.getX(b),T.y=this.getY(b),T.z=this.getZ(b),T.applyMatrix4(a),this.setXYZ(b,T.x,T.y,T.z);return this},applyNormalMatrix:function(a){for(var b=0,c=this.count;b<c;b++)T.x=this.getX(b),T.y=this.getY(b),T.z=this.getZ(b),T.applyNormalMatrix(a),
 this.setXYZ(b,T.x,T.y,T.z);return this},transformDirection:function(a){for(var b=0,c=this.count;b<c;b++)T.x=this.getX(b),T.y=this.getY(b),T.z=this.getZ(b),T.transformDirection(a),this.setXYZ(b,T.x,T.y,T.z);return this},set:function(a,b){void 0===b&&(b=0);this.array.set(a,b);return this},getX:function(a){return this.array[a*this.itemSize]},setX:function(a,b){this.array[a*this.itemSize]=b;return this},getY:function(a){return this.array[a*this.itemSize+1]},setY:function(a,b){this.array[a*this.itemSize+
 1]=b;return this},getZ:function(a){return this.array[a*this.itemSize+2]},setZ:function(a,b){this.array[a*this.itemSize+2]=b;return this},getW:function(a){return this.array[a*this.itemSize+3]},setW:function(a,b){this.array[a*this.itemSize+3]=b;return this},setXY:function(a,b,c){a*=this.itemSize;this.array[a+0]=b;this.array[a+1]=c;return this},setXYZ:function(a,b,c,d){a*=this.itemSize;this.array[a+0]=b;this.array[a+1]=c;this.array[a+2]=d;return this},setXYZW:function(a,b,c,d,e){a*=this.itemSize;this.array[a+
@@ -552,7 +552,7 @@ if(a.isBufferGeometry){a=a.morphAttributes;var b=Object.keys(a);if(0<b.length){v
 e=this.matrixWorld;if(void 0!==d&&(null===c.boundingSphere&&c.computeBoundingSphere(),lh.copy(c.boundingSphere),lh.applyMatrix4(e),!1!==a.ray.intersectsSphere(lh)&&(Qi.getInverse(e),tc.copy(a.ray).applyMatrix4(Qi),null===c.boundingBox||!1!==tc.intersectsBox(c.boundingBox))))if(c.isBufferGeometry){var f=c.index;e=c.attributes.position;var g=c.morphAttributes.position,k=c.morphTargetsRelative,l=c.attributes.uv,h=c.attributes.uv2,n=c.groups,p=c.drawRange,q,t;if(null!==f)if(Array.isArray(d)){var r=0;
 for(q=n.length;r<q;r++){var u=n[r];var y=d[u.materialIndex];var v=Math.max(u.start,p.start);for(t=c=Math.min(u.start+u.count,p.start+p.count);v<t;v+=3){c=f.getX(v);var C=f.getX(v+1);var A=f.getX(v+2);if(c=Le(this,y,a,tc,e,g,k,l,h,c,C,A))c.faceIndex=Math.floor(v/3),c.face.materialIndex=u.materialIndex,b.push(c)}}}else for(v=Math.max(0,p.start),c=Math.min(f.count,p.start+p.count),r=v,q=c;r<q;r+=3){if(c=f.getX(r),C=f.getX(r+1),A=f.getX(r+2),c=Le(this,d,a,tc,e,g,k,l,h,c,C,A))c.faceIndex=Math.floor(r/
 3),b.push(c)}else if(void 0!==e)if(Array.isArray(d))for(r=0,q=n.length;r<q;r++)for(u=n[r],y=d[u.materialIndex],v=Math.max(u.start,p.start),t=c=Math.min(u.start+u.count,p.start+p.count);v<t;v+=3){if(c=v,C=v+1,A=v+2,c=Le(this,y,a,tc,e,g,k,l,h,c,C,A))c.faceIndex=Math.floor(v/3),c.face.materialIndex=u.materialIndex,b.push(c)}else for(v=Math.max(0,p.start),c=Math.min(e.count,p.start+p.count),r=v,q=c;r<q;r+=3)if(c=r,C=r+1,A=r+2,c=Le(this,d,a,tc,e,g,k,l,h,c,C,A))c.faceIndex=Math.floor(r/3),b.push(c)}else if(c.isGeometry)for(e=
-Array.isArray(d),g=c.vertices,k=c.faces,c=c.faceVertexUvs[0],0<c.length&&(f=c),p=0,r=k.length;p<r;p++)if(q=k[p],c=e?d[q.materialIndex]:d,void 0!==c&&(l=g[q.a],h=g[q.b],n=g[q.c],c=zh(this,c,a,tc,l,h,n,Id)))f&&f[p]&&(u=f[p],Cc.copy(u[0]),Dc.copy(u[1]),Ec.copy(u[2]),c.uv=na.getUV(Id,l,h,n,Cc,Dc,Ec,new w)),c.face=q,c.faceIndex=p,b.push(c)},clone:function(){return(new this.constructor(this.geometry,this.material)).copy(this)}});var tj=0,ob=new O,mh=new D,Lf=new n;L.prototype=Object.assign(Object.create(Fa.prototype),
+Array.isArray(d),g=c.vertices,k=c.faces,c=c.faceVertexUvs[0],0<c.length&&(f=c),p=0,r=k.length;p<r;p++)if(q=k[p],c=e?d[q.materialIndex]:d,void 0!==c&&(l=g[q.a],h=g[q.b],n=g[q.c],c=zh(this,c,a,tc,l,h,n,Id)))f&&f[p]&&(u=f[p],Cc.copy(u[0]),Dc.copy(u[1]),Ec.copy(u[2]),c.uv=oa.getUV(Id,l,h,n,Cc,Dc,Ec,new w)),c.face=q,c.faceIndex=p,b.push(c)},clone:function(){return(new this.constructor(this.geometry,this.material)).copy(this)}});var tj=0,ob=new O,mh=new D,Lf=new n;L.prototype=Object.assign(Object.create(Fa.prototype),
 {constructor:L,isGeometry:!0,applyMatrix4:function(a){for(var b=(new za).getNormalMatrix(a),c=0,d=this.vertices.length;c<d;c++)this.vertices[c].applyMatrix4(a);c=0;for(d=this.faces.length;c<d;c++){a=this.faces[c];a.normal.applyMatrix3(b).normalize();for(var e=0,f=a.vertexNormals.length;e<f;e++)a.vertexNormals[e].applyMatrix3(b).normalize()}null!==this.boundingBox&&this.computeBoundingBox();null!==this.boundingSphere&&this.computeBoundingSphere();this.normalsNeedUpdate=this.verticesNeedUpdate=!0;return this},
 rotateX:function(a){ob.makeRotationX(a);this.applyMatrix4(ob);return this},rotateY:function(a){ob.makeRotationY(a);this.applyMatrix4(ob);return this},rotateZ:function(a){ob.makeRotationZ(a);this.applyMatrix4(ob);return this},translate:function(a,b,c){ob.makeTranslation(a,b,c);this.applyMatrix4(ob);return this},scale:function(a,b,c){ob.makeScale(a,b,c);this.applyMatrix4(ob);return this},lookAt:function(a){mh.lookAt(a);mh.updateMatrix();this.applyMatrix4(mh.matrix);return this},fromBufferGeometry:function(a){function b(a,
 b,d,e){var f=void 0===k?[]:[c.colors[a].clone(),c.colors[b].clone(),c.colors[d].clone()],m=void 0===g?[]:[(new n).fromArray(g,3*a),(new n).fromArray(g,3*b),(new n).fromArray(g,3*d)];e=new Bc(a,b,d,m,f,e);c.faces.push(e);void 0!==l&&c.faceVertexUvs[0].push([(new w).fromArray(l,2*a),(new w).fromArray(l,2*b),(new w).fromArray(l,2*d)]);void 0!==h&&c.faceVertexUvs[1].push([(new w).fromArray(h,2*a),(new w).fromArray(h,2*b),(new w).fromArray(h,2*d)])}var c=this,d=null!==a.index?a.index.array:void 0,e=a.attributes;
@@ -579,16 +579,16 @@ e=a.skinIndices;f=0;for(b=e.length;f<b;f++)this.skinIndices.push(e[f].clone());e
 a.lineDistancesNeedUpdate;this.groupsNeedUpdate=a.groupsNeedUpdate;return this},dispose:function(){this.dispatchEvent({type:"dispose"})}});var nh=function(a){function b(b,d,e,f,g,k){a.call(this);this.type="BoxGeometry";this.parameters={width:b,height:d,depth:e,widthSegments:f,heightSegments:g,depthSegments:k};this.fromBufferGeometry(new Kd(b,d,e,f,g,k));this.mergeVertices()}a&&(b.__proto__=a);b.prototype=Object.create(a&&a.prototype);return b.prototype.constructor=b}(L),Kd=function(a){function b(b,
 d,e,f,g,k){function c(a,b,c,d,e,f,g,k,l,m,w){var v=f/l,y=g/m,z=f/2,A=g/2,C=k/2;g=l+1;var B=m+1,E=f=0,D,F,G=new n;for(F=0;F<B;F++){var I=F*y-A;for(D=0;D<g;D++)G[a]=(D*v-z)*d,G[b]=I*e,G[c]=C,p.push(G.x,G.y,G.z),G[a]=0,G[b]=0,G[c]=0<k?1:-1,q.push(G.x,G.y,G.z),t.push(D/l),t.push(1-F/m),f+=1}for(F=0;F<m;F++)for(D=0;D<l;D++)a=r+D+g*(F+1),b=r+(D+1)+g*(F+1),c=r+(D+1)+g*F,x.push(r+D+g*F,a,c),x.push(a,b,c),E+=6;h.addGroup(u,E,w);u+=E;r+=f}a.call(this);this.type="BoxBufferGeometry";this.parameters={width:b,
 height:d,depth:e,widthSegments:f,heightSegments:g,depthSegments:k};var h=this;b=b||1;d=d||1;e=e||1;f=Math.floor(f)||1;g=Math.floor(g)||1;k=Math.floor(k)||1;var x=[],p=[],q=[],t=[],r=0,u=0;c("z","y","x",-1,-1,e,d,b,k,g,0);c("z","y","x",1,-1,e,d,-b,k,g,1);c("x","z","y",1,1,b,e,d,f,k,2);c("x","z","y",1,-1,b,e,-d,f,k,3);c("x","y","z",1,-1,b,d,e,f,g,4);c("x","y","z",-1,-1,b,d,-e,f,g,5);this.setIndex(x);this.setAttribute("position",new E(p,3));this.setAttribute("normal",new E(q,3));this.setAttribute("uv",
-new E(t,2))}a&&(b.__proto__=a);b.prototype=Object.create(a&&a.prototype);return b.prototype.constructor=b}(A),Th={clone:Fc,merge:oa};pa.prototype=Object.create(K.prototype);pa.prototype.constructor=pa;pa.prototype.isShaderMaterial=!0;pa.prototype.copy=function(a){K.prototype.copy.call(this,a);this.fragmentShader=a.fragmentShader;this.vertexShader=a.vertexShader;this.uniforms=Fc(a.uniforms);this.defines=Object.assign({},a.defines);this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;
-this.lights=a.lights;this.clipping=a.clipping;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;this.extensions=a.extensions;return this};pa.prototype.toJSON=function(a){var b=K.prototype.toJSON.call(this,a);b.uniforms={};for(var c in this.uniforms){var d=this.uniforms[c].value;b.uniforms[c]=d&&d.isTexture?{type:"t",value:d.toJSON(a).uuid}:d&&d.isColor?{type:"c",value:d.getHex()}:d&&d.isVector2?{type:"v2",value:d.toArray()}:d&&d.isVector3?{type:"v3",value:d.toArray()}:
+new E(t,2))}a&&(b.__proto__=a);b.prototype=Object.create(a&&a.prototype);return b.prototype.constructor=b}(A),Th={clone:Fc,merge:pa};qa.prototype=Object.create(K.prototype);qa.prototype.constructor=qa;qa.prototype.isShaderMaterial=!0;qa.prototype.copy=function(a){K.prototype.copy.call(this,a);this.fragmentShader=a.fragmentShader;this.vertexShader=a.vertexShader;this.uniforms=Fc(a.uniforms);this.defines=Object.assign({},a.defines);this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;
+this.lights=a.lights;this.clipping=a.clipping;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;this.extensions=a.extensions;return this};qa.prototype.toJSON=function(a){var b=K.prototype.toJSON.call(this,a);b.uniforms={};for(var c in this.uniforms){var d=this.uniforms[c].value;b.uniforms[c]=d&&d.isTexture?{type:"t",value:d.toJSON(a).uuid}:d&&d.isColor?{type:"c",value:d.getHex()}:d&&d.isVector2?{type:"v2",value:d.toArray()}:d&&d.isVector3?{type:"v3",value:d.toArray()}:
 d&&d.isVector4?{type:"v4",value:d.toArray()}:d&&d.isMatrix3?{type:"m3",value:d.toArray()}:d&&d.isMatrix4?{type:"m4",value:d.toArray()}:{value:d}}0<Object.keys(this.defines).length&&(b.defines=this.defines);b.vertexShader=this.vertexShader;b.fragmentShader=this.fragmentShader;a={};for(var e in this.extensions)!0===this.extensions[e]&&(a[e]=!0);0<Object.keys(a).length&&(b.extensions=a);return b};eb.prototype=Object.assign(Object.create(D.prototype),{constructor:eb,isCamera:!0,copy:function(a,b){D.prototype.copy.call(this,
 a,b);this.matrixWorldInverse.copy(a.matrixWorldInverse);this.projectionMatrix.copy(a.projectionMatrix);this.projectionMatrixInverse.copy(a.projectionMatrixInverse);return this},getWorldDirection:function(a){void 0===a&&(console.warn("THREE.Camera: .getWorldDirection() target is now required"),a=new n);this.updateMatrixWorld(!0);var b=this.matrixWorld.elements;return a.set(-b[8],-b[9],-b[10]).normalize()},updateMatrixWorld:function(a){D.prototype.updateMatrixWorld.call(this,a);this.matrixWorldInverse.getInverse(this.matrixWorld)},
-updateWorldMatrix:function(a,b){D.prototype.updateWorldMatrix.call(this,a,b);this.matrixWorldInverse.getInverse(this.matrixWorld)},clone:function(){return(new this.constructor).copy(this)}});qa.prototype=Object.assign(Object.create(eb.prototype),{constructor:qa,isPerspectiveCamera:!0,copy:function(a,b){eb.prototype.copy.call(this,a,b);this.fov=a.fov;this.zoom=a.zoom;this.near=a.near;this.far=a.far;this.focus=a.focus;this.aspect=a.aspect;this.view=null===a.view?null:Object.assign({},a.view);this.filmGauge=
+updateWorldMatrix:function(a,b){D.prototype.updateWorldMatrix.call(this,a,b);this.matrixWorldInverse.getInverse(this.matrixWorld)},clone:function(){return(new this.constructor).copy(this)}});da.prototype=Object.assign(Object.create(eb.prototype),{constructor:da,isPerspectiveCamera:!0,copy:function(a,b){eb.prototype.copy.call(this,a,b);this.fov=a.fov;this.zoom=a.zoom;this.near=a.near;this.far=a.far;this.focus=a.focus;this.aspect=a.aspect;this.view=null===a.view?null:Object.assign({},a.view);this.filmGauge=
 a.filmGauge;this.filmOffset=a.filmOffset;return this},setFocalLength:function(a){a=.5*this.getFilmHeight()/a;this.fov=2*P.RAD2DEG*Math.atan(a);this.updateProjectionMatrix()},getFocalLength:function(){var a=Math.tan(.5*P.DEG2RAD*this.fov);return.5*this.getFilmHeight()/a},getEffectiveFOV:function(){return 2*P.RAD2DEG*Math.atan(Math.tan(.5*P.DEG2RAD*this.fov)/this.zoom)},getFilmWidth:function(){return this.filmGauge*Math.min(this.aspect,1)},getFilmHeight:function(){return this.filmGauge/Math.max(this.aspect,
 1)},setViewOffset:function(a,b,c,d,e,f){this.aspect=a/b;null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1});this.view.enabled=!0;this.view.fullWidth=a;this.view.fullHeight=b;this.view.offsetX=c;this.view.offsetY=d;this.view.width=e;this.view.height=f;this.updateProjectionMatrix()},clearViewOffset:function(){null!==this.view&&(this.view.enabled=!1);this.updateProjectionMatrix()},updateProjectionMatrix:function(){var a=this.near,b=a*Math.tan(.5*P.DEG2RAD*
 this.fov)/this.zoom,c=2*b,d=this.aspect*c,e=-.5*d,f=this.view;if(null!==this.view&&this.view.enabled){var g=f.fullWidth,k=f.fullHeight;e+=f.offsetX*d/g;b-=f.offsetY*c/k;d*=f.width/g;c*=f.height/k}f=this.filmOffset;0!==f&&(e+=a*f/this.getFilmWidth());this.projectionMatrix.makePerspective(e,e+d,b,b-c,a,this.far);this.projectionMatrixInverse.getInverse(this.projectionMatrix)},toJSON:function(a){a=D.prototype.toJSON.call(this,a);a.object.fov=this.fov;a.object.zoom=this.zoom;a.object.near=this.near;a.object.far=
 this.far;a.object.focus=this.focus;a.object.aspect=this.aspect;null!==this.view&&(a.object.view=Object.assign({},this.view));a.object.filmGauge=this.filmGauge;a.object.filmOffset=this.filmOffset;return a}});Gc.prototype=Object.create(D.prototype);Gc.prototype.constructor=Gc;Eb.prototype=Object.create(wa.prototype);Eb.prototype.constructor=Eb;Eb.prototype.isWebGLCubeRenderTarget=!0;Eb.prototype.fromEquirectangularTexture=function(a,b){this.texture.type=b.type;this.texture.format=b.format;this.texture.encoding=
-b.encoding;var c=new pb,d=new pa({type:"CubemapFromEquirect",uniforms:Fc({tEquirect:{value:null}}),vertexShader:"varying vec3 vWorldDirection;\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\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}",
+b.encoding;var c=new pb,d=new qa({type:"CubemapFromEquirect",uniforms:Fc({tEquirect:{value:null}}),vertexShader:"varying vec3 vWorldDirection;\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\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 ca(new Kd(5,5,5),d);c.add(b);d=new Gc(1,10,1);d.renderTarget=this;d.renderTarget.texture.name="CubeCameraTexture";d.update(a,c);b.geometry.dispose();b.material.dispose();return this};bc.prototype=Object.create(Z.prototype);bc.prototype.constructor=bc;bc.prototype.isDataTexture=!0;var xd=new qb,Mf=new n;Object.assign(Hc.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},setFromProjectionMatrix: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],k=c[5],h=c[6],m=c[7],n=c[8],p=c[9],q=c[10],t=c[11],r=c[12],u=c[13],y=c[14];c=c[15];b[0].setComponents(f-a,m-g,t-n,c-r).normalize();b[1].setComponents(f+a,m+g,t+n,c+r).normalize();b[2].setComponents(f+d,m+k,t+p,c+u).normalize();b[3].setComponents(f-
 d,m-k,t-p,c-u).normalize();b[4].setComponents(f-e,m-h,t-q,c-y).normalize();b[5].setComponents(f+e,m+h,t+q,c+y).normalize();return this},intersectsObject:function(a){var b=a.geometry;null===b.boundingSphere&&b.computeBoundingSphere();xd.copy(b.boundingSphere).applyMatrix4(a.matrixWorld);return this.intersectsSphere(xd)},intersectsSprite:function(a){xd.center.set(0,0,0);xd.radius=.7071067811865476;xd.applyMatrix4(a.matrixWorld);return this.intersectsSphere(xd)},intersectsSphere:function(a){var b=this.planes,
@@ -669,18 +669,18 @@ points_vert:"uniform float size;\nuniform float scale;\n#include <common>\n#incl
 shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\nvoid main() {\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}",shadow_vert:"#include <fog_pars_vertex>\n#include <shadowmap_pars_vertex>\nvoid main() {\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",
 sprite_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}",
 sprite_vert:"uniform float rotation;\nuniform vec2 center;\n#include <common>\n#include <uv_pars_vertex>\n#include <fog_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n\tvec2 scale;\n\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\t#endif\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}"},
-fb={basic:{uniforms:oa([F.common,F.specularmap,F.envmap,F.aomap,F.lightmap,F.fog]),vertexShader:N.meshbasic_vert,fragmentShader:N.meshbasic_frag},lambert:{uniforms:oa([F.common,F.specularmap,F.envmap,F.aomap,F.lightmap,F.emissivemap,F.fog,F.lights,{emissive:{value:new B(0)}}]),vertexShader:N.meshlambert_vert,fragmentShader:N.meshlambert_frag},phong:{uniforms:oa([F.common,F.specularmap,F.envmap,F.aomap,F.lightmap,F.emissivemap,F.bumpmap,F.normalmap,F.displacementmap,F.fog,F.lights,{emissive:{value:new B(0)},
-specular:{value:new B(1118481)},shininess:{value:30}}]),vertexShader:N.meshphong_vert,fragmentShader:N.meshphong_frag},standard:{uniforms:oa([F.common,F.envmap,F.aomap,F.lightmap,F.emissivemap,F.bumpmap,F.normalmap,F.displacementmap,F.roughnessmap,F.metalnessmap,F.fog,F.lights,{emissive:{value:new B(0)},roughness:{value:.5},metalness:{value:.5},envMapIntensity:{value:1}}]),vertexShader:N.meshphysical_vert,fragmentShader:N.meshphysical_frag},toon:{uniforms:oa([F.common,F.specularmap,F.aomap,F.lightmap,
-F.emissivemap,F.bumpmap,F.normalmap,F.displacementmap,F.gradientmap,F.fog,F.lights,{emissive:{value:new B(0)},specular:{value:new B(1118481)},shininess:{value:30}}]),vertexShader:N.meshtoon_vert,fragmentShader:N.meshtoon_frag},matcap:{uniforms:oa([F.common,F.bumpmap,F.normalmap,F.displacementmap,F.fog,{matcap:{value:null}}]),vertexShader:N.meshmatcap_vert,fragmentShader:N.meshmatcap_frag},points:{uniforms:oa([F.points,F.fog]),vertexShader:N.points_vert,fragmentShader:N.points_frag},dashed:{uniforms:oa([F.common,
-F.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:N.linedashed_vert,fragmentShader:N.linedashed_frag},depth:{uniforms:oa([F.common,F.displacementmap]),vertexShader:N.depth_vert,fragmentShader:N.depth_frag},normal:{uniforms:oa([F.common,F.bumpmap,F.normalmap,F.displacementmap,{opacity:{value:1}}]),vertexShader:N.normal_vert,fragmentShader:N.normal_frag},sprite:{uniforms:oa([F.sprite,F.fog]),vertexShader:N.sprite_vert,fragmentShader:N.sprite_frag},background:{uniforms:{uvTransform:{value:new za},
-t2D:{value:null}},vertexShader:N.background_vert,fragmentShader:N.background_frag},cube:{uniforms:oa([F.envmap,{opacity:{value:1}}]),vertexShader:N.cube_vert,fragmentShader:N.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:N.equirect_vert,fragmentShader:N.equirect_frag},distanceRGBA:{uniforms:oa([F.common,F.displacementmap,{referencePosition:{value:new n},nearDistance:{value:1},farDistance:{value:1E3}}]),vertexShader:N.distanceRGBA_vert,fragmentShader:N.distanceRGBA_frag},shadow:{uniforms:oa([F.lights,
-F.fog,{color:{value:new B(0)},opacity:{value:1}}]),vertexShader:N.shadow_vert,fragmentShader:N.shadow_frag}};fb.physical={uniforms:oa([fb.standard.uniforms,{transparency:{value:0},clearcoat:{value:0},clearcoatRoughness:{value:0},sheen:{value:new B(0)},clearcoatNormalScale:{value:new w(1,1)},clearcoatNormalMap:{value:null}}]),vertexShader:N.meshphysical_vert,fragmentShader:N.meshphysical_frag};rb.prototype=Object.create(Z.prototype);rb.prototype.constructor=rb;rb.prototype.isCubeTexture=!0;Object.defineProperty(rb.prototype,
+fb={basic:{uniforms:pa([F.common,F.specularmap,F.envmap,F.aomap,F.lightmap,F.fog]),vertexShader:N.meshbasic_vert,fragmentShader:N.meshbasic_frag},lambert:{uniforms:pa([F.common,F.specularmap,F.envmap,F.aomap,F.lightmap,F.emissivemap,F.fog,F.lights,{emissive:{value:new B(0)}}]),vertexShader:N.meshlambert_vert,fragmentShader:N.meshlambert_frag},phong:{uniforms:pa([F.common,F.specularmap,F.envmap,F.aomap,F.lightmap,F.emissivemap,F.bumpmap,F.normalmap,F.displacementmap,F.fog,F.lights,{emissive:{value:new B(0)},
+specular:{value:new B(1118481)},shininess:{value:30}}]),vertexShader:N.meshphong_vert,fragmentShader:N.meshphong_frag},standard:{uniforms:pa([F.common,F.envmap,F.aomap,F.lightmap,F.emissivemap,F.bumpmap,F.normalmap,F.displacementmap,F.roughnessmap,F.metalnessmap,F.fog,F.lights,{emissive:{value:new B(0)},roughness:{value:.5},metalness:{value:.5},envMapIntensity:{value:1}}]),vertexShader:N.meshphysical_vert,fragmentShader:N.meshphysical_frag},toon:{uniforms:pa([F.common,F.specularmap,F.aomap,F.lightmap,
+F.emissivemap,F.bumpmap,F.normalmap,F.displacementmap,F.gradientmap,F.fog,F.lights,{emissive:{value:new B(0)},specular:{value:new B(1118481)},shininess:{value:30}}]),vertexShader:N.meshtoon_vert,fragmentShader:N.meshtoon_frag},matcap:{uniforms:pa([F.common,F.bumpmap,F.normalmap,F.displacementmap,F.fog,{matcap:{value:null}}]),vertexShader:N.meshmatcap_vert,fragmentShader:N.meshmatcap_frag},points:{uniforms:pa([F.points,F.fog]),vertexShader:N.points_vert,fragmentShader:N.points_frag},dashed:{uniforms:pa([F.common,
+F.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:N.linedashed_vert,fragmentShader:N.linedashed_frag},depth:{uniforms:pa([F.common,F.displacementmap]),vertexShader:N.depth_vert,fragmentShader:N.depth_frag},normal:{uniforms:pa([F.common,F.bumpmap,F.normalmap,F.displacementmap,{opacity:{value:1}}]),vertexShader:N.normal_vert,fragmentShader:N.normal_frag},sprite:{uniforms:pa([F.sprite,F.fog]),vertexShader:N.sprite_vert,fragmentShader:N.sprite_frag},background:{uniforms:{uvTransform:{value:new za},
+t2D:{value:null}},vertexShader:N.background_vert,fragmentShader:N.background_frag},cube:{uniforms:pa([F.envmap,{opacity:{value:1}}]),vertexShader:N.cube_vert,fragmentShader:N.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:N.equirect_vert,fragmentShader:N.equirect_frag},distanceRGBA:{uniforms:pa([F.common,F.displacementmap,{referencePosition:{value:new n},nearDistance:{value:1},farDistance:{value:1E3}}]),vertexShader:N.distanceRGBA_vert,fragmentShader:N.distanceRGBA_frag},shadow:{uniforms:pa([F.lights,
+F.fog,{color:{value:new B(0)},opacity:{value:1}}]),vertexShader:N.shadow_vert,fragmentShader:N.shadow_frag}};fb.physical={uniforms:pa([fb.standard.uniforms,{transparency:{value:0},clearcoat:{value:0},clearcoatRoughness:{value:0},sheen:{value:new B(0)},clearcoatNormalScale:{value:new w(1,1)},clearcoatNormalMap:{value:null}}]),vertexShader:N.meshphysical_vert,fragmentShader:N.meshphysical_frag};rb.prototype=Object.create(Z.prototype);rb.prototype.constructor=rb;rb.prototype.isCubeTexture=!0;Object.defineProperty(rb.prototype,
 "images",{get:function(){return this.image},set:function(a){this.image=a}});Ic.prototype=Object.create(Z.prototype);Ic.prototype.constructor=Ic;Ic.prototype.isDataTexture2DArray=!0;Jc.prototype=Object.create(Z.prototype);Jc.prototype.constructor=Jc;Jc.prototype.isDataTexture3D=!0;var Hh=new Z,Pj=new Ic,Rj=new Jc,Ih=new rb,Bh=[],Dh=[],Gh=new Float32Array(16),Fh=new Float32Array(9),Eh=new Float32Array(4);Jh.prototype.updateCache=function(a){var b=this.cache;a instanceof Float32Array&&b.length!==a.length&&
 (this.cache=new Float32Array(a.length));Ka(b,a)};Kh.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 ig=/([\w\d_]+)(\])?(\[|\.)?/g;Fb.prototype.setValue=function(a,b,c,d){b=this.map[b];void 0!==b&&b.setValue(a,c,d)};Fb.prototype.setOptional=function(a,b,c){b=b[c];void 0!==b&&this.setValue(a,c,b)};Fb.upload=function(a,b,c,d){for(var e=0,f=b.length;e!==f;++e){var g=b[e],k=c[g.id];!1!==k.needsUpdate&&g.setValue(a,k.value,d)}};Fb.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 wk=0,kg=/^[ \t]*#include +<([\w\d./]+)>/gm,Sh=/#pragma unroll_loop[\s]+?for \( int i = (\d+); i < (\d+); i \+\+ \) \{([\s\S]+?)(?=\})\}/g,Fk=0;Gb.prototype=Object.create(K.prototype);Gb.prototype.constructor=Gb;Gb.prototype.isMeshDepthMaterial=!0;Gb.prototype.copy=function(a){K.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};Hb.prototype=Object.create(K.prototype);Hb.prototype.constructor=Hb;Hb.prototype.isMeshDistanceMaterial=!0;Hb.prototype.copy=function(a){K.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};pg.prototype=Object.assign(Object.create(wa.prototype),{constructor:pg,isWebGLMultiviewRenderTarget:!0,copy:function(a){wa.prototype.copy.call(this,a);this.numViews=a.numViews;return this},setNumViews:function(a){this.numViews!==a&&(this.numViews=a,this.dispose());
-return this}});Qe.prototype=Object.assign(Object.create(qa.prototype),{constructor:Qe,isArrayCamera:!0});Mc.prototype=Object.assign(Object.create(D.prototype),{constructor:Mc,isGroup:!0});Object.assign(Zh.prototype,Fa.prototype);Object.assign(Re.prototype,{isFogExp2:!0,clone:function(){return new Re(this.color,this.density)},toJSON:function(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}}});Object.assign(Se.prototype,{isFog:!0,clone:function(){return new Se(this.color,this.near,
+return this}});Qe.prototype=Object.assign(Object.create(da.prototype),{constructor:Qe,isArrayCamera:!0});Mc.prototype=Object.assign(Object.create(D.prototype),{constructor:Mc,isGroup:!0});Object.assign(Zh.prototype,Fa.prototype);Object.assign(Re.prototype,{isFogExp2:!0,clone:function(){return new Re(this.color,this.density)},toJSON:function(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}}});Object.assign(Se.prototype,{isFog:!0,clone:function(){return new Se(this.color,this.near,
 this.far)},toJSON:function(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}}});Object.defineProperty(sb.prototype,"needsUpdate",{set:function(a){!0===a&&this.version++}});Object.assign(sb.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;d<e;d++)this.array[a+d]=b.array[c+d];return this},set:function(a,b){void 0===b&&(b=0);this.array.set(a,b);return this},clone:function(){return(new this.constructor).copy(this)},onUpload:function(a){this.onUploadCallback=a;return this}});var uc=new n;Object.defineProperties(Qd.prototype,{count:{get:function(){return this.data.count}},array:{get:function(){return this.data.array}}});Object.assign(Qd.prototype,{isInterleavedBufferAttribute:!0,applyMatrix4:function(a){for(var b=
 0,c=this.data.count;b<c;b++)uc.x=this.getX(b),uc.y=this.getY(b),uc.z=this.getZ(b),uc.applyMatrix4(a),this.setXYZ(b,uc.x,uc.y,uc.z);return this},setX:function(a,b){this.data.array[a*this.data.stride+this.offset]=b;return this},setY:function(a,b){this.data.array[a*this.data.stride+this.offset+1]=b;return this},setZ:function(a,b){this.data.array[a*this.data.stride+this.offset+2]=b;return this},setW:function(a,b){this.data.array[a*this.data.stride+this.offset+3]=b;return this},getX:function(a){return this.data.array[a*
@@ -688,11 +688,11 @@ this.data.stride+this.offset]},getY:function(a){return this.data.array[a*this.da
 setXYZW:function(a,b,c,d,e){a=a*this.data.stride+this.offset;this.data.array[a+0]=b;this.data.array[a+1]=c;this.data.array[a+2]=d;this.data.array[a+3]=e;return this}});Jb.prototype=Object.create(K.prototype);Jb.prototype.constructor=Jb;Jb.prototype.isSpriteMaterial=!0;Jb.prototype.copy=function(a){K.prototype.copy.call(this,a);this.color.copy(a.color);this.map=a.map;this.alphaMap=a.alphaMap;this.rotation=a.rotation;this.sizeAttenuation=a.sizeAttenuation;return this};var Nc,Fe=new n,yd=new n,zd=new n,
 Oc=new w,Sd=new w,ai=new O,Nf=new n,Ge=new n,Of=new n,Ri=new w,oh=new w,Si=new w;Rd.prototype=Object.assign(Object.create(D.prototype),{constructor:Rd,isSprite:!0,raycast:function(a,b){null===a.camera&&console.error('THREE.Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.');yd.setFromMatrixScale(this.matrixWorld);ai.copy(a.camera.matrixWorld);this.modelViewMatrix.multiplyMatrices(a.camera.matrixWorldInverse,this.matrixWorld);zd.setFromMatrixPosition(this.modelViewMatrix);
 a.camera.isPerspectiveCamera&&!1===this.material.sizeAttenuation&&yd.multiplyScalar(-zd.z);var c=this.material.rotation;if(0!==c){var d=Math.cos(c);var e=Math.sin(c)}c=this.center;Te(Nf.set(-.5,-.5,0),zd,c,yd,e,d);Te(Ge.set(.5,-.5,0),zd,c,yd,e,d);Te(Of.set(.5,.5,0),zd,c,yd,e,d);Ri.set(0,0);oh.set(1,0);Si.set(1,1);var f=a.ray.intersectTriangle(Nf,Ge,Of,!1,Fe);if(null===f&&(Te(Ge.set(-.5,.5,0),zd,c,yd,e,d),oh.set(0,1),f=a.ray.intersectTriangle(Nf,Of,Ge,!1,Fe),null===f))return;e=a.ray.origin.distanceTo(Fe);
-e<a.near||e>a.far||b.push({distance:e,point:Fe.clone(),uv:na.getUV(Fe,Nf,Ge,Of,Ri,oh,Si,new w),face:null,object:this})},clone:function(){return(new this.constructor(this.material)).copy(this)},copy:function(a){D.prototype.copy.call(this,a);void 0!==a.center&&this.center.copy(a.center);return this}});var Pf=new n,Ti=new n;Td.prototype=Object.assign(Object.create(D.prototype),{constructor:Td,isLOD:!0,copy:function(a){D.prototype.copy.call(this,a,!1);for(var b=a.levels,c=0,d=b.length;c<d;c++){var e=
+e<a.near||e>a.far||b.push({distance:e,point:Fe.clone(),uv:oa.getUV(Fe,Nf,Ge,Of,Ri,oh,Si,new w),face:null,object:this})},clone:function(){return(new this.constructor(this.material)).copy(this)},copy:function(a){D.prototype.copy.call(this,a);void 0!==a.center&&this.center.copy(a.center);return this}});var Pf=new n,Ti=new n;Td.prototype=Object.assign(Object.create(D.prototype),{constructor:Td,isLOD:!0,copy:function(a){D.prototype.copy.call(this,a,!1);for(var b=a.levels,c=0,d=b.length;c<d;c++){var e=
 b[c];this.addLevel(e.object.clone(),e.distance)}this.autoUpdate=a.autoUpdate;return this},addLevel:function(a,b){void 0===b&&(b=0);b=Math.abs(b);for(var c=this.levels,d=0;d<c.length&&!(b<c[d].distance);d++);c.splice(d,0,{distance:b,object:a});this.add(a);return this},getObjectForDistance:function(a){var b=this.levels;if(0<b.length){for(var c=1,d=b.length;c<d&&!(a<b[c].distance);c++);return b[c-1].object}return null},raycast:function(a,b){if(0<this.levels.length){Pf.setFromMatrixPosition(this.matrixWorld);
 var c=a.ray.origin.distanceTo(Pf);this.getObjectForDistance(c).raycast(a,b)}},update:function(a){var b=this.levels;if(1<b.length){Pf.setFromMatrixPosition(a.matrixWorld);Ti.setFromMatrixPosition(this.matrixWorld);a=Pf.distanceTo(Ti);b[0].object.visible=!0;for(var c=1,d=b.length;c<d;c++)if(a>=b[c].distance)b[c-1].object.visible=!1,b[c].object.visible=!0;else break;for(;c<d;c++)b[c].object.visible=!1}},toJSON:function(a){a=D.prototype.toJSON.call(this,a);!1===this.autoUpdate&&(a.object.autoUpdate=!1);
 a.object.levels=[];for(var b=this.levels,c=0,d=b.length;c<d;c++){var e=b[c];a.object.levels.push({object:e.object.uuid,distance:e.distance})}return a}});Ud.prototype=Object.assign(Object.create(ca.prototype),{constructor:Ud,isSkinnedMesh:!0,bind:function(a,b){this.skeleton=a;void 0===b&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),b=this.matrixWorld);this.bindMatrix.copy(b);this.bindMatrixInverse.getInverse(b)},pose:function(){this.skeleton.pose()},normalizeSkinWeights:function(){for(var a=
-new R,b=this.geometry.attributes.skinWeight,c=0,d=b.count;c<d;c++){a.x=b.getX(c);a.y=b.getY(c);a.z=b.getZ(c);a.w=b.getW(c);var e=1/a.manhattanLength();Infinity!==e?a.multiplyScalar(e):a.set(1,0,0,0);b.setXYZW(c,a.x,a.y,a.z,a.w)}},updateMatrixWorld:function(a){ca.prototype.updateMatrixWorld.call(this,a);"attached"===this.bindMode?this.bindMatrixInverse.getInverse(this.matrixWorld):"detached"===this.bindMode?this.bindMatrixInverse.getInverse(this.bindMatrix):console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+
+new ia,b=this.geometry.attributes.skinWeight,c=0,d=b.count;c<d;c++){a.x=b.getX(c);a.y=b.getY(c);a.z=b.getZ(c);a.w=b.getW(c);var e=1/a.manhattanLength();Infinity!==e?a.multiplyScalar(e):a.set(1,0,0,0);b.setXYZW(c,a.x,a.y,a.z,a.w)}},updateMatrixWorld:function(a){ca.prototype.updateMatrixWorld.call(this,a);"attached"===this.bindMode?this.bindMatrixInverse.getInverse(this.matrixWorld):"detached"===this.bindMode?this.bindMatrixInverse.getInverse(this.bindMatrix):console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+
 this.bindMode)},clone:function(){return(new this.constructor(this.geometry,this.material)).copy(this)}});var Ui=new O,$k=new O;Object.assign(Ue.prototype,{calculateInverses:function(){this.boneInverses=[];for(var a=0,b=this.bones.length;a<b;a++){var c=new O;this.bones[a]&&c.getInverse(this.bones[a].matrixWorld);this.boneInverses.push(c)}},pose:function(){var a,b;var c=0;for(b=this.bones.length;c<b;c++)(a=this.bones[c])&&a.matrixWorld.getInverse(this.boneInverses[c]);c=0;for(b=this.bones.length;c<
 b;c++)if(a=this.bones[c])a.parent&&a.parent.isBone?(a.matrix.getInverse(a.parent.matrixWorld),a.matrix.multiply(a.matrixWorld)):a.matrix.copy(a.matrixWorld),a.matrix.decompose(a.position,a.quaternion,a.scale)},update:function(){for(var a=this.bones,b=this.boneInverses,c=this.boneMatrices,d=this.boneTexture,e=0,f=a.length;e<f;e++)Ui.multiplyMatrices(a[e]?a[e].matrixWorld:$k,b[e]),Ui.toArray(c,16*e);void 0!==d&&(d.needsUpdate=!0)},clone:function(){return new Ue(this.bones,this.boneInverses)},getBoneByName:function(a){for(var b=
 0,c=this.bones.length;b<c;b++){var d=this.bones[b];if(d.name===a)return d}}});rg.prototype=Object.assign(Object.create(D.prototype),{constructor:rg,isBone:!0});var Vi=new O,Wi=new O,Ad=[],He=new ca;Ve.prototype=Object.assign(Object.create(ca.prototype),{constructor:Ve,isInstancedMesh:!0,getMatrixAt:function(a,b){b.fromArray(this.instanceMatrix.array,16*a)},raycast:function(a,b){var c=this.matrixWorld,d=this.count;He.geometry=this.geometry;He.material=this.material;if(void 0!==He.material)for(var e=
@@ -718,7 +718,7 @@ le;$c.prototype=Object.create(A.prototype);$c.prototype.constructor=$c;me.protot
 return ii(this.parameters.shapes,a)};bd.prototype=Object.create(A.prototype);bd.prototype.constructor=bd;kc.prototype=Object.create(L.prototype);kc.prototype.constructor=kc;ub.prototype=Object.create(A.prototype);ub.prototype.constructor=ub;ne.prototype=Object.create(kc.prototype);ne.prototype.constructor=ne;oe.prototype=Object.create(ub.prototype);oe.prototype.constructor=oe;pe.prototype=Object.create(L.prototype);pe.prototype.constructor=pe;cd.prototype=Object.create(A.prototype);cd.prototype.constructor=
 cd;var va=Object.freeze({__proto__:null,WireframeGeometry:Rc,ParametricGeometry:Xd,ParametricBufferGeometry:Sc,TetrahedronGeometry:Zd,TetrahedronBufferGeometry:Tc,OctahedronGeometry:$d,OctahedronBufferGeometry:dc,IcosahedronGeometry:ae,IcosahedronBufferGeometry:Uc,DodecahedronGeometry:be,DodecahedronBufferGeometry:Vc,PolyhedronGeometry:Yd,PolyhedronBufferGeometry:Ja,TubeGeometry:ce,TubeBufferGeometry:ec,TorusKnotGeometry:de,TorusKnotBufferGeometry:Wc,TorusGeometry:ee,TorusBufferGeometry:Xc,TextGeometry:je,
 TextBufferGeometry:Zc,SphereGeometry:ke,SphereBufferGeometry:hc,RingGeometry:le,RingBufferGeometry:$c,PlaneGeometry:Jd,PlaneBufferGeometry:cc,LatheGeometry:me,LatheBufferGeometry:ad,ShapeGeometry:ic,ShapeBufferGeometry:jc,ExtrudeGeometry:gc,ExtrudeBufferGeometry:gb,EdgesGeometry:bd,ConeGeometry:ne,ConeBufferGeometry:oe,CylinderGeometry:kc,CylinderBufferGeometry:ub,CircleGeometry:pe,CircleBufferGeometry:cd,BoxGeometry:nh,BoxBufferGeometry:Kd});lc.prototype=Object.create(K.prototype);lc.prototype.constructor=
-lc;lc.prototype.isShadowMaterial=!0;lc.prototype.copy=function(a){K.prototype.copy.call(this,a);this.color.copy(a.color);return this};vb.prototype=Object.create(pa.prototype);vb.prototype.constructor=vb;vb.prototype.isRawShaderMaterial=!0;hb.prototype=Object.create(K.prototype);hb.prototype.constructor=hb;hb.prototype.isMeshStandardMaterial=!0;hb.prototype.copy=function(a){K.prototype.copy.call(this,a);this.defines={STANDARD:""};this.color.copy(a.color);this.roughness=a.roughness;this.metalness=a.metalness;
+lc;lc.prototype.isShadowMaterial=!0;lc.prototype.copy=function(a){K.prototype.copy.call(this,a);this.color.copy(a.color);return this};vb.prototype=Object.create(qa.prototype);vb.prototype.constructor=vb;vb.prototype.isRawShaderMaterial=!0;hb.prototype=Object.create(K.prototype);hb.prototype.constructor=hb;hb.prototype.isMeshStandardMaterial=!0;hb.prototype.copy=function(a){K.prototype.copy.call(this,a);this.defines={STANDARD:""};this.color.copy(a.color);this.roughness=a.roughness;this.metalness=a.metalness;
 this.map=a.map;this.lightMap=a.lightMap;this.lightMapIntensity=a.lightMapIntensity;this.aoMap=a.aoMap;this.aoMapIntensity=a.aoMapIntensity;this.emissive.copy(a.emissive);this.emissiveMap=a.emissiveMap;this.emissiveIntensity=a.emissiveIntensity;this.bumpMap=a.bumpMap;this.bumpScale=a.bumpScale;this.normalMap=a.normalMap;this.normalMapType=a.normalMapType;this.normalScale.copy(a.normalScale);this.displacementMap=a.displacementMap;this.displacementScale=a.displacementScale;this.displacementBias=a.displacementBias;
 this.roughnessMap=a.roughnessMap;this.metalnessMap=a.metalnessMap;this.alphaMap=a.alphaMap;this.envMap=a.envMap;this.envMapIntensity=a.envMapIntensity;this.refractionRatio=a.refractionRatio;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.wireframeLinecap=a.wireframeLinecap;this.wireframeLinejoin=a.wireframeLinejoin;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;return this};mc.prototype=Object.create(hb.prototype);mc.prototype.constructor=
 mc;mc.prototype.isMeshPhysicalMaterial=!0;mc.prototype.copy=function(a){hb.prototype.copy.call(this,a);this.defines={STANDARD:"",PHYSICAL:""};this.reflectivity=a.reflectivity;this.clearcoat=a.clearcoat;this.clearcoatRoughness=a.clearcoatRoughness;this.sheen=a.sheen?(this.sheen||new B).copy(a.sheen):null;this.clearcoatNormalMap=a.clearcoatNormalMap;this.clearcoatNormalScale.copy(a.clearcoatNormalScale);this.transparency=a.transparency;return this};Kb.prototype=Object.create(K.prototype);Kb.prototype.constructor=
@@ -731,33 +731,33 @@ this.displacementMap=a.displacementMap;this.displacementScale=a.displacementScal
 this.lightMap=a.lightMap;this.lightMapIntensity=a.lightMapIntensity;this.aoMap=a.aoMap;this.aoMapIntensity=a.aoMapIntensity;this.emissive.copy(a.emissive);this.emissiveMap=a.emissiveMap;this.emissiveIntensity=a.emissiveIntensity;this.specularMap=a.specularMap;this.alphaMap=a.alphaMap;this.envMap=a.envMap;this.combine=a.combine;this.reflectivity=a.reflectivity;this.refractionRatio=a.refractionRatio;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.wireframeLinecap=a.wireframeLinecap;
 this.wireframeLinejoin=a.wireframeLinejoin;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;return this};qc.prototype=Object.create(K.prototype);qc.prototype.constructor=qc;qc.prototype.isMeshMatcapMaterial=!0;qc.prototype.copy=function(a){K.prototype.copy.call(this,a);this.defines={MATCAP:""};this.color.copy(a.color);this.matcap=a.matcap;this.map=a.map;this.bumpMap=a.bumpMap;this.bumpScale=a.bumpScale;this.normalMap=a.normalMap;this.normalMapType=a.normalMapType;
 this.normalScale.copy(a.normalScale);this.displacementMap=a.displacementMap;this.displacementScale=a.displacementScale;this.displacementBias=a.displacementBias;this.alphaMap=a.alphaMap;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;return this};rc.prototype=Object.create(ka.prototype);rc.prototype.constructor=rc;rc.prototype.isLineDashedMaterial=!0;rc.prototype.copy=function(a){ka.prototype.copy.call(this,a);this.scale=a.scale;this.dashSize=a.dashSize;this.gapSize=
-a.gapSize;return this};var bl=Object.freeze({__proto__:null,ShadowMaterial:lc,SpriteMaterial:Jb,RawShaderMaterial:vb,ShaderMaterial:pa,PointsMaterial:Wa,MeshPhysicalMaterial:mc,MeshStandardMaterial:hb,MeshPhongMaterial:Kb,MeshToonMaterial:nc,MeshNormalMaterial:oc,MeshLambertMaterial:pc,MeshDepthMaterial:Gb,MeshDistanceMaterial:Hb,MeshBasicMaterial:Pa,MeshMatcapMaterial:qc,LineDashedMaterial:rc,LineBasicMaterial:ka,Material:K}),da={arraySlice:function(a,b,c){return da.isTypedArray(a)?new a.constructor(a.subarray(b,
+a.gapSize;return this};var bl=Object.freeze({__proto__:null,ShadowMaterial:lc,SpriteMaterial:Jb,RawShaderMaterial:vb,ShaderMaterial:qa,PointsMaterial:Wa,MeshPhysicalMaterial:mc,MeshStandardMaterial:hb,MeshPhongMaterial:Kb,MeshToonMaterial:nc,MeshNormalMaterial:oc,MeshLambertMaterial:pc,MeshDepthMaterial:Gb,MeshDistanceMaterial:Hb,MeshBasicMaterial:Pa,MeshMatcapMaterial:qc,LineDashedMaterial:rc,LineBasicMaterial:ka,Material:K}),ea={arraySlice:function(a,b,c){return ea.isTypedArray(a)?new a.constructor(a.subarray(b,
 void 0!==c?c:a.length)):a.slice(b,c)},convertArray:function(a,b,c){return!a||!c&&a.constructor===b?a:"number"===typeof b.BYTES_PER_ELEMENT?new b(a):Array.prototype.slice.call(a)},isTypedArray:function(a){return ArrayBuffer.isView(a)&&!(a instanceof DataView)},getKeyframeOrder:function(a){for(var b=a.length,c=Array(b),d=0;d!==b;++d)c[d]=d;c.sort(function(b,c){return a[b]-a[c]});return c},sortedArray:function(a,b,c){for(var d=a.length,e=new a.constructor(d),f=0,g=0;g!==d;++f)for(var k=c[f]*b,h=0;h!==
 b;++h)e[g++]=a[k+h];return e},flattenJSON:function(a,b,c,d){for(var e=1,f=a[0];void 0!==f&&void 0===f[d];)f=a[e++];if(void 0!==f){var g=f[d];if(void 0!==g)if(Array.isArray(g)){do g=f[d],void 0!==g&&(b.push(f.time),c.push.apply(c,g)),f=a[e++];while(void 0!==f)}else if(void 0!==g.toArray){do g=f[d],void 0!==g&&(b.push(f.time),g.toArray(c,c.length)),f=a[e++];while(void 0!==f)}else{do g=f[d],void 0!==g&&(b.push(f.time),c.push(g)),f=a[e++];while(void 0!==f)}}},subclip:function(a,b,c,d,e){e=e||30;a=a.clone();
-a.name=b;var f=[];for(b=0;b<a.tracks.length;++b){for(var g=a.tracks[b],k=g.getValueSize(),h=[],m=[],n=0;n<g.times.length;++n){var p=g.times[n]*e;if(!(p<c||p>=d))for(h.push(g.times[n]),p=0;p<k;++p)m.push(g.values[n*k+p])}0!==h.length&&(g.times=da.convertArray(h,g.times.constructor),g.values=da.convertArray(m,g.values.constructor),f.push(g))}a.tracks=f;c=Infinity;for(b=0;b<a.tracks.length;++b)c>a.tracks[b].times[0]&&(c=a.tracks[b].times[0]);for(b=0;b<a.tracks.length;++b)a.tracks[b].shift(-1*c);a.resetDuration();
+a.name=b;var f=[];for(b=0;b<a.tracks.length;++b){for(var g=a.tracks[b],k=g.getValueSize(),h=[],m=[],n=0;n<g.times.length;++n){var p=g.times[n]*e;if(!(p<c||p>=d))for(h.push(g.times[n]),p=0;p<k;++p)m.push(g.values[n*k+p])}0!==h.length&&(g.times=ea.convertArray(h,g.times.constructor),g.values=ea.convertArray(m,g.values.constructor),f.push(g))}a.tracks=f;c=Infinity;for(b=0;b<a.tracks.length;++b)c>a.tracks[b].times[0]&&(c=a.tracks[b].times[0]);for(b=0;b<a.tracks.length;++b)a.tracks[b].shift(-1*c);a.resetDuration();
 return a}};Object.assign(Ma.prototype,{evaluate:function(a){var b=this.parameterPositions,c=this._cachedIndex,d=b[c],e=b[c-1];a:{b:{c:{d:if(!(a<d)){for(var f=c+2;;){if(void 0===d){if(a<e)break d;this._cachedIndex=c=b.length;return this.afterEnd_(c-1,a,e)}if(c===f)break;e=d;d=b[++c];if(a<d)break b}d=b.length;break c}if(a>=e)break a;else{f=b[1];a<f&&(c=2,e=f);for(f=c-2;;){if(void 0===e)return this._cachedIndex=0,this.beforeStart_(0,a,d);if(c===f)break;d=e;e=b[--c-1];if(a>=e)break b}d=c;c=0}}for(;c<
 d;)e=c+d>>>1,a<b[e]?d=e:c=e+1;d=b[c];e=b[c-1];if(void 0===e)return this._cachedIndex=0,this.beforeStart_(0,a,d);if(void 0===d)return this._cachedIndex=c=b.length,this.afterEnd_(c-1,e,a)}this._cachedIndex=c;this.intervalChanged_(c,e,d)}return this.interpolate_(c,e,a,d)},settings:null,DefaultSettings_:{},getSettings_:function(){return this.settings||this.DefaultSettings_},copySampleValue_:function(a){var b=this.resultBuffer,c=this.sampleValues,d=this.valueSize;a*=d;for(var e=0;e!==d;++e)b[e]=c[a+e];
 return b},interpolate_:function(){throw Error("call to abstract method");},intervalChanged_:function(){}});Object.assign(Ma.prototype,{beforeStart_:Ma.prototype.copySampleValue_,afterEnd_:Ma.prototype.copySampleValue_});Xe.prototype=Object.assign(Object.create(Ma.prototype),{constructor:Xe,DefaultSettings_:{endingStart:2400,endingEnd:2400},intervalChanged_:function(a,b,c){var d=this.parameterPositions,e=a-2,f=a+1,g=d[e],k=d[f];if(void 0===g)switch(this.getSettings_().endingStart){case 2401:e=a;g=
 2*b-c;break;case 2402:e=d.length-2;g=b+d[e]-d[e+1];break;default:e=a,g=c}if(void 0===k)switch(this.getSettings_().endingEnd){case 2401:f=a;k=2*c-b;break;case 2402:f=1;k=c+d[1]-d[0];break;default:f=a-1,k=b}a=.5*(c-b);d=this.valueSize;this._weightPrev=a/(b-g);this._weightNext=a/(k-c);this._offsetPrev=e*d;this._offsetNext=f*d},interpolate_:function(a,b,c,d){var e=this.resultBuffer,f=this.sampleValues,g=this.valueSize;a*=g;var k=a-g,h=this._offsetPrev,m=this._offsetNext,n=this._weightPrev,p=this._weightNext,
 q=(c-b)/(d-b);c=q*q;d=c*q;b=-n*d+2*n*c-n*q;n=(1+n)*d+(-1.5-2*n)*c+(-.5+n)*q+1;q=(-1-p)*d+(1.5+p)*c+.5*q;p=p*d-p*c;for(c=0;c!==g;++c)e[c]=b*f[h+c]+n*f[k+c]+q*f[a+c]+p*f[m+c];return e}});qe.prototype=Object.assign(Object.create(Ma.prototype),{constructor:qe,interpolate_:function(a,b,c,d){var e=this.resultBuffer,f=this.sampleValues,g=this.valueSize;a*=g;var k=a-g;b=(c-b)/(d-b);c=1-b;for(d=0;d!==g;++d)e[d]=f[k+d]*c+f[a+d]*b;return e}});Ye.prototype=Object.assign(Object.create(Ma.prototype),{constructor:Ye,
-interpolate_:function(a){return this.copySampleValue_(a-1)}});Object.assign(ua,{toJSON:function(a){var b=a.constructor;if(void 0!==b.toJSON)b=b.toJSON(a);else{b={name:a.name,times:da.convertArray(a.times,Array),values:da.convertArray(a.values,Array)};var c=a.getInterpolation();c!==a.DefaultInterpolation&&(b.interpolation=c)}b.type=a.ValueTypeName;return b}});Object.assign(ua.prototype,{constructor:ua,TimeBufferType:Float32Array,ValueBufferType:Float32Array,DefaultInterpolation:2301,InterpolantFactoryMethodDiscrete:function(a){return new Ye(this.times,
+interpolate_:function(a){return this.copySampleValue_(a-1)}});Object.assign(ua,{toJSON:function(a){var b=a.constructor;if(void 0!==b.toJSON)b=b.toJSON(a);else{b={name:a.name,times:ea.convertArray(a.times,Array),values:ea.convertArray(a.values,Array)};var c=a.getInterpolation();c!==a.DefaultInterpolation&&(b.interpolation=c)}b.type=a.ValueTypeName;return b}});Object.assign(ua.prototype,{constructor:ua,TimeBufferType:Float32Array,ValueBufferType:Float32Array,DefaultInterpolation:2301,InterpolantFactoryMethodDiscrete:function(a){return new Ye(this.times,
 this.values,this.getValueSize(),a)},InterpolantFactoryMethodLinear:function(a){return new qe(this.times,this.values,this.getValueSize(),a)},InterpolantFactoryMethodSmooth:function(a){return new Xe(this.times,this.values,this.getValueSize(),a)},setInterpolation:function(a){switch(a){case 2300:var b=this.InterpolantFactoryMethodDiscrete;break;case 2301:b=this.InterpolantFactoryMethodLinear;break;case 2302:b=this.InterpolantFactoryMethodSmooth}if(void 0===b){b="unsupported interpolation for "+this.ValueTypeName+
 " keyframe track named "+this.name;if(void 0===this.createInterpolant)if(a!==this.DefaultInterpolation)this.setInterpolation(this.DefaultInterpolation);else throw Error(b);console.warn("THREE.KeyframeTrack:",b);return this}this.createInterpolant=b;return this},getInterpolation:function(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return 2300;case this.InterpolantFactoryMethodLinear:return 2301;case this.InterpolantFactoryMethodSmooth:return 2302}},getValueSize:function(){return this.values.length/
-this.times.length},shift:function(a){if(0!==a)for(var b=this.times,c=0,d=b.length;c!==d;++c)b[c]+=a;return this},scale:function(a){if(1!==a)for(var b=this.times,c=0,d=b.length;c!==d;++c)b[c]*=a;return this},trim:function(a,b){for(var c=this.times,d=c.length,e=0,f=d-1;e!==d&&c[e]<a;)++e;for(;-1!==f&&c[f]>b;)--f;++f;if(0!==e||f!==d)e>=f&&(f=Math.max(f,1),e=f-1),a=this.getValueSize(),this.times=da.arraySlice(c,e,f),this.values=da.arraySlice(this.values,e*a,f*a);return this},validate:function(){var a=
+this.times.length},shift:function(a){if(0!==a)for(var b=this.times,c=0,d=b.length;c!==d;++c)b[c]+=a;return this},scale:function(a){if(1!==a)for(var b=this.times,c=0,d=b.length;c!==d;++c)b[c]*=a;return this},trim:function(a,b){for(var c=this.times,d=c.length,e=0,f=d-1;e!==d&&c[e]<a;)++e;for(;-1!==f&&c[f]>b;)--f;++f;if(0!==e||f!==d)e>=f&&(f=Math.max(f,1),e=f-1),a=this.getValueSize(),this.times=ea.arraySlice(c,e,f),this.values=ea.arraySlice(this.values,e*a,f*a);return this},validate:function(){var a=
 !0,b=this.getValueSize();0!==b-Math.floor(b)&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),a=!1);var c=this.times;b=this.values;var d=c.length;0===d&&(console.error("THREE.KeyframeTrack: Track is empty.",this),a=!1);for(var e=null,f=0;f!==d;f++){var g=c[f];if("number"===typeof g&&isNaN(g)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,f,g);a=!1;break}if(null!==e&&e>g){console.error("THREE.KeyframeTrack: Out of order keys.",this,f,g,e);a=!1;break}e=
-g}if(void 0!==b&&da.isTypedArray(b))for(f=0,c=b.length;f!==c;++f)if(d=b[f],isNaN(d)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,f,d);a=!1;break}return a},optimize:function(){for(var a=this.times,b=this.values,c=this.getValueSize(),d=2302===this.getInterpolation(),e=1,f=a.length-1,g=1;g<f;++g){var k=!1,h=a[g];if(h!==a[g+1]&&(1!==g||h!==h[0]))if(d)k=!0;else{var m=g*c,n=m-c,p=m+c;for(h=0;h!==c;++h){var q=b[m+h];if(q!==b[n+h]||q!==b[p+h]){k=!0;break}}}if(k){if(g!==e)for(a[e]=
-a[g],k=g*c,m=e*c,h=0;h!==c;++h)b[m+h]=b[k+h];++e}}if(0<f){a[e]=a[f];k=f*c;m=e*c;for(h=0;h!==c;++h)b[m+h]=b[k+h];++e}e!==a.length&&(this.times=da.arraySlice(a,0,e),this.values=da.arraySlice(b,0,e*c));return this},clone:function(){var a=da.arraySlice(this.times,0),b=da.arraySlice(this.values,0);a=new this.constructor(this.name,a,b);a.createInterpolant=this.createInterpolant;return a}});Ze.prototype=Object.assign(Object.create(ua.prototype),{constructor:Ze,ValueTypeName:"bool",ValueBufferType:Array,
-DefaultInterpolation:2300,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0});$e.prototype=Object.assign(Object.create(ua.prototype),{constructor:$e,ValueTypeName:"color"});dd.prototype=Object.assign(Object.create(ua.prototype),{constructor:dd,ValueTypeName:"number"});af.prototype=Object.assign(Object.create(Ma.prototype),{constructor:af,interpolate_:function(a,b,c,d){var e=this.resultBuffer,f=this.sampleValues,g=this.valueSize;a*=g;b=(c-b)/(d-b);for(c=a+g;a!==c;a+=4)Da.slerpFlat(e,
-0,f,a-g,f,a,b);return e}});re.prototype=Object.assign(Object.create(ua.prototype),{constructor:re,ValueTypeName:"quaternion",DefaultInterpolation:2301,InterpolantFactoryMethodLinear:function(a){return new af(this.times,this.values,this.getValueSize(),a)},InterpolantFactoryMethodSmooth:void 0});bf.prototype=Object.assign(Object.create(ua.prototype),{constructor:bf,ValueTypeName:"string",ValueBufferType:Array,DefaultInterpolation:2300,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0});
-ed.prototype=Object.assign(Object.create(ua.prototype),{constructor:ed,ValueTypeName:"vector"});Object.assign(Ra,{parse:function(a){for(var b=[],c=a.tracks,d=1/(a.fps||1),e=0,f=c.length;e!==f;++e)b.push(Qk(c[e]).scale(d));return new Ra(a.name,a.duration,b)},toJSON:function(a){var b=[],c=a.tracks;a={name:a.name,duration:a.duration,tracks:b,uuid:a.uuid};for(var d=0,e=c.length;d!==e;++d)b.push(ua.toJSON(c[d]));return a},CreateFromMorphTargetSequence:function(a,b,c,d){for(var e=b.length,f=[],g=0;g<e;g++){var k=
-[],h=[];k.push((g+e-1)%e,g,(g+1)%e);h.push(0,1,0);var m=da.getKeyframeOrder(k);k=da.sortedArray(k,1,m);h=da.sortedArray(h,1,m);d||0!==k[0]||(k.push(e),h.push(h[0]));f.push((new dd(".morphTargetInfluences["+b[g].name+"]",k,h)).scale(1/c))}return new Ra(a,-1,f)},findByName:function(a,b){var c=a;Array.isArray(a)||(c=a.geometry&&a.geometry.animations||a.animations);for(a=0;a<c.length;a++)if(c[a].name===b)return c[a];return null},CreateClipsFromMorphTargetSequences:function(a,b,c){for(var d={},e=/^([\w-]*?)([\d]+)$/,
-f=0,g=a.length;f<g;f++){var k=a[f],h=k.name.match(e);if(h&&1<h.length){var m=h[1];(h=d[m])||(d[m]=h=[]);h.push(k)}}a=[];for(m in d)a.push(Ra.CreateFromMorphTargetSequence(m,d[m],b,c));return a},parseAnimation:function(a,b){if(!a)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;var c=function(a,b,c,d,e){if(0!==c.length){var f=[],g=[];da.flattenJSON(c,f,g,d);0!==f.length&&e.push(new a(b,f,g))}},d=[],e=a.name||"default",f=a.length||-1,g=a.fps||30;a=a.hierarchy||[];for(var k=
-0;k<a.length;k++){var h=a[k].keys;if(h&&0!==h.length)if(h[0].morphTargets){f={};for(var m=0;m<h.length;m++)if(h[m].morphTargets)for(var n=0;n<h[m].morphTargets.length;n++)f[h[m].morphTargets[n]]=-1;for(var p in f){var q=[],t=[];for(n=0;n!==h[m].morphTargets.length;++n){var r=h[m];q.push(r.time);t.push(r.morphTarget===p?1:0)}d.push(new dd(".morphTargetInfluence["+p+"]",q,t))}f=f.length*(g||1)}else m=".bones["+b[k].name+"]",c(ed,m+".position",h,"pos",d),c(re,m+".quaternion",h,"rot",d),c(ed,m+".scale",
-h,"scl",d)}return 0===d.length?null:new Ra(e,f,d)}});Object.assign(Ra.prototype,{resetDuration:function(){for(var a=0,b=0,c=this.tracks.length;b!==c;++b){var d=this.tracks[b];a=Math.max(a,d.times[d.times.length-1])}this.duration=a;return this},trim:function(){for(var a=0;a<this.tracks.length;a++)this.tracks[a].trim(0,this.duration);return this},validate:function(){for(var a=!0,b=0;b<this.tracks.length;b++)a=a&&this.tracks[b].validate();return a},optimize:function(){for(var a=0;a<this.tracks.length;a++)this.tracks[a].optimize();
-return this},clone:function(){for(var a=[],b=0;b<this.tracks.length;b++)a.push(this.tracks[b].clone());return new Ra(this.name,this.duration,a)}});var vc={enabled:!1,files:{},add:function(a,b){!1!==this.enabled&&(this.files[a]=b)},get:function(a){if(!1!==this.enabled)return this.files[a]},remove:function(a){delete this.files[a]},clear:function(){this.files={}}},ji=new xg;Object.assign(V.prototype,{load:function(){},parse:function(){},setCrossOrigin:function(a){this.crossOrigin=a;return this},setPath:function(a){this.path=
-a;return this},setResourcePath:function(a){this.resourcePath=a;return this}});var db={};Sa.prototype=Object.assign(Object.create(V.prototype),{constructor:Sa,load:function(a,b,c,d){void 0===a&&(a="");void 0!==this.path&&(a=this.path+a);a=this.manager.resolveURL(a);var e=this,f=vc.get(a);if(void 0!==f)return e.manager.itemStart(a),setTimeout(function(){b&&b(f);e.manager.itemEnd(a)},0),f;if(void 0!==db[a])db[a].push({onLoad:b,onProgress:c,onError:d});else{var g=a.match(/^data:(.*?)(;base64)?,(.*)$/);
-if(g){c=g[1];var k=!!g[2];g=g[3];g=decodeURIComponent(g);k&&(g=atob(g));try{var h=(this.responseType||"").toLowerCase();switch(h){case "arraybuffer":case "blob":var m=new Uint8Array(g.length);for(k=0;k<g.length;k++)m[k]=g.charCodeAt(k);var n="blob"===h?new Blob([m.buffer],{type:c}):m.buffer;break;case "document":n=(new DOMParser).parseFromString(g,c);break;case "json":n=JSON.parse(g);break;default:n=g}setTimeout(function(){b&&b(n);e.manager.itemEnd(a)},0)}catch(q){setTimeout(function(){d&&d(q);e.manager.itemError(a);
-e.manager.itemEnd(a)},0)}}else{db[a]=[];db[a].push({onLoad:b,onProgress:c,onError:d});var p=new XMLHttpRequest;p.open("GET",a,!0);p.addEventListener("load",function(b){var c=this.response,d=db[a];delete db[a];if(200===this.status||0===this.status){0===this.status&&console.warn("THREE.FileLoader: HTTP Status 0 received.");vc.add(a,c);for(var f=0,g=d.length;f<g;f++){var k=d[f];if(k.onLoad)k.onLoad(c)}}else{f=0;for(g=d.length;f<g;f++)if(k=d[f],k.onError)k.onError(b);e.manager.itemError(a)}e.manager.itemEnd(a)},
+g}if(void 0!==b&&ea.isTypedArray(b))for(f=0,c=b.length;f!==c;++f)if(d=b[f],isNaN(d)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,f,d);a=!1;break}return a},optimize:function(){for(var a=ea.arraySlice(this.times),b=ea.arraySlice(this.values),c=this.getValueSize(),d=2302===this.getInterpolation(),e=1,f=a.length-1,g=1;g<f;++g){var k=!1,h=a[g];if(h!==a[g+1]&&(1!==g||h!==h[0]))if(d)k=!0;else{var m=g*c,n=m-c,p=m+c;for(h=0;h!==c;++h){var q=b[m+h];if(q!==b[n+h]||q!==b[p+h]){k=!0;
+break}}}if(k){if(g!==e)for(a[e]=a[g],k=g*c,m=e*c,h=0;h!==c;++h)b[m+h]=b[k+h];++e}}if(0<f){a[e]=a[f];k=f*c;m=e*c;for(h=0;h!==c;++h)b[m+h]=b[k+h];++e}e!==a.length?(this.times=ea.arraySlice(a,0,e),this.values=ea.arraySlice(b,0,e*c)):(this.times=a,this.values=b);return this},clone:function(){var a=ea.arraySlice(this.times,0),b=ea.arraySlice(this.values,0);a=new this.constructor(this.name,a,b);a.createInterpolant=this.createInterpolant;return a}});Ze.prototype=Object.assign(Object.create(ua.prototype),
+{constructor:Ze,ValueTypeName:"bool",ValueBufferType:Array,DefaultInterpolation:2300,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0});$e.prototype=Object.assign(Object.create(ua.prototype),{constructor:$e,ValueTypeName:"color"});dd.prototype=Object.assign(Object.create(ua.prototype),{constructor:dd,ValueTypeName:"number"});af.prototype=Object.assign(Object.create(Ma.prototype),{constructor:af,interpolate_:function(a,b,c,d){var e=this.resultBuffer,f=this.sampleValues,g=
+this.valueSize;a*=g;b=(c-b)/(d-b);for(c=a+g;a!==c;a+=4)Da.slerpFlat(e,0,f,a-g,f,a,b);return e}});re.prototype=Object.assign(Object.create(ua.prototype),{constructor:re,ValueTypeName:"quaternion",DefaultInterpolation:2301,InterpolantFactoryMethodLinear:function(a){return new af(this.times,this.values,this.getValueSize(),a)},InterpolantFactoryMethodSmooth:void 0});bf.prototype=Object.assign(Object.create(ua.prototype),{constructor:bf,ValueTypeName:"string",ValueBufferType:Array,DefaultInterpolation:2300,
+InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0});ed.prototype=Object.assign(Object.create(ua.prototype),{constructor:ed,ValueTypeName:"vector"});Object.assign(Ra,{parse:function(a){for(var b=[],c=a.tracks,d=1/(a.fps||1),e=0,f=c.length;e!==f;++e)b.push(Qk(c[e]).scale(d));return new Ra(a.name,a.duration,b)},toJSON:function(a){var b=[],c=a.tracks;a={name:a.name,duration:a.duration,tracks:b,uuid:a.uuid};for(var d=0,e=c.length;d!==e;++d)b.push(ua.toJSON(c[d]));return a},CreateFromMorphTargetSequence:function(a,
+b,c,d){for(var e=b.length,f=[],g=0;g<e;g++){var k=[],h=[];k.push((g+e-1)%e,g,(g+1)%e);h.push(0,1,0);var m=ea.getKeyframeOrder(k);k=ea.sortedArray(k,1,m);h=ea.sortedArray(h,1,m);d||0!==k[0]||(k.push(e),h.push(h[0]));f.push((new dd(".morphTargetInfluences["+b[g].name+"]",k,h)).scale(1/c))}return new Ra(a,-1,f)},findByName:function(a,b){var c=a;Array.isArray(a)||(c=a.geometry&&a.geometry.animations||a.animations);for(a=0;a<c.length;a++)if(c[a].name===b)return c[a];return null},CreateClipsFromMorphTargetSequences:function(a,
+b,c){for(var d={},e=/^([\w-]*?)([\d]+)$/,f=0,g=a.length;f<g;f++){var k=a[f],h=k.name.match(e);if(h&&1<h.length){var m=h[1];(h=d[m])||(d[m]=h=[]);h.push(k)}}a=[];for(m in d)a.push(Ra.CreateFromMorphTargetSequence(m,d[m],b,c));return a},parseAnimation:function(a,b){if(!a)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;var c=function(a,b,c,d,e){if(0!==c.length){var f=[],g=[];ea.flattenJSON(c,f,g,d);0!==f.length&&e.push(new a(b,f,g))}},d=[],e=a.name||"default",f=a.length||
+-1,g=a.fps||30;a=a.hierarchy||[];for(var k=0;k<a.length;k++){var h=a[k].keys;if(h&&0!==h.length)if(h[0].morphTargets){f={};for(var m=0;m<h.length;m++)if(h[m].morphTargets)for(var n=0;n<h[m].morphTargets.length;n++)f[h[m].morphTargets[n]]=-1;for(var p in f){var q=[],t=[];for(n=0;n!==h[m].morphTargets.length;++n){var r=h[m];q.push(r.time);t.push(r.morphTarget===p?1:0)}d.push(new dd(".morphTargetInfluence["+p+"]",q,t))}f=f.length*(g||1)}else m=".bones["+b[k].name+"]",c(ed,m+".position",h,"pos",d),c(re,
+m+".quaternion",h,"rot",d),c(ed,m+".scale",h,"scl",d)}return 0===d.length?null:new Ra(e,f,d)}});Object.assign(Ra.prototype,{resetDuration:function(){for(var a=0,b=0,c=this.tracks.length;b!==c;++b){var d=this.tracks[b];a=Math.max(a,d.times[d.times.length-1])}this.duration=a;return this},trim:function(){for(var a=0;a<this.tracks.length;a++)this.tracks[a].trim(0,this.duration);return this},validate:function(){for(var a=!0,b=0;b<this.tracks.length;b++)a=a&&this.tracks[b].validate();return a},optimize:function(){for(var a=
+0;a<this.tracks.length;a++)this.tracks[a].optimize();return this},clone:function(){for(var a=[],b=0;b<this.tracks.length;b++)a.push(this.tracks[b].clone());return new Ra(this.name,this.duration,a)}});var vc={enabled:!1,files:{},add:function(a,b){!1!==this.enabled&&(this.files[a]=b)},get:function(a){if(!1!==this.enabled)return this.files[a]},remove:function(a){delete this.files[a]},clear:function(){this.files={}}},ji=new xg;Object.assign(V.prototype,{load:function(){},parse:function(){},setCrossOrigin:function(a){this.crossOrigin=
+a;return this},setPath:function(a){this.path=a;return this},setResourcePath:function(a){this.resourcePath=a;return this}});var db={};Sa.prototype=Object.assign(Object.create(V.prototype),{constructor:Sa,load:function(a,b,c,d){void 0===a&&(a="");void 0!==this.path&&(a=this.path+a);a=this.manager.resolveURL(a);var e=this,f=vc.get(a);if(void 0!==f)return e.manager.itemStart(a),setTimeout(function(){b&&b(f);e.manager.itemEnd(a)},0),f;if(void 0!==db[a])db[a].push({onLoad:b,onProgress:c,onError:d});else{var g=
+a.match(/^data:(.*?)(;base64)?,(.*)$/);if(g){c=g[1];var k=!!g[2];g=g[3];g=decodeURIComponent(g);k&&(g=atob(g));try{var h=(this.responseType||"").toLowerCase();switch(h){case "arraybuffer":case "blob":var m=new Uint8Array(g.length);for(k=0;k<g.length;k++)m[k]=g.charCodeAt(k);var n="blob"===h?new Blob([m.buffer],{type:c}):m.buffer;break;case "document":n=(new DOMParser).parseFromString(g,c);break;case "json":n=JSON.parse(g);break;default:n=g}setTimeout(function(){b&&b(n);e.manager.itemEnd(a)},0)}catch(q){setTimeout(function(){d&&
+d(q);e.manager.itemError(a);e.manager.itemEnd(a)},0)}}else{db[a]=[];db[a].push({onLoad:b,onProgress:c,onError:d});var p=new XMLHttpRequest;p.open("GET",a,!0);p.addEventListener("load",function(b){var c=this.response,d=db[a];delete db[a];if(200===this.status||0===this.status){0===this.status&&console.warn("THREE.FileLoader: HTTP Status 0 received.");vc.add(a,c);for(var f=0,g=d.length;f<g;f++){var k=d[f];if(k.onLoad)k.onLoad(c)}}else{f=0;for(g=d.length;f<g;f++)if(k=d[f],k.onError)k.onError(b);e.manager.itemError(a)}e.manager.itemEnd(a)},
 !1);p.addEventListener("progress",function(b){for(var c=db[a],d=0,e=c.length;d<e;d++){var f=c[d];if(f.onProgress)f.onProgress(b)}},!1);p.addEventListener("error",function(b){var c=db[a];delete db[a];for(var d=0,f=c.length;d<f;d++){var g=c[d];if(g.onError)g.onError(b)}e.manager.itemError(a);e.manager.itemEnd(a)},!1);p.addEventListener("abort",function(b){var c=db[a];delete db[a];for(var d=0,f=c.length;d<f;d++){var g=c[d];if(g.onError)g.onError(b)}e.manager.itemError(a);e.manager.itemEnd(a)},!1);void 0!==
 this.responseType&&(p.responseType=this.responseType);void 0!==this.withCredentials&&(p.withCredentials=this.withCredentials);p.overrideMimeType&&p.overrideMimeType(void 0!==this.mimeType?this.mimeType:"text/plain");for(k in this.requestHeader)p.setRequestHeader(k,this.requestHeader[k]);p.send(null)}e.manager.itemStart(a);return p}},setResponseType:function(a){this.responseType=a;return this},setWithCredentials:function(a){this.withCredentials=a;return this},setMimeType:function(a){this.mimeType=
 a;return this},setRequestHeader:function(a){this.requestHeader=a;return this}});yg.prototype=Object.assign(Object.create(V.prototype),{constructor:yg,load:function(a,b,c,d){var e=this,f=new Sa(e.manager);f.setPath(e.path);f.load(a,function(a){b(e.parse(JSON.parse(a)))},c,d)},parse:function(a){for(var b=[],c=0;c<a.length;c++){var d=Ra.parse(a[c]);b.push(d)}return b}});zg.prototype=Object.assign(Object.create(V.prototype),{constructor:zg,load:function(a,b,c,d){function e(e){h.load(a[e],function(a){a=
@@ -816,7 +816,7 @@ void 0!==a.side&&(d.side=a.side);void 0!==a.opacity&&(d.opacity=a.opacity);void
 void 0!==a.stencilRef&&(d.stencilRef=a.stencilRef);void 0!==a.stencilFuncMask&&(d.stencilFuncMask=a.stencilFuncMask);void 0!==a.stencilFail&&(d.stencilFail=a.stencilFail);void 0!==a.stencilZFail&&(d.stencilZFail=a.stencilZFail);void 0!==a.stencilZPass&&(d.stencilZPass=a.stencilZPass);void 0!==a.wireframe&&(d.wireframe=a.wireframe);void 0!==a.wireframeLinewidth&&(d.wireframeLinewidth=a.wireframeLinewidth);void 0!==a.wireframeLinecap&&(d.wireframeLinecap=a.wireframeLinecap);void 0!==a.wireframeLinejoin&&
 (d.wireframeLinejoin=a.wireframeLinejoin);void 0!==a.rotation&&(d.rotation=a.rotation);1!==a.linewidth&&(d.linewidth=a.linewidth);void 0!==a.dashSize&&(d.dashSize=a.dashSize);void 0!==a.gapSize&&(d.gapSize=a.gapSize);void 0!==a.scale&&(d.scale=a.scale);void 0!==a.polygonOffset&&(d.polygonOffset=a.polygonOffset);void 0!==a.polygonOffsetFactor&&(d.polygonOffsetFactor=a.polygonOffsetFactor);void 0!==a.polygonOffsetUnits&&(d.polygonOffsetUnits=a.polygonOffsetUnits);void 0!==a.skinning&&(d.skinning=a.skinning);
 void 0!==a.morphTargets&&(d.morphTargets=a.morphTargets);void 0!==a.morphNormals&&(d.morphNormals=a.morphNormals);void 0!==a.dithering&&(d.dithering=a.dithering);void 0!==a.visible&&(d.visible=a.visible);void 0!==a.toneMapped&&(d.toneMapped=a.toneMapped);void 0!==a.userData&&(d.userData=a.userData);if(void 0!==a.uniforms)for(var e in a.uniforms){var f=a.uniforms[e];d.uniforms[e]={};switch(f.type){case "t":d.uniforms[e].value=b(f.value);break;case "c":d.uniforms[e].value=(new B).setHex(f.value);break;
-case "v2":d.uniforms[e].value=(new w).fromArray(f.value);break;case "v3":d.uniforms[e].value=(new n).fromArray(f.value);break;case "v4":d.uniforms[e].value=(new R).fromArray(f.value);break;case "m3":d.uniforms[e].value=(new za).fromArray(f.value);case "m4":d.uniforms[e].value=(new O).fromArray(f.value);break;default:d.uniforms[e].value=f.value}}void 0!==a.defines&&(d.defines=a.defines);void 0!==a.vertexShader&&(d.vertexShader=a.vertexShader);void 0!==a.fragmentShader&&(d.fragmentShader=a.fragmentShader);
+case "v2":d.uniforms[e].value=(new w).fromArray(f.value);break;case "v3":d.uniforms[e].value=(new n).fromArray(f.value);break;case "v4":d.uniforms[e].value=(new ia).fromArray(f.value);break;case "m3":d.uniforms[e].value=(new za).fromArray(f.value);case "m4":d.uniforms[e].value=(new O).fromArray(f.value);break;default:d.uniforms[e].value=f.value}}void 0!==a.defines&&(d.defines=a.defines);void 0!==a.vertexShader&&(d.vertexShader=a.vertexShader);void 0!==a.fragmentShader&&(d.fragmentShader=a.fragmentShader);
 if(void 0!==a.extensions)for(var g in a.extensions)d.extensions[g]=a.extensions[g];void 0!==a.shading&&(d.flatShading=1===a.shading);void 0!==a.size&&(d.size=a.size);void 0!==a.sizeAttenuation&&(d.sizeAttenuation=a.sizeAttenuation);void 0!==a.map&&(d.map=b(a.map));void 0!==a.matcap&&(d.matcap=b(a.matcap));void 0!==a.alphaMap&&(d.alphaMap=b(a.alphaMap),d.transparent=!0);void 0!==a.bumpMap&&(d.bumpMap=b(a.bumpMap));void 0!==a.bumpScale&&(d.bumpScale=a.bumpScale);void 0!==a.normalMap&&(d.normalMap=b(a.normalMap));
 void 0!==a.normalMapType&&(d.normalMapType=a.normalMapType);void 0!==a.normalScale&&(e=a.normalScale,!1===Array.isArray(e)&&(e=[e,e]),d.normalScale=(new w).fromArray(e));void 0!==a.displacementMap&&(d.displacementMap=b(a.displacementMap));void 0!==a.displacementScale&&(d.displacementScale=a.displacementScale);void 0!==a.displacementBias&&(d.displacementBias=a.displacementBias);void 0!==a.roughnessMap&&(d.roughnessMap=b(a.roughnessMap));void 0!==a.metalnessMap&&(d.metalnessMap=b(a.metalnessMap));void 0!==
 a.emissiveMap&&(d.emissiveMap=b(a.emissiveMap));void 0!==a.emissiveIntensity&&(d.emissiveIntensity=a.emissiveIntensity);void 0!==a.specularMap&&(d.specularMap=b(a.specularMap));void 0!==a.envMap&&(d.envMap=b(a.envMap));void 0!==a.envMapIntensity&&(d.envMapIntensity=a.envMapIntensity);void 0!==a.reflectivity&&(d.reflectivity=a.reflectivity);void 0!==a.refractionRatio&&(d.refractionRatio=a.refractionRatio);void 0!==a.lightMap&&(d.lightMap=b(a.lightMap));void 0!==a.lightMapIntensity&&(d.lightMapIntensity=
@@ -839,7 +839,7 @@ b=0;for(var g=a.length;b<g;b++){var h=a[b],l=h.url;if(Array.isArray(l)){e[h.uuid
 a)for(var e=0,f=a.length;e<f;e++){var g=a[e];void 0===g.image&&console.warn('THREE.ObjectLoader: No "image" specified for',g.uuid);void 0===b[g.image]&&console.warn("THREE.ObjectLoader: Undefined image",g.image);var h=Array.isArray(b[g.image])?new rb(b[g.image]):new Z(b[g.image]);h.needsUpdate=!0;h.uuid=g.uuid;void 0!==g.name&&(h.name=g.name);void 0!==g.mapping&&(h.mapping=c(g.mapping,cl));void 0!==g.offset&&h.offset.fromArray(g.offset);void 0!==g.repeat&&h.repeat.fromArray(g.repeat);void 0!==g.center&&
 h.center.fromArray(g.center);void 0!==g.rotation&&(h.rotation=g.rotation);void 0!==g.wrap&&(h.wrapS=c(g.wrap[0],aj),h.wrapT=c(g.wrap[1],aj));void 0!==g.format&&(h.format=g.format);void 0!==g.type&&(h.type=g.type);void 0!==g.encoding&&(h.encoding=g.encoding);void 0!==g.minFilter&&(h.minFilter=c(g.minFilter,bj));void 0!==g.magFilter&&(h.magFilter=c(g.magFilter,bj));void 0!==g.anisotropy&&(h.anisotropy=g.anisotropy);void 0!==g.flipY&&(h.flipY=g.flipY);void 0!==g.premultiplyAlpha&&(h.premultiplyAlpha=
 g.premultiplyAlpha);void 0!==g.unpackAlignment&&(h.unpackAlignment=g.unpackAlignment);d[g.uuid]=h}return d},parseObject:function(a,b,c){function d(a){void 0===b[a]&&console.warn("THREE.ObjectLoader: Undefined geometry",a);return b[a]}function e(a){if(void 0!==a){if(Array.isArray(a)){for(var b=[],d=0,e=a.length;d<e;d++){var f=a[d];void 0===c[f]&&console.warn("THREE.ObjectLoader: Undefined material",f);b.push(c[f])}return b}void 0===c[a]&&console.warn("THREE.ObjectLoader: Undefined material",a);return c[a]}}
-switch(a.type){case "Scene":var f=new pb;void 0!==a.background&&Number.isInteger(a.background)&&(f.background=new B(a.background));void 0!==a.fog&&("Fog"===a.fog.type?f.fog=new Se(a.fog.color,a.fog.near,a.fog.far):"FogExp2"===a.fog.type&&(f.fog=new Re(a.fog.color,a.fog.density)));break;case "PerspectiveCamera":f=new qa(a.fov,a.aspect,a.near,a.far);void 0!==a.focus&&(f.focus=a.focus);void 0!==a.zoom&&(f.zoom=a.zoom);void 0!==a.filmGauge&&(f.filmGauge=a.filmGauge);void 0!==a.filmOffset&&(f.filmOffset=
+switch(a.type){case "Scene":var f=new pb;void 0!==a.background&&Number.isInteger(a.background)&&(f.background=new B(a.background));void 0!==a.fog&&("Fog"===a.fog.type?f.fog=new Se(a.fog.color,a.fog.near,a.fog.far):"FogExp2"===a.fog.type&&(f.fog=new Re(a.fog.color,a.fog.density)));break;case "PerspectiveCamera":f=new da(a.fov,a.aspect,a.near,a.far);void 0!==a.focus&&(f.focus=a.focus);void 0!==a.zoom&&(f.zoom=a.zoom);void 0!==a.filmGauge&&(f.filmGauge=a.filmGauge);void 0!==a.filmOffset&&(f.filmOffset=
 a.filmOffset);void 0!==a.view&&(f.view=Object.assign({},a.view));break;case "OrthographicCamera":f=new hd(a.left,a.right,a.top,a.bottom,a.near,a.far);void 0!==a.zoom&&(f.zoom=a.zoom);void 0!==a.view&&(f.view=Object.assign({},a.view));break;case "AmbientLight":f=new mf(a.color,a.intensity);break;case "DirectionalLight":f=new lf(a.color,a.intensity);break;case "PointLight":f=new jf(a.color,a.intensity,a.distance,a.decay);break;case "RectAreaLight":f=new nf(a.color,a.intensity,a.width,a.height);break;
 case "SpotLight":f=new hf(a.color,a.intensity,a.distance,a.angle,a.penumbra,a.decay);break;case "HemisphereLight":f=new ff(a.color,a.groundColor,a.intensity);break;case "SkinnedMesh":console.warn("THREE.ObjectLoader.parseObject() does not support SkinnedMesh yet.");case "Mesh":f=d(a.geometry);var g=e(a.material);f=f.bones&&0<f.bones.length?new Ud(f,g):new ca(f,g);break;case "InstancedMesh":f=d(a.geometry);g=e(a.material);var h=a.instanceMatrix;f=new Ve(f,g,a.count);f.instanceMatrix=new M(new Float32Array(h.array),
 16);break;case "LOD":f=new Td;break;case "Line":f=new La(d(a.geometry),e(a.material),a.mode);break;case "LineLoop":f=new We(d(a.geometry),e(a.material));break;case "LineSegments":f=new ma(d(a.geometry),e(a.material));break;case "PointCloud":case "Points":f=new Pc(d(a.geometry),e(a.material));break;case "Sprite":f=new Rd(e(a.material));break;case "Group":f=new Mc;break;default:f=new D}f.uuid=a.uuid;void 0!==a.name&&(f.name=a.name);void 0!==a.matrix?(f.matrix.fromArray(a.matrix),void 0!==a.matrixAutoUpdate&&
@@ -933,17 +933,17 @@ for(var e=0,f=0;e<b.length;e++){var g=b[e];g.parent&&g.parent.isBone&&(Xf.multip
 ld.prototype.update=function(){void 0!==this.color?this.material.color.set(this.color):this.material.color.copy(this.light.color)};var nl=new n,jj=new B,kj=new B;md.prototype=Object.create(D.prototype);md.prototype.constructor=md;md.prototype.dispose=function(){this.children[0].geometry.dispose();this.children[0].material.dispose()};md.prototype.update=function(){var a=this.children[0];if(void 0!==this.color)this.material.color.set(this.color);else{var b=a.geometry.getAttribute("color");jj.copy(this.light.color);
 kj.copy(this.light.groundColor);for(var c=0,d=b.count;c<d;c++){var e=c<d/2?jj:kj;b.setXYZ(c,e.r,e.g,e.b)}b.needsUpdate=!0}a.lookAt(nl.setFromMatrixPosition(this.light.matrixWorld).negate())};wf.prototype=Object.assign(Object.create(ma.prototype),{constructor:wf,copy:function(a){ma.prototype.copy.call(this,a);this.geometry.copy(a.geometry);this.material.copy(a.material);return this},clone:function(){return(new this.constructor).copy(this)}});xf.prototype=Object.create(ma.prototype);xf.prototype.constructor=
 xf;var lj=new n,Yf=new n,mj=new n;nd.prototype=Object.create(D.prototype);nd.prototype.constructor=nd;nd.prototype.dispose=function(){this.lightPlane.geometry.dispose();this.lightPlane.material.dispose();this.targetLine.geometry.dispose();this.targetLine.material.dispose()};nd.prototype.update=function(){lj.setFromMatrixPosition(this.light.matrixWorld);Yf.setFromMatrixPosition(this.light.target.matrixWorld);mj.subVectors(Yf,lj);this.lightPlane.lookAt(Yf);void 0!==this.color?(this.lightPlane.material.color.set(this.color),
-this.targetLine.material.color.set(this.color)):(this.lightPlane.material.color.copy(this.light.color),this.targetLine.material.color.copy(this.light.color));this.targetLine.lookAt(Yf);this.targetLine.scale.z=mj.length()};var yf=new n,ea=new eb;ve.prototype=Object.create(ma.prototype);ve.prototype.constructor=ve;ve.prototype.update=function(){var a=this.geometry,b=this.pointMap;ea.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse);ia("c",b,a,ea,0,0,-1);ia("t",b,a,ea,0,0,1);ia("n1",
-b,a,ea,-1,-1,-1);ia("n2",b,a,ea,1,-1,-1);ia("n3",b,a,ea,-1,1,-1);ia("n4",b,a,ea,1,1,-1);ia("f1",b,a,ea,-1,-1,1);ia("f2",b,a,ea,1,-1,1);ia("f3",b,a,ea,-1,1,1);ia("f4",b,a,ea,1,1,1);ia("u1",b,a,ea,.7,1.1,-1);ia("u2",b,a,ea,-.7,1.1,-1);ia("u3",b,a,ea,0,2,-1);ia("cf1",b,a,ea,-1,0,1);ia("cf2",b,a,ea,1,0,1);ia("cf3",b,a,ea,0,-1,1);ia("cf4",b,a,ea,0,1,1);ia("cn1",b,a,ea,-1,0,-1);ia("cn2",b,a,ea,1,0,-1);ia("cn3",b,a,ea,0,-1,-1);ia("cn4",b,a,ea,0,1,-1);a.getAttribute("position").needsUpdate=!0};var Zf=new Ta;
-xb.prototype=Object.create(ma.prototype);xb.prototype.constructor=xb;xb.prototype.update=function(a){void 0!==a&&console.warn("THREE.BoxHelper: .update() has no longer arguments.");void 0!==this.object&&Zf.setFromObject(this.object);if(!Zf.isEmpty()){a=Zf.min;var b=Zf.max,c=this.geometry.attributes.position,d=c.array;d[0]=b.x;d[1]=b.y;d[2]=b.z;d[3]=a.x;d[4]=b.y;d[5]=b.z;d[6]=a.x;d[7]=a.y;d[8]=b.z;d[9]=b.x;d[10]=a.y;d[11]=b.z;d[12]=b.x;d[13]=b.y;d[14]=a.z;d[15]=a.x;d[16]=b.y;d[17]=a.z;d[18]=a.x;d[19]=
-a.y;d[20]=a.z;d[21]=b.x;d[22]=a.y;d[23]=a.z;c.needsUpdate=!0;this.geometry.computeBoundingSphere()}};xb.prototype.setFromObject=function(a){this.object=a;this.update();return this};xb.prototype.copy=function(a){ma.prototype.copy.call(this,a);this.object=a.object;return this};xb.prototype.clone=function(){return(new this.constructor).copy(this)};we.prototype=Object.create(ma.prototype);we.prototype.constructor=we;we.prototype.updateMatrixWorld=function(a){var b=this.box;b.isEmpty()||(b.getCenter(this.position),
-b.getSize(this.scale),this.scale.multiplyScalar(.5),D.prototype.updateMatrixWorld.call(this,a))};xe.prototype=Object.create(La.prototype);xe.prototype.constructor=xe;xe.prototype.updateMatrixWorld=function(a){var b=-this.plane.constant;1E-8>Math.abs(b)&&(b=1E-8);this.scale.set(.5*this.size,.5*this.size,b);this.children[0].material.side=0>b?1:0;this.lookAt(this.plane.normal);D.prototype.updateMatrixWorld.call(this,a)};var nj=new n,zf,Tg;yb.prototype=Object.create(D.prototype);yb.prototype.constructor=
-yb;yb.prototype.setDirection=function(a){.99999<a.y?this.quaternion.set(0,0,0,1):-.99999>a.y?this.quaternion.set(1,0,0,0):(nj.set(a.z,0,-a.x).normalize(),this.quaternion.setFromAxisAngle(nj,Math.acos(a.y)))};yb.prototype.setLength=function(a,b,c){void 0===b&&(b=.2*a);void 0===c&&(c=.2*b);this.line.scale.set(1,Math.max(1E-4,a-b),1);this.line.updateMatrix();this.cone.scale.set(c,b,c);this.cone.position.y=a;this.cone.updateMatrix()};yb.prototype.setColor=function(a){this.line.material.color.set(a);this.cone.material.color.set(a)};
-yb.prototype.copy=function(a){D.prototype.copy.call(this,a,!1);this.line.copy(a.line);this.cone.copy(a.cone);return this};yb.prototype.clone=function(){return(new this.constructor).copy(this)};ye.prototype=Object.create(ma.prototype);ye.prototype.constructor=ye;var lb=Math.pow(2,8),oj=[.125,.215,.35,.446,.526,.582],yi=5+oj.length,mb={3E3:0,3001:1,3002:2,3004:3,3005:4,3006:5,3007:6},Xg=new hd,Af=function(a){var b=new Float32Array(a),c=new n(0,1,0);a=new vb({defines:{n:a},uniforms:{envMap:{value:null},
-samples:{value:1},weights:{value:b},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:c},inputEncoding:{value:mb[3E3]},outputEncoding:{value:mb[3E3]}},vertexShader:Zg(),fragmentShader:"\nprecision mediump float;\nprecision mediump int;\nvarying vec3 vOutputDirection;\nuniform sampler2D envMap;\nuniform int samples;\nuniform float weights[n];\nuniform bool latitudinal;\nuniform float dTheta;\nuniform float mipInt;\nuniform vec3 poleAxis;\n\n"+$g()+"\n\n#define ENVMAP_TYPE_CUBE_UV\n#include <cube_uv_reflection_fragment>\n\nvoid main() {\n\tgl_FragColor = vec4(0.0);\n\tfor (int i = 0; i < n; i++) {\n\t\tif (i >= samples)\n\t\t\tbreak;\n\t\tfor (int dir = -1; dir < 2; dir += 2) {\n\t\t\tif (i == 0 && dir == 1)\n\t\t\t\tcontinue;\n\t\t\tvec3 axis = latitudinal ? poleAxis : cross(poleAxis, vOutputDirection);\n\t\t\tif (all(equal(axis, vec3(0.0))))\n\t\t\t\taxis = cross(vec3(0.0, 1.0, 0.0), vOutputDirection);\n\t\t\taxis = normalize(axis);\n\t\t\tfloat theta = dTheta * float(dir * i);\n\t\t\tfloat cosTheta = cos(theta);\n\t\t\t// Rodrigues' axis-angle rotation\n\t\t\tvec3 sampleDirection = vOutputDirection * cosTheta\n\t\t\t\t\t+ cross(axis, vOutputDirection) * sin(theta)\n\t\t\t\t\t+ axis * dot(axis, vOutputDirection) * (1.0 - cosTheta);\n\t\t\tgl_FragColor.rgb +=\n\t\t\t\t\tweights[i] * bilinearCubeUV(envMap, sampleDirection, mipInt);\n\t\t}\n\t}\n\tgl_FragColor = linearToOutputTexel(gl_FragColor);\n}\n\t\t",
+this.targetLine.material.color.set(this.color)):(this.lightPlane.material.color.copy(this.light.color),this.targetLine.material.color.copy(this.light.color));this.targetLine.lookAt(Yf);this.targetLine.scale.z=mj.length()};var yf=new n,R=new eb;ve.prototype=Object.create(ma.prototype);ve.prototype.constructor=ve;ve.prototype.update=function(){var a=this.geometry,b=this.pointMap;R.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse);na("c",b,a,R,0,0,-1);na("t",b,a,R,0,0,1);na("n1",b,a,
+R,-1,-1,-1);na("n2",b,a,R,1,-1,-1);na("n3",b,a,R,-1,1,-1);na("n4",b,a,R,1,1,-1);na("f1",b,a,R,-1,-1,1);na("f2",b,a,R,1,-1,1);na("f3",b,a,R,-1,1,1);na("f4",b,a,R,1,1,1);na("u1",b,a,R,.7,1.1,-1);na("u2",b,a,R,-.7,1.1,-1);na("u3",b,a,R,0,2,-1);na("cf1",b,a,R,-1,0,1);na("cf2",b,a,R,1,0,1);na("cf3",b,a,R,0,-1,1);na("cf4",b,a,R,0,1,1);na("cn1",b,a,R,-1,0,-1);na("cn2",b,a,R,1,0,-1);na("cn3",b,a,R,0,-1,-1);na("cn4",b,a,R,0,1,-1);a.getAttribute("position").needsUpdate=!0};var Zf=new Ta;xb.prototype=Object.create(ma.prototype);
+xb.prototype.constructor=xb;xb.prototype.update=function(a){void 0!==a&&console.warn("THREE.BoxHelper: .update() has no longer arguments.");void 0!==this.object&&Zf.setFromObject(this.object);if(!Zf.isEmpty()){a=Zf.min;var b=Zf.max,c=this.geometry.attributes.position,d=c.array;d[0]=b.x;d[1]=b.y;d[2]=b.z;d[3]=a.x;d[4]=b.y;d[5]=b.z;d[6]=a.x;d[7]=a.y;d[8]=b.z;d[9]=b.x;d[10]=a.y;d[11]=b.z;d[12]=b.x;d[13]=b.y;d[14]=a.z;d[15]=a.x;d[16]=b.y;d[17]=a.z;d[18]=a.x;d[19]=a.y;d[20]=a.z;d[21]=b.x;d[22]=a.y;d[23]=
+a.z;c.needsUpdate=!0;this.geometry.computeBoundingSphere()}};xb.prototype.setFromObject=function(a){this.object=a;this.update();return this};xb.prototype.copy=function(a){ma.prototype.copy.call(this,a);this.object=a.object;return this};xb.prototype.clone=function(){return(new this.constructor).copy(this)};we.prototype=Object.create(ma.prototype);we.prototype.constructor=we;we.prototype.updateMatrixWorld=function(a){var b=this.box;b.isEmpty()||(b.getCenter(this.position),b.getSize(this.scale),this.scale.multiplyScalar(.5),
+D.prototype.updateMatrixWorld.call(this,a))};xe.prototype=Object.create(La.prototype);xe.prototype.constructor=xe;xe.prototype.updateMatrixWorld=function(a){var b=-this.plane.constant;1E-8>Math.abs(b)&&(b=1E-8);this.scale.set(.5*this.size,.5*this.size,b);this.children[0].material.side=0>b?1:0;this.lookAt(this.plane.normal);D.prototype.updateMatrixWorld.call(this,a)};var nj=new n,zf,Tg;yb.prototype=Object.create(D.prototype);yb.prototype.constructor=yb;yb.prototype.setDirection=function(a){.99999<
+a.y?this.quaternion.set(0,0,0,1):-.99999>a.y?this.quaternion.set(1,0,0,0):(nj.set(a.z,0,-a.x).normalize(),this.quaternion.setFromAxisAngle(nj,Math.acos(a.y)))};yb.prototype.setLength=function(a,b,c){void 0===b&&(b=.2*a);void 0===c&&(c=.2*b);this.line.scale.set(1,Math.max(1E-4,a-b),1);this.line.updateMatrix();this.cone.scale.set(c,b,c);this.cone.position.y=a;this.cone.updateMatrix()};yb.prototype.setColor=function(a){this.line.material.color.set(a);this.cone.material.color.set(a)};yb.prototype.copy=
+function(a){D.prototype.copy.call(this,a,!1);this.line.copy(a.line);this.cone.copy(a.cone);return this};yb.prototype.clone=function(){return(new this.constructor).copy(this)};ye.prototype=Object.create(ma.prototype);ye.prototype.constructor=ye;var lb=Math.pow(2,8),oj=[.125,.215,.35,.446,.526,.582],yi=5+oj.length,mb={3E3:0,3001:1,3002:2,3004:3,3005:4,3006:5,3007:6},Xg=new hd,Af=function(a){var b=new Float32Array(a),c=new n(0,1,0);a=new vb({defines:{n:a},uniforms:{envMap:{value:null},samples:{value:1},
+weights:{value:b},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:c},inputEncoding:{value:mb[3E3]},outputEncoding:{value:mb[3E3]}},vertexShader:Zg(),fragmentShader:"\nprecision mediump float;\nprecision mediump int;\nvarying vec3 vOutputDirection;\nuniform sampler2D envMap;\nuniform int samples;\nuniform float weights[n];\nuniform bool latitudinal;\nuniform float dTheta;\nuniform float mipInt;\nuniform vec3 poleAxis;\n\n"+$g()+"\n\n#define ENVMAP_TYPE_CUBE_UV\n#include <cube_uv_reflection_fragment>\n\nvoid main() {\n\tgl_FragColor = vec4(0.0);\n\tfor (int i = 0; i < n; i++) {\n\t\tif (i >= samples)\n\t\t\tbreak;\n\t\tfor (int dir = -1; dir < 2; dir += 2) {\n\t\t\tif (i == 0 && dir == 1)\n\t\t\t\tcontinue;\n\t\t\tvec3 axis = latitudinal ? poleAxis : cross(poleAxis, vOutputDirection);\n\t\t\tif (all(equal(axis, vec3(0.0))))\n\t\t\t\taxis = cross(vec3(0.0, 1.0, 0.0), vOutputDirection);\n\t\t\taxis = normalize(axis);\n\t\t\tfloat theta = dTheta * float(dir * i);\n\t\t\tfloat cosTheta = cos(theta);\n\t\t\t// Rodrigues' axis-angle rotation\n\t\t\tvec3 sampleDirection = vOutputDirection * cosTheta\n\t\t\t\t\t+ cross(axis, vOutputDirection) * sin(theta)\n\t\t\t\t\t+ axis * dot(axis, vOutputDirection) * (1.0 - cosTheta);\n\t\t\tgl_FragColor.rgb +=\n\t\t\t\t\tweights[i] * bilinearCubeUV(envMap, sampleDirection, mipInt);\n\t\t}\n\t}\n\tgl_FragColor = linearToOutputTexel(gl_FragColor);\n}\n\t\t",
 blending:0,depthTest:!1,depthWrite:!1});a.type="SphericalGaussianBlur";return a}(20),Sb=null,Tb=null,wh=function(){for(var a=[],b=[],c=[],d=8,e=0;e<yi;e++){var f=Math.pow(2,d);b.push(f);var g=1/f;4<e?g=oj[e-8+4-1]:0==e&&(g=0);c.push(g);g=1/(f-1);f=-g/2;g=1+g/2;var h=[f,f,g,f,g,g,f,f,g,g,f,g];f=new Float32Array(108);g=new Float32Array(72);for(var l=new Float32Array(36),m=0;6>m;m++){var n=m%3*2/3-1,p=2<m?0:-1;f.set([n,p,0,n+2/3,p,0,n+2/3,p+1,0,n,p,0,n+2/3,p+1,0,n,p+1,0],18*m);g.set(h,12*m);l.set([m,
 m,m,m,m,m],6*m)}h=new A;h.setAttribute("position",new M(f,3));h.setAttribute("uv",new M(g,2));h.setAttribute("faceIndex",new M(l,1));a.push(h);4<d&&d--}return{_lodPlanes:a,_sizeLods:b,_sigmas:c}}(),ze=wh._lodPlanes,Ci=wh._sizeLods,Cf=wh._sigmas,Bf=null,Y=null,Wg=null,Ac=(1+Math.sqrt(5))/2,Bd=1/Ac,Ai=[new n(1,1,1),new n(-1,1,1),new n(1,1,-1),new n(-1,1,-1),new n(0,Ac,Bd),new n(0,Ac,-Bd),new n(Bd,0,Ac),new n(-Bd,0,Ac),new n(Ac,Bd,0),new n(-Ac,Bd,0)];Ug.prototype={constructor:Ug,fromScene:function(a,
-b,c,d){void 0===b&&(b=0);void 0===c&&(c=.1);void 0===d&&(d=100);Wg=Y.getRenderTarget();var e=ui();c=new qa(90,1,c,d);d=[1,1,1,1,-1,1];var f=[1,1,-1,-1,-1,1],g=Y.outputEncoding,h=Y.toneMapping,l=Y.toneMappingExposure,m=Y.getClearColor(),n=Y.getClearAlpha();Y.toneMapping=1;Y.toneMappingExposure=1;Y.outputEncoding=3E3;a.scale.z*=-1;var p=a.background;if(p&&p.isColor){p.convertSRGBToLinear();var q=Math.min(Math.max(Math.ceil(Math.log2(Math.max(p.r,p.g,p.b))),-128),127);p=p.multiplyScalar(Math.pow(2,-q));
+b,c,d){void 0===b&&(b=0);void 0===c&&(c=.1);void 0===d&&(d=100);Wg=Y.getRenderTarget();var e=ui();c=new da(90,1,c,d);d=[1,1,1,1,-1,1];var f=[1,1,-1,-1,-1,1],g=Y.outputEncoding,h=Y.toneMapping,l=Y.toneMappingExposure,m=Y.getClearColor(),n=Y.getClearAlpha();Y.toneMapping=1;Y.toneMappingExposure=1;Y.outputEncoding=3E3;a.scale.z*=-1;var p=a.background;if(p&&p.isColor){p.convertSRGBToLinear();var q=Math.min(Math.max(Math.ceil(Math.log2(Math.max(p.r,p.g,p.b))),-128),127);p=p.multiplyScalar(Math.pow(2,-q));
 Y.setClearColor(p,(q+128)/255);a.background=null}for(p=0;6>p;p++)q=p%3,0==q?(c.up.set(0,d[p],0),c.lookAt(f[p],0,0)):1==q?(c.up.set(0,0,d[p]),c.lookAt(0,f[p],0)):(c.up.set(0,d[p],0),c.lookAt(0,0,f[p])),Yg(e,q*lb,2<p?lb:0,lb,lb),Y.setRenderTarget(e),Y.render(a,c);Y.toneMapping=h;Y.toneMappingExposure=l;Y.outputEncoding=g;Y.setClearColor(m,n);a.scale.z*=-1;0<b&&zi(e,0,0,b);xi(e);wi(e);return e},fromEquirectangular:function(a){a.magFilter=1003;a.minFilter=1003;a.generateMipmaps=!1;return this.fromCubemap(a)},
 fromCubemap:function(a){Wg=Y.getRenderTarget();var b=ui(a),c=new pb;a.isCubeTexture?null==Tb&&(Tb=Ei()):null==Sb&&(Sb=Di());var d=a.isCubeTexture?Tb:Sb;c.add(new ca(ze[0],d));d=d.uniforms;d.envMap.value=a;a.isCubeTexture||d.texelSize.value.set(1/a.image.width,1/a.image.height);d.inputEncoding.value=mb[a.encoding];d.outputEncoding.value=mb[a.encoding];Yg(b,0,0,3*lb,2*lb);Y.setRenderTarget(b);Y.render(c,Xg);xi(b);wi(b);return b},compileCubemapShader:function(){null==Tb&&(Tb=Ei(),Vg(Tb))},compileEquirectangularShader:function(){null==
 Sb&&(Sb=Di(),Vg(Sb))},dispose:function(){Af.dispose();null!=Tb&&Tb.dispose();null!=Sb&&Sb.dispose();for(var a=0;a<ze.length;a++)ze[a].dispose()}};I.create=function(a,b){console.log("THREE.Curve.create() has been deprecated");a.prototype=Object.create(I.prototype);a.prototype.constructor=a;a.prototype.getPoint=b;return a};Object.assign(wb.prototype,{createPointsGeometry:function(a){console.warn("THREE.CurvePath: .createPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");
@@ -961,20 +961,20 @@ return this.makeRotationFromQuaternion(a)},multiplyToArray:function(){console.wa
 rotateAxis:function(a){console.warn("THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead.");a.transformDirection(this)},crossVector:function(a){console.warn("THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead.");return a.applyMatrix4(this)},translate:function(){console.error("THREE.Matrix4: .translate() has been removed.")},rotateX:function(){console.error("THREE.Matrix4: .rotateX() has been removed.")},rotateY:function(){console.error("THREE.Matrix4: .rotateY() has been removed.")},
 rotateZ:function(){console.error("THREE.Matrix4: .rotateZ() has been removed.")},rotateByAxis:function(){console.error("THREE.Matrix4: .rotateByAxis() has been removed.")},applyToBufferAttribute:function(a){console.warn("THREE.Matrix4: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix4( matrix ) instead.");return a.applyMatrix4(this)},applyToVector3Array:function(){console.error("THREE.Matrix4: .applyToVector3Array() has been removed.")},makeFrustum:function(a,b,c,d,e,f){console.warn("THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead.");
 return this.makePerspective(a,b,d,c,e,f)}});Ua.prototype.isIntersectionLine=function(a){console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine().");return this.intersectsLine(a)};Da.prototype.multiplyVector3=function(a){console.warn("THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead.");return a.applyQuaternion(this)};Object.assign(Wb.prototype,{isIntersectionBox:function(a){console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox().");
-return this.intersectsBox(a)},isIntersectionPlane:function(a){console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane().");return this.intersectsPlane(a)},isIntersectionSphere:function(a){console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere().");return this.intersectsSphere(a)}});Object.assign(na.prototype,{area:function(){console.warn("THREE.Triangle: .area() has been renamed to .getArea().");return this.getArea()},barycoordFromPoint:function(a,
-b){console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord().");return this.getBarycoord(a,b)},midpoint:function(a){console.warn("THREE.Triangle: .midpoint() has been renamed to .getMidpoint().");return this.getMidpoint(a)},normal:function(a){console.warn("THREE.Triangle: .normal() has been renamed to .getNormal().");return this.getNormal(a)},plane:function(a){console.warn("THREE.Triangle: .plane() has been renamed to .getPlane().");return this.getPlane(a)}});Object.assign(na,
-{barycoordFromPoint:function(a,b,c,d,e){console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord().");return na.getBarycoord(a,b,c,d,e)},normal:function(a,b,c,d){console.warn("THREE.Triangle: .normal() has been renamed to .getNormal().");return na.getNormal(a,b,c,d)}});Object.assign(Lb.prototype,{extractAllPoints:function(a){console.warn("THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead.");return this.extractPoints(a)},extrude:function(a){console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead.");
+return this.intersectsBox(a)},isIntersectionPlane:function(a){console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane().");return this.intersectsPlane(a)},isIntersectionSphere:function(a){console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere().");return this.intersectsSphere(a)}});Object.assign(oa.prototype,{area:function(){console.warn("THREE.Triangle: .area() has been renamed to .getArea().");return this.getArea()},barycoordFromPoint:function(a,
+b){console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord().");return this.getBarycoord(a,b)},midpoint:function(a){console.warn("THREE.Triangle: .midpoint() has been renamed to .getMidpoint().");return this.getMidpoint(a)},normal:function(a){console.warn("THREE.Triangle: .normal() has been renamed to .getNormal().");return this.getNormal(a)},plane:function(a){console.warn("THREE.Triangle: .plane() has been renamed to .getPlane().");return this.getPlane(a)}});Object.assign(oa,
+{barycoordFromPoint:function(a,b,c,d,e){console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord().");return oa.getBarycoord(a,b,c,d,e)},normal:function(a,b,c,d){console.warn("THREE.Triangle: .normal() has been renamed to .getNormal().");return oa.getNormal(a,b,c,d)}});Object.assign(Lb.prototype,{extractAllPoints:function(a){console.warn("THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead.");return this.extractPoints(a)},extrude:function(a){console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead.");
 return new gc(this,a)},makeGeometry:function(a){console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead.");return new ic(this,a)}});Object.assign(w.prototype,{fromAttribute:function(a,b,c){console.warn("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute().");return this.fromBufferAttribute(a,b,c)},distanceToManhattan:function(a){console.warn("THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo().");return this.manhattanDistanceTo(a)},
 lengthManhattan:function(){console.warn("THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength().");return this.manhattanLength()}});Object.assign(n.prototype,{setEulerFromRotationMatrix:function(){console.error("THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.")},setEulerFromQuaternion:function(){console.error("THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.")},getPositionFromMatrix:function(a){console.warn("THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition().");
 return this.setFromMatrixPosition(a)},getScaleFromMatrix:function(a){console.warn("THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale().");return this.setFromMatrixScale(a)},getColumnFromMatrix:function(a,b){console.warn("THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn().");return this.setFromMatrixColumn(b,a)},applyProjection:function(a){console.warn("THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead.");return this.applyMatrix4(a)},
-fromAttribute:function(a,b,c){console.warn("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute().");return this.fromBufferAttribute(a,b,c)},distanceToManhattan:function(a){console.warn("THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo().");return this.manhattanDistanceTo(a)},lengthManhattan:function(){console.warn("THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength().");return this.manhattanLength()}});Object.assign(R.prototype,
+fromAttribute:function(a,b,c){console.warn("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute().");return this.fromBufferAttribute(a,b,c)},distanceToManhattan:function(a){console.warn("THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo().");return this.manhattanDistanceTo(a)},lengthManhattan:function(){console.warn("THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength().");return this.manhattanLength()}});Object.assign(ia.prototype,
 {fromAttribute:function(a,b,c){console.warn("THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute().");return this.fromBufferAttribute(a,b,c)},lengthManhattan:function(){console.warn("THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength().");return this.manhattanLength()}});Object.assign(L.prototype,{computeTangents:function(){console.error("THREE.Geometry: .computeTangents() has been removed.")},computeLineDistances:function(){console.error("THREE.Geometry: .computeLineDistances() has been removed. Use THREE.Line.computeLineDistances() instead.")},
 applyMatrix:function(a){console.warn("THREE.Geometry: .applyMatrix() has been renamed to .applyMatrix4().");return this.applyMatrix4(a)}});Object.assign(D.prototype,{getChildByName:function(a){console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName().");return this.getObjectByName(a)},renderDepth:function(){console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")},translate:function(a,b){console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead.");
 return this.translateOnAxis(b,a)},getWorldRotation:function(){console.error("THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.")},applyMatrix:function(a){console.warn("THREE.Object3D: .applyMatrix() has been renamed to .applyMatrix4().");return this.applyMatrix4(a)}});Object.defineProperties(D.prototype,{eulerOrder:{get:function(){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order.");return this.rotation.order},set:function(a){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order.");
 this.rotation.order=a}},useQuaternion:{get:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")},set:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")}}});Object.assign(ca.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(ca.prototype,{drawMode:{get:function(){console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode.");return 0},set:function(){console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.")}}});Object.defineProperties(Td.prototype,{objects:{get:function(){console.warn("THREE.LOD: .objects has been renamed to .levels.");
 return this.levels}}});Object.defineProperty(Ue.prototype,"useVertexTexture",{get:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")},set:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")}});Ud.prototype.initBones=function(){console.error("THREE.SkinnedMesh: initBones() has been removed.")};Object.defineProperty(I.prototype,"__arcLengthDivisions",{get:function(){console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions.");return this.arcLengthDivisions},
-set:function(a){console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions.");this.arcLengthDivisions=a}});qa.prototype.setLens=function(a,b){console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup.");void 0!==b&&(this.filmGauge=b);this.setFocalLength(a)};Object.defineProperties(ba.prototype,{onlyShadow:{set:function(){console.warn("THREE.Light: .onlyShadow has been removed.")}},shadowCameraFov:{set:function(a){console.warn("THREE.Light: .shadowCameraFov is now .shadow.camera.fov.");
+set:function(a){console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions.");this.arcLengthDivisions=a}});da.prototype.setLens=function(a,b){console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup.");void 0!==b&&(this.filmGauge=b);this.setFocalLength(a)};Object.defineProperties(ba.prototype,{onlyShadow:{set:function(){console.warn("THREE.Light: .onlyShadow has been removed.")}},shadowCameraFov:{set:function(a){console.warn("THREE.Light: .shadowCameraFov is now .shadow.camera.fov.");
 this.shadow.camera.fov=a}},shadowCameraLeft:{set:function(a){console.warn("THREE.Light: .shadowCameraLeft is now .shadow.camera.left.");this.shadow.camera.left=a}},shadowCameraRight:{set:function(a){console.warn("THREE.Light: .shadowCameraRight is now .shadow.camera.right.");this.shadow.camera.right=a}},shadowCameraTop:{set:function(a){console.warn("THREE.Light: .shadowCameraTop is now .shadow.camera.top.");this.shadow.camera.top=a}},shadowCameraBottom:{set:function(a){console.warn("THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom.");
 this.shadow.camera.bottom=a}},shadowCameraNear:{set:function(a){console.warn("THREE.Light: .shadowCameraNear is now .shadow.camera.near.");this.shadow.camera.near=a}},shadowCameraFar:{set:function(a){console.warn("THREE.Light: .shadowCameraFar is now .shadow.camera.far.");this.shadow.camera.far=a}},shadowCameraVisible:{set:function(){console.warn("THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.")}},shadowBias:{set:function(a){console.warn("THREE.Light: .shadowBias is now .shadow.bias.");
 this.shadow.bias=a}},shadowDarkness:{set:function(){console.warn("THREE.Light: .shadowDarkness has been removed.")}},shadowMapWidth:{set:function(a){console.warn("THREE.Light: .shadowMapWidth is now .shadow.mapSize.width.");this.shadow.mapSize.width=a}},shadowMapHeight:{set:function(a){console.warn("THREE.Light: .shadowMapHeight is now .shadow.mapSize.height.");this.shadow.mapSize.height=a}}});Object.defineProperties(M.prototype,{length:{get:function(){console.warn("THREE.BufferAttribute: .length has been deprecated. Use .count instead.");
@@ -987,7 +987,7 @@ this.setUsage(a)}}});Object.assign(sb.prototype,{setDynamic:function(a){console.
 addShapeList:function(){console.error("THREE.ExtrudeBufferGeometry: .addShapeList() has been removed.")},addShape:function(){console.error("THREE.ExtrudeBufferGeometry: .addShape() has been removed.")}});Object.defineProperties(vf.prototype,{dynamic:{set:function(){console.warn("THREE.Uniform: .dynamic has been removed. Use object.onBeforeRender() instead.")}},onUpdate:{value:function(){console.warn("THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead.");return this}}});
 Object.defineProperties(K.prototype,{wrapAround:{get:function(){console.warn("THREE.Material: .wrapAround has been removed.")},set:function(){console.warn("THREE.Material: .wrapAround has been removed.")}},overdraw:{get:function(){console.warn("THREE.Material: .overdraw has been removed.")},set:function(){console.warn("THREE.Material: .overdraw has been removed.")}},wrapRGB:{get:function(){console.warn("THREE.Material: .wrapRGB has been removed.");return new B}},shading:{get:function(){console.error("THREE."+
 this.type+": .shading has been removed. Use the boolean .flatShading instead.")},set:function(a){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead.");this.flatShading=1===a}},stencilMask:{get:function(){console.warn("THREE."+this.type+": .stencilMask has been removed. Use .stencilFuncMask instead.");return this.stencilFuncMask},set:function(a){console.warn("THREE."+this.type+": .stencilMask has been removed. Use .stencilFuncMask instead.");this.stencilFuncMask=
-a}}});Object.defineProperties(Kb.prototype,{metal:{get:function(){console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead.");return!1},set:function(){console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead")}}});Object.defineProperties(pa.prototype,{derivatives:{get:function(){console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives.");return this.extensions.derivatives},
+a}}});Object.defineProperties(Kb.prototype,{metal:{get:function(){console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead.");return!1},set:function(){console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead")}}});Object.defineProperties(qa.prototype,{derivatives:{get:function(){console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives.");return this.extensions.derivatives},
 set:function(a){console.warn("THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives.");this.extensions.derivatives=a}}});Object.assign(qg.prototype,{clearTarget:function(a,b,c,d){console.warn("THREE.WebGLRenderer: .clearTarget() has been deprecated. Use .setRenderTarget() and .clear() instead.");this.setRenderTarget(a);this.clear(b,c,d)},animate:function(a){console.warn("THREE.WebGLRenderer: .animate() is now .setAnimationLoop().");this.setAnimationLoop(a)},getCurrentRenderTarget:function(){console.warn("THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget().");
 return this.getRenderTarget()},getMaxAnisotropy:function(){console.warn("THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy().");return this.capabilities.getMaxAnisotropy()},getPrecision:function(){console.warn("THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision.");return this.capabilities.precision},resetGLState:function(){console.warn("THREE.WebGLRenderer: .resetGLState() is now .state.reset().");return this.state.reset()},supportsFloatTextures:function(){console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( 'OES_texture_float' ).");
 return this.extensions.get("OES_texture_float")},supportsHalfFloatTextures:function(){console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( 'OES_texture_half_float' ).");return this.extensions.get("OES_texture_half_float")},supportsStandardDerivatives:function(){console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( 'OES_standard_derivatives' ).");return this.extensions.get("OES_standard_derivatives")},supportsCompressedTextureS3TC:function(){console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( 'WEBGL_compressed_texture_s3tc' ).");
@@ -1006,7 +1006,7 @@ this.texture.repeat=a}},format:{get:function(){console.warn("THREE.WebGLRenderTa
 return this.texture.generateMipmaps},set:function(a){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps.");this.texture.generateMipmaps=a}}});Object.defineProperties(id.prototype,{load:{value:function(a){console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.");var b=this;(new tf).load(a,function(a){b.setBuffer(a)});return this}},startTime:{set:function(){console.warn("THREE.Audio: .startTime is now .play( delay ).")}}});Mg.prototype.getData=
 function(){console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData().");return this.getFrequencyData()};Gc.prototype.updateCubeMap=function(a,b){console.warn("THREE.CubeCamera: .updateCubeMap() is now .update().");return this.update(a,b)};Mb.crossOrigin=void 0;Mb.loadTexture=function(a,b,c,d){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");var e=new ef;e.setCrossOrigin(this.crossOrigin);a=e.load(a,c,void 0,d);b&&(a.mapping=b);return a};
 Mb.loadTextureCube=function(a,b,c,d){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");var e=new df;e.setCrossOrigin(this.crossOrigin);a=e.load(a,c,void 0,d);b&&(a.mapping=b);return a};Mb.loadCompressedTexture=function(){console.error("THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.")};Mb.loadCompressedTextureCube=function(){console.error("THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.")};
-"undefined"!==typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:"113dev"}}));h.ACESFilmicToneMapping=5;h.AddEquation=100;h.AddOperation=2;h.AdditiveBlending=2;h.AlphaFormat=1021;h.AlwaysDepth=1;h.AlwaysStencilFunc=519;h.AmbientLight=mf;h.AmbientLightProbe=Hg;h.AnimationClip=Ra;h.AnimationLoader=yg;h.AnimationMixer=Og;h.AnimationObjectGroup=ni;h.AnimationUtils=da;h.ArcCurve=gd;h.ArrayCamera=Qe;h.ArrowHelper=yb;h.Audio=id;h.AudioAnalyser=Mg;h.AudioContext=
+"undefined"!==typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:"113dev"}}));h.ACESFilmicToneMapping=5;h.AddEquation=100;h.AddOperation=2;h.AdditiveBlending=2;h.AlphaFormat=1021;h.AlwaysDepth=1;h.AlwaysStencilFunc=519;h.AmbientLight=mf;h.AmbientLightProbe=Hg;h.AnimationClip=Ra;h.AnimationLoader=yg;h.AnimationMixer=Og;h.AnimationObjectGroup=ni;h.AnimationUtils=ea;h.ArcCurve=gd;h.ArrayCamera=Qe;h.ArrowHelper=yb;h.Audio=id;h.AudioAnalyser=Mg;h.AudioContext=
 Kg;h.AudioListener=Jg;h.AudioLoader=tf;h.AxesHelper=ye;h.AxisHelper=function(a){console.warn("THREE.AxisHelper has been renamed to THREE.AxesHelper.");return new ye(a)};h.BackSide=1;h.BasicDepthPacking=3200;h.BasicShadowMap=0;h.BinaryTextureLoader=function(a){console.warn("THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader.");return new cf(a)};h.Bone=rg;h.BooleanKeyframeTrack=Ze;h.BoundingBoxHelper=function(a,b){console.warn("THREE.BoundingBoxHelper has been deprecated. Creating a THREE.BoxHelper instead.");
 return new xb(a,b)};h.Box2=Rg;h.Box3=Ta;h.Box3Helper=we;h.BoxBufferGeometry=Kd;h.BoxGeometry=nh;h.BoxHelper=xb;h.BufferAttribute=M;h.BufferGeometry=A;h.BufferGeometryLoader=rf;h.ByteType=1010;h.Cache=vc;h.Camera=eb;h.CameraHelper=ve;h.CanvasRenderer=function(){console.error("THREE.CanvasRenderer has been removed")};h.CanvasTexture=Vd;h.CatmullRomCurve3=Aa;h.CineonToneMapping=4;h.CircleBufferGeometry=cd;h.CircleGeometry=pe;h.ClampToEdgeWrapping=1001;h.Clock=Ig;h.ClosedSplineCurve3=Fi;h.Color=B;h.ColorKeyframeTrack=
 $e;h.CompressedTexture=Qc;h.CompressedTextureLoader=zg;h.ConeBufferGeometry=oe;h.ConeGeometry=ne;h.CubeCamera=Gc;h.CubeGeometry=nh;h.CubeReflectionMapping=301;h.CubeRefractionMapping=302;h.CubeTexture=rb;h.CubeTextureLoader=df;h.CubeUVReflectionMapping=306;h.CubeUVRefractionMapping=307;h.CubicBezierCurve=Xa;h.CubicBezierCurve3=ib;h.CubicInterpolant=Xe;h.CullFaceBack=1;h.CullFaceFront=2;h.CullFaceFrontBack=3;h.CullFaceNone=0;h.Curve=I;h.CurvePath=wb;h.CustomBlending=5;h.CylinderBufferGeometry=ub;h.CylinderGeometry=
@@ -1022,15 +1022,15 @@ h.KeyframeTrack=ua;h.LOD=Td;h.LatheBufferGeometry=ad;h.LatheGeometry=me;h.Layers
 104;h.Mesh=ca;h.MeshBasicMaterial=Pa;h.MeshDepthMaterial=Gb;h.MeshDistanceMaterial=Hb;h.MeshFaceMaterial=function(a){console.warn("THREE.MeshFaceMaterial has been removed. Use an Array instead.");return a};h.MeshLambertMaterial=pc;h.MeshMatcapMaterial=qc;h.MeshNormalMaterial=oc;h.MeshPhongMaterial=Kb;h.MeshPhysicalMaterial=mc;h.MeshStandardMaterial=hb;h.MeshToonMaterial=nc;h.MinEquation=103;h.MirroredRepeatWrapping=1002;h.MixOperation=1;h.MultiMaterial=function(a){void 0===a&&(a=[]);console.warn("THREE.MultiMaterial has been removed. Use an Array instead.");
 a.isMultiMaterial=!0;a.materials=a;a.clone=function(){return a.slice()};return a};h.MultiplyBlending=4;h.MultiplyOperation=0;h.NearestFilter=1003;h.NearestMipMapLinearFilter=1005;h.NearestMipMapNearestFilter=1004;h.NearestMipmapLinearFilter=1005;h.NearestMipmapNearestFilter=1004;h.NeverDepth=0;h.NeverStencilFunc=512;h.NoBlending=0;h.NoColors=0;h.NoToneMapping=0;h.NormalBlending=1;h.NotEqualDepth=7;h.NotEqualStencilFunc=517;h.NumberKeyframeTrack=dd;h.Object3D=D;h.ObjectLoader=sf;h.ObjectSpaceNormalMap=
 1;h.OctahedronBufferGeometry=dc;h.OctahedronGeometry=$d;h.OneFactor=201;h.OneMinusDstAlphaFactor=207;h.OneMinusDstColorFactor=209;h.OneMinusSrcAlphaFactor=205;h.OneMinusSrcColorFactor=203;h.OrthographicCamera=hd;h.PCFShadowMap=1;h.PCFSoftShadowMap=2;h.PMREMGenerator=Ug;h.ParametricBufferGeometry=Sc;h.ParametricGeometry=Xd;h.Particle=function(a){console.warn("THREE.Particle has been renamed to THREE.Sprite.");return new Rd(a)};h.ParticleBasicMaterial=function(a){console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial.");
-return new Wa(a)};h.ParticleSystem=function(a,b){console.warn("THREE.ParticleSystem has been renamed to THREE.Points.");return new Pc(a,b)};h.ParticleSystemMaterial=function(a){console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial.");return new Wa(a)};h.Path=ab;h.PerspectiveCamera=qa;h.Plane=Ua;h.PlaneBufferGeometry=cc;h.PlaneGeometry=Jd;h.PlaneHelper=xe;h.PointCloud=function(a,b){console.warn("THREE.PointCloud has been renamed to THREE.Points.");return new Pc(a,b)};
+return new Wa(a)};h.ParticleSystem=function(a,b){console.warn("THREE.ParticleSystem has been renamed to THREE.Points.");return new Pc(a,b)};h.ParticleSystemMaterial=function(a){console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial.");return new Wa(a)};h.Path=ab;h.PerspectiveCamera=da;h.Plane=Ua;h.PlaneBufferGeometry=cc;h.PlaneGeometry=Jd;h.PlaneHelper=xe;h.PointCloud=function(a,b){console.warn("THREE.PointCloud has been renamed to THREE.Points.");return new Pc(a,b)};
 h.PointCloudMaterial=function(a){console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial.");return new Wa(a)};h.PointLight=jf;h.PointLightHelper=ld;h.Points=Pc;h.PointsMaterial=Wa;h.PolarGridHelper=xf;h.PolyhedronBufferGeometry=Ja;h.PolyhedronGeometry=Yd;h.PositionalAudio=Lg;h.PropertyBinding=Ba;h.PropertyMixer=Ng;h.QuadraticBezierCurve=Za;h.QuadraticBezierCurve3=jb;h.Quaternion=Da;h.QuaternionKeyframeTrack=re;h.QuaternionLinearInterpolant=af;h.REVISION="113dev";h.RGBADepthPacking=
 3201;h.RGBAFormat=1023;h.RGBAIntegerFormat=1033;h.RGBA_ASTC_10x10_Format=37819;h.RGBA_ASTC_10x5_Format=37816;h.RGBA_ASTC_10x6_Format=37817;h.RGBA_ASTC_10x8_Format=37818;h.RGBA_ASTC_12x10_Format=37820;h.RGBA_ASTC_12x12_Format=37821;h.RGBA_ASTC_4x4_Format=37808;h.RGBA_ASTC_5x4_Format=37809;h.RGBA_ASTC_5x5_Format=37810;h.RGBA_ASTC_6x5_Format=37811;h.RGBA_ASTC_6x6_Format=37812;h.RGBA_ASTC_8x5_Format=37813;h.RGBA_ASTC_8x6_Format=37814;h.RGBA_ASTC_8x8_Format=37815;h.RGBA_PVRTC_2BPPV1_Format=35843;h.RGBA_PVRTC_4BPPV1_Format=
 35842;h.RGBA_S3TC_DXT1_Format=33777;h.RGBA_S3TC_DXT3_Format=33778;h.RGBA_S3TC_DXT5_Format=33779;h.RGBDEncoding=3006;h.RGBEEncoding=3002;h.RGBEFormat=1023;h.RGBFormat=1022;h.RGBIntegerFormat=1032;h.RGBM16Encoding=3005;h.RGBM7Encoding=3004;h.RGB_ETC1_Format=36196;h.RGB_PVRTC_2BPPV1_Format=35841;h.RGB_PVRTC_4BPPV1_Format=35840;h.RGB_S3TC_DXT1_Format=33776;h.RGFormat=1030;h.RGIntegerFormat=1031;h.RawShaderMaterial=vb;h.Ray=Wb;h.Raycaster=pi;h.RectAreaLight=nf;h.RedFormat=1028;h.RedIntegerFormat=1029;
 h.ReinhardToneMapping=2;h.RepeatWrapping=1E3;h.ReplaceStencilOp=7681;h.ReverseSubtractEquation=102;h.RingBufferGeometry=$c;h.RingGeometry=le;h.Scene=pb;h.SceneUtils={createMultiMaterialObject:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")},detach:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")},attach:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")}};h.ShaderChunk=
-N;h.ShaderLib=fb;h.ShaderMaterial=pa;h.ShadowMaterial=lc;h.Shape=Lb;h.ShapeBufferGeometry=jc;h.ShapeGeometry=ic;h.ShapePath=Dg;h.ShapeUtils=tb;h.ShortType=1011;h.Skeleton=Ue;h.SkeletonHelper=kd;h.SkinnedMesh=Ud;h.SmoothShading=2;h.Sphere=qb;h.SphereBufferGeometry=hc;h.SphereGeometry=ke;h.Spherical=ri;h.SphericalHarmonics3=uf;h.SphericalReflectionMapping=305;h.Spline=ah;h.SplineCurve=$a;h.SplineCurve3=Gi;h.SpotLight=hf;h.SpotLightHelper=jd;h.SpotLightShadow=gf;h.Sprite=Rd;h.SpriteMaterial=Jb;h.SrcAlphaFactor=
+N;h.ShaderLib=fb;h.ShaderMaterial=qa;h.ShadowMaterial=lc;h.Shape=Lb;h.ShapeBufferGeometry=jc;h.ShapeGeometry=ic;h.ShapePath=Dg;h.ShapeUtils=tb;h.ShortType=1011;h.Skeleton=Ue;h.SkeletonHelper=kd;h.SkinnedMesh=Ud;h.SmoothShading=2;h.Sphere=qb;h.SphereBufferGeometry=hc;h.SphereGeometry=ke;h.Spherical=ri;h.SphericalHarmonics3=uf;h.SphericalReflectionMapping=305;h.Spline=ah;h.SplineCurve=$a;h.SplineCurve3=Gi;h.SpotLight=hf;h.SpotLightHelper=jd;h.SpotLightShadow=gf;h.Sprite=Rd;h.SpriteMaterial=Jb;h.SrcAlphaFactor=
 204;h.SrcAlphaSaturateFactor=210;h.SrcColorFactor=202;h.StaticCopyUsage=35046;h.StaticDrawUsage=35044;h.StaticReadUsage=35045;h.StereoCamera=li;h.StreamCopyUsage=35042;h.StreamDrawUsage=35040;h.StreamReadUsage=35041;h.StringKeyframeTrack=bf;h.SubtractEquation=101;h.SubtractiveBlending=3;h.TOUCH={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3};h.TangentSpaceNormalMap=0;h.TetrahedronBufferGeometry=Tc;h.TetrahedronGeometry=Zd;h.TextBufferGeometry=Zc;h.TextGeometry=je;h.Texture=Z;h.TextureLoader=ef;h.TorusBufferGeometry=
-Xc;h.TorusGeometry=ee;h.TorusKnotBufferGeometry=Wc;h.TorusKnotGeometry=de;h.Triangle=na;h.TriangleFanDrawMode=2;h.TriangleStripDrawMode=1;h.TrianglesDrawMode=0;h.TubeBufferGeometry=ec;h.TubeGeometry=ce;h.UVMapping=300;h.Uint16Attribute=function(a,b){console.warn("THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead.");return new Xb(a,b)};h.Uint16BufferAttribute=Xb;h.Uint32Attribute=function(a,b){console.warn("THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead.");
+Xc;h.TorusGeometry=ee;h.TorusKnotBufferGeometry=Wc;h.TorusKnotGeometry=de;h.Triangle=oa;h.TriangleFanDrawMode=2;h.TriangleStripDrawMode=1;h.TrianglesDrawMode=0;h.TubeBufferGeometry=ec;h.TubeGeometry=ce;h.UVMapping=300;h.Uint16Attribute=function(a,b){console.warn("THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead.");return new Xb(a,b)};h.Uint16BufferAttribute=Xb;h.Uint32Attribute=function(a,b){console.warn("THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead.");
 return new Yb(a,b)};h.Uint32BufferAttribute=Yb;h.Uint8Attribute=function(a,b){console.warn("THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead.");return new Dd(a,b)};h.Uint8BufferAttribute=Dd;h.Uint8ClampedAttribute=function(a,b){console.warn("THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead.");return new Ed(a,b)};h.Uint8ClampedBufferAttribute=Ed;h.Uncharted2ToneMapping=3;h.Uniform=vf;h.UniformsLib=F;h.UniformsUtils=
-Th;h.UnsignedByteType=1009;h.UnsignedInt248Type=1020;h.UnsignedIntType=1014;h.UnsignedShort4444Type=1017;h.UnsignedShort5551Type=1018;h.UnsignedShort565Type=1019;h.UnsignedShortType=1012;h.VSMShadowMap=3;h.Vector2=w;h.Vector3=n;h.Vector4=R;h.VectorKeyframeTrack=ed;h.Vertex=function(a,b,c){console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead.");return new n(a,b,c)};h.VertexColors=2;h.VideoTexture=ug;h.WebGLCubeRenderTarget=Eb;h.WebGLMultisampleRenderTarget=$f;h.WebGLRenderTarget=
+Th;h.UnsignedByteType=1009;h.UnsignedInt248Type=1020;h.UnsignedIntType=1014;h.UnsignedShort4444Type=1017;h.UnsignedShort5551Type=1018;h.UnsignedShort565Type=1019;h.UnsignedShortType=1012;h.VSMShadowMap=3;h.Vector2=w;h.Vector3=n;h.Vector4=ia;h.VectorKeyframeTrack=ed;h.Vertex=function(a,b,c){console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead.");return new n(a,b,c)};h.VertexColors=2;h.VideoTexture=ug;h.WebGLCubeRenderTarget=Eb;h.WebGLMultisampleRenderTarget=$f;h.WebGLRenderTarget=
 wa;h.WebGLRenderTargetCube=function(a,b,c){console.warn("THREE.WebGLRenderTargetCube( width, height, options ) is now WebGLCubeRenderTarget( size, options ).");return new Eb(a,c)};h.WebGLRenderer=qg;h.WebGLUtils=Yh;h.WireframeGeometry=Rc;h.WireframeHelper=function(a,b){console.warn("THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead.");return new ma(new Rc(a.geometry),new ka({color:void 0!==b?b:16777215}))};h.WrapAroundEnding=2402;h.XHRLoader=function(a){console.warn("THREE.XHRLoader has been renamed to THREE.FileLoader.");
 return new Sa(a)};h.ZeroCurvatureEnding=2400;h.ZeroFactor=200;h.ZeroSlopeEnding=2401;h.ZeroStencilOp=0;h.sRGBEncoding=3001;Object.defineProperty(h,"__esModule",{value:!0})});

+ 20 - 4
build/three.module.js

@@ -24517,6 +24517,8 @@ function WebGLRenderer( parameters ) {
 
 		currentRenderState.setupLights( camera );
 
+		var compiled = {};
+
 		scene.traverse( function ( object ) {
 
 			if ( object.material ) {
@@ -24525,13 +24527,19 @@ function WebGLRenderer( parameters ) {
 
 					for ( var i = 0; i < object.material.length; i ++ ) {
 
-						initMaterial( object.material[ i ], scene, object );
+						if ( ! object.material[ i ].uuid in compiled ) {
+
+							initMaterial( object.material[ i ], scene, object );
+							compiled[ object.material[ i ].uuid ] = true;
+
+						}
 
 					}
 
-				} else {
+				} else if ( ! object.material.uuid in compiled ) {
 
 					initMaterial( object.material, scene, object );
+					compiled[ object.material.uuid ] = true;
 
 				}
 
@@ -27363,6 +27371,8 @@ function InstancedMesh( geometry, material, count ) {
 
 	this.count = count;
 
+	this.frustumCulled = false;
+
 }
 
 InstancedMesh.prototype = Object.assign( Object.create( Mesh.prototype ), {
@@ -34754,8 +34764,9 @@ Object.assign( KeyframeTrack.prototype, {
 	// (0,0,0,0,1,1,1,0,0,0,0,0,0,0) --> (0,0,1,1,0,0)
 	optimize: function () {
 
-		var times = this.times,
-			values = this.values,
+		// times or values may be shared with other tracks, so overwriting is unsafe
+		var times = AnimationUtils.arraySlice( this.times ),
+			values = AnimationUtils.arraySlice( this.values ),
 			stride = this.getValueSize(),
 
 			smoothInterpolation = this.getInterpolation() === InterpolateSmooth,
@@ -34850,6 +34861,11 @@ Object.assign( KeyframeTrack.prototype, {
 			this.times = AnimationUtils.arraySlice( times, 0, writeIndex );
 			this.values = AnimationUtils.arraySlice( values, 0, writeIndex * stride );
 
+		} else {
+
+			this.times = times;
+			this.values = values;
+
 		}
 
 		return this;