Browse Source

Merge remote-tracking branch 'mrdoob/dev' into lint-example-shaders-2

Garrett Johnson 5 years ago
parent
commit
d28ea5b50a

+ 24 - 1
build/three.js

@@ -24581,7 +24581,14 @@
 
 
 					if ( object.isSkinnedMesh ) {
 					if ( object.isSkinnedMesh ) {
 
 
-						object.skeleton.update();
+						// update skeleton only once in a frame
+
+						if ( object.skeleton.frame !== info.render.frame ) {
+
+							object.skeleton.update();
+							object.skeleton.frame = info.render.frame;
+
+						}
 
 
 					}
 					}
 
 
@@ -26760,6 +26767,8 @@
 		this.bones = bones.slice( 0 );
 		this.bones = bones.slice( 0 );
 		this.boneMatrices = new Float32Array( this.bones.length * 16 );
 		this.boneMatrices = new Float32Array( this.bones.length * 16 );
 
 
+		this.frame = - 1;
+
 		// use the supplied bone inverses or calculate the inverses
 		// use the supplied bone inverses or calculate the inverses
 
 
 		if ( boneInverses === undefined ) {
 		if ( boneInverses === undefined ) {
@@ -44556,6 +44565,20 @@
 
 
 		},
 		},
 
 
+		// Allows you to seek to a specific time in an animation.
+		setTime: function ( timeInSeconds ) {
+
+			this.time = 0; // Zero out time attribute for AnimationMixer object;
+			for ( var i = 0; i < this._actions.length; i ++ ) {
+
+				this._actions[ i ].time = 0; // Zero out time attribute for all associated AnimationAction objects.
+
+			}
+
+			return this.update( timeInSeconds ); // Update used to set exact time. Returns "this" AnimationMixer object.
+
+		},
+
 		// return this mixer's root target object
 		// return this mixer's root target object
 		getRoot: function () {
 		getRoot: function () {
 
 

+ 121 - 120
build/three.min.js

@@ -1,12 +1,12 @@
 // threejs.org/license
 // threejs.org/license
-(function(k,Ba){"object"===typeof exports&&"undefined"!==typeof module?Ba(exports):"function"===typeof define&&define.amd?define(["exports"],Ba):(k=k||self,Ba(k.THREE={}))})(this,function(k){function Ba(){}function w(a,b){this.x=a||0;this.y=b||0}function sa(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 S(){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(k,Ba){"object"===typeof exports&&"undefined"!==typeof module?Ba(exports):"function"===typeof define&&define.amd?define(["exports"],Ba):(k=k||self,Ba(k.THREE={}))})(this,function(k){function Ba(){}function w(a,b){this.x=a||0;this.y=b||0}function sa(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 ca(){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,h,l,m){Object.defineProperty(this,"id",{value:Oi++});this.uuid=N.generateUUID();this.name="";this.image=void 0!==a?a:Z.DEFAULT_IMAGE;this.mipmaps=[];this.mapping=void 0!==b?b:Z.DEFAULT_MAPPING;this.wrapS=void 0!==c?c:1001;this.wrapT=void 0!==d?d:1001;this.magFilter=void 0!==e?e:1006;this.minFilter=void 0!==f?f:1008;this.anisotropy=void 0!==l?l:1;this.format=void 0!==g?g:1023;this.type=void 0!==h?h:1009;this.offset=new w(0,0);this.repeat=new w(1,1);this.center=new w(0,0);this.rotation=
 function Z(a,b,c,d,e,f,g,h,l,m){Object.defineProperty(this,"id",{value:Oi++});this.uuid=N.generateUUID();this.name="";this.image=void 0!==a?a:Z.DEFAULT_IMAGE;this.mipmaps=[];this.mapping=void 0!==b?b:Z.DEFAULT_MAPPING;this.wrapS=void 0!==c?c:1001;this.wrapT=void 0!==d?d:1001;this.magFilter=void 0!==e?e:1006;this.minFilter=void 0!==f?f:1008;this.anisotropy=void 0!==l?l:1;this.format=void 0!==g?g:1023;this.type=void 0!==h?h:1009;this.offset=new w(0,0);this.repeat=new w(1,1);this.center=new w(0,0);this.rotation=
-0;this.matrixAutoUpdate=!0;this.matrix=new S;this.generateMipmaps=!0;this.premultiplyAlpha=!1;this.flipY=!0;this.unpackAlignment=4;this.encoding=void 0!==m?m:3E3;this.version=0;this.onUpdate=null}function ca(a,b,c,d){this.x=a||0;this.y=b||0;this.z=c||0;this.w=void 0!==d?d:1}function ka(a,b,c){this.width=a;this.height=b;this.scissor=new ca(0,0,a,b);this.scissorTest=!1;this.viewport=new ca(0,0,a,b);c=c||{};this.texture=new Z(void 0,void 0,c.wrapS,c.wrapT,c.magFilter,c.minFilter,c.format,c.type,c.anisotropy,
+0;this.matrixAutoUpdate=!0;this.matrix=new ca;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 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 ka(a,b,c){this.width=a;this.height=b;this.scissor=new da(0,0,a,b);this.scissorTest=!1;this.viewport=new da(0,0,a,b);c=c||{};this.texture=new Z(void 0,void 0,c.wrapS,c.wrapT,c.magFilter,c.minFilter,c.format,c.type,c.anisotropy,
 c.encoding);this.texture.image={};this.texture.image.width=a;this.texture.image.height=b;this.texture.generateMipmaps=void 0!==c.generateMipmaps?c.generateMipmaps:!1;this.texture.minFilter=void 0!==c.minFilter?c.minFilter:1006;this.depthBuffer=void 0!==c.depthBuffer?c.depthBuffer:!0;this.stencilBuffer=void 0!==c.stencilBuffer?c.stencilBuffer:!0;this.depthTexture=void 0!==c.depthTexture?c.depthTexture:null}function Of(a,b,c){ka.call(this,a,b,c);this.samples=4}function M(){this.elements=[1,0,0,0,0,
 c.encoding);this.texture.image={};this.texture.image.width=a;this.texture.image.height=b;this.texture.generateMipmaps=void 0!==c.generateMipmaps?c.generateMipmaps:!1;this.texture.minFilter=void 0!==c.minFilter?c.minFilter:1006;this.depthBuffer=void 0!==c.depthBuffer?c.depthBuffer:!0;this.stencilBuffer=void 0!==c.stencilBuffer?c.stencilBuffer:!0;this.depthTexture=void 0!==c.depthTexture?c.depthTexture:null}function Of(a,b,c){ka.call(this,a,b,c);this.samples=4}function M(){this.elements=[1,0,0,0,0,
 1,0,0,0,0,1,0,0,0,0,1];0<arguments.length&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}function Qb(a,b,c,d){this._x=a||0;this._y=b||0;this._z=c||0;this._order=d||Qb.DefaultOrder}function Pf(){this.mask=1}function C(){Object.defineProperty(this,"id",{value:Pi++});this.uuid=N.generateUUID();this.name="";this.type="Object3D";this.parent=null;this.children=[];this.up=C.DefaultUp.clone();var a=new n,b=new Qb,c=new sa,d=new n(1,1,1);b._onChange(function(){c.setFromEuler(b,
 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 Qb(a,b,c,d){this._x=a||0;this._y=b||0;this._z=c||0;this._order=d||Qb.DefaultOrder}function Pf(){this.mask=1}function C(){Object.defineProperty(this,"id",{value:Pi++});this.uuid=N.generateUUID();this.name="";this.type="Object3D";this.parent=null;this.children=[];this.up=C.DefaultUp.clone();var a=new n,b=new Qb,c=new sa,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 M},normalMatrix:{value:new S}});this.matrix=new M;this.matrixWorld=new M;this.matrixAutoUpdate=C.DefaultMatrixAutoUpdate;this.matrixWorldNeedsUpdate=!1;this.layers=new Pf;this.visible=!0;
-this.receiveShadow=this.castShadow=!1;this.frustumCulled=!0;this.renderOrder=0;this.userData={}}function wd(){C.call(this);this.type="Scene";this.overrideMaterial=this.fog=this.background=null;this.autoUpdate=!0;"undefined"!==typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}function ab(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 Qf(a,b,c,d,e){var f;var g=0;for(f=
-a.length-3;g<=f;g+=3){Rb.fromArray(a,g);var h=e.x*Math.abs(Rb.x)+e.y*Math.abs(Rb.y)+e.z*Math.abs(Rb.z),l=b.dot(Rb),m=c.dot(Rb),p=d.dot(Rb);if(Math.max(-Math.max(l,m,p),Math.min(l,m,p))>h)return!1}return!0}function nb(a,b){this.center=void 0!==a?a:new n;this.radius=void 0!==b?b:0}function Sb(a,b){this.origin=void 0!==a?a:new n;this.direction=void 0!==b?b:new n}function aa(a,b,c){this.a=void 0!==a?a:new n;this.b=void 0!==b?b:new n;this.c=void 0!==c?c:new n}function I(a,b,c){return void 0===b&&void 0===
+!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 M},normalMatrix:{value:new ca}});this.matrix=new M;this.matrixWorld=new M;this.matrixAutoUpdate=C.DefaultMatrixAutoUpdate;this.matrixWorldNeedsUpdate=!1;this.layers=new Pf;this.visible=
+!0;this.receiveShadow=this.castShadow=!1;this.frustumCulled=!0;this.renderOrder=0;this.userData={}}function wd(){C.call(this);this.type="Scene";this.overrideMaterial=this.fog=this.background=null;this.autoUpdate=!0;"undefined"!==typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}function ab(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 Qf(a,b,c,d,e){var f;var g=0;for(f=
+a.length-3;g<=f;g+=3){Rb.fromArray(a,g);var h=e.x*Math.abs(Rb.x)+e.y*Math.abs(Rb.y)+e.z*Math.abs(Rb.z),l=b.dot(Rb),m=c.dot(Rb),p=d.dot(Rb);if(Math.max(-Math.max(l,m,p),Math.min(l,m,p))>h)return!1}return!0}function nb(a,b){this.center=void 0!==a?a:new n;this.radius=void 0!==b?b:0}function Sb(a,b){this.origin=void 0!==a?a:new n;this.direction=void 0!==b?b:new n}function ba(a,b,c){this.a=void 0!==a?a:new n;this.b=void 0!==b?b:new n;this.c=void 0!==c?c:new n}function I(a,b,c){return void 0===b&&void 0===
 c?this.set(a):this.setRGB(a,b,c)}function Rf(a,b,c){0>c&&(c+=1);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 Sf(a){return.04045>a?.0773993808*a:Math.pow(.9478672986*a+.0521327014,2.4)}function Tf(a){return.0031308>a?12.92*a:1.055*Math.pow(a,.41666)-.055}function zc(a,b,c,d,e,f){this.a=a;this.b=b;this.c=c;this.normal=d&&d.isVector3?d:new n;this.vertexNormals=Array.isArray(d)?d:[];this.color=e&&e.isColor?e:new I;this.vertexColors=Array.isArray(e)?e:[];this.materialIndex=
 c?this.set(a):this.setRGB(a,b,c)}function Rf(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 Sf(a){return.04045>a?.0773993808*a:Math.pow(.9478672986*a+.0521327014,2.4)}function Tf(a){return.0031308>a?12.92*a:1.055*Math.pow(a,.41666)-.055}function zc(a,b,c,d,e,f){this.a=a;this.b=b;this.c=c;this.normal=d&&d.isVector3?d:new n;this.vertexNormals=Array.isArray(d)?d:[];this.color=e&&e.isColor?e:new I;this.vertexColors=Array.isArray(e)?e:[];this.materialIndex=
 void 0!==f?f:0}function Q(){Object.defineProperty(this,"id",{value:Qi++});this.uuid=N.generateUUID();this.name="";this.type="Material";this.lights=this.fog=!0;this.blending=1;this.side=0;this.vertexTangents=this.flatShading=!1;this.vertexColors=0;this.opacity=1;this.transparent=!1;this.blendSrc=204;this.blendDst=205;this.blendEquation=100;this.blendEquationAlpha=this.blendDstAlpha=this.blendSrcAlpha=null;this.depthFunc=3;this.depthWrite=this.depthTest=!0;this.stencilWriteMask=255;this.stencilFunc=
 void 0!==f?f:0}function Q(){Object.defineProperty(this,"id",{value:Qi++});this.uuid=N.generateUUID();this.name="";this.type="Material";this.lights=this.fog=!0;this.blending=1;this.side=0;this.vertexTangents=this.flatShading=!1;this.vertexColors=0;this.opacity=1;this.transparent=!1;this.blendSrc=204;this.blendDst=205;this.blendEquation=100;this.blendEquationAlpha=this.blendDstAlpha=this.blendSrcAlpha=null;this.depthFunc=3;this.depthWrite=this.depthTest=!0;this.stencilWriteMask=255;this.stencilFunc=
 519;this.stencilRef=0;this.stencilFuncMask=255;this.stencilZPass=this.stencilZFail=this.stencilFail=7680;this.stencilWrite=!1;this.clippingPlanes=null;this.clipShadows=this.clipIntersection=!1;this.shadowSide=null;this.colorWrite=!0;this.precision=null;this.polygonOffset=!1;this.polygonOffsetUnits=this.polygonOffsetFactor=0;this.dithering=!1;this.alphaTest=0;this.premultipliedAlpha=!1;this.toneMapped=this.visible=!0;this.userData={};this.needsUpdate=!0}function Ga(a){Q.call(this);this.type="MeshBasicMaterial";
 519;this.stencilRef=0;this.stencilFuncMask=255;this.stencilZPass=this.stencilZFail=this.stencilFail=7680;this.stencilWrite=!1;this.clippingPlanes=null;this.clipShadows=this.clipIntersection=!1;this.shadowSide=null;this.colorWrite=!0;this.precision=null;this.polygonOffset=!1;this.polygonOffsetUnits=this.polygonOffsetFactor=0;this.dithering=!1;this.alphaTest=0;this.premultipliedAlpha=!1;this.toneMapped=this.visible=!0;this.userData={};this.needsUpdate=!0}function Ga(a){Q.call(this);this.type="MeshBasicMaterial";
@@ -15,8 +15,8 @@ this.name="";this.array=a;this.itemSize=b;this.count=void 0!==a?a.length/b:0;thi
 b,c){O.call(this,new Uint32Array(a),b,c)}function A(a,b,c){O.call(this,new Float32Array(a),b,c)}function Cd(a,b,c){O.call(this,new Float64Array(a),b,c)}function hh(){this.vertices=[];this.normals=[];this.colors=[];this.uvs=[];this.uvs2=[];this.groups=[];this.morphTargets={};this.skinWeights=[];this.skinIndices=[];this.boundingSphere=this.boundingBox=null;this.groupsNeedUpdate=this.uvsNeedUpdate=this.colorsNeedUpdate=this.normalsNeedUpdate=this.verticesNeedUpdate=!1}function ih(a){if(0===a.length)return-Infinity;
 b,c){O.call(this,new Uint32Array(a),b,c)}function A(a,b,c){O.call(this,new Float32Array(a),b,c)}function Cd(a,b,c){O.call(this,new Float64Array(a),b,c)}function hh(){this.vertices=[];this.normals=[];this.colors=[];this.uvs=[];this.uvs2=[];this.groups=[];this.morphTargets={};this.skinWeights=[];this.skinIndices=[];this.boundingSphere=this.boundingBox=null;this.groupsNeedUpdate=this.uvsNeedUpdate=this.colorsNeedUpdate=this.normalsNeedUpdate=this.verticesNeedUpdate=!1}function ih(a){if(0===a.length)return-Infinity;
 for(var b=a[0],c=1,d=a.length;c<d;++c)a[c]>b&&(b=a[c]);return b}function D(){Object.defineProperty(this,"id",{value:Ri+=2});this.uuid=N.generateUUID();this.name="";this.type="BufferGeometry";this.index=null;this.attributes={};this.morphAttributes={};this.groups=[];this.boundingSphere=this.boundingBox=null;this.drawRange={start:0,count:Infinity};this.userData={}}function R(a,b){C.call(this);this.type="Mesh";this.geometry=void 0!==a?a:new D;this.material=void 0!==b?b:new Ga({color:16777215*Math.random()});
 for(var b=a[0],c=1,d=a.length;c<d;++c)a[c]>b&&(b=a[c]);return b}function D(){Object.defineProperty(this,"id",{value:Ri+=2});this.uuid=N.generateUUID();this.name="";this.type="BufferGeometry";this.index=null;this.attributes={};this.morphAttributes={};this.groups=[];this.boundingSphere=this.boundingBox=null;this.drawRange={start:0,count:Infinity};this.userData={}}function R(a,b){C.call(this);this.type="Mesh";this.geometry=void 0!==a?a:new D;this.material=void 0!==b?b:new Ga({color:16777215*Math.random()});
 this.drawMode=0;this.updateMorphTargets()}function jh(a,b,c,d,e,f,g,h){if(null===(1===b.side?d.intersectTriangle(g,f,e,!0,h):d.intersectTriangle(e,f,g,2!==b.side,h)))return null;Ee.copy(h);Ee.applyMatrix4(a.matrixWorld);b=c.ray.origin.distanceTo(Ee);return b<c.near||b>c.far?null:{distance:b,point:Ee.clone(),object:a}}function Fe(a,b,c,d,e,f,g,h,l,m,p){Vb.fromBufferAttribute(e,l);Wb.fromBufferAttribute(e,m);Xb.fromBufferAttribute(e,p);e=a.morphTargetInfluences;if(b.morphTargets&&f&&e){Uf.set(0,0,0);
 this.drawMode=0;this.updateMorphTargets()}function jh(a,b,c,d,e,f,g,h){if(null===(1===b.side?d.intersectTriangle(g,f,e,!0,h):d.intersectTriangle(e,f,g,2!==b.side,h)))return null;Ee.copy(h);Ee.applyMatrix4(a.matrixWorld);b=c.ray.origin.distanceTo(Ee);return b<c.near||b>c.far?null:{distance:b,point:Ee.clone(),object:a}}function Fe(a,b,c,d,e,f,g,h,l,m,p){Vb.fromBufferAttribute(e,l);Wb.fromBufferAttribute(e,m);Xb.fromBufferAttribute(e,p);e=a.morphTargetInfluences;if(b.morphTargets&&f&&e){Uf.set(0,0,0);
-Vf.set(0,0,0);Wf.set(0,0,0);for(var u=0,t=f.length;u<t;u++){var k=e[u],q=f[u];0!==k&&(kh.fromBufferAttribute(q,l),lh.fromBufferAttribute(q,m),mh.fromBufferAttribute(q,p),Uf.addScaledVector(kh.sub(Vb),k),Vf.addScaledVector(lh.sub(Wb),k),Wf.addScaledVector(mh.sub(Xb),k))}Vb.add(Uf);Wb.add(Vf);Xb.add(Wf)}if(a=jh(a,b,c,d,Vb,Wb,Xb,Dd))g&&(Ac.fromBufferAttribute(g,l),Bc.fromBufferAttribute(g,m),Cc.fromBufferAttribute(g,p),a.uv=aa.getUV(Dd,Vb,Wb,Xb,Ac,Bc,Cc,new w)),h&&(Ac.fromBufferAttribute(h,l),Bc.fromBufferAttribute(h,
-m),Cc.fromBufferAttribute(h,p),a.uv2=aa.getUV(Dd,Vb,Wb,Xb,Ac,Bc,Cc,new w)),g=new zc(l,m,p),aa.getNormal(Vb,Wb,Xb,g.normal),a.face=g;return a}function G(){Object.defineProperty(this,"id",{value:Si+=2});this.uuid=N.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=
+Vf.set(0,0,0);Wf.set(0,0,0);for(var u=0,t=f.length;u<t;u++){var k=e[u],q=f[u];0!==k&&(kh.fromBufferAttribute(q,l),lh.fromBufferAttribute(q,m),mh.fromBufferAttribute(q,p),Uf.addScaledVector(kh.sub(Vb),k),Vf.addScaledVector(lh.sub(Wb),k),Wf.addScaledVector(mh.sub(Xb),k))}Vb.add(Uf);Wb.add(Vf);Xb.add(Wf)}if(a=jh(a,b,c,d,Vb,Wb,Xb,Dd))g&&(Ac.fromBufferAttribute(g,l),Bc.fromBufferAttribute(g,m),Cc.fromBufferAttribute(g,p),a.uv=ba.getUV(Dd,Vb,Wb,Xb,Ac,Bc,Cc,new w)),h&&(Ac.fromBufferAttribute(h,l),Bc.fromBufferAttribute(h,
+m),Cc.fromBufferAttribute(h,p),a.uv2=ba.getUV(Dd,Vb,Wb,Xb,Ac,Bc,Cc,new w)),g=new zc(l,m,p),ba.getNormal(Vb,Wb,Xb,g.normal),a.face=g;return a}function G(){Object.defineProperty(this,"id",{value:Si+=2});this.uuid=N.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 Yb(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 Ea(a){for(var b={},c=0;c<a.length;c++){var d=Yb(a[c]),e;for(e in d)b[e]=d[e]}return b}function la(a){Q.call(this);this.type="ShaderMaterial";
 this.colorsNeedUpdate=this.normalsNeedUpdate=this.uvsNeedUpdate=this.verticesNeedUpdate=this.elementsNeedUpdate=!1}function Yb(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 Ea(a){for(var b={},c=0;c<a.length;c++){var d=Yb(a[c]),e;for(e in d)b[e]=d[e]}return b}function la(a){Q.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,
 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 bb(){C.call(this);this.type="Camera";this.matrixWorldInverse=new M;this.projectionMatrix=new M;this.projectionMatrixInverse=new M}function ja(a,b,c,d){bb.call(this);this.type="PerspectiveCamera";this.fov=void 0!==a?a:50;this.zoom=1;this.near=void 0!==
 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 bb(){C.call(this);this.type="Camera";this.matrixWorldInverse=new M;this.projectionMatrix=new M;this.projectionMatrixInverse=new M}function ja(a,b,c,d){bb.call(this);this.type="PerspectiveCamera";this.fov=void 0!==a?a:50;this.zoom=1;this.near=void 0!==
@@ -37,7 +37,7 @@ null===l){console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferG
 36337).precision?"mediump":"lowp"}var e,f="undefined"!==typeof WebGL2RenderingContext&&a instanceof WebGL2RenderingContext,g=void 0!==c.precision?c.precision:"highp",h=d(g);h!==g&&(console.warn("THREE.WebGLRenderer:",g,"not supported, using",h,"instead."),g=h);c=!0===c.logarithmicDepthBuffer;h=a.getParameter(34930);var l=a.getParameter(35660),m=a.getParameter(3379),p=a.getParameter(34076),u=a.getParameter(34921),k=a.getParameter(36347),r=a.getParameter(36348),q=a.getParameter(36349),v=0<l,y=f||!!b.get("OES_texture_float"),
 36337).precision?"mediump":"lowp"}var e,f="undefined"!==typeof WebGL2RenderingContext&&a instanceof WebGL2RenderingContext,g=void 0!==c.precision?c.precision:"highp",h=d(g);h!==g&&(console.warn("THREE.WebGLRenderer:",g,"not supported, using",h,"instead."),g=h);c=!0===c.logarithmicDepthBuffer;h=a.getParameter(34930);var l=a.getParameter(35660),m=a.getParameter(3379),p=a.getParameter(34076),u=a.getParameter(34921),k=a.getParameter(36347),r=a.getParameter(36348),q=a.getParameter(36349),v=0<l,y=f||!!b.get("OES_texture_float"),
 n=v&&y,x=f?a.getParameter(36183):0,F=b.get("OVR_multiview2"),V=f&&!!F&&!a.getContextAttributes().antialias;F=V?a.getParameter(F.MAX_VIEWS_OVR):0;return{isWebGL2:f,getMaxAnisotropy:function(){if(void 0!==e)return e;var c=b.get("EXT_texture_filter_anisotropic");return e=null!==c?a.getParameter(c.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0},getMaxPrecision:d,precision:g,logarithmicDepthBuffer:c,maxTextures:h,maxVertexTextures:l,maxTextureSize:m,maxCubemapSize:p,maxAttributes:u,maxVertexUniforms:k,maxVaryings:r,
 n=v&&y,x=f?a.getParameter(36183):0,F=b.get("OVR_multiview2"),V=f&&!!F&&!a.getContextAttributes().antialias;F=V?a.getParameter(F.MAX_VIEWS_OVR):0;return{isWebGL2:f,getMaxAnisotropy:function(){if(void 0!==e)return e;var c=b.get("EXT_texture_filter_anisotropic");return e=null!==c?a.getParameter(c.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0},getMaxPrecision:d,precision:g,logarithmicDepthBuffer:c,maxTextures:h,maxVertexTextures:l,maxTextureSize:m,maxCubemapSize:p,maxAttributes:u,maxVertexUniforms:k,maxVaryings:r,
 maxFragmentUniforms:q,vertexTextures:v,floatFragmentTextures:y,floatVertexTextures:n,maxSamples:x,multiview:V,maxMultiviewViews:F}}function Xi(){function a(){m.value!==d&&(m.value=d,m.needsUpdate=0<e);c.numPlanes=e;c.numIntersection=0}function b(a,b,d,e){var f=null!==a?a.length:0,g=null;if(0!==f){g=m.value;if(!0!==e||null===g){e=d+4*f;b=b.matrixWorldInverse;l.getNormalMatrix(b);if(null===g||g.length<e)g=new Float32Array(e);for(e=0;e!==f;++e,d+=4)h.copy(a[e]).applyMatrix4(b,l),h.normal.toArray(g,d),
 maxFragmentUniforms:q,vertexTextures:v,floatFragmentTextures:y,floatVertexTextures:n,maxSamples:x,multiview:V,maxMultiviewViews:F}}function Xi(){function a(){m.value!==d&&(m.value=d,m.needsUpdate=0<e);c.numPlanes=e;c.numIntersection=0}function b(a,b,d,e){var f=null!==a?a.length:0,g=null;if(0!==f){g=m.value;if(!0!==e||null===g){e=d+4*f;b=b.matrixWorldInverse;l.getNormalMatrix(b);if(null===g||g.length<e)g=new Float32Array(e);for(e=0;e!==f;++e,d+=4)h.copy(a[e]).applyMatrix4(b,l),h.normal.toArray(g,d),
-g[d+3]=h.constant}m.value=g;m.needsUpdate=!0}c.numPlanes=f;return g}var c=this,d=null,e=0,f=!1,g=!1,h=new cb,l=new S,m={value:null,needsUpdate:!1};this.uniform=m;this.numIntersection=this.numPlanes=0;this.init=function(a,c,g){var h=0!==a.length||c||0!==e||f;f=c;d=b(a,g,0);e=a.length;return h};this.beginShadows=function(){g=!0;b(null)};this.endShadows=function(){g=!1;a()};this.setState=function(c,h,l,k,q,v){if(!f||null===c||0===c.length||g&&!l)g?b(null):a();else{l=g?0:e;var p=4*l,u=q.clippingState||
+g[d+3]=h.constant}m.value=g;m.needsUpdate=!0}c.numPlanes=f;return g}var c=this,d=null,e=0,f=!1,g=!1,h=new cb,l=new ca,m={value:null,needsUpdate:!1};this.uniform=m;this.numIntersection=this.numPlanes=0;this.init=function(a,c,g){var h=0!==a.length||c||0!==e||f;f=c;d=b(a,g,0);e=a.length;return h};this.beginShadows=function(){g=!0;b(null)};this.endShadows=function(){g=!1;a()};this.setState=function(c,h,l,k,q,v){if(!f||null===c||0===c.length||g&&!l)g?b(null):a();else{l=g?0:e;var p=4*l,u=q.clippingState||
 null;m.value=u;u=b(c,k,p,v);for(c=0;c!==p;++c)u[c]=d[c];q.clippingState=u;this.numIntersection=h?this.numPlanes:0;this.numPlanes+=l}}}function Yi(a){var b={};return{get:function(c){if(void 0!==b[c])return b[c];switch(c){case "WEBGL_depth_texture":var d=a.getExtension("WEBGL_depth_texture")||a.getExtension("MOZ_WEBGL_depth_texture")||a.getExtension("WEBKIT_WEBGL_depth_texture");break;case "EXT_texture_filter_anisotropic":d=a.getExtension("EXT_texture_filter_anisotropic")||a.getExtension("MOZ_EXT_texture_filter_anisotropic")||
 null;m.value=u;u=b(c,k,p,v);for(c=0;c!==p;++c)u[c]=d[c];q.clippingState=u;this.numIntersection=h?this.numPlanes:0;this.numPlanes+=l}}}function Yi(a){var b={};return{get:function(c){if(void 0!==b[c])return b[c];switch(c){case "WEBGL_depth_texture":var d=a.getExtension("WEBGL_depth_texture")||a.getExtension("MOZ_WEBGL_depth_texture")||a.getExtension("WEBKIT_WEBGL_depth_texture");break;case "EXT_texture_filter_anisotropic":d=a.getExtension("EXT_texture_filter_anisotropic")||a.getExtension("MOZ_EXT_texture_filter_anisotropic")||
 a.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case "WEBGL_compressed_texture_s3tc":d=a.getExtension("WEBGL_compressed_texture_s3tc")||a.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||a.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case "WEBGL_compressed_texture_pvrtc":d=a.getExtension("WEBGL_compressed_texture_pvrtc")||a.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:d=a.getExtension(c)}null===d&&console.warn("THREE.WebGLRenderer: "+c+" extension not supported.");
 a.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case "WEBGL_compressed_texture_s3tc":d=a.getExtension("WEBGL_compressed_texture_s3tc")||a.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||a.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case "WEBGL_compressed_texture_pvrtc":d=a.getExtension("WEBGL_compressed_texture_pvrtc")||a.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:d=a.getExtension(c)}null===d&&console.warn("THREE.WebGLRenderer: "+c+" extension not supported.");
 return b[c]=d}}}function Zi(a,b,c){function d(a){var e=a.target;a=f.get(e);null!==a.index&&b.remove(a.index);for(var h in a.attributes)b.remove(a.attributes[h]);e.removeEventListener("dispose",d);f.delete(e);if(h=g.get(a))b.remove(h),g.delete(a);c.memory.geometries--}function e(a){var c=[],d=a.index,e=a.attributes.position;if(null!==d){var f=d.array;d=d.version;e=0;for(var h=f.length;e<h;e+=3){var k=f[e+0],q=f[e+1],v=f[e+2];c.push(k,q,q,v,v,k)}}else for(f=e.array,d=e.version,e=0,h=f.length/3-1;e<
 return b[c]=d}}}function Zi(a,b,c){function d(a){var e=a.target;a=f.get(e);null!==a.index&&b.remove(a.index);for(var h in a.attributes)b.remove(a.attributes[h]);e.removeEventListener("dispose",d);f.delete(e);if(h=g.get(a))b.remove(h),g.delete(a);c.memory.geometries--}function e(a){var c=[],d=a.index,e=a.attributes.position;if(null!==d){var f=d.array;d=d.version;e=0;for(var h=f.length;e<h;e+=3){var k=f[e+0],q=f[e+1],v=f[e+2];c.push(k,q,q,v,v,k)}}else for(f=e.array,d=e.version,e=0,h=f.length/3-1;e<
@@ -106,7 +106,7 @@ this.alphaMap=this.map=null;this.displacementScale=1;this.displacementBias=0;thi
 c,d,e,f,g){var h=b.geometry;var l=m;var q=b.customDepthMaterial;d.isPointLight&&(l=p,q=b.customDistanceMaterial);q?l=q:(q=!1,c.morphTargets&&(h&&h.isBufferGeometry?q=h.morphAttributes&&h.morphAttributes.position&&0<h.morphAttributes.position.length:h&&h.isGeometry&&(q=h.morphTargets&&0<h.morphTargets.length)),b.isSkinnedMesh&&!1===c.skinning&&console.warn("THREE.WebGLShadowMap: THREE.SkinnedMesh with material.skinning set to false:",b),b=b.isSkinnedMesh&&c.skinning,h=0,q&&(h|=1),b&&(h|=2),l=l[h]);
 c,d,e,f,g){var h=b.geometry;var l=m;var q=b.customDepthMaterial;d.isPointLight&&(l=p,q=b.customDistanceMaterial);q?l=q:(q=!1,c.morphTargets&&(h&&h.isBufferGeometry?q=h.morphAttributes&&h.morphAttributes.position&&0<h.morphAttributes.position.length:h&&h.isGeometry&&(q=h.morphTargets&&0<h.morphTargets.length)),b.isSkinnedMesh&&!1===c.skinning&&console.warn("THREE.WebGLShadowMap: THREE.SkinnedMesh with material.skinning set to false:",b),b=b.isSkinnedMesh&&c.skinning,h=0,q&&(h|=1),b&&(h|=2),l=l[h]);
 a.localClippingEnabled&&!0===c.clipShadows&&0!==c.clippingPlanes.length&&(h=l.uuid,q=c.uuid,b=u[h],void 0===b&&(b={},u[h]=b),h=b[q],void 0===h&&(h=l.clone(),b[q]=h),l=h);l.visible=c.visible;l.wireframe=c.wireframe;l.side=3===g?null!=c.shadowSide?c.shadowSide:c.side:null!=c.shadowSide?c.shadowSide:k[c.side];l.clipShadows=c.clipShadows;l.clippingPlanes=c.clippingPlanes;l.clipIntersection=c.clipIntersection;l.wireframeLinewidth=c.wireframeLinewidth;l.linewidth=c.linewidth;d.isPointLight&&l.isMeshDistanceMaterial&&
 a.localClippingEnabled&&!0===c.clipShadows&&0!==c.clippingPlanes.length&&(h=l.uuid,q=c.uuid,b=u[h],void 0===b&&(b={},u[h]=b),h=b[q],void 0===h&&(h=l.clone(),b[q]=h),l=h);l.visible=c.visible;l.wireframe=c.wireframe;l.side=3===g?null!=c.shadowSide?c.shadowSide:c.side:null!=c.shadowSide?c.shadowSide:k[c.side];l.clipShadows=c.clipShadows;l.clippingPlanes=c.clippingPlanes;l.clipIntersection=c.clipIntersection;l.wireframeLinewidth=c.wireframeLinewidth;l.linewidth=c.linewidth;d.isPointLight&&l.isMeshDistanceMaterial&&
 (l.referencePosition.setFromMatrixPosition(d.matrixWorld),l.nearDistance=e,l.farDistance=f);return l}function e(c,g,h,l,m){if(!1!==c.visible){if(c.layers.test(g.layers)&&(c.isMesh||c.isLine||c.isPoints)&&(c.castShadow||c.receiveShadow&&3===m)&&(!c.frustumCulled||f.intersectsObject(c))){c.modelViewMatrix.multiplyMatrices(h.matrixWorldInverse,c.matrixWorld);var p=b.update(c),u=c.material;if(Array.isArray(u))for(var k=p.groups,q=0,t=k.length;q<t;q++){var r=k[q],v=u[r.materialIndex];v&&v.visible&&(v=
 (l.referencePosition.setFromMatrixPosition(d.matrixWorld),l.nearDistance=e,l.farDistance=f);return l}function e(c,g,h,l,m){if(!1!==c.visible){if(c.layers.test(g.layers)&&(c.isMesh||c.isLine||c.isPoints)&&(c.castShadow||c.receiveShadow&&3===m)&&(!c.frustumCulled||f.intersectsObject(c))){c.modelViewMatrix.multiplyMatrices(h.matrixWorldInverse,c.matrixWorld);var p=b.update(c),u=c.material;if(Array.isArray(u))for(var k=p.groups,q=0,t=k.length;q<t;q++){var r=k[q],v=u[r.materialIndex];v&&v.visible&&(v=
-d(c,v,l,h.near,h.far,m),a.renderBufferDirect(h,null,p,v,c,r))}else u.visible&&(v=d(c,u,l,h.near,h.far,m),a.renderBufferDirect(h,null,p,v,c,null))}c=c.children;p=0;for(u=c.length;p<u;p++)e(c[p],g,h,l,m)}}var f=new Ed,g=new w,h=new w,l=new ca,m=Array(4),p=Array(4),u={},k={0:1,1:0,2:2},r=new la({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  \n\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy  ) / resolution ) );\n  for ( float i = -1.0; i < 1.0 ; i += SAMPLE_RATE) {\n    #ifdef HORIZONAL_PASS\n      vec2 distribution = decodeHalfRGBA ( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( i, 0.0 ) * radius ) / resolution ) );\n      mean += distribution.x;\n      squared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n    #else\n      float depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0,  i )  * radius ) / resolution ) );\n      mean += depth;\n      squared_mean += depth * depth;\n    #endif\n  }\n  mean = mean * HALF_SAMPLE_RATE;\n  squared_mean = squared_mean * HALF_SAMPLE_RATE;\n  float std_dev = pow( squared_mean - mean * mean, 0.5 );\n  gl_FragColor = encodeHalfRGBA( vec2( mean, std_dev ) );\n}"}),
+d(c,v,l,h.near,h.far,m),a.renderBufferDirect(h,null,p,v,c,r))}else u.visible&&(v=d(c,u,l,h.near,h.far,m),a.renderBufferDirect(h,null,p,v,c,null))}c=c.children;p=0;for(u=c.length;p<u;p++)e(c[p],g,h,l,m)}}var f=new Ed,g=new w,h=new w,l=new da,m=Array(4),p=Array(4),u={},k={0:1,1:0,2:2},r=new la({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  \n\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy  ) / resolution ) );\n  for ( float i = -1.0; i < 1.0 ; i += SAMPLE_RATE) {\n    #ifdef HORIZONAL_PASS\n      vec2 distribution = decodeHalfRGBA ( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( i, 0.0 ) * radius ) / resolution ) );\n      mean += distribution.x;\n      squared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n    #else\n      float depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0,  i )  * radius ) / resolution ) );\n      mean += depth;\n      squared_mean += depth * depth;\n    #endif\n  }\n  mean = mean * HALF_SAMPLE_RATE;\n  squared_mean = squared_mean * HALF_SAMPLE_RATE;\n  float std_dev = pow( squared_mean - mean * mean, 0.5 );\n  gl_FragColor = encodeHalfRGBA( vec2( mean, std_dev ) );\n}"}),
 q=r.clone();q.defines.HORIZONAL_PASS=1;var v=new D;v.addAttribute("position",new O(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));var n=new R(v,r);for(v=0;4!==v;++v){var z=0!==(v&1),x=0!==(v&2),F=new Db({depthPacking:3201,morphTargets:z,skinning:x});m[v]=F;z=new Eb({morphTargets:z,skinning:x});p[v]=z}var V=this;this.enabled=!1;this.autoUpdate=!0;this.needsUpdate=!1;this.type=1;this.render=function(d,m,p){if(!1!==V.enabled&&(!1!==V.autoUpdate||!1!==V.needsUpdate)&&0!==d.length){var u=a.getRenderTarget(),
 q=r.clone();q.defines.HORIZONAL_PASS=1;var v=new D;v.addAttribute("position",new O(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));var n=new R(v,r);for(v=0;4!==v;++v){var z=0!==(v&1),x=0!==(v&2),F=new Db({depthPacking:3201,morphTargets:z,skinning:x});m[v]=F;z=new Eb({morphTargets:z,skinning:x});p[v]=z}var V=this;this.enabled=!1;this.autoUpdate=!0;this.needsUpdate=!1;this.type=1;this.render=function(d,m,p){if(!1!==V.enabled&&(!1!==V.autoUpdate||!1!==V.needsUpdate)&&0!==d.length){var u=a.getRenderTarget(),
 k=a.getActiveCubeFace(),t=a.getActiveMipmapLevel(),v=a.state;v.setBlending(0);v.buffers.color.setClear(1,1,1,1);v.buffers.depth.setTest(!0);v.setScissorTest(!1);for(var y=0,x=d.length;y<x;y++){var F=d[y],W=F.shadow;if(void 0===W)console.warn("THREE.WebGLShadowMap:",F,"has no shadow.");else{g.copy(W.mapSize);var ia=W.getFrameExtents();g.multiply(ia);h.copy(W.mapSize);if(g.x>c||g.y>c)console.warn("THREE.WebGLShadowMap:",F,"has shadow exceeding max texture size, reducing"),g.x>c&&(h.x=Math.floor(c/ia.x),
 k=a.getActiveCubeFace(),t=a.getActiveMipmapLevel(),v=a.state;v.setBlending(0);v.buffers.color.setClear(1,1,1,1);v.buffers.depth.setTest(!0);v.setScissorTest(!1);for(var y=0,x=d.length;y<x;y++){var F=d[y],W=F.shadow;if(void 0===W)console.warn("THREE.WebGLShadowMap:",F,"has no shadow.");else{g.copy(W.mapSize);var ia=W.getFrameExtents();g.multiply(ia);h.copy(W.mapSize);if(g.x>c||g.y>c)console.warn("THREE.WebGLShadowMap:",F,"has shadow exceeding max texture size, reducing"),g.x>c&&(h.x=Math.floor(c/ia.x),
 g.x=h.x*ia.x,W.mapSize.x=h.x),g.y>c&&(h.y=Math.floor(c/ia.y),g.y=h.y*ia.y,W.mapSize.y=h.y);null!==W.map||W.isPointLightShadow||3!==this.type||(ia={minFilter:1006,magFilter:1006,format:1023},W.map=new ka(g.x,g.y,ia),W.map.texture.name=F.name+".shadowMap",W.mapPass=new ka(g.x,g.y,ia),W.camera.updateProjectionMatrix());null===W.map&&(ia={minFilter:1003,magFilter:1003,format:1023},W.map=new ka(g.x,g.y,ia),W.map.texture.name=F.name+".shadowMap",W.camera.updateProjectionMatrix());a.setRenderTarget(W.map);
 g.x=h.x*ia.x,W.mapSize.x=h.x),g.y>c&&(h.y=Math.floor(c/ia.y),g.y=h.y*ia.y,W.mapSize.y=h.y);null!==W.map||W.isPointLightShadow||3!==this.type||(ia={minFilter:1006,magFilter:1006,format:1023},W.map=new ka(g.x,g.y,ia),W.map.texture.name=F.name+".shadowMap",W.mapPass=new ka(g.x,g.y,ia),W.camera.updateProjectionMatrix());null===W.map&&(ia={minFilter:1003,magFilter:1003,format:1023},W.map=new ka(g.x,g.y,ia),W.map.texture.name=F.name+".shadowMap",W.camera.updateProjectionMatrix());a.setRenderTarget(W.map);
@@ -114,11 +114,11 @@ a.clear();ia=W.getViewportCount();for(var z=0;z<ia;z++){var B=W.getViewport(z);l
 q.uniforms.resolution.value=F.mapSize,q.uniforms.radius.value=F.radius,a.setRenderTarget(F.map),a.clear(),a.renderBufferDirect(W,null,ia,q,n,null))}}V.needsUpdate=!1;a.setRenderTarget(u,k,t)}}}function fk(a,b,c,d){function e(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 f(c,e){z[c]=1;0===x[c]&&(a.enableVertexAttribArray(c),x[c]=1);F[c]!==
 q.uniforms.resolution.value=F.mapSize,q.uniforms.radius.value=F.radius,a.setRenderTarget(F.map),a.clear(),a.renderBufferDirect(W,null,ia,q,n,null))}}V.needsUpdate=!1;a.setRenderTarget(u,k,t)}}}function fk(a,b,c,d){function e(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 f(c,e){z[c]=1;0===x[c]&&(a.enableVertexAttribArray(c),x[c]=1);F[c]!==
 e&&((d.isWebGL2?a:b.get("ANGLE_instanced_arrays"))[d.isWebGL2?"vertexAttribDivisor":"vertexAttribDivisorANGLE"](c,e),F[c]=e)}function g(b){!0!==V[b]&&(a.enable(b),V[b]=!0)}function h(b){!1!==V[b]&&(a.disable(b),V[b]=!1)}function l(b,d,e,f,l,m,p,u){if(0===b)A&&(h(3042),A=!1);else if(A||(g(3042),A=!0),5!==b){if(b!==C||u!==W){if(100!==va||100!==D)a.blendEquation(32774),D=va=100;if(u)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,
 e&&((d.isWebGL2?a:b.get("ANGLE_instanced_arrays"))[d.isWebGL2?"vertexAttribDivisor":"vertexAttribDivisorANGLE"](c,e),F[c]=e)}function g(b){!0!==V[b]&&(a.enable(b),V[b]=!0)}function h(b){!1!==V[b]&&(a.disable(b),V[b]=!1)}function l(b,d,e,f,l,m,p,u){if(0===b)A&&(h(3042),A=!1);else if(A||(g(3042),A=!0),5!==b){if(b!==C||u!==W){if(100!==va||100!==D)a.blendEquation(32774),D=va=100;if(u)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)}I=J=$f=H=null;C=b;W=u}}else{l=l||d;m=m||e;p=p||f;if(d!==va||l!==D)a.blendEquationSeparate(c.convert(d),c.convert(l)),va=d,D=l;if(e!==H||f!==$f||m!==J||p!==I)a.blendFuncSeparate(c.convert(e),
 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)}I=J=$f=H=null;C=b;W=u}}else{l=l||d;m=m||e;p=p||f;if(d!==va||l!==D)a.blendEquationSeparate(c.convert(d),c.convert(l)),va=d,D=l;if(e!==H||f!==$f||m!==J||p!==I)a.blendFuncSeparate(c.convert(e),
-c.convert(f),c.convert(m),c.convert(p)),H=e,$f=f,J=m,I=p;C=b;W=null}}function m(b){ia!==b&&(b?a.frontFace(2304):a.frontFace(2305),ia=b)}function p(b){0!==b?(g(2884),b!==ag&&(1===b?a.cullFace(1029):2===b?a.cullFace(1028):a.cullFace(1032))):h(2884);ag=b}function u(b,c,d){if(b){if(g(32823),fa!==c||bc!==d)a.polygonOffset(c,d),fa=c,bc=d}else h(32823)}function k(b){void 0===b&&(b=33984+E-1);Pa!==b&&(a.activeTexture(b),Pa=b)}var r=new function(){var b=!1,c=new ca,d=null,e=new ca(0,0,0,0);return{setMask:function(c){d===
+c.convert(f),c.convert(m),c.convert(p)),H=e,$f=f,J=m,I=p;C=b;W=null}}function m(b){ia!==b&&(b?a.frontFace(2304):a.frontFace(2305),ia=b)}function p(b){0!==b?(g(2884),b!==ag&&(1===b?a.cullFace(1029):2===b?a.cullFace(1028):a.cullFace(1032))):h(2884);ag=b}function u(b,c,d){if(b){if(g(32823),fa!==c||bc!==d)a.polygonOffset(c,d),fa=c,bc=d}else h(32823)}function k(b){void 0===b&&(b=33984+E-1);Pa!==b&&(a.activeTexture(b),Pa=b)}var r=new function(){var b=!1,c=new da,d=null,e=new da(0,0,0,0);return{setMask:function(c){d===
 c||b||(a.colorMask(c,c,c,c),d=c)},setLocked:function(a){b=a},setClear:function(b,d,f,g,h){!0===h&&(b*=g,d*=g,f*=g);c.set(b,d,f,g);!1===e.equals(c)&&(a.clearColor(b,d,f,g),e.copy(c))},reset:function(){b=!1;d=null;e.set(-1,0,0,0)}}},q=new function(){var b=!1,c=null,d=null,e=null;return{setTest:function(a){a?g(2929):h(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);
 c||b||(a.colorMask(c,c,c,c),d=c)},setLocked:function(a){b=a},setClear:function(b,d,f,g,h){!0===h&&(b*=g,d*=g,f*=g);c.set(b,d,f,g);!1===e.equals(c)&&(a.clearColor(b,d,f,g),e.copy(c))},reset:function(){b=!1;d=null;e.set(-1,0,0,0)}}},q=new function(){var b=!1,c=null,d=null,e=null;return{setTest:function(a){a?g(2929):h(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}}},v=new function(){var b=!1,c=null,d=null,e=null,f=null,l=null,m=null,p=null,u=null;return{setTest:function(a){b||(a?g(2960):h(2960))},setMask:function(d){c===d||b||(a.stencilMask(d),
 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}}},v=new function(){var b=!1,c=null,d=null,e=null,f=null,l=null,m=null,p=null,u=null;return{setTest:function(a){b||(a?g(2960):h(2960))},setMask:function(d){c===d||b||(a.stencilMask(d),
 c=d)},setFunc:function(b,c,g){if(d!==b||e!==c||f!==g)a.stencilFunc(b,c,g),d=b,e=c,f=g},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){u!==b&&(a.clearStencil(b),u=b)},reset:function(){b=!1;u=p=m=l=f=e=d=c=null}}},n=a.getParameter(34921),z=new Uint8Array(n),x=new Uint8Array(n),F=new Uint8Array(n),V={},B=null,w=null,A=null,C=null,va=null,H=null,$f=null,D=null,J=null,I=null,W=!1,ia=null,ag=null,ac=null,fa=null,bc=null,E=a.getParameter(35661),
 c=d)},setFunc:function(b,c,g){if(d!==b||e!==c||f!==g)a.stencilFunc(b,c,g),d=b,e=c,f=g},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){u!==b&&(a.clearStencil(b),u=b)},reset:function(){b=!1;u=p=m=l=f=e=d=c=null}}},n=a.getParameter(34921),z=new Uint8Array(n),x=new Uint8Array(n),F=new Uint8Array(n),V={},B=null,w=null,A=null,C=null,va=null,H=null,$f=null,D=null,J=null,I=null,W=!1,ia=null,ag=null,ac=null,fa=null,bc=null,E=a.getParameter(35661),
-cg=!1;n=0;n=a.getParameter(7938);-1!==n.indexOf("WebGL")?(n=parseFloat(/^WebGL ([0-9])/.exec(n)[1]),cg=1<=n):-1!==n.indexOf("OpenGL ES")&&(n=parseFloat(/^OpenGL ES ([0-9])/.exec(n)[1]),cg=2<=n);var Pa=null,dg={},G=new ca,Q=new ca,L={};L[3553]=e(3553,3553,1);L[34067]=e(34067,34069,6);r.setClear(0,0,0,1);q.setClear(1);v.setClear(0);g(2929);q.setFunc(3);m(!1);p(1);g(2884);l(0);return{buffers:{color:r,depth:q,stencil:v},initAttributes:function(){for(var a=0,b=z.length;a<b;a++)z[a]=0},enableAttribute:function(a){f(a,
+cg=!1;n=0;n=a.getParameter(7938);-1!==n.indexOf("WebGL")?(n=parseFloat(/^WebGL ([0-9])/.exec(n)[1]),cg=1<=n):-1!==n.indexOf("OpenGL ES")&&(n=parseFloat(/^OpenGL ES ([0-9])/.exec(n)[1]),cg=2<=n);var Pa=null,dg={},G=new da,Q=new da,L={};L[3553]=e(3553,3553,1);L[34067]=e(34067,34069,6);r.setClear(0,0,0,1);q.setClear(1);v.setClear(0);g(2929);q.setFunc(3);m(!1);p(1);g(2884);l(0);return{buffers:{color:r,depth:q,stencil:v},initAttributes:function(){for(var a=0,b=z.length;a<b;a++)z[a]=0},enableAttribute:function(a){f(a,
 0)},enableAttributeAndDivisor:f,disableUnusedAttributes:function(){for(var b=0,c=x.length;b!==c;++b)x[b]!==z[b]&&(a.disableVertexAttribArray(b),x[b]=0)},enable:g,disable:h,getCompressedTextureFormats:function(){if(null===B&&(B=[],b.get("WEBGL_compressed_texture_pvrtc")||b.get("WEBGL_compressed_texture_s3tc")||b.get("WEBGL_compressed_texture_etc1")||b.get("WEBGL_compressed_texture_astc")))for(var c=a.getParameter(34467),d=0;d<c.length;d++)B.push(c[d]);return B},useProgram:function(b){return w!==b?
 0)},enableAttributeAndDivisor:f,disableUnusedAttributes:function(){for(var b=0,c=x.length;b!==c;++b)x[b]!==z[b]&&(a.disableVertexAttribArray(b),x[b]=0)},enable:g,disable:h,getCompressedTextureFormats:function(){if(null===B&&(B=[],b.get("WEBGL_compressed_texture_pvrtc")||b.get("WEBGL_compressed_texture_s3tc")||b.get("WEBGL_compressed_texture_etc1")||b.get("WEBGL_compressed_texture_astc")))for(var c=a.getParameter(34467),d=0;d<c.length;d++)B.push(c[d]);return B},useProgram:function(b){return w!==b?
 (a.useProgram(b),w=b,!0):!1},setBlending:l,setMaterial:function(a,b){2===a.side?h(2884):g(2884);var c=1===a.side;b&&(c=!c);m(c);1===a.blending&&!1===a.transparent?l(0):l(a.blending,a.blendEquation,a.blendSrc,a.blendDst,a.blendEquationAlpha,a.blendSrcAlpha,a.blendDstAlpha,a.premultipliedAlpha);q.setFunc(a.depthFunc);q.setTest(a.depthTest);q.setMask(a.depthWrite);r.setMask(a.colorWrite);b=a.stencilWrite;v.setTest(b);b&&(v.setMask(a.stencilWriteMask),v.setFunc(a.stencilFunc,a.stencilRef,a.stencilFuncMask),
 (a.useProgram(b),w=b,!0):!1},setBlending:l,setMaterial:function(a,b){2===a.side?h(2884):g(2884);var c=1===a.side;b&&(c=!c);m(c);1===a.blending&&!1===a.transparent?l(0):l(a.blending,a.blendEquation,a.blendSrc,a.blendDst,a.blendEquationAlpha,a.blendSrcAlpha,a.blendDstAlpha,a.premultipliedAlpha);q.setFunc(a.depthFunc);q.setTest(a.depthTest);q.setMask(a.depthWrite);r.setMask(a.colorWrite);b=a.stencilWrite;v.setTest(b);b&&(v.setMask(a.stencilWriteMask),v.setFunc(a.stencilFunc,a.stencilRef,a.stencilFuncMask),
 v.setOp(a.stencilFail,a.stencilZFail,a.stencilZPass));u(a.polygonOffset,a.polygonOffsetFactor,a.polygonOffsetUnits)},setFlipSided:m,setCullFace:p,setLineWidth:function(b){b!==ac&&(cg&&a.lineWidth(b),ac=b)},setPolygonOffset:u,setScissorTest:function(a){a?g(3089):h(3089)},activeTexture:k,bindTexture:function(b,c){null===Pa&&k();var d=dg[Pa];void 0===d&&(d={type:void 0,texture:void 0},dg[Pa]=d);if(d.type!==b||d.texture!==c)a.bindTexture(b,c||L[b]),d.type=b,d.texture=c},compressedTexImage2D:function(){try{a.compressedTexImage2D.apply(a,
 v.setOp(a.stencilFail,a.stencilZFail,a.stencilZPass));u(a.polygonOffset,a.polygonOffsetFactor,a.polygonOffsetUnits)},setFlipSided:m,setCullFace:p,setLineWidth:function(b){b!==ac&&(cg&&a.lineWidth(b),ac=b)},setPolygonOffset:u,setScissorTest:function(a){a?g(3089):h(3089)},activeTexture:k,bindTexture:function(b,c){null===Pa&&k();var d=dg[Pa];void 0===d&&(d={type:void 0,texture:void 0},dg[Pa]=d);if(d.type!==b||d.texture!==c)a.bindTexture(b,c||L[b]),d.type=b,d.texture=c},compressedTexImage2D:function(){try{a.compressedTexImage2D.apply(a,
@@ -157,44 +157,44 @@ if(null!==d)return d.HALF_FLOAT_OES}if(1021===a)return 6406;if(1022===a)return 6
 a)return 775;if(210===a)return 776;if(33776===a||33777===a||33778===a||33779===a)if(d=b.get("WEBGL_compressed_texture_s3tc"),null!==d){if(33776===a)return d.COMPRESSED_RGB_S3TC_DXT1_EXT;if(33777===a)return d.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(33778===a)return d.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(33779===a)return d.COMPRESSED_RGBA_S3TC_DXT5_EXT}if(35840===a||35841===a||35842===a||35843===a)if(d=b.get("WEBGL_compressed_texture_pvrtc"),null!==d){if(35840===a)return d.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(35841===
 a)return 775;if(210===a)return 776;if(33776===a||33777===a||33778===a||33779===a)if(d=b.get("WEBGL_compressed_texture_s3tc"),null!==d){if(33776===a)return d.COMPRESSED_RGB_S3TC_DXT1_EXT;if(33777===a)return d.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(33778===a)return d.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(33779===a)return d.COMPRESSED_RGBA_S3TC_DXT5_EXT}if(35840===a||35841===a||35842===a||35843===a)if(d=b.get("WEBGL_compressed_texture_pvrtc"),null!==d){if(35840===a)return d.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(35841===
 a)return d.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(35842===a)return d.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(35843===a)return d.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(36196===a&&(d=b.get("WEBGL_compressed_texture_etc1"),null!==d))return d.COMPRESSED_RGB_ETC1_WEBGL;if(37808===a||37809===a||37810===a||37811===a||37812===a||37813===a||37814===a||37815===a||37816===a||37817===a||37818===a||37819===a||37820===a||37821===a)if(d=b.get("WEBGL_compressed_texture_astc"),null!==d)return a;if(103===a||104===a){if(c.isWebGL2){if(103===
 a)return d.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(35842===a)return d.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(35843===a)return d.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(36196===a&&(d=b.get("WEBGL_compressed_texture_etc1"),null!==d))return d.COMPRESSED_RGB_ETC1_WEBGL;if(37808===a||37809===a||37810===a||37811===a||37812===a||37813===a||37814===a||37815===a||37816===a||37817===a||37818===a||37819===a||37820===a||37821===a)if(d=b.get("WEBGL_compressed_texture_astc"),null!==d)return a;if(103===a||104===a){if(c.isWebGL2){if(103===
 a)return 32775;if(104===a)return 32776}d=b.get("EXT_blend_minmax");if(null!==d){if(103===a)return d.MIN_EXT;if(104===a)return d.MAX_EXT}}if(1020===a){if(c.isWebGL2)return 34042;d=b.get("WEBGL_depth_texture");if(null!==d)return d.UNSIGNED_INT_24_8_WEBGL}return 0}}}function eg(a,b,c,d){ka.call(this,a,b,d);this.stencilBuffer=this.depthBuffer=!1;this.numViews=c}function hk(a,b){function c(a){if(a.isArrayCamera)return a.cameras;k[0]=a;return k}function d(a){if(!a.isArrayCamera)return!0;a=a.cameras;if(a.length>
 a)return 32775;if(104===a)return 32776}d=b.get("EXT_blend_minmax");if(null!==d){if(103===a)return d.MIN_EXT;if(104===a)return d.MAX_EXT}}if(1020===a){if(c.isWebGL2)return 34042;d=b.get("WEBGL_depth_texture");if(null!==d)return d.UNSIGNED_INT_24_8_WEBGL}return 0}}}function eg(a,b,c,d){ka.call(this,a,b,d);this.stencilBuffer=this.depthBuffer=!1;this.numViews=c}function hk(a,b){function c(a){if(a.isArrayCamera)return a.cameras;k[0]=a;return k}function d(a){if(!a.isArrayCamera)return!0;a=a.cameras;if(a.length>
-g)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.capabilities,f=a.properties,g=e.maxMultiviewViews,h;if(a.capabilities.multiview){var l=new eg(0,0,2);var m=new w;var p=[];var u=[];var k=[];e=e.maxMultiviewViews;for(var r=0;r<e;r++)p[r]=new M,u[r]=new S}this.attachCamera=function(b){if(d(b)){(h=a.getRenderTarget())?m.set(h.width,h.height):a.getDrawingBufferSize(m);if(b.isArrayCamera){var c=b.cameras[0].viewport;
+g)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.capabilities,f=a.properties,g=e.maxMultiviewViews,h;if(a.capabilities.multiview){var l=new eg(0,0,2);var m=new w;var p=[];var u=[];var k=[];e=e.maxMultiviewViews;for(var r=0;r<e;r++)p[r]=new M,u[r]=new ca}this.attachCamera=function(b){if(d(b)){(h=a.getRenderTarget())?m.set(h.width,h.height):a.getDrawingBufferSize(m);if(b.isArrayCamera){var c=b.cameras[0].viewport;
 l.setSize(c.z,c.w);l.setNumViews(b.cameras.length)}else l.setSize(m.x,m.y),l.setNumViews(2);a.setRenderTarget(l)}};this.detachCamera=function(c){if(l===a.getRenderTarget()){a.setRenderTarget(h);var d=l,e=d.numViews,g=f.get(d).__webglViewFramebuffers,p=d.width;d=d.height;if(c.isArrayCamera)for(var u=0;u<e;u++){var k=c.cameras[u].viewport,q=k.x,t=k.y,r=q+k.z;k=t+k.w;b.bindFramebuffer(36008,g[u]);b.blitFramebuffer(0,0,p,d,q,t,r,k,16384,9728)}else b.bindFramebuffer(36008,g[0]),b.blitFramebuffer(0,0,p,
 l.setSize(c.z,c.w);l.setNumViews(b.cameras.length)}else l.setSize(m.x,m.y),l.setNumViews(2);a.setRenderTarget(l)}};this.detachCamera=function(c){if(l===a.getRenderTarget()){a.setRenderTarget(h);var d=l,e=d.numViews,g=f.get(d).__webglViewFramebuffers,p=d.width;d=d.height;if(c.isArrayCamera)for(var u=0;u<e;u++){var k=c.cameras[u].viewport,q=k.x,t=k.y,r=q+k.z;k=t+k.w;b.bindFramebuffer(36008,g[u]);b.blitFramebuffer(0,0,p,d,q,t,r,k,16384,9728)}else b.bindFramebuffer(36008,g[0]),b.blitFramebuffer(0,0,p,
 d,0,0,m.x,m.y,16384,9728)}};this.updateCameraProjectionMatricesUniform=function(a,d){a=c(a);for(var e=0;e<a.length;e++)p[e].copy(a[e].projectionMatrix);d.setValue(b,"projectionMatrices",p)};this.updateCameraViewMatricesUniform=function(a,d){a=c(a);for(var e=0;e<a.length;e++)p[e].copy(a[e].matrixWorldInverse);d.setValue(b,"viewMatrices",p)};this.updateObjectMatricesUniforms=function(a,d,e){d=c(d);for(var f=0;f<d.length;f++)p[f].multiplyMatrices(d[f].matrixWorldInverse,a.matrixWorld),u[f].getNormalMatrix(p[f]);
 d,0,0,m.x,m.y,16384,9728)}};this.updateCameraProjectionMatricesUniform=function(a,d){a=c(a);for(var e=0;e<a.length;e++)p[e].copy(a[e].projectionMatrix);d.setValue(b,"projectionMatrices",p)};this.updateCameraViewMatricesUniform=function(a,d){a=c(a);for(var e=0;e<a.length;e++)p[e].copy(a[e].matrixWorldInverse);d.setValue(b,"viewMatrices",p)};this.updateObjectMatricesUniforms=function(a,d,e){d=c(d);for(var f=0;f<d.length;f++)p[f].multiplyMatrices(d[f].matrixWorldInverse,a.matrixWorld),u[f].getNormalMatrix(p[f]);
 e.setValue(b,"modelViewMatrices",p);e.setValue(b,"normalMatrices",u)}}function Hc(){C.call(this);this.type="Group"}function Jd(a){ja.call(this);this.cameras=a||[]}function Ih(a,b,c){Jh.setFromMatrixPosition(b.matrixWorld);Kh.setFromMatrixPosition(c.matrixWorld);var d=Jh.distanceTo(Kh),e=b.projectionMatrix.elements,f=c.projectionMatrix.elements,g=e[14]/(e[10]-1);c=e[14]/(e[10]+1);var h=(e[9]+1)/e[5],l=(e[9]-1)/e[5],m=(e[8]-1)/e[0],p=(f[8]+1)/f[0];e=g*m;f=g*p;p=d/(-m+p);m=p*-m;b.matrixWorld.decompose(a.position,
 e.setValue(b,"modelViewMatrices",p);e.setValue(b,"normalMatrices",u)}}function Hc(){C.call(this);this.type="Group"}function Jd(a){ja.call(this);this.cameras=a||[]}function Ih(a,b,c){Jh.setFromMatrixPosition(b.matrixWorld);Kh.setFromMatrixPosition(c.matrixWorld);var d=Jh.distanceTo(Kh),e=b.projectionMatrix.elements,f=c.projectionMatrix.elements,g=e[14]/(e[10]-1);c=e[14]/(e[10]+1);var h=(e[9]+1)/e[5],l=(e[9]-1)/e[5],m=(e[8]-1)/e[0],p=(f[8]+1)/f[0];e=g*m;f=g*p;p=d/(-m+p);m=p*-m;b.matrixWorld.decompose(a.position,
 a.quaternion,a.scale);a.translateX(m);a.translateZ(p);a.matrixWorld.compose(a.position,a.quaternion,a.scale);a.matrixWorldInverse.getInverse(a.matrixWorld);b=g+p;g=c+p;a.projectionMatrix.makePerspective(e-m,f+(d-m),h*c/g*b,l*c/g*b,b,g)}function fg(a){function b(){return null!==h&&!0===h.isPresenting}function c(){if(b()){var c=h.getEyeParameters("left");e=2*c.renderWidth*r;f=c.renderHeight*r;Cb=a.getPixelRatio();a.getSize(B);a.setDrawingBufferSize(e,f,1);x.viewport.set(0,0,e/2,f);F.viewport.set(e/
 a.quaternion,a.scale);a.translateX(m);a.translateZ(p);a.matrixWorld.compose(a.position,a.quaternion,a.scale);a.matrixWorldInverse.getInverse(a.matrixWorld);b=g+p;g=c+p;a.projectionMatrix.makePerspective(e-m,f+(d-m),h*c/g*b,l*c/g*b,b,g)}function fg(a){function b(){return null!==h&&!0===h.isPresenting}function c(){if(b()){var c=h.getEyeParameters("left");e=2*c.renderWidth*r;f=c.renderHeight*r;Cb=a.getPixelRatio();a.getSize(B);a.setDrawingBufferSize(e,f,1);x.viewport.set(0,0,e/2,f);F.viewport.set(e/
 2,0,e/2,f);C.start();g.dispatchEvent({type:"sessionstart"})}else g.enabled&&a.setDrawingBufferSize(B.width,B.height,Cb),C.stop(),g.dispatchEvent({type:"sessionend"})}function d(a,b){null!==b&&4===b.length&&a.set(b[0]*e,b[1]*f,b[2]*e,b[3]*f)}var e,f,g=this,h=null,l=null,m=null,p=[],u=new M,k=new M,r=1,q="local-floor";"undefined"!==typeof window&&"VRFrameData"in window&&(l=new window.VRFrameData,window.addEventListener("vrdisplaypresentchange",c,!1));var v=new M,y=new sa,z=new n,x=new ja;x.viewport=
 2,0,e/2,f);C.start();g.dispatchEvent({type:"sessionstart"})}else g.enabled&&a.setDrawingBufferSize(B.width,B.height,Cb),C.stop(),g.dispatchEvent({type:"sessionend"})}function d(a,b){null!==b&&4===b.length&&a.set(b[0]*e,b[1]*f,b[2]*e,b[3]*f)}var e,f,g=this,h=null,l=null,m=null,p=[],u=new M,k=new M,r=1,q="local-floor";"undefined"!==typeof window&&"VRFrameData"in window&&(l=new window.VRFrameData,window.addEventListener("vrdisplaypresentchange",c,!1));var v=new M,y=new sa,z=new n,x=new ja;x.viewport=
-new ca;x.layers.enable(1);var F=new ja;F.viewport=new ca;F.layers.enable(2);var V=new Jd([x,F]);V.layers.enable(1);V.layers.enable(2);var B=new w,Cb,A=[];this.enabled=!1;this.getController=function(a){var b=p[a];void 0===b&&(b=new Hc,b.matrixAutoUpdate=!1,b.visible=!1,p[a]=b);return b};this.getDevice=function(){return h};this.setDevice=function(a){void 0!==a&&(h=a);C.setContext(a)};this.setFramebufferScaleFactor=function(a){r=a};this.setReferenceSpaceType=function(a){q=a};this.setPoseTarget=function(a){void 0!==
+new da;x.layers.enable(1);var F=new ja;F.viewport=new da;F.layers.enable(2);var V=new Jd([x,F]);V.layers.enable(1);V.layers.enable(2);var B=new w,Cb,A=[];this.enabled=!1;this.getController=function(a){var b=p[a];void 0===b&&(b=new Hc,b.matrixAutoUpdate=!1,b.visible=!1,p[a]=b);return b};this.getDevice=function(){return h};this.setDevice=function(a){void 0!==a&&(h=a);C.setContext(a)};this.setFramebufferScaleFactor=function(a){r=a};this.setReferenceSpaceType=function(a){q=a};this.setPoseTarget=function(a){void 0!==
 a&&(m=a)};this.getCamera=function(a){var c="local-floor"===q?1.6:0;if(!1===b())return a.position.set(0,c,0),a.rotation.set(0,0,0),a;h.depthNear=a.near;h.depthFar=a.far;h.getFrameData(l);if("local-floor"===q){var e=h.stageParameters;e?u.fromArray(e.sittingToStandingTransform):u.makeTranslation(0,c,0)}c=l.pose;e=null!==m?m:a;e.matrix.copy(u);e.matrix.decompose(e.position,e.quaternion,e.scale);null!==c.orientation&&(y.fromArray(c.orientation),e.quaternion.multiply(y));null!==c.position&&(y.setFromRotationMatrix(u),
 a&&(m=a)};this.getCamera=function(a){var c="local-floor"===q?1.6:0;if(!1===b())return a.position.set(0,c,0),a.rotation.set(0,0,0),a;h.depthNear=a.near;h.depthFar=a.far;h.getFrameData(l);if("local-floor"===q){var e=h.stageParameters;e?u.fromArray(e.sittingToStandingTransform):u.makeTranslation(0,c,0)}c=l.pose;e=null!==m?m:a;e.matrix.copy(u);e.matrix.decompose(e.position,e.quaternion,e.scale);null!==c.orientation&&(y.fromArray(c.orientation),e.quaternion.multiply(y));null!==c.position&&(y.setFromRotationMatrix(u),
 z.fromArray(c.position),z.applyQuaternion(y),e.position.add(z));e.updateMatrixWorld();x.near=a.near;F.near=a.near;x.far=a.far;F.far=a.far;x.matrixWorldInverse.fromArray(l.leftViewMatrix);F.matrixWorldInverse.fromArray(l.rightViewMatrix);k.getInverse(u);"local-floor"===q&&(x.matrixWorldInverse.multiply(k),F.matrixWorldInverse.multiply(k));a=e.parent;null!==a&&(v.getInverse(a.matrixWorld),x.matrixWorldInverse.multiply(v),F.matrixWorldInverse.multiply(v));x.matrixWorld.getInverse(x.matrixWorldInverse);
 z.fromArray(c.position),z.applyQuaternion(y),e.position.add(z));e.updateMatrixWorld();x.near=a.near;F.near=a.near;x.far=a.far;F.far=a.far;x.matrixWorldInverse.fromArray(l.leftViewMatrix);F.matrixWorldInverse.fromArray(l.rightViewMatrix);k.getInverse(u);"local-floor"===q&&(x.matrixWorldInverse.multiply(k),F.matrixWorldInverse.multiply(k));a=e.parent;null!==a&&(v.getInverse(a.matrixWorld),x.matrixWorldInverse.multiply(v),F.matrixWorldInverse.multiply(v));x.matrixWorld.getInverse(x.matrixWorldInverse);
 F.matrixWorld.getInverse(F.matrixWorldInverse);x.projectionMatrix.fromArray(l.leftProjectionMatrix);F.projectionMatrix.fromArray(l.rightProjectionMatrix);Ih(V,x,F);a=h.getLayers();a.length&&(a=a[0],d(x.viewport,a.leftBounds),d(F.viewport,a.rightBounds));a:for(a=0;a<p.length;a++){c=p[a];b:{e=a;for(var f=navigator.getGamepads&&navigator.getGamepads(),g=0,r=0,t=f.length;g<t;g++){var n=f[g];if(n&&("Daydream Controller"===n.id||"Gear VR Controller"===n.id||"Oculus Go Controller"===n.id||"OpenVR Gamepad"===
 F.matrixWorld.getInverse(F.matrixWorldInverse);x.projectionMatrix.fromArray(l.leftProjectionMatrix);F.projectionMatrix.fromArray(l.rightProjectionMatrix);Ih(V,x,F);a=h.getLayers();a.length&&(a=a[0],d(x.viewport,a.leftBounds),d(F.viewport,a.rightBounds));a:for(a=0;a<p.length;a++){c=p[a];b:{e=a;for(var f=navigator.getGamepads&&navigator.getGamepads(),g=0,r=0,t=f.length;g<t;g++){var n=f[g];if(n&&("Daydream Controller"===n.id||"Gear VR Controller"===n.id||"Oculus Go Controller"===n.id||"OpenVR Gamepad"===
 n.id||n.id.startsWith("Oculus Touch")||n.id.startsWith("HTC Vive Focus")||n.id.startsWith("Spatial Controller"))){if(r===e){e=n;break b}r++}}e=void 0}if(void 0!==e&&void 0!==e.pose){if(null===e.pose)break a;f=e.pose;!1===f.hasPosition&&c.position.set(.2,-.6,-.05);null!==f.position&&c.position.fromArray(f.position);null!==f.orientation&&c.quaternion.fromArray(f.orientation);c.matrix.compose(c.position,c.quaternion,c.scale);c.matrix.premultiply(u);c.matrix.decompose(c.position,c.quaternion,c.scale);
 n.id||n.id.startsWith("Oculus Touch")||n.id.startsWith("HTC Vive Focus")||n.id.startsWith("Spatial Controller"))){if(r===e){e=n;break b}r++}}e=void 0}if(void 0!==e&&void 0!==e.pose){if(null===e.pose)break a;f=e.pose;!1===f.hasPosition&&c.position.set(.2,-.6,-.05);null!==f.position&&c.position.fromArray(f.position);null!==f.orientation&&c.quaternion.fromArray(f.orientation);c.matrix.compose(c.position,c.quaternion,c.scale);c.matrix.premultiply(u);c.matrix.decompose(c.position,c.quaternion,c.scale);
 c.matrixWorldNeedsUpdate=!0;c.visible=!0;f="Daydream Controller"===e.id?0:1;void 0===A[a]&&(A[a]=!1);A[a]!==e.buttons[f].pressed&&(A[a]=e.buttons[f].pressed,!0===A[a]?c.dispatchEvent({type:"selectstart"}):(c.dispatchEvent({type:"selectend"}),c.dispatchEvent({type:"select"})))}else c.visible=!1}return V};this.getStandingMatrix=function(){return u};this.isPresenting=b;var C=new Xf;this.setAnimationLoop=function(a){C.setAnimationLoop(a);b()&&C.start()};this.submitFrame=function(){b()&&h.submitFrame()};
 c.matrixWorldNeedsUpdate=!0;c.visible=!0;f="Daydream Controller"===e.id?0:1;void 0===A[a]&&(A[a]=!1);A[a]!==e.buttons[f].pressed&&(A[a]=e.buttons[f].pressed,!0===A[a]?c.dispatchEvent({type:"selectstart"}):(c.dispatchEvent({type:"selectend"}),c.dispatchEvent({type:"select"})))}else c.visible=!1}return V};this.getStandingMatrix=function(){return u};this.isPresenting=b;var C=new Xf;this.setAnimationLoop=function(a){C.setAnimationLoop(a);b()&&C.start()};this.submitFrame=function(){b()&&h.submitFrame()};
 this.dispose=function(){"undefined"!==typeof window&&window.removeEventListener("vrdisplaypresentchange",c)};this.setFrameOfReferenceType=function(){console.warn("THREE.WebVRManager: setFrameOfReferenceType() has been deprecated.")}}function Lh(a,b){function c(){return null!==l&&null!==m}function d(a){for(var b=0;b<k.length;b++)r[b]===a.inputSource&&k[b].dispatchEvent({type:a.type})}function e(){a.setFramebuffer(null);a.setRenderTarget(a.getRenderTarget());x.stop();h.dispatchEvent({type:"sessionend"})}
 this.dispose=function(){"undefined"!==typeof window&&window.removeEventListener("vrdisplaypresentchange",c)};this.setFrameOfReferenceType=function(){console.warn("THREE.WebVRManager: setFrameOfReferenceType() has been deprecated.")}}function Lh(a,b){function c(){return null!==l&&null!==m}function d(a){for(var b=0;b<k.length;b++)r[b]===a.inputSource&&k[b].dispatchEvent({type:a.type})}function e(){a.setFramebuffer(null);a.setRenderTarget(a.getRenderTarget());x.stop();h.dispatchEvent({type:"sessionend"})}
-function f(a){m=a;x.setContext(l);x.start();h.dispatchEvent({type:"sessionstart"})}function g(a,b){null===b?a.matrixWorld.copy(a.matrix):a.matrixWorld.multiplyMatrices(b.matrixWorld,a.matrix);a.matrixWorldInverse.getInverse(a.matrixWorld)}var h=this,l=null,m=null,p="local-floor",u=null,k=[],r=[],q=new ja;q.layers.enable(1);q.viewport=new ca;var n=new ja;n.layers.enable(2);n.viewport=new ca;var y=new Jd([q,n]);y.layers.enable(1);y.layers.enable(2);this.enabled=!1;this.getController=function(a){var b=
+function f(a){m=a;x.setContext(l);x.start();h.dispatchEvent({type:"sessionstart"})}function g(a,b){null===b?a.matrixWorld.copy(a.matrix):a.matrixWorld.multiplyMatrices(b.matrixWorld,a.matrix);a.matrixWorldInverse.getInverse(a.matrixWorld)}var h=this,l=null,m=null,p="local-floor",u=null,k=[],r=[],q=new ja;q.layers.enable(1);q.viewport=new da;var n=new ja;n.layers.enable(2);n.viewport=new da;var y=new Jd([q,n]);y.layers.enable(1);y.layers.enable(2);this.enabled=!1;this.getController=function(a){var b=
 k[a];void 0===b&&(b=new Hc,b.matrixAutoUpdate=!1,b.visible=!1,k[a]=b);return b};this.setFramebufferScaleFactor=function(a){};this.setReferenceSpaceType=function(a){p=a};this.getSession=function(){return l};this.setSession=function(a){l=a;null!==l&&(l.addEventListener("select",d),l.addEventListener("selectstart",d),l.addEventListener("selectend",d),l.addEventListener("end",e),l.updateRenderState({baseLayer:new XRWebGLLayer(l,b)}),l.requestReferenceSpace(p).then(f),r=l.inputSources,l.addEventListener("inputsourceschange",
 k[a];void 0===b&&(b=new Hc,b.matrixAutoUpdate=!1,b.visible=!1,k[a]=b);return b};this.setFramebufferScaleFactor=function(a){};this.setReferenceSpaceType=function(a){p=a};this.getSession=function(){return l};this.setSession=function(a){l=a;null!==l&&(l.addEventListener("select",d),l.addEventListener("selectstart",d),l.addEventListener("selectend",d),l.addEventListener("end",e),l.updateRenderState({baseLayer:new XRWebGLLayer(l,b)}),l.requestReferenceSpace(p).then(f),r=l.inputSources,l.addEventListener("inputsourceschange",
 function(){r=l.inputSources;console.log(r);for(var a=0;a<k.length;a++)k[a].userData.inputSource=r[a]}))};this.getCamera=function(a){if(c()){var b=a.parent,d=y.cameras;g(y,b);for(var e=0;e<d.length;e++)g(d[e],b);a.matrixWorld.copy(y.matrixWorld);a=a.children;e=0;for(b=a.length;e<b;e++)a[e].updateMatrixWorld(!0);Ih(y,q,n);return y}return a};this.isPresenting=c;var z=null,x=new Xf;x.setAnimationLoop(function(b,c){u=c.getViewerPose(m);if(null!==u){var d=u.views,e=l.renderState.baseLayer;a.setFramebuffer(e.framebuffer);
 function(){r=l.inputSources;console.log(r);for(var a=0;a<k.length;a++)k[a].userData.inputSource=r[a]}))};this.getCamera=function(a){if(c()){var b=a.parent,d=y.cameras;g(y,b);for(var e=0;e<d.length;e++)g(d[e],b);a.matrixWorld.copy(y.matrixWorld);a=a.children;e=0;for(b=a.length;e<b;e++)a[e].updateMatrixWorld(!0);Ih(y,q,n);return y}return a};this.isPresenting=c;var z=null,x=new Xf;x.setAnimationLoop(function(b,c){u=c.getViewerPose(m);if(null!==u){var d=u.views,e=l.renderState.baseLayer;a.setFramebuffer(e.framebuffer);
 for(var f=0;f<d.length;f++){var g=d[f],h=e.getViewport(g),p=y.cameras[f];p.matrix.fromArray(g.transform.inverse.matrix).getInverse(p.matrix);p.projectionMatrix.fromArray(g.projectionMatrix);p.viewport.set(h.x,h.y,h.width,h.height);0===f&&y.matrix.copy(p.matrix)}}for(f=0;f<k.length;f++){d=k[f];if(e=r[f])if(e=c.getPose(e.targetRaySpace,m),null!==e){d.matrix.fromArray(e.transform.matrix);d.matrix.decompose(d.position,d.rotation,d.scale);d.visible=!0;continue}d.visible=!1}z&&z(b)});this.setAnimationLoop=
 for(var f=0;f<d.length;f++){var g=d[f],h=e.getViewport(g),p=y.cameras[f];p.matrix.fromArray(g.transform.inverse.matrix).getInverse(p.matrix);p.projectionMatrix.fromArray(g.projectionMatrix);p.viewport.set(h.x,h.y,h.width,h.height);0===f&&y.matrix.copy(p.matrix)}}for(f=0;f<k.length;f++){d=k[f];if(e=r[f])if(e=c.getPose(e.targetRaySpace,m),null!==e){d.matrix.fromArray(e.transform.matrix);d.matrix.decompose(d.position,d.rotation,d.scale);d.visible=!0;continue}d.visible=!1}z&&z(b)});this.setAnimationLoop=
 function(a){z=a};this.dispose=function(){};this.getStandingMatrix=function(){console.warn("THREE.WebXRManager: getStandingMatrix() is no longer needed.");return new M};this.getDevice=function(){console.warn("THREE.WebXRManager: getDevice() has been deprecated.")};this.setDevice=function(){console.warn("THREE.WebXRManager: setDevice() has been deprecated.")};this.setFrameOfReferenceType=function(){console.warn("THREE.WebXRManager: setFrameOfReferenceType() has been deprecated.")};this.submitFrame=
 function(a){z=a};this.dispose=function(){};this.getStandingMatrix=function(){console.warn("THREE.WebXRManager: getStandingMatrix() is no longer needed.");return new M};this.getDevice=function(){console.warn("THREE.WebXRManager: getDevice() has been deprecated.")};this.setDevice=function(){console.warn("THREE.WebXRManager: setDevice() has been deprecated.")};this.setFrameOfReferenceType=function(){console.warn("THREE.WebXRManager: setFrameOfReferenceType() has been deprecated.")};this.submitFrame=
-function(){}}function gg(a){var b;function c(){pa=new Yi(K);Ca=new Wi(K,pa,a);Ca.isWebGL2||(pa.get("WEBGL_depth_texture"),pa.get("OES_texture_float"),pa.get("OES_texture_half_float"),pa.get("OES_texture_half_float_linear"),pa.get("OES_standard_derivatives"),pa.get("OES_element_index_uint"),pa.get("ANGLE_instanced_arrays"));pa.get("OES_texture_float_linear");ka=new Hh(K,pa,Ca);ha=new fk(K,pa,ka,Ca);ha.scissor(T.copy(ja).multiplyScalar(ea).floor());ha.viewport(Z.copy(ba).multiplyScalar(ea).floor());
-S=new aj(K);R=new Wj;aa=new gk(K,pa,ha,R,Ca,ka,S);ta=new Ti(K);wa=new Zi(K,ta,S);qa=new dj(wa,S);ya=new cj(K);ma=new Vj(G,pa,Ca);ua=new Zj;sa=new ek;la=new Ui(G,ha,qa,A);Aa=new Vi(K,pa,S,Ca);Ba=new $i(K,pa,S,Ca);S.programs=ma.programs;G.capabilities=Ca;G.extensions=pa;G.properties=R;G.renderLists=ua;G.state=ha;G.info=S}function d(a){a.preventDefault();console.log("THREE.WebGLRenderer: Context Lost.");Q=!0}function e(){console.log("THREE.WebGLRenderer: Context Restored.");Q=!1;c()}function f(a){a=
+function(){}}function gg(a){var b;function c(){pa=new Yi(K);Ca=new Wi(K,pa,a);Ca.isWebGL2||(pa.get("WEBGL_depth_texture"),pa.get("OES_texture_float"),pa.get("OES_texture_half_float"),pa.get("OES_texture_half_float_linear"),pa.get("OES_standard_derivatives"),pa.get("OES_element_index_uint"),pa.get("ANGLE_instanced_arrays"));pa.get("OES_texture_float_linear");ka=new Hh(K,pa,Ca);ha=new fk(K,pa,ka,Ca);ha.scissor(T.copy(ja).multiplyScalar(ea).floor());ha.viewport(Z.copy(S).multiplyScalar(ea).floor());
+ca=new aj(K);R=new Wj;ba=new gk(K,pa,ha,R,Ca,ka,ca);ta=new Ti(K);wa=new Zi(K,ta,ca);qa=new dj(wa,ca);ya=new cj(K);ma=new Vj(G,pa,Ca);ua=new Zj;sa=new ek;la=new Ui(G,ha,qa,A);Aa=new Vi(K,pa,ca,Ca);Ba=new $i(K,pa,ca,Ca);ca.programs=ma.programs;G.capabilities=Ca;G.extensions=pa;G.properties=R;G.renderLists=ua;G.state=ha;G.info=ca}function d(a){a.preventDefault();console.log("THREE.WebGLRenderer: Context Lost.");Q=!0}function e(){console.log("THREE.WebGLRenderer: Context Restored.");Q=!1;c()}function f(a){a=
 a.target;a.removeEventListener("dispose",f);g(a);R.remove(a)}function g(a){var b=R.get(a).program;a.program=void 0;void 0!==b&&ma.releaseProgram(b)}function h(a,b){a.render(function(a){G.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)E.pushLight(a),a.castShadow&&E.pushShadow(a);else if(a.isSprite){if(!a.frustumCulled||bg.intersectsSprite(a)){d&&Fb.setFromMatrixPosition(a.matrixWorld).applyMatrix4(Id);
 a.target;a.removeEventListener("dispose",f);g(a);R.remove(a)}function g(a){var b=R.get(a).program;a.program=void 0;void 0!==b&&ma.releaseProgram(b)}function h(a,b){a.render(function(a){G.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)E.pushLight(a),a.castShadow&&E.pushShadow(a);else if(a.isSprite){if(!a.frustumCulled||bg.intersectsSprite(a)){d&&Fb.setFromMatrixPosition(a.matrixWorld).applyMatrix4(Id);
-var e=qa.update(a),f=a.material;f.visible&&H.push(a,e,f,c,Fb.z,null)}}else if(a.isImmediateRenderObject)d&&Fb.setFromMatrixPosition(a.matrixWorld).applyMatrix4(Id),H.push(a,null,a.material,c,Fb.z,null);else if(a.isMesh||a.isLine||a.isPoints)if(a.isSkinnedMesh&&a.skeleton.update(),!a.frustumCulled||bg.intersectsObject(a))if(d&&Fb.setFromMatrixPosition(a.matrixWorld).applyMatrix4(Id),e=qa.update(a),f=a.material,Array.isArray(f))for(var g=e.groups,h=0,m=g.length;h<m;h++){var p=g[h],k=f[p.materialIndex];
-k&&k.visible&&H.push(a,e,k,c,Fb.z,p)}else f.visible&&H.push(a,e,f,c,Fb.z,null);a=a.children;h=0;for(m=a.length;h<m;h++)l(a[h],b,c,d)}}function m(a,b,c,d){for(var e=0,f=a.length;e<f;e++){var g=a[e],h=g.object,l=g.geometry,m=void 0===d?g.material:d;g=g.group;if(c.isArrayCamera)if(Pa=c,Ca.multiview)p(h,b,c,l,m,g);else for(var k=c.cameras,u=0,r=k.length;u<r;u++){var q=k[u];h.layers.test(q.layers)&&(ha.viewport(Z.copy(q.viewport)),E.setupLights(q),p(h,b,q,l,m,g))}else Pa=null,p(h,b,c,l,m,g)}}function p(a,
-c,d,e,f,g){a.onBeforeRender(G,c,d,e,f,g);E=sa.get(c,Pa||d);a.modelViewMatrix.multiplyMatrices(d.matrixWorldInverse,a.matrixWorld);a.normalMatrix.getNormalMatrix(a.modelViewMatrix);if(a.isImmediateRenderObject){ha.setMaterial(f);var l=k(d,c.fog,f,a);bc=b=null;Y=!1;h(a,l)}else G.renderBufferDirect(d,c.fog,e,f,a,g);a.onAfterRender(G,c,d,e,f,g);E=sa.get(c,Pa||d)}function u(a,b,c){var d=R.get(a),e=E.state.lights,h=e.state.version;c=ma.getParameters(a,e.state,E.state.shadowsArray,b,Oa.numPlanes,Oa.numIntersection,
-c);var l=ma.getProgramCode(a,c),m=d.program,p=!0;if(void 0===m)a.addEventListener("dispose",f);else if(m.code!==l)g(a);else{if(d.lightsStateVersion!==h)d.lightsStateVersion=h;else if(void 0!==c.shaderID)return;p=!1}p&&(c.shaderID?(l=db[c.shaderID],d.shader={name:a.type,uniforms:Yb(l.uniforms),vertexShader:l.vertexShader,fragmentShader:l.fragmentShader}):d.shader={name:a.type,uniforms:a.uniforms,vertexShader:a.vertexShader,fragmentShader:a.fragmentShader},a.onBeforeCompile(d.shader,G),l=ma.getProgramCode(a,
-c),m=ma.acquireProgram(a,d.shader,c,l),d.program=m,a.program=m);c=m.getAttributes();if(a.morphTargets)for(l=a.numSupportedMorphTargets=0;l<G.maxMorphTargets;l++)0<=c["morphTarget"+l]&&a.numSupportedMorphTargets++;if(a.morphNormals)for(l=a.numSupportedMorphNormals=0;l<G.maxMorphNormals;l++)0<=c["morphNormal"+l]&&a.numSupportedMorphNormals++;c=d.shader.uniforms;if(!a.isShaderMaterial&&!a.isRawShaderMaterial||!0===a.clipping)d.numClippingPlanes=Oa.numPlanes,d.numIntersection=Oa.numIntersection,c.clippingPlanes=
-Oa.uniform;d.fog=b;d.lightsStateVersion=h;a.lights&&(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=Bb.seqWithValue(a.seq,c);d.uniformsList=a}function k(a,b,c,d){aa.resetTextureUnits();var e=R.get(c),f=E.state.lights;He&&(ra||a!==U)&&Oa.setState(c.clippingPlanes,c.clipIntersection,c.clipShadows,a,e,a===U&&c.id===fa);!1===c.needsUpdate&&(void 0===e.program?c.needsUpdate=!0:c.fog&&e.fog!==b?c.needsUpdate=!0:c.lights&&e.lightsStateVersion!==f.state.version?
-c.needsUpdate=!0:void 0===e.numClippingPlanes||e.numClippingPlanes===Oa.numPlanes&&e.numIntersection===Oa.numIntersection||(c.needsUpdate=!0));c.needsUpdate&&(u(c,b,d),c.needsUpdate=!1);var g=!1,h=!1,l=!1;f=e.program;var m=f.getUniforms(),p=e.shader.uniforms;ha.useProgram(f.program)&&(l=h=g=!0);c.id!==fa&&(fa=c.id,h=!0);if(g||U!==a){0<f.numMultiviewViews?xa.updateCameraProjectionMatricesUniform(a,m):m.setValue(K,"projectionMatrix",a.projectionMatrix);Ca.logarithmicDepthBuffer&&m.setValue(K,"logDepthBufFC",
-2/(Math.log(a.far+1)/Math.LN2));U!==a&&(U=a,l=h=!0);if(c.isShaderMaterial||c.isMeshPhongMaterial||c.isMeshStandardMaterial||c.envMap)g=m.map.cameraPosition,void 0!==g&&g.setValue(K,Fb.setFromMatrixPosition(a.matrixWorld));if(c.isMeshPhongMaterial||c.isMeshLambertMaterial||c.isMeshBasicMaterial||c.isMeshStandardMaterial||c.isShaderMaterial||c.skinning)0<f.numMultiviewViews?xa.updateCameraViewMatricesUniform(a,m):m.setValue(K,"viewMatrix",a.matrixWorldInverse)}if(c.skinning&&(m.setOptional(K,d,"bindMatrix"),
-m.setOptional(K,d,"bindMatrixInverse"),g=d.skeleton)){var k=g.bones;if(Ca.floatVertexTextures){if(void 0===g.boneTexture){k=Math.sqrt(4*k.length);k=N.ceilPowerOfTwo(k);k=Math.max(k,4);var t=new Float32Array(k*k*4);t.set(g.boneMatrices);var n=new Zb(t,k,k,1023,1015);g.boneMatrices=t;g.boneTexture=n;g.boneTextureSize=k}m.setValue(K,"boneTexture",g.boneTexture,aa);m.setValue(K,"boneTextureSize",g.boneTextureSize)}else m.setOptional(K,g,"boneMatrices")}if(h||e.receiveShadow!==d.receiveShadow)e.receiveShadow=
-d.receiveShadow,m.setValue(K,"receiveShadow",d.receiveShadow);h&&(m.setValue(K,"toneMappingExposure",G.toneMappingExposure),m.setValue(K,"toneMappingWhitePoint",G.toneMappingWhitePoint),c.lights&&(h=l,p.ambientLightColor.needsUpdate=h,p.lightProbe.needsUpdate=h,p.directionalLights.needsUpdate=h,p.pointLights.needsUpdate=h,p.spotLights.needsUpdate=h,p.rectAreaLights.needsUpdate=h,p.hemisphereLights.needsUpdate=h),b&&c.fog&&(p.fogColor.value.copy(b.color),b.isFog?(p.fogNear.value=b.near,p.fogFar.value=
-b.far):b.isFogExp2&&(p.fogDensity.value=b.density)),c.isMeshBasicMaterial?r(p,c):c.isMeshLambertMaterial?(r(p,c),c.emissiveMap&&(p.emissiveMap.value=c.emissiveMap)):c.isMeshPhongMaterial?(r(p,c),c.isMeshToonMaterial?(q(p,c),c.gradientMap&&(p.gradientMap.value=c.gradientMap)):q(p,c)):c.isMeshStandardMaterial?(r(p,c),c.isMeshPhysicalMaterial?(v(p,c),p.reflectivity.value=c.reflectivity,p.clearcoat.value=c.clearcoat,p.clearcoatRoughness.value=c.clearcoatRoughness,c.sheen&&p.sheen.value.copy(c.sheen),
+var e=qa.update(a),f=a.material;f.visible&&H.push(a,e,f,c,Fb.z,null)}}else if(a.isImmediateRenderObject)d&&Fb.setFromMatrixPosition(a.matrixWorld).applyMatrix4(Id),H.push(a,null,a.material,c,Fb.z,null);else if(a.isMesh||a.isLine||a.isPoints)if(a.isSkinnedMesh&&a.skeleton.frame!==ca.render.frame&&(a.skeleton.update(),a.skeleton.frame=ca.render.frame),!a.frustumCulled||bg.intersectsObject(a))if(d&&Fb.setFromMatrixPosition(a.matrixWorld).applyMatrix4(Id),e=qa.update(a),f=a.material,Array.isArray(f))for(var g=
+e.groups,h=0,m=g.length;h<m;h++){var p=g[h],k=f[p.materialIndex];k&&k.visible&&H.push(a,e,k,c,Fb.z,p)}else f.visible&&H.push(a,e,f,c,Fb.z,null);a=a.children;h=0;for(m=a.length;h<m;h++)l(a[h],b,c,d)}}function m(a,b,c,d){for(var e=0,f=a.length;e<f;e++){var g=a[e],h=g.object,l=g.geometry,m=void 0===d?g.material:d;g=g.group;if(c.isArrayCamera)if(Pa=c,Ca.multiview)p(h,b,c,l,m,g);else for(var k=c.cameras,u=0,r=k.length;u<r;u++){var q=k[u];h.layers.test(q.layers)&&(ha.viewport(Z.copy(q.viewport)),E.setupLights(q),
+p(h,b,q,l,m,g))}else Pa=null,p(h,b,c,l,m,g)}}function p(a,c,d,e,f,g){a.onBeforeRender(G,c,d,e,f,g);E=sa.get(c,Pa||d);a.modelViewMatrix.multiplyMatrices(d.matrixWorldInverse,a.matrixWorld);a.normalMatrix.getNormalMatrix(a.modelViewMatrix);if(a.isImmediateRenderObject){ha.setMaterial(f);var l=k(d,c.fog,f,a);bc=b=null;Y=!1;h(a,l)}else G.renderBufferDirect(d,c.fog,e,f,a,g);a.onAfterRender(G,c,d,e,f,g);E=sa.get(c,Pa||d)}function u(a,b,c){var d=R.get(a),e=E.state.lights,h=e.state.version;c=ma.getParameters(a,
+e.state,E.state.shadowsArray,b,Oa.numPlanes,Oa.numIntersection,c);var l=ma.getProgramCode(a,c),m=d.program,p=!0;if(void 0===m)a.addEventListener("dispose",f);else if(m.code!==l)g(a);else{if(d.lightsStateVersion!==h)d.lightsStateVersion=h;else if(void 0!==c.shaderID)return;p=!1}p&&(c.shaderID?(l=db[c.shaderID],d.shader={name:a.type,uniforms:Yb(l.uniforms),vertexShader:l.vertexShader,fragmentShader:l.fragmentShader}):d.shader={name:a.type,uniforms:a.uniforms,vertexShader:a.vertexShader,fragmentShader:a.fragmentShader},
+a.onBeforeCompile(d.shader,G),l=ma.getProgramCode(a,c),m=ma.acquireProgram(a,d.shader,c,l),d.program=m,a.program=m);c=m.getAttributes();if(a.morphTargets)for(l=a.numSupportedMorphTargets=0;l<G.maxMorphTargets;l++)0<=c["morphTarget"+l]&&a.numSupportedMorphTargets++;if(a.morphNormals)for(l=a.numSupportedMorphNormals=0;l<G.maxMorphNormals;l++)0<=c["morphNormal"+l]&&a.numSupportedMorphNormals++;c=d.shader.uniforms;if(!a.isShaderMaterial&&!a.isRawShaderMaterial||!0===a.clipping)d.numClippingPlanes=Oa.numPlanes,
+d.numIntersection=Oa.numIntersection,c.clippingPlanes=Oa.uniform;d.fog=b;d.lightsStateVersion=h;a.lights&&(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=Bb.seqWithValue(a.seq,c);d.uniformsList=a}function k(a,b,c,d){ba.resetTextureUnits();var e=R.get(c),f=E.state.lights;He&&(ra||a!==U)&&Oa.setState(c.clippingPlanes,c.clipIntersection,c.clipShadows,a,e,a===U&&c.id===fa);!1===c.needsUpdate&&(void 0===e.program?c.needsUpdate=!0:c.fog&&e.fog!==b?c.needsUpdate=
+!0:c.lights&&e.lightsStateVersion!==f.state.version?c.needsUpdate=!0:void 0===e.numClippingPlanes||e.numClippingPlanes===Oa.numPlanes&&e.numIntersection===Oa.numIntersection||(c.needsUpdate=!0));c.needsUpdate&&(u(c,b,d),c.needsUpdate=!1);var g=!1,h=!1,l=!1;f=e.program;var m=f.getUniforms(),p=e.shader.uniforms;ha.useProgram(f.program)&&(l=h=g=!0);c.id!==fa&&(fa=c.id,h=!0);if(g||U!==a){0<f.numMultiviewViews?xa.updateCameraProjectionMatricesUniform(a,m):m.setValue(K,"projectionMatrix",a.projectionMatrix);
+Ca.logarithmicDepthBuffer&&m.setValue(K,"logDepthBufFC",2/(Math.log(a.far+1)/Math.LN2));U!==a&&(U=a,l=h=!0);if(c.isShaderMaterial||c.isMeshPhongMaterial||c.isMeshStandardMaterial||c.envMap)g=m.map.cameraPosition,void 0!==g&&g.setValue(K,Fb.setFromMatrixPosition(a.matrixWorld));if(c.isMeshPhongMaterial||c.isMeshLambertMaterial||c.isMeshBasicMaterial||c.isMeshStandardMaterial||c.isShaderMaterial||c.skinning)0<f.numMultiviewViews?xa.updateCameraViewMatricesUniform(a,m):m.setValue(K,"viewMatrix",a.matrixWorldInverse)}if(c.skinning&&
+(m.setOptional(K,d,"bindMatrix"),m.setOptional(K,d,"bindMatrixInverse"),g=d.skeleton)){var k=g.bones;if(Ca.floatVertexTextures){if(void 0===g.boneTexture){k=Math.sqrt(4*k.length);k=N.ceilPowerOfTwo(k);k=Math.max(k,4);var t=new Float32Array(k*k*4);t.set(g.boneMatrices);var n=new Zb(t,k,k,1023,1015);g.boneMatrices=t;g.boneTexture=n;g.boneTextureSize=k}m.setValue(K,"boneTexture",g.boneTexture,ba);m.setValue(K,"boneTextureSize",g.boneTextureSize)}else m.setOptional(K,g,"boneMatrices")}if(h||e.receiveShadow!==
+d.receiveShadow)e.receiveShadow=d.receiveShadow,m.setValue(K,"receiveShadow",d.receiveShadow);h&&(m.setValue(K,"toneMappingExposure",G.toneMappingExposure),m.setValue(K,"toneMappingWhitePoint",G.toneMappingWhitePoint),c.lights&&(h=l,p.ambientLightColor.needsUpdate=h,p.lightProbe.needsUpdate=h,p.directionalLights.needsUpdate=h,p.pointLights.needsUpdate=h,p.spotLights.needsUpdate=h,p.rectAreaLights.needsUpdate=h,p.hemisphereLights.needsUpdate=h),b&&c.fog&&(p.fogColor.value.copy(b.color),b.isFog?(p.fogNear.value=
+b.near,p.fogFar.value=b.far):b.isFogExp2&&(p.fogDensity.value=b.density)),c.isMeshBasicMaterial?r(p,c):c.isMeshLambertMaterial?(r(p,c),c.emissiveMap&&(p.emissiveMap.value=c.emissiveMap)):c.isMeshPhongMaterial?(r(p,c),c.isMeshToonMaterial?(q(p,c),c.gradientMap&&(p.gradientMap.value=c.gradientMap)):q(p,c)):c.isMeshStandardMaterial?(r(p,c),c.isMeshPhysicalMaterial?(v(p,c),p.reflectivity.value=c.reflectivity,p.clearcoat.value=c.clearcoat,p.clearcoatRoughness.value=c.clearcoatRoughness,c.sheen&&p.sheen.value.copy(c.sheen),
 c.clearcoatNormalMap&&(p.clearcoatNormalScale.value.copy(c.clearcoatNormalScale),p.clearcoatNormalMap.value=c.clearcoatNormalMap,1===c.side&&p.clearcoatNormalScale.value.negate()),p.transparency.value=c.transparency):v(p,c)):c.isMeshMatcapMaterial?(r(p,c),c.matcap&&(p.matcap.value=c.matcap),c.bumpMap&&(p.bumpMap.value=c.bumpMap,p.bumpScale.value=c.bumpScale,1===c.side&&(p.bumpScale.value*=-1)),c.normalMap&&(p.normalMap.value=c.normalMap,p.normalScale.value.copy(c.normalScale),1===c.side&&p.normalScale.value.negate()),
 c.clearcoatNormalMap&&(p.clearcoatNormalScale.value.copy(c.clearcoatNormalScale),p.clearcoatNormalMap.value=c.clearcoatNormalMap,1===c.side&&p.clearcoatNormalScale.value.negate()),p.transparency.value=c.transparency):v(p,c)):c.isMeshMatcapMaterial?(r(p,c),c.matcap&&(p.matcap.value=c.matcap),c.bumpMap&&(p.bumpMap.value=c.bumpMap,p.bumpScale.value=c.bumpScale,1===c.side&&(p.bumpScale.value*=-1)),c.normalMap&&(p.normalMap.value=c.normalMap,p.normalScale.value.copy(c.normalScale),1===c.side&&p.normalScale.value.negate()),
 c.displacementMap&&(p.displacementMap.value=c.displacementMap,p.displacementScale.value=c.displacementScale,p.displacementBias.value=c.displacementBias)):c.isMeshDepthMaterial?(r(p,c),c.displacementMap&&(p.displacementMap.value=c.displacementMap,p.displacementScale.value=c.displacementScale,p.displacementBias.value=c.displacementBias)):c.isMeshDistanceMaterial?(r(p,c),c.displacementMap&&(p.displacementMap.value=c.displacementMap,p.displacementScale.value=c.displacementScale,p.displacementBias.value=
 c.displacementMap&&(p.displacementMap.value=c.displacementMap,p.displacementScale.value=c.displacementScale,p.displacementBias.value=c.displacementBias)):c.isMeshDepthMaterial?(r(p,c),c.displacementMap&&(p.displacementMap.value=c.displacementMap,p.displacementScale.value=c.displacementScale,p.displacementBias.value=c.displacementBias)):c.isMeshDistanceMaterial?(r(p,c),c.displacementMap&&(p.displacementMap.value=c.displacementMap,p.displacementScale.value=c.displacementScale,p.displacementBias.value=
 c.displacementBias),p.referencePosition.value.copy(c.referencePosition),p.nearDistance.value=c.nearDistance,p.farDistance.value=c.farDistance):c.isMeshNormalMaterial?(r(p,c),c.bumpMap&&(p.bumpMap.value=c.bumpMap,p.bumpScale.value=c.bumpScale,1===c.side&&(p.bumpScale.value*=-1)),c.normalMap&&(p.normalMap.value=c.normalMap,p.normalScale.value.copy(c.normalScale),1===c.side&&p.normalScale.value.negate()),c.displacementMap&&(p.displacementMap.value=c.displacementMap,p.displacementScale.value=c.displacementScale,
 c.displacementBias),p.referencePosition.value.copy(c.referencePosition),p.nearDistance.value=c.nearDistance,p.farDistance.value=c.farDistance):c.isMeshNormalMaterial?(r(p,c),c.bumpMap&&(p.bumpMap.value=c.bumpMap,p.bumpScale.value=c.bumpScale,1===c.side&&(p.bumpScale.value*=-1)),c.normalMap&&(p.normalMap.value=c.normalMap,p.normalScale.value.copy(c.normalScale),1===c.side&&p.normalScale.value.negate()),c.displacementMap&&(p.displacementMap.value=c.displacementMap,p.displacementScale.value=c.displacementScale,
 p.displacementBias.value=c.displacementBias)):c.isLineBasicMaterial?(p.diffuse.value.copy(c.color),p.opacity.value=c.opacity,c.isLineDashedMaterial&&(p.dashSize.value=c.dashSize,p.totalSize.value=c.dashSize+c.gapSize,p.scale.value=c.scale)):c.isPointsMaterial?(p.diffuse.value.copy(c.color),p.opacity.value=c.opacity,p.size.value=c.size*ea,p.scale.value=.5*X,p.map.value=c.map,null!==c.map&&(!0===c.map.matrixAutoUpdate&&c.map.updateMatrix(),p.uvTransform.value.copy(c.map.matrix))):c.isSpriteMaterial?
 p.displacementBias.value=c.displacementBias)):c.isLineBasicMaterial?(p.diffuse.value.copy(c.color),p.opacity.value=c.opacity,c.isLineDashedMaterial&&(p.dashSize.value=c.dashSize,p.totalSize.value=c.dashSize+c.gapSize,p.scale.value=c.scale)):c.isPointsMaterial?(p.diffuse.value.copy(c.color),p.opacity.value=c.opacity,p.size.value=c.size*ea,p.scale.value=.5*X,p.map.value=c.map,null!==c.map&&(!0===c.map.matrixAutoUpdate&&c.map.updateMatrix(),p.uvTransform.value.copy(c.map.matrix))):c.isSpriteMaterial?
-(p.diffuse.value.copy(c.color),p.opacity.value=c.opacity,p.rotation.value=c.rotation,p.map.value=c.map,null!==c.map&&(!0===c.map.matrixAutoUpdate&&c.map.updateMatrix(),p.uvTransform.value.copy(c.map.matrix))):c.isShadowMaterial&&(p.color.value.copy(c.color),p.opacity.value=c.opacity),void 0!==p.ltc_1&&(p.ltc_1.value=J.LTC_1),void 0!==p.ltc_2&&(p.ltc_2.value=J.LTC_2),Bb.upload(K,e.uniformsList,p,aa));c.isShaderMaterial&&!0===c.uniformsNeedUpdate&&(Bb.upload(K,e.uniformsList,p,aa),c.uniformsNeedUpdate=
+(p.diffuse.value.copy(c.color),p.opacity.value=c.opacity,p.rotation.value=c.rotation,p.map.value=c.map,null!==c.map&&(!0===c.map.matrixAutoUpdate&&c.map.updateMatrix(),p.uvTransform.value.copy(c.map.matrix))):c.isShadowMaterial&&(p.color.value.copy(c.color),p.opacity.value=c.opacity),void 0!==p.ltc_1&&(p.ltc_1.value=J.LTC_1),void 0!==p.ltc_2&&(p.ltc_2.value=J.LTC_2),Bb.upload(K,e.uniformsList,p,ba));c.isShaderMaterial&&!0===c.uniformsNeedUpdate&&(Bb.upload(K,e.uniformsList,p,ba),c.uniformsNeedUpdate=
 !1);c.isSpriteMaterial&&m.setValue(K,"center",d.center);0<f.numMultiviewViews?xa.updateObjectMatricesUniforms(d,a,m):(m.setValue(K,"modelViewMatrix",d.modelViewMatrix),m.setValue(K,"normalMatrix",d.normalMatrix));m.setValue(K,"modelMatrix",d.matrixWorld);return f}function r(a,b){a.opacity.value=b.opacity;b.color&&a.diffuse.value.copy(b.color);b.emissive&&a.emissive.value.copy(b.emissive).multiplyScalar(b.emissiveIntensity);b.map&&(a.map.value=b.map);b.alphaMap&&(a.alphaMap.value=b.alphaMap);b.specularMap&&
 !1);c.isSpriteMaterial&&m.setValue(K,"center",d.center);0<f.numMultiviewViews?xa.updateObjectMatricesUniforms(d,a,m):(m.setValue(K,"modelViewMatrix",d.modelViewMatrix),m.setValue(K,"normalMatrix",d.normalMatrix));m.setValue(K,"modelMatrix",d.matrixWorld);return f}function r(a,b){a.opacity.value=b.opacity;b.color&&a.diffuse.value.copy(b.color);b.emissive&&a.emissive.value.copy(b.emissive).multiplyScalar(b.emissiveIntensity);b.map&&(a.map.value=b.map);b.alphaMap&&(a.alphaMap.value=b.alphaMap);b.specularMap&&
 (a.specularMap.value=b.specularMap);b.envMap&&(a.envMap.value=b.envMap,a.flipEnvMap.value=b.envMap.isCubeTexture?-1:1,a.reflectivity.value=b.reflectivity,a.refractionRatio.value=b.refractionRatio,a.maxMipLevel.value=R.get(b.envMap).__maxMipLevel);b.lightMap&&(a.lightMap.value=b.lightMap,a.lightMapIntensity.value=b.lightMapIntensity);b.aoMap&&(a.aoMap.value=b.aoMap,a.aoMapIntensity.value=b.aoMapIntensity);if(b.map)var c=b.map;else b.specularMap?c=b.specularMap:b.displacementMap?c=b.displacementMap:
 (a.specularMap.value=b.specularMap);b.envMap&&(a.envMap.value=b.envMap,a.flipEnvMap.value=b.envMap.isCubeTexture?-1:1,a.reflectivity.value=b.reflectivity,a.refractionRatio.value=b.refractionRatio,a.maxMipLevel.value=R.get(b.envMap).__maxMipLevel);b.lightMap&&(a.lightMap.value=b.lightMap,a.lightMapIntensity.value=b.lightMapIntensity);b.aoMap&&(a.aoMap.value=b.aoMap,a.aoMapIntensity.value=b.aoMapIntensity);if(b.map)var c=b.map;else b.specularMap?c=b.specularMap:b.displacementMap?c=b.displacementMap:
 b.normalMap?c=b.normalMap:b.bumpMap?c=b.bumpMap:b.roughnessMap?c=b.roughnessMap:b.metalnessMap?c=b.metalnessMap:b.alphaMap?c=b.alphaMap:b.emissiveMap&&(c=b.emissiveMap);void 0!==c&&(c.isWebGLRenderTarget&&(c=c.texture),!0===c.matrixAutoUpdate&&c.updateMatrix(),a.uvTransform.value.copy(c.matrix))}function q(a,b){a.specular.value.copy(b.specular);a.shininess.value=Math.max(b.shininess,1E-4);b.emissiveMap&&(a.emissiveMap.value=b.emissiveMap);b.bumpMap&&(a.bumpMap.value=b.bumpMap,a.bumpScale.value=b.bumpScale,
 b.normalMap?c=b.normalMap:b.bumpMap?c=b.bumpMap:b.roughnessMap?c=b.roughnessMap:b.metalnessMap?c=b.metalnessMap:b.alphaMap?c=b.alphaMap:b.emissiveMap&&(c=b.emissiveMap);void 0!==c&&(c.isWebGLRenderTarget&&(c=c.texture),!0===c.matrixAutoUpdate&&c.updateMatrix(),a.uvTransform.value.copy(c.matrix))}function q(a,b){a.specular.value.copy(b.specular);a.shininess.value=Math.max(b.shininess,1E-4);b.emissiveMap&&(a.emissiveMap.value=b.emissiveMap);b.bumpMap&&(a.bumpMap.value=b.bumpMap,a.bumpScale.value=b.bumpScale,
@@ -202,11 +202,11 @@ b.normalMap?c=b.normalMap:b.bumpMap?c=b.bumpMap:b.roughnessMap?c=b.roughnessMap:
 (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);b.envMap&&(a.envMapIntensity.value=b.envMapIntensity)}a=a||{};var y=void 0!==a.canvas?
 (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);b.envMap&&(a.envMapIntensity.value=b.envMapIntensity)}a=a||{};var y=void 0!==a.canvas?
 a.canvas:document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),z=void 0!==a.context?a.context:null,x=void 0!==a.alpha?a.alpha:!1,F=void 0!==a.depth?a.depth:!0,V=void 0!==a.stencil?a.stencil:!0,B=void 0!==a.antialias?a.antialias:!1,A=void 0!==a.premultipliedAlpha?a.premultipliedAlpha:!0,C=void 0!==a.preserveDrawingBuffer?a.preserveDrawingBuffer:!1,D=void 0!==a.powerPreference?a.powerPreference:"default",I=void 0!==a.failIfMajorPerformanceCaveat?a.failIfMajorPerformanceCaveat:!1,H=null,
 a.canvas:document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),z=void 0!==a.context?a.context:null,x=void 0!==a.alpha?a.alpha:!1,F=void 0!==a.depth?a.depth:!0,V=void 0!==a.stencil?a.stencil:!0,B=void 0!==a.antialias?a.antialias:!1,A=void 0!==a.premultipliedAlpha?a.premultipliedAlpha:!0,C=void 0!==a.preserveDrawingBuffer?a.preserveDrawingBuffer:!1,D=void 0!==a.powerPreference?a.powerPreference:"default",I=void 0!==a.failIfMajorPerformanceCaveat?a.failIfMajorPerformanceCaveat:!1,H=null,
 E=null;this.domElement=y;this.debug={checkShaderErrors:!0};this.sortObjects=this.autoClearStencil=this.autoClearDepth=this.autoClearColor=this.autoClear=!0;this.clippingPlanes=[];this.localClippingEnabled=!1;this.gammaFactor=2;this.physicallyCorrectLights=this.gammaOutput=this.gammaInput=!1;this.toneMappingWhitePoint=this.toneMappingExposure=this.toneMapping=1;this.maxMorphTargets=8;this.maxMorphNormals=4;var G=this,Q=!1,O=null,W=0,ia=0,P=null,ac=null,fa=-1;var bc=b=null;var Y=!1;var U=null,Pa=null,
 E=null;this.domElement=y;this.debug={checkShaderErrors:!0};this.sortObjects=this.autoClearStencil=this.autoClearDepth=this.autoClearColor=this.autoClear=!0;this.clippingPlanes=[];this.localClippingEnabled=!1;this.gammaFactor=2;this.physicallyCorrectLights=this.gammaOutput=this.gammaInput=!1;this.toneMappingWhitePoint=this.toneMappingExposure=this.toneMapping=1;this.maxMorphTargets=8;this.maxMorphNormals=4;var G=this,Q=!1,O=null,W=0,ia=0,P=null,ac=null,fa=-1;var bc=b=null;var Y=!1;var U=null,Pa=null,
-Z=new ca,T=new ca,da=null,L=y.width,X=y.height,ea=1,ba=new ca(0,0,L,X),ja=new ca(0,0,L,X),na=!1,bg=new Ed,Oa=new Xi,He=!1,ra=!1,Id=new M,Fb=new n;try{x={alpha:x,depth:F,stencil:V,antialias:B,premultipliedAlpha:A,preserveDrawingBuffer:C,powerPreference:D,failIfMajorPerformanceCaveat:I,xrCompatible:!0};y.addEventListener("webglcontextlost",d,!1);y.addEventListener("webglcontextrestored",e,!1);var K=z||y.getContext("webgl",x)||y.getContext("experimental-webgl",x);if(null===K){if(null!==y.getContext("webgl"))throw Error("Error creating WebGL context with your selected attributes.");
-throw Error("Error creating WebGL context.");}void 0===K.getShaderPrecisionFormat&&(K.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(Mh){throw console.error("THREE.WebGLRenderer: "+Mh.message),Mh;}var pa,Ca,ha,S,R,aa,ta,wa,qa,ma,ua,sa,la,ya,Aa,Ba,ka;c();var oa="undefined"!==typeof navigator&&"xr"in navigator&&"supportsSession"in navigator.xr?new Lh(G,K):new fg(G);this.vr=oa;var xa=new hk(G,K),Ea=new Gh(G,qa,Ca.maxTextureSize);this.shadowMap=Ea;this.getContext=
+Z=new da,T=new da,aa=null,L=y.width,X=y.height,ea=1,S=new da(0,0,L,X),ja=new da(0,0,L,X),na=!1,bg=new Ed,Oa=new Xi,He=!1,ra=!1,Id=new M,Fb=new n;try{x={alpha:x,depth:F,stencil:V,antialias:B,premultipliedAlpha:A,preserveDrawingBuffer:C,powerPreference:D,failIfMajorPerformanceCaveat:I,xrCompatible:!0};y.addEventListener("webglcontextlost",d,!1);y.addEventListener("webglcontextrestored",e,!1);var K=z||y.getContext("webgl",x)||y.getContext("experimental-webgl",x);if(null===K){if(null!==y.getContext("webgl"))throw Error("Error creating WebGL context with your selected attributes.");
+throw Error("Error creating WebGL context.");}void 0===K.getShaderPrecisionFormat&&(K.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(Mh){throw console.error("THREE.WebGLRenderer: "+Mh.message),Mh;}var pa,Ca,ha,ca,R,ba,ta,wa,qa,ma,ua,sa,la,ya,Aa,Ba,ka;c();var oa="undefined"!==typeof navigator&&"xr"in navigator&&"supportsSession"in navigator.xr?new Lh(G,K):new fg(G);this.vr=oa;var xa=new hk(G,K),Ea=new Gh(G,qa,Ca.maxTextureSize);this.shadowMap=Ea;this.getContext=
 function(){return K};this.getContextAttributes=function(){return K.getContextAttributes()};this.forceContextLoss=function(){var a=pa.get("WEBGL_lose_context");a&&a.loseContext()};this.forceContextRestore=function(){var a=pa.get("WEBGL_lose_context");a&&a.restoreContext()};this.getPixelRatio=function(){return ea};this.setPixelRatio=function(a){void 0!==a&&(ea=a,this.setSize(L,X,!1))};this.getSize=function(a){void 0===a&&(console.warn("WebGLRenderer: .getsize() now requires a Vector2 as an argument"),
 function(){return K};this.getContextAttributes=function(){return K.getContextAttributes()};this.forceContextLoss=function(){var a=pa.get("WEBGL_lose_context");a&&a.loseContext()};this.forceContextRestore=function(){var a=pa.get("WEBGL_lose_context");a&&a.restoreContext()};this.getPixelRatio=function(){return ea};this.setPixelRatio=function(a){void 0!==a&&(ea=a,this.setSize(L,X,!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(L,X)};this.setSize=function(a,b,c){oa.isPresenting()?console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting."):(L=a,X=b,y.width=Math.floor(a*ea),y.height=Math.floor(b*ea),!1!==c&&(y.style.width=a+"px",y.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(L*ea,X*ea).floor()};this.setDrawingBufferSize=
 a=new w);return a.set(L,X)};this.setSize=function(a,b,c){oa.isPresenting()?console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting."):(L=a,X=b,y.width=Math.floor(a*ea),y.height=Math.floor(b*ea),!1!==c&&(y.style.width=a+"px",y.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(L*ea,X*ea).floor()};this.setDrawingBufferSize=
-function(a,b,c){L=a;X=b;ea=c;y.width=Math.floor(a*c);y.height=Math.floor(b*c);this.setViewport(0,0,a,b)};this.getCurrentViewport=function(a){void 0===a&&(console.warn("WebGLRenderer: .getCurrentViewport() now requires a Vector4 as an argument"),a=new ca);return a.copy(Z)};this.getViewport=function(a){return a.copy(ba)};this.setViewport=function(a,b,c,d){a.isVector4?ba.set(a.x,a.y,a.z,a.w):ba.set(a,b,c,d);ha.viewport(Z.copy(ba).multiplyScalar(ea).floor())};this.getScissor=function(a){return a.copy(ja)};
+function(a,b,c){L=a;X=b;ea=c;y.width=Math.floor(a*c);y.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 da);return a.copy(Z)};this.getViewport=function(a){return a.copy(S)};this.setViewport=function(a,b,c,d){a.isVector4?S.set(a.x,a.y,a.z,a.w):S.set(a,b,c,d);ha.viewport(Z.copy(S).multiplyScalar(ea).floor())};this.getScissor=function(a){return a.copy(ja)};
 this.setScissor=function(a,b,c,d){a.isVector4?ja.set(a.x,a.y,a.z,a.w):ja.set(a,b,c,d);ha.scissor(T.copy(ja).multiplyScalar(ea).floor())};this.getScissorTest=function(){return na};this.setScissorTest=function(a){ha.setScissorTest(na=a)};this.getClearColor=function(){return la.getClearColor()};this.setClearColor=function(){la.setClearColor.apply(la,arguments)};this.getClearAlpha=function(){return la.getClearAlpha()};this.setClearAlpha=function(){la.setClearAlpha.apply(la,arguments)};this.clear=function(a,
 this.setScissor=function(a,b,c,d){a.isVector4?ja.set(a.x,a.y,a.z,a.w):ja.set(a,b,c,d);ha.scissor(T.copy(ja).multiplyScalar(ea).floor())};this.getScissorTest=function(){return na};this.setScissorTest=function(a){ha.setScissorTest(na=a)};this.getClearColor=function(){return la.getClearColor()};this.setClearColor=function(){la.setClearColor.apply(la,arguments)};this.getClearAlpha=function(){return la.getClearAlpha()};this.setClearAlpha=function(){la.setClearAlpha.apply(la,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;K.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(){y.removeEventListener("webglcontextlost",d,!1);y.removeEventListener("webglcontextrestored",e,!1);ua.dispose();sa.dispose();R.dispose();qa.dispose();oa.dispose();za.stop()};this.renderBufferImmediate=function(a,b){ha.initAttributes();
 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;K.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(){y.removeEventListener("webglcontextlost",d,!1);y.removeEventListener("webglcontextrestored",e,!1);ua.dispose();sa.dispose();R.dispose();qa.dispose();oa.dispose();za.stop()};this.renderBufferImmediate=function(a,b){ha.initAttributes();
 var c=R.get(a);a.hasPositions&&!c.position&&(c.position=K.createBuffer());a.hasNormals&&!c.normal&&(c.normal=K.createBuffer());a.hasUvs&&!c.uv&&(c.uv=K.createBuffer());a.hasColors&&!c.color&&(c.color=K.createBuffer());b=b.getAttributes();a.hasPositions&&(K.bindBuffer(34962,c.position),K.bufferData(34962,a.positionArray,35048),ha.enableAttribute(b.position),K.vertexAttribPointer(b.position,3,5126,!1,0,0));a.hasNormals&&(K.bindBuffer(34962,c.normal),K.bufferData(34962,a.normalArray,35048),ha.enableAttribute(b.normal),
 var c=R.get(a);a.hasPositions&&!c.position&&(c.position=K.createBuffer());a.hasNormals&&!c.normal&&(c.normal=K.createBuffer());a.hasUvs&&!c.uv&&(c.uv=K.createBuffer());a.hasColors&&!c.color&&(c.color=K.createBuffer());b=b.getAttributes();a.hasPositions&&(K.bindBuffer(34962,c.position),K.bufferData(34962,a.positionArray,35048),ha.enableAttribute(b.position),K.vertexAttribPointer(b.position,3,5126,!1,0,0));a.hasNormals&&(K.bindBuffer(34962,c.normal),K.bufferData(34962,a.normalArray,35048),ha.enableAttribute(b.normal),
@@ -218,16 +218,16 @@ h&&K.bindBuffer(34963,u.buffer)}u=Infinity;null!==h?u=h.count:void 0!==p&&(u=p.c
 (null===P?ea:1)),f.isLineSegments?a.setMode(1):f.isLineLoop?a.setMode(2):a.setMode(3)):f.isPoints?a.setMode(0):f.isSprite&&a.setMode(4);d&&d.isInstancedBufferGeometry?0<d.maxInstancedCount&&a.renderInstances(d,w,g):a.render(w,g)}};this.compile=function(a,b){E=sa.get(a,b);E.init();a.traverse(function(a){a.isLight&&(E.pushLight(a),a.castShadow&&E.pushShadow(a))});E.setupLights(b);a.traverse(function(b){if(b.material)if(Array.isArray(b.material))for(var c=0;c<b.material.length;c++)u(b.material[c],a.fog,
 (null===P?ea:1)),f.isLineSegments?a.setMode(1):f.isLineLoop?a.setMode(2):a.setMode(3)):f.isPoints?a.setMode(0):f.isSprite&&a.setMode(4);d&&d.isInstancedBufferGeometry?0<d.maxInstancedCount&&a.renderInstances(d,w,g):a.render(w,g)}};this.compile=function(a,b){E=sa.get(a,b);E.init();a.traverse(function(a){a.isLight&&(E.pushLight(a),a.castShadow&&E.pushShadow(a))});E.setupLights(b);a.traverse(function(b){if(b.material)if(Array.isArray(b.material))for(var c=0;c<b.material.length;c++)u(b.material[c],a.fog,
 b);else u(b.material,a.fog,b)})};var Da=null,za=new Xf;za.setAnimationLoop(function(a){oa.isPresenting()||Da&&Da(a)});"undefined"!==typeof window&&za.setContext(window);this.setAnimationLoop=function(a){Da=a;oa.setAnimationLoop(a);za.start()};this.render=function(a,c,d,e){if(void 0!==d){console.warn("THREE.WebGLRenderer.render(): the renderTarget argument has been removed. Use .setRenderTarget() instead.");var f=d}if(void 0!==e){console.warn("THREE.WebGLRenderer.render(): the forceClear argument has been removed. Use .clear() instead.");
 b);else u(b.material,a.fog,b)})};var Da=null,za=new Xf;za.setAnimationLoop(function(a){oa.isPresenting()||Da&&Da(a)});"undefined"!==typeof window&&za.setContext(window);this.setAnimationLoop=function(a){Da=a;oa.setAnimationLoop(a);za.start()};this.render=function(a,c,d,e){if(void 0!==d){console.warn("THREE.WebGLRenderer.render(): the renderTarget argument has been removed. Use .setRenderTarget() instead.");var f=d}if(void 0!==e){console.warn("THREE.WebGLRenderer.render(): the forceClear argument has been removed. Use .clear() instead.");
 var g=e}c&&c.isCamera?Q||(bc=b=null,Y=!1,fa=-1,U=null,!0===a.autoUpdate&&a.updateMatrixWorld(),null===c.parent&&c.updateMatrixWorld(),oa.enabled&&(c=oa.getCamera(c)),E=sa.get(a,c),E.init(),a.onBeforeRender(G,a,c,f||P),Id.multiplyMatrices(c.projectionMatrix,c.matrixWorldInverse),bg.setFromMatrix(Id),ra=this.localClippingEnabled,He=Oa.init(this.clippingPlanes,ra,c),H=ua.get(a,c),H.init(),l(a,c,0,G.sortObjects),!0===G.sortObjects&&H.sort(),He&&Oa.beginShadows(),Ea.render(E.state.shadowsArray,a,c),E.setupLights(c),
 var g=e}c&&c.isCamera?Q||(bc=b=null,Y=!1,fa=-1,U=null,!0===a.autoUpdate&&a.updateMatrixWorld(),null===c.parent&&c.updateMatrixWorld(),oa.enabled&&(c=oa.getCamera(c)),E=sa.get(a,c),E.init(),a.onBeforeRender(G,a,c,f||P),Id.multiplyMatrices(c.projectionMatrix,c.matrixWorldInverse),bg.setFromMatrix(Id),ra=this.localClippingEnabled,He=Oa.init(this.clippingPlanes,ra,c),H=ua.get(a,c),H.init(),l(a,c,0,G.sortObjects),!0===G.sortObjects&&H.sort(),He&&Oa.beginShadows(),Ea.render(E.state.shadowsArray,a,c),E.setupLights(c),
-He&&Oa.endShadows(),this.info.autoReset&&this.info.reset(),void 0!==f&&this.setRenderTarget(f),Ca.multiview&&xa.attachCamera(c),la.render(H,a,c,g),d=H.opaque,e=H.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(G,a,c),null!==P&&(aa.updateRenderTargetMipmap(P),aa.updateMultisampleRenderTarget(P)),ha.buffers.depth.setTest(!0),ha.buffers.depth.setMask(!0),ha.buffers.color.setMask(!0),ha.setPolygonOffset(!1),
-Ca.multiview&&xa.detachCamera(c),oa.enabled&&oa.submitFrame(),E=H=null):console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.")};this.setFramebuffer=function(a){O!==a&&K.bindFramebuffer(36160,a);O=a};this.getActiveCubeFace=function(){return W};this.getActiveMipmapLevel=function(){return ia};this.getRenderTarget=function(){return P};this.setRenderTarget=function(a,b,c){P=a;W=b;ia=c;a&&void 0===R.get(a).__webglFramebuffer&&aa.setupRenderTarget(a);var d=O,e=!1;a?(d=R.get(a).__webglFramebuffer,
-a.isWebGLRenderTargetCube?(d=d[b||0],e=!0):d=a.isWebGLMultisampleRenderTarget?R.get(a).__webglMultisampledFramebuffer:d,Z.copy(a.viewport),T.copy(a.scissor),da=a.scissorTest):(Z.copy(ba).multiplyScalar(ea).floor(),T.copy(ja).multiplyScalar(ea).floor(),da=na);ac!==d&&(K.bindFramebuffer(36160,d),ac=d);ha.viewport(Z);ha.scissor(T);ha.setScissorTest(da);e&&(a=R.get(a.texture),K.framebufferTexture2D(36160,36064,34069+(b||0),a.__webglTexture,c||0))};this.readRenderTargetPixels=function(a,b,c,d,e,f,g){if(a&&
+He&&Oa.endShadows(),this.info.autoReset&&this.info.reset(),void 0!==f&&this.setRenderTarget(f),Ca.multiview&&xa.attachCamera(c),la.render(H,a,c,g),d=H.opaque,e=H.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(G,a,c),null!==P&&(ba.updateRenderTargetMipmap(P),ba.updateMultisampleRenderTarget(P)),ha.buffers.depth.setTest(!0),ha.buffers.depth.setMask(!0),ha.buffers.color.setMask(!0),ha.setPolygonOffset(!1),
+Ca.multiview&&xa.detachCamera(c),oa.enabled&&oa.submitFrame(),E=H=null):console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.")};this.setFramebuffer=function(a){O!==a&&K.bindFramebuffer(36160,a);O=a};this.getActiveCubeFace=function(){return W};this.getActiveMipmapLevel=function(){return ia};this.getRenderTarget=function(){return P};this.setRenderTarget=function(a,b,c){P=a;W=b;ia=c;a&&void 0===R.get(a).__webglFramebuffer&&ba.setupRenderTarget(a);var d=O,e=!1;a?(d=R.get(a).__webglFramebuffer,
+a.isWebGLRenderTargetCube?(d=d[b||0],e=!0):d=a.isWebGLMultisampleRenderTarget?R.get(a).__webglMultisampledFramebuffer:d,Z.copy(a.viewport),T.copy(a.scissor),aa=a.scissorTest):(Z.copy(S).multiplyScalar(ea).floor(),T.copy(ja).multiplyScalar(ea).floor(),aa=na);ac!==d&&(K.bindFramebuffer(36160,d),ac=d);ha.viewport(Z);ha.scissor(T);ha.setScissorTest(aa);e&&(a=R.get(a.texture),K.framebufferTexture2D(36160,36064,34069+(b||0),a.__webglTexture,c||0))};this.readRenderTargetPixels=function(a,b,c,d,e,f,g){if(a&&
 a.isWebGLRenderTarget){var h=R.get(a).__webglFramebuffer;a.isWebGLRenderTargetCube&&void 0!==g&&(h=h[g]);if(h){g=!1;h!==ac&&(K.bindFramebuffer(36160,h),g=!0);try{var l=a.texture,m=l.format,p=l.type;1023!==m&&ka.convert(m)!==K.getParameter(35739)?console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format."):1009===p||ka.convert(p)===K.getParameter(35738)||1015===p&&(Ca.isWebGL2||pa.get("OES_texture_float")||pa.get("WEBGL_color_buffer_float"))||
 a.isWebGLRenderTarget){var h=R.get(a).__webglFramebuffer;a.isWebGLRenderTargetCube&&void 0!==g&&(h=h[g]);if(h){g=!1;h!==ac&&(K.bindFramebuffer(36160,h),g=!0);try{var l=a.texture,m=l.format,p=l.type;1023!==m&&ka.convert(m)!==K.getParameter(35739)?console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format."):1009===p||ka.convert(p)===K.getParameter(35738)||1015===p&&(Ca.isWebGL2||pa.get("OES_texture_float")||pa.get("WEBGL_color_buffer_float"))||
 1016===p&&(Ca.isWebGL2?pa.get("EXT_color_buffer_float"):pa.get("EXT_color_buffer_half_float"))?36053===K.checkFramebufferStatus(36160)?0<=b&&b<=a.width-d&&0<=c&&c<=a.height-e&&K.readPixels(b,c,d,e,ka.convert(m),ka.convert(p),f):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete."):console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.")}finally{g&&K.bindFramebuffer(36160,
 1016===p&&(Ca.isWebGL2?pa.get("EXT_color_buffer_float"):pa.get("EXT_color_buffer_half_float"))?36053===K.checkFramebufferStatus(36160)?0<=b&&b<=a.width-d&&0<=c&&c<=a.height-e&&K.readPixels(b,c,d,e,ka.convert(m),ka.convert(p),f):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete."):console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.")}finally{g&&K.bindFramebuffer(36160,
-ac)}}}else console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.")};this.copyFramebufferToTexture=function(a,b,c){var d=b.image.width,e=b.image.height,f=ka.convert(b.format);aa.setTexture2D(b,0);K.copyTexImage2D(3553,c||0,f,a.x,a.y,d,e,0)};this.copyTextureToTexture=function(a,b,c,d){var e=b.image.width,f=b.image.height,g=ka.convert(c.format),h=ka.convert(c.type);aa.setTexture2D(c,0);b.isDataTexture?K.texSubImage2D(3553,d||0,a.x,a.y,e,f,g,h,b.image.data):
+ac)}}}else console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.")};this.copyFramebufferToTexture=function(a,b,c){var d=b.image.width,e=b.image.height,f=ka.convert(b.format);ba.setTexture2D(b,0);K.copyTexImage2D(3553,c||0,f,a.x,a.y,d,e,0)};this.copyTextureToTexture=function(a,b,c,d){var e=b.image.width,f=b.image.height,g=ka.convert(c.format),h=ka.convert(c.type);ba.setTexture2D(c,0);b.isDataTexture?K.texSubImage2D(3553,d||0,a.x,a.y,e,f,g,h,b.image.data):
 K.texSubImage2D(3553,d||0,a.x,a.y,g,h,b.image)};"undefined"!==typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}function Ie(a,b){this.name="";this.color=new I(a);this.density=void 0!==b?b:2.5E-4}function Je(a,b,c){this.name="";this.color=new I(a);this.near=void 0!==b?b:1;this.far=void 0!==c?c:1E3}function Gb(a,b){this.array=a;this.stride=b;this.count=void 0!==a?a.length/b:0;this.dynamic=!1;this.updateRange={offset:0,count:-1};this.version=0}function Kd(a,
 K.texSubImage2D(3553,d||0,a.x,a.y,g,h,b.image)};"undefined"!==typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}function Ie(a,b){this.name="";this.color=new I(a);this.density=void 0!==b?b:2.5E-4}function Je(a,b,c){this.name="";this.color=new I(a);this.near=void 0!==b?b:1;this.far=void 0!==c?c:1E3}function Gb(a,b){this.array=a;this.stride=b;this.count=void 0!==a?a.length/b:0;this.dynamic=!1;this.updateRange={offset:0,count:-1};this.version=0}function Kd(a,
 b,c,d){this.data=a;this.itemSize=b;this.offset=c;this.normalized=!0===d}function Hb(a){Q.call(this);this.type="SpriteMaterial";this.color=new I(16777215);this.map=null;this.rotation=0;this.sizeAttenuation=!0;this.lights=!1;this.transparent=!0;this.setValues(a)}function Ld(a){C.call(this);this.type="Sprite";if(void 0===Ic){Ic=new D;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 Gb(b,5);Ic.setIndex([0,1,2,0,2,3]);Ic.addAttribute("position",new Kd(b,3,0,!1));Ic.addAttribute("uv",
 b,c,d){this.data=a;this.itemSize=b;this.offset=c;this.normalized=!0===d}function Hb(a){Q.call(this);this.type="SpriteMaterial";this.color=new I(16777215);this.map=null;this.rotation=0;this.sizeAttenuation=!0;this.lights=!1;this.transparent=!0;this.setValues(a)}function Ld(a){C.call(this);this.type="Sprite";if(void 0===Ic){Ic=new D;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 Gb(b,5);Ic.setIndex([0,1,2,0,2,3]);Ic.addAttribute("position",new Kd(b,3,0,!1));Ic.addAttribute("uv",
 new Kd(b,2,3,!1))}this.geometry=Ic;this.material=void 0!==a?a:new Hb;this.center=new w(.5,.5)}function Ke(a,b,c,d,e,f){Jc.subVectors(a,c).addScalar(.5).multiply(d);void 0!==e?(Md.x=f*Jc.x-e*Jc.y,Md.y=e*Jc.x+f*Jc.y):Md.copy(Jc);a.copy(b);a.x+=Md.x;a.y+=Md.y;a.applyMatrix4(Nh)}function Nd(){C.call(this);this.type="LOD";Object.defineProperties(this,{levels:{enumerable:!0,value:[]}});this.autoUpdate=!0}function Od(a,b){a&&a.isGeometry&&console.error("THREE.SkinnedMesh no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");
 new Kd(b,2,3,!1))}this.geometry=Ic;this.material=void 0!==a?a:new Hb;this.center=new w(.5,.5)}function Ke(a,b,c,d,e,f){Jc.subVectors(a,c).addScalar(.5).multiply(d);void 0!==e?(Md.x=f*Jc.x-e*Jc.y,Md.y=e*Jc.x+f*Jc.y):Md.copy(Jc);a.copy(b);a.x+=Md.x;a.y+=Md.y;a.applyMatrix4(Nh)}function Nd(){C.call(this);this.type="LOD";Object.defineProperties(this,{levels:{enumerable:!0,value:[]}});this.autoUpdate=!0}function Od(a,b){a&&a.isGeometry&&console.error("THREE.SkinnedMesh no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");
-R.call(this,a,b);this.type="SkinnedMesh";this.bindMode="attached";this.bindMatrix=new M;this.bindMatrixInverse=new M}function Le(a,b){a=a||[];this.bones=a.slice(0);this.boneMatrices=new Float32Array(16*this.bones.length);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 M)}function hg(){C.call(this);
+R.call(this,a,b);this.type="SkinnedMesh";this.bindMode="attached";this.bindMatrix=new M;this.bindMatrixInverse=new M}function Le(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 M)}function hg(){C.call(this);
 this.type="Bone"}function U(a){Q.call(this);this.type="LineBasicMaterial";this.color=new I(16777215);this.linewidth=1;this.linejoin=this.linecap="round";this.lights=!1;this.setValues(a)}function wa(a,b,c){1===c&&console.error("THREE.Line: parameter THREE.LinePieces no longer supported. Use THREE.LineSegments instead.");C.call(this);this.type="Line";this.geometry=void 0!==a?a:new D;this.material=void 0!==b?b:new U({color:16777215*Math.random()})}function T(a,b){wa.call(this,a,b);this.type="LineSegments"}
 this.type="Bone"}function U(a){Q.call(this);this.type="LineBasicMaterial";this.color=new I(16777215);this.linewidth=1;this.linejoin=this.linecap="round";this.lights=!1;this.setValues(a)}function wa(a,b,c){1===c&&console.error("THREE.Line: parameter THREE.LinePieces no longer supported. Use THREE.LineSegments instead.");C.call(this);this.type="Line";this.geometry=void 0!==a?a:new D;this.material=void 0!==b?b:new U({color:16777215*Math.random()})}function T(a,b){wa.call(this,a,b);this.type="LineSegments"}
 function Me(a,b){wa.call(this,a,b);this.type="LineLoop"}function Qa(a){Q.call(this);this.type="PointsMaterial";this.color=new I(16777215);this.map=null;this.size=1;this.sizeAttenuation=!0;this.lights=this.morphTargets=!1;this.setValues(a)}function Kc(a,b){C.call(this);this.type="Points";this.geometry=void 0!==a?a:new D;this.material=void 0!==b?b:new Qa({color:16777215*Math.random()});this.updateMorphTargets()}function ig(a,b,c,d,e,f,g){var h=jg.distanceSqToPoint(a);h<c&&(c=new n,jg.closestPointToPoint(a,
 function Me(a,b){wa.call(this,a,b);this.type="LineLoop"}function Qa(a){Q.call(this);this.type="PointsMaterial";this.color=new I(16777215);this.map=null;this.size=1;this.sizeAttenuation=!0;this.lights=this.morphTargets=!1;this.setValues(a)}function Kc(a,b){C.call(this);this.type="Points";this.geometry=void 0!==a?a:new D;this.material=void 0!==b?b:new Qa({color:16777215*Math.random()});this.updateMorphTargets()}function ig(a,b,c,d,e,f,g){var h=jg.distanceSqToPoint(a);h<c&&(c=new n,jg.closestPointToPoint(a,
 c),c.applyMatrix4(d),a=e.ray.origin.distanceTo(c),a<e.near||a>e.far||f.push({distance:a,distanceToRay:Math.sqrt(h),point:c,index:b,face:null,object:g}))}function kg(a,b,c,d,e,f,g,h,l){Z.call(this,a,b,c,d,e,f,g,h,l);this.format=void 0!==g?g:1022;this.minFilter=void 0!==f?f:1006;this.magFilter=void 0!==e?e:1006;this.generateMipmaps=!1}function Lc(a,b,c,d,e,f,g,h,l,m,p,k){Z.call(this,null,f,g,h,l,m,d,e,p,k);this.image={width:b,height:c};this.mipmaps=a;this.generateMipmaps=this.flipY=!1}function Pd(a,
 c),c.applyMatrix4(d),a=e.ray.origin.distanceTo(c),a<e.near||a>e.far||f.push({distance:a,distanceToRay:Math.sqrt(h),point:c,index:b,face:null,object:g}))}function kg(a,b,c,d,e,f,g,h,l){Z.call(this,a,b,c,d,e,f,g,h,l);this.format=void 0!==g?g:1022;this.minFilter=void 0!==f?f:1006;this.magFilter=void 0!==e?e:1006;this.generateMipmaps=!1}function Lc(a,b,c,d,e,f,g,h,l,m,p,k){Z.call(this,null,f,g,h,l,m,d,e,p,k);this.image={width:b,height:c};this.mipmaps=a;this.generateMipmaps=this.flipY=!1}function Pd(a,
@@ -303,13 +303,13 @@ a)}function Ue(a){Y.call(this,a)}function Ve(a){Y.call(this,a)}function E(){this
 h=l*(h-f);a=f;b=e;c=-3*f+3*g-2*e-h;d=2*f-2*g+e+h},initNonuniformCatmullRom:function(e,f,g,h,l,m,k){e=((f-e)/l-(g-e)/(l+m)+(g-f)/m)*m;h=((g-f)/m-(h-f)/(m+k)+(h-g)/k)*m;a=f;b=e;c=-3*f+3*g-2*e-h;d=2*f-2*g+e+h},calc:function(e){var f=e*e;return a+b*e+c*f+d*f*e}}}function ya(a,b,c,d){E.call(this);this.type="CatmullRomCurve3";this.points=a||[];this.closed=b||!1;this.curveType=c||"centripetal";this.tension=d||.5}function Xh(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-
 h=l*(h-f);a=f;b=e;c=-3*f+3*g-2*e-h;d=2*f-2*g+e+h},initNonuniformCatmullRom:function(e,f,g,h,l,m,k){e=((f-e)/l-(g-e)/(l+m)+(g-f)/m)*m;h=((g-f)/m-(h-f)/(m+k)+(h-g)/k)*m;a=f;b=e;c=-3*f+3*g-2*e-h;d=2*f-2*g+e+h},calc:function(e){var f=e*e;return a+b*e+c*f+d*f*e}}}function ya(a,b,c,d){E.call(this);this.type="CatmullRomCurve3";this.points=a||[];this.closed=b||!1;this.curveType=c||"centripetal";this.tension=d||.5}function Xh(a,b,c,d,e){b=.5*(d-b);e=.5*(e-c);var f=a*a;return(2*c-2*d+b+e)*a*f+(-3*c+3*d-2*b-
 e)*f+b*a+c}function me(a,b,c,d){var e=1-a;return e*e*b+2*(1-a)*a*c+a*a*d}function ne(a,b,c,d,e){var f=1-a,g=1-a;return f*f*f*b+3*g*g*a*c+3*(1-a)*a*a*d+a*a*a*e}function Sa(a,b,c,d){E.call(this);this.type="CubicBezierCurve";this.v0=a||new w;this.v1=b||new w;this.v2=c||new w;this.v3=d||new w}function gb(a,b,c,d){E.call(this);this.type="CubicBezierCurve3";this.v0=a||new n;this.v1=b||new n;this.v2=c||new n;this.v3=d||new n}function za(a,b){E.call(this);this.type="LineCurve";this.v1=a||new w;this.v2=b||
 e)*f+b*a+c}function me(a,b,c,d){var e=1-a;return e*e*b+2*(1-a)*a*c+a*a*d}function ne(a,b,c,d,e){var f=1-a,g=1-a;return f*f*f*b+3*g*g*a*c+3*(1-a)*a*a*d+a*a*a*e}function Sa(a,b,c,d){E.call(this);this.type="CubicBezierCurve";this.v0=a||new w;this.v1=b||new w;this.v2=c||new w;this.v3=d||new w}function gb(a,b,c,d){E.call(this);this.type="CubicBezierCurve3";this.v0=a||new n;this.v1=b||new n;this.v2=c||new n;this.v3=d||new n}function za(a,b){E.call(this);this.type="LineCurve";this.v1=a||new w;this.v2=b||
 new w}function Ta(a,b){E.call(this);this.type="LineCurve3";this.v1=a||new n;this.v2=b||new n}function Ua(a,b,c){E.call(this);this.type="QuadraticBezierCurve";this.v0=a||new w;this.v1=b||new w;this.v2=c||new w}function hb(a,b,c){E.call(this);this.type="QuadraticBezierCurve3";this.v0=a||new n;this.v1=b||new n;this.v2=c||new n}function Va(a){E.call(this);this.type="SplineCurve";this.points=a||[]}function rb(){E.call(this);this.type="CurvePath";this.curves=[];this.autoClose=!1}function Wa(a){rb.call(this);
 new w}function Ta(a,b){E.call(this);this.type="LineCurve3";this.v1=a||new n;this.v2=b||new n}function Ua(a,b,c){E.call(this);this.type="QuadraticBezierCurve";this.v0=a||new w;this.v1=b||new w;this.v2=c||new w}function hb(a,b,c){E.call(this);this.type="QuadraticBezierCurve3";this.v0=a||new n;this.v1=b||new n;this.v2=c||new n}function Va(a){E.call(this);this.type="SplineCurve";this.points=a||[]}function rb(){E.call(this);this.type="CurvePath";this.curves=[];this.autoClose=!1}function Wa(a){rb.call(this);
-this.type="Path";this.currentPoint=new w;a&&this.setFromPoints(a)}function Jb(a){Wa.call(this,a);this.uuid=N.generateUUID();this.type="Shape";this.holes=[]}function da(a,b){C.call(this);this.type="Light";this.color=new I(a);this.intensity=void 0!==b?b:1;this.receiveShadow=void 0}function We(a,b,c){da.call(this,a,c);this.type="HemisphereLight";this.castShadow=void 0;this.position.copy(C.DefaultUp);this.updateMatrix();this.groundColor=new I(b)}function ib(a){this.camera=a;this.bias=0;this.radius=1;
-this.mapSize=new w(512,512);this.mapPass=this.map=null;this.matrix=new M;this._frustum=new Ed;this._frameExtents=new w(1,1);this._viewportCount=1;this._viewports=[new ca(0,0,1,1)]}function Xe(){ib.call(this,new ja(50,1,.5,500))}function Ye(a,b,c,d,e,f){da.call(this,a,b);this.type="SpotLight";this.position.copy(C.DefaultUp);this.updateMatrix();this.target=new C;Object.defineProperty(this,"power",{get:function(){return this.intensity*Math.PI},set:function(a){this.intensity=a/Math.PI}});this.distance=
-void 0!==c?c:0;this.angle=void 0!==d?d:Math.PI/3;this.penumbra=void 0!==e?e:0;this.decay=void 0!==f?f:1;this.shadow=new Xe}function rg(){ib.call(this,new ja(90,1,.5,500));this._frameExtents=new w(4,2);this._viewportCount=6;this._viewports=[new ca(2,1,1,1),new ca(0,1,1,1),new ca(3,1,1,1),new ca(1,1,1,1),new ca(3,0,1,1),new ca(1,0,1,1)];this._cubeDirections=[new n(1,0,0),new n(-1,0,0),new n(0,0,1),new n(0,0,-1),new n(0,1,0),new n(0,-1,0)];this._cubeUps=[new n(0,1,0),new n(0,1,0),new n(0,1,0),new n(0,
-1,0),new n(0,0,1),new n(0,0,-1)]}function Ze(a,b,c,d){da.call(this,a,b);this.type="PointLight";Object.defineProperty(this,"power",{get:function(){return 4*this.intensity*Math.PI},set:function(a){this.intensity=a/(4*Math.PI)}});this.distance=void 0!==c?c:0;this.decay=void 0!==d?d:1;this.shadow=new rg}function oe(a,b,c,d,e,f){bb.call(this);this.type="OrthographicCamera";this.zoom=1;this.view=null;this.left=void 0!==a?a:-1;this.right=void 0!==b?b:1;this.top=void 0!==c?c:1;this.bottom=void 0!==d?d:-1;
-this.near=void 0!==e?e:.1;this.far=void 0!==f?f:2E3;this.updateProjectionMatrix()}function $e(){ib.call(this,new oe(-5,5,5,-5,.5,500))}function af(a,b){da.call(this,a,b);this.type="DirectionalLight";this.position.copy(C.DefaultUp);this.updateMatrix();this.target=new C;this.shadow=new $e}function bf(a,b){da.call(this,a,b);this.type="AmbientLight";this.castShadow=void 0}function cf(a,b,c,d){da.call(this,a,b);this.type="RectAreaLight";this.width=void 0!==c?c:10;this.height=void 0!==d?d:10}function df(a){Y.call(this,
+this.type="Path";this.currentPoint=new w;a&&this.setFromPoints(a)}function Jb(a){Wa.call(this,a);this.uuid=N.generateUUID();this.type="Shape";this.holes=[]}function aa(a,b){C.call(this);this.type="Light";this.color=new I(a);this.intensity=void 0!==b?b:1;this.receiveShadow=void 0}function We(a,b,c){aa.call(this,a,c);this.type="HemisphereLight";this.castShadow=void 0;this.position.copy(C.DefaultUp);this.updateMatrix();this.groundColor=new I(b)}function ib(a){this.camera=a;this.bias=0;this.radius=1;
+this.mapSize=new w(512,512);this.mapPass=this.map=null;this.matrix=new M;this._frustum=new Ed;this._frameExtents=new w(1,1);this._viewportCount=1;this._viewports=[new da(0,0,1,1)]}function Xe(){ib.call(this,new ja(50,1,.5,500))}function Ye(a,b,c,d,e,f){aa.call(this,a,b);this.type="SpotLight";this.position.copy(C.DefaultUp);this.updateMatrix();this.target=new C;Object.defineProperty(this,"power",{get:function(){return this.intensity*Math.PI},set:function(a){this.intensity=a/Math.PI}});this.distance=
+void 0!==c?c:0;this.angle=void 0!==d?d:Math.PI/3;this.penumbra=void 0!==e?e:0;this.decay=void 0!==f?f:1;this.shadow=new Xe}function rg(){ib.call(this,new ja(90,1,.5,500));this._frameExtents=new w(4,2);this._viewportCount=6;this._viewports=[new da(2,1,1,1),new da(0,1,1,1),new da(3,1,1,1),new da(1,1,1,1),new da(3,0,1,1),new da(1,0,1,1)];this._cubeDirections=[new n(1,0,0),new n(-1,0,0),new n(0,0,1),new n(0,0,-1),new n(0,1,0),new n(0,-1,0)];this._cubeUps=[new n(0,1,0),new n(0,1,0),new n(0,1,0),new n(0,
+1,0),new n(0,0,1),new n(0,0,-1)]}function Ze(a,b,c,d){aa.call(this,a,b);this.type="PointLight";Object.defineProperty(this,"power",{get:function(){return 4*this.intensity*Math.PI},set:function(a){this.intensity=a/(4*Math.PI)}});this.distance=void 0!==c?c:0;this.decay=void 0!==d?d:1;this.shadow=new rg}function oe(a,b,c,d,e,f){bb.call(this);this.type="OrthographicCamera";this.zoom=1;this.view=null;this.left=void 0!==a?a:-1;this.right=void 0!==b?b:1;this.top=void 0!==c?c:1;this.bottom=void 0!==d?d:-1;
+this.near=void 0!==e?e:.1;this.far=void 0!==f?f:2E3;this.updateProjectionMatrix()}function $e(){ib.call(this,new oe(-5,5,5,-5,.5,500))}function af(a,b){aa.call(this,a,b);this.type="DirectionalLight";this.position.copy(C.DefaultUp);this.updateMatrix();this.target=new C;this.shadow=new $e}function bf(a,b){aa.call(this,a,b);this.type="AmbientLight";this.castShadow=void 0}function cf(a,b,c,d){aa.call(this,a,b);this.type="RectAreaLight";this.width=void 0!==c?c:10;this.height=void 0!==d?d:10}function df(a){Y.call(this,
 a);this.textures={}}function ef(){D.call(this);this.type="InstancedBufferGeometry";this.maxInstancedCount=void 0}function ff(a,b,c,d){"number"===typeof c&&(d=c,c=!1,console.error("THREE.InstancedBufferAttribute: The constructor now expects normalized as the third argument."));O.call(this,a,b,c);this.meshPerAttribute=d||1}function gf(a){Y.call(this,a)}function hf(a){Y.call(this,a)}function sg(a){"undefined"===typeof createImageBitmap&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported.");
 a);this.textures={}}function ef(){D.call(this);this.type="InstancedBufferGeometry";this.maxInstancedCount=void 0}function ff(a,b,c,d){"number"===typeof c&&(d=c,c=!1,console.error("THREE.InstancedBufferAttribute: The constructor now expects normalized as the third argument."));O.call(this,a,b,c);this.meshPerAttribute=d||1}function gf(a){Y.call(this,a)}function hf(a){Y.call(this,a)}function sg(a){"undefined"===typeof createImageBitmap&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported.");
-"undefined"===typeof fetch&&console.warn("THREE.ImageBitmapLoader: fetch() not supported.");Y.call(this,a);this.options=void 0}function tg(){this.type="ShapePath";this.color=new I;this.subPaths=[];this.currentPath=null}function ug(a){this.type="Font";this.data=a}function vg(a){Y.call(this,a)}function jf(a){Y.call(this,a)}function kf(){this.coefficients=[];for(var a=0;9>a;a++)this.coefficients.push(new n)}function Xa(a,b){da.call(this,void 0,b);this.sh=void 0!==a?a:new kf}function wg(a,b,c){Xa.call(this,
+"undefined"===typeof fetch&&console.warn("THREE.ImageBitmapLoader: fetch() not supported.");Y.call(this,a);this.options=void 0}function tg(){this.type="ShapePath";this.color=new I;this.subPaths=[];this.currentPath=null}function ug(a){this.type="Font";this.data=a}function vg(a){Y.call(this,a)}function jf(a){Y.call(this,a)}function kf(){this.coefficients=[];for(var a=0;9>a;a++)this.coefficients.push(new n)}function Xa(a,b){aa.call(this,void 0,b);this.sh=void 0!==a?a:new kf}function wg(a,b,c){Xa.call(this,
 void 0,c);a=(new I).set(a);c=(new I).set(b);b=new n(a.r,a.g,a.b);a=new n(c.r,c.g,c.b);c=Math.sqrt(Math.PI);var d=c*Math.sqrt(.75);this.sh.coefficients[0].copy(b).add(a).multiplyScalar(c);this.sh.coefficients[1].copy(b).sub(a).multiplyScalar(d)}function xg(a,b){Xa.call(this,void 0,b);a=(new I).set(a);this.sh.coefficients[0].set(a.r,a.g,a.b).multiplyScalar(2*Math.sqrt(Math.PI))}function Yh(){this.type="StereoCamera";this.aspect=1;this.eyeSep=.064;this.cameraL=new ja;this.cameraL.layers.enable(1);this.cameraL.matrixAutoUpdate=
 void 0,c);a=(new I).set(a);c=(new I).set(b);b=new n(a.r,a.g,a.b);a=new n(c.r,c.g,c.b);c=Math.sqrt(Math.PI);var d=c*Math.sqrt(.75);this.sh.coefficients[0].copy(b).add(a).multiplyScalar(c);this.sh.coefficients[1].copy(b).sub(a).multiplyScalar(d)}function xg(a,b){Xa.call(this,void 0,b);a=(new I).set(a);this.sh.coefficients[0].set(a.r,a.g,a.b).multiplyScalar(2*Math.sqrt(Math.PI))}function Yh(){this.type="StereoCamera";this.aspect=1;this.eyeSep=.064;this.cameraL=new ja;this.cameraL.layers.enable(1);this.cameraL.matrixAutoUpdate=
 !1;this.cameraR=new ja;this.cameraR.layers.enable(2);this.cameraR.matrixAutoUpdate=!1;this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}function yg(a){this.autoStart=void 0!==a?a:!0;this.elapsedTime=this.oldTime=this.startTime=0;this.running=!1}function zg(){C.call(this);this.type="AudioListener";this.context=Ag.getContext();this.gain=this.context.createGain();this.gain.connect(this.context.destination);this.filter=null;this.timeDelta=0;this._clock=new yg}function dd(a){C.call(this);
 !1;this.cameraR=new ja;this.cameraR.layers.enable(2);this.cameraR.matrixAutoUpdate=!1;this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}function yg(a){this.autoStart=void 0!==a?a:!0;this.elapsedTime=this.oldTime=this.startTime=0;this.running=!1}function zg(){C.call(this);this.type="AudioListener";this.context=Ag.getContext();this.gain=this.context.createGain();this.gain.connect(this.context.destination);this.filter=null;this.timeDelta=0;this._clock=new yg}function dd(a){C.call(this);
 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.startTime=0;this.duration=void 0;this.playbackRate=1;this.isPlaying=!1;this.hasPlaybackControl=!0;this.sourceType="empty";this.filters=[]}function Bg(a){dd.call(this,a);this.panner=this.context.createPanner();this.panner.panningModel="HRTF";this.panner.connect(this.gain)}function Cg(a,b){this.analyser=
 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.startTime=0;this.duration=void 0;this.playbackRate=1;this.isPlaying=!1;this.hasPlaybackControl=!0;this.sourceType="empty";this.filters=[]}function Bg(a){dd.call(this,a);this.panner=this.context.createPanner();this.panner.panningModel="HRTF";this.panner.connect(this.gain)}function Cg(a,b){this.analyser=
@@ -374,7 +374,7 @@ Math.abs(this.z)},normalize:function(){return this.divideScalar(this.length()||1
 a)},crossVectors:function(a,b){var c=a.x,d=a.y;a=a.z;var e=b.x,f=b.y;b=b.z;this.x=d*b-a*f;this.y=a*e-c*b;this.z=c*f-d*e;return this},projectOnVector:function(a){var b=a.dot(this)/a.lengthSq();return this.copy(a).multiplyScalar(b)},projectOnPlane:function(a){Lg.copy(this).projectOnVector(a);return this.sub(Lg)},reflect:function(a){return this.sub(Lg.copy(a).multiplyScalar(2*this.dot(a)))},angleTo:function(a){a=this.dot(a)/Math.sqrt(this.lengthSq()*a.lengthSq());return Math.acos(N.clamp(a,-1,1))},distanceTo:function(a){return Math.sqrt(this.distanceToSquared(a))},
 a)},crossVectors:function(a,b){var c=a.x,d=a.y;a=a.z;var e=b.x,f=b.y;b=b.z;this.x=d*b-a*f;this.y=a*e-c*b;this.z=c*f-d*e;return this},projectOnVector:function(a){var b=a.dot(this)/a.lengthSq();return this.copy(a).multiplyScalar(b)},projectOnPlane:function(a){Lg.copy(this).projectOnVector(a);return this.sub(Lg)},reflect:function(a){return this.sub(Lg.copy(a).multiplyScalar(2*this.dot(a)))},angleTo:function(a){a=this.dot(a)/Math.sqrt(this.lengthSq()*a.lengthSq());return Math.acos(N.clamp(a,-1,1))},distanceTo:function(a){return Math.sqrt(this.distanceToSquared(a))},
 distanceToSquared:function(a){var b=this.x-a.x,c=this.y-a.y;a=this.z-a.z;return b*b+c*c+a*a},manhattanDistanceTo:function(a){return Math.abs(this.x-a.x)+Math.abs(this.y-a.y)+Math.abs(this.z-a.z)},setFromSpherical:function(a){return this.setFromSphericalCoords(a.radius,a.phi,a.theta)},setFromSphericalCoords:function(a,b,c){var d=Math.sin(b)*a;this.x=d*Math.sin(c);this.y=Math.cos(b)*a;this.z=d*Math.cos(c);return this},setFromCylindrical:function(a){return this.setFromCylindricalCoords(a.radius,a.theta,
 distanceToSquared:function(a){var b=this.x-a.x,c=this.y-a.y;a=this.z-a.z;return b*b+c*c+a*a},manhattanDistanceTo:function(a){return Math.abs(this.x-a.x)+Math.abs(this.y-a.y)+Math.abs(this.z-a.z)},setFromSpherical:function(a){return this.setFromSphericalCoords(a.radius,a.phi,a.theta)},setFromSphericalCoords:function(a,b,c){var d=Math.sin(b)*a;this.x=d*Math.sin(c);this.y=Math.cos(b)*a;this.z=d*Math.cos(c);return this},setFromCylindrical:function(a){return this.setFromCylindricalCoords(a.radius,a.theta,
 a.y)},setFromCylindricalCoords:function(a,b,c){this.x=a*Math.sin(b);this.y=c;this.z=a*Math.cos(b);return this},setFromMatrixPosition:function(a){a=a.elements;this.x=a[12];this.y=a[13];this.z=a[14];return this},setFromMatrixScale:function(a){var b=this.setFromMatrixColumn(a,0).length(),c=this.setFromMatrixColumn(a,1).length();a=this.setFromMatrixColumn(a,2).length();this.x=b;this.y=c;this.z=a;return this},setFromMatrixColumn:function(a,b){return this.fromArray(a.elements,4*b)},equals:function(a){return a.x===
 a.y)},setFromCylindricalCoords:function(a,b,c){this.x=a*Math.sin(b);this.y=c;this.z=a*Math.cos(b);return this},setFromMatrixPosition:function(a){a=a.elements;this.x=a[12];this.y=a[13];this.z=a[14];return this},setFromMatrixScale:function(a){var b=this.setFromMatrixColumn(a,0).length(),c=this.setFromMatrixColumn(a,1).length();a=this.setFromMatrixColumn(a,2).length();this.x=b;this.y=c;this.z=a;return this},setFromMatrixColumn:function(a,b){return this.fromArray(a.elements,4*b)},equals:function(a){return a.x===
-this.x&&a.y===this.y&&a.z===this.z},fromArray:function(a,b){void 0===b&&(b=0);this.x=a[b];this.y=a[b+1];this.z=a[b+2];return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);a[b]=this.x;a[b+1]=this.y;a[b+2]=this.z;return a},fromBufferAttribute:function(a,b,c){void 0!==c&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute().");this.x=a.getX(b);this.y=a.getY(b);this.z=a.getZ(b);return this}});var qc=new n;Object.assign(S.prototype,{isMatrix3:!0,set:function(a,
+this.x&&a.y===this.y&&a.z===this.z},fromArray:function(a,b){void 0===b&&(b=0);this.x=a[b];this.y=a[b+1];this.z=a[b+2];return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);a[b]=this.x;a[b+1]=this.y;a[b+2]=this.z;return a},fromBufferAttribute:function(a,b,c){void 0!==c&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute().");this.x=a.getX(b);this.y=a.getY(b);this.z=a.getZ(b);return this}});var qc=new n;Object.assign(ca.prototype,{isMatrix3:!0,set:function(a,
 b,c,d,e,f,g,h,l){var m=this.elements;m[0]=a;m[1]=d;m[2]=g;m[3]=b;m[4]=e;m[5]=h;m[6]=c;m[7]=f;m[8]=l;return this},identity:function(){this.set(1,0,0,0,1,0,0,0,1);return this},clone:function(){return(new this.constructor).fromArray(this.elements)},copy:function(a){var b=this.elements;a=a.elements;b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]=a[3];b[4]=a[4];b[5]=a[5];b[6]=a[6];b[7]=a[7];b[8]=a[8];return this},setFromMatrix4:function(a){a=a.elements;this.set(a[0],a[4],a[8],a[1],a[5],a[9],a[2],a[6],a[10]);return this},
 b,c,d,e,f,g,h,l){var m=this.elements;m[0]=a;m[1]=d;m[2]=g;m[3]=b;m[4]=e;m[5]=h;m[6]=c;m[7]=f;m[8]=l;return this},identity:function(){this.set(1,0,0,0,1,0,0,0,1);return this},clone:function(){return(new this.constructor).fromArray(this.elements)},copy:function(a){var b=this.elements;a=a.elements;b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]=a[3];b[4]=a[4];b[5]=a[5];b[6]=a[6];b[7]=a[7];b[8]=a[8];return this},setFromMatrix4:function(a){a=a.elements;this.set(a[0],a[4],a[8],a[1],a[5],a[9],a[2],a[6],a[10]);return this},
 applyToBufferAttribute:function(a){for(var b=0,c=a.count;b<c;b++)qc.x=a.getX(b),qc.y=a.getY(b),qc.z=a.getZ(b),qc.applyMatrix3(this),a.setXYZ(b,qc.x,qc.y,qc.z);return a},multiply:function(a){return this.multiplyMatrices(this,a)},premultiply:function(a){return this.multiplyMatrices(a,this)},multiplyMatrices:function(a,b){var c=a.elements,d=b.elements;b=this.elements;a=c[0];var e=c[3],f=c[6],g=c[1],h=c[4],l=c[7],m=c[2],k=c[5];c=c[8];var u=d[0],t=d[3],r=d[6],q=d[1],n=d[4],y=d[7],z=d[2],x=d[5];d=d[8];
 applyToBufferAttribute:function(a){for(var b=0,c=a.count;b<c;b++)qc.x=a.getX(b),qc.y=a.getY(b),qc.z=a.getZ(b),qc.applyMatrix3(this),a.setXYZ(b,qc.x,qc.y,qc.z);return a},multiply:function(a){return this.multiplyMatrices(this,a)},premultiply:function(a){return this.multiplyMatrices(a,this)},multiplyMatrices:function(a,b){var c=a.elements,d=b.elements;b=this.elements;a=c[0];var e=c[3],f=c[6],g=c[1],h=c[4],l=c[7],m=c[2],k=c[5];c=c[8];var u=d[0],t=d[3],r=d[6],q=d[1],n=d[4],y=d[7],z=d[2],x=d[5];d=d[8];
 b[0]=a*u+e*q+f*z;b[3]=a*t+e*n+f*x;b[6]=a*r+e*y+f*d;b[1]=g*u+h*q+l*z;b[4]=g*t+h*n+l*x;b[7]=g*r+h*y+l*d;b[2]=m*u+k*q+c*z;b[5]=m*t+k*n+c*x;b[8]=m*r+k*y+c*d;return this},multiplyScalar:function(a){var b=this.elements;b[0]*=a;b[3]*=a;b[6]*=a;b[1]*=a;b[4]*=a;b[7]*=a;b[2]*=a;b[5]*=a;b[8]*=a;return this},determinant:function(){var a=this.elements,b=a[0],c=a[1],d=a[2],e=a[3],f=a[4],g=a[5],h=a[6],l=a[7];a=a[8];return b*f*a-b*g*l-c*e*a+c*g*h+d*e*l-d*f*h},getInverse:function(a,b){a&&a.isMatrix4&&console.error("THREE.Matrix3: .getInverse() no longer takes a Matrix4 argument.");
 b[0]=a*u+e*q+f*z;b[3]=a*t+e*n+f*x;b[6]=a*r+e*y+f*d;b[1]=g*u+h*q+l*z;b[4]=g*t+h*n+l*x;b[7]=g*r+h*y+l*d;b[2]=m*u+k*q+c*z;b[5]=m*t+k*n+c*x;b[8]=m*r+k*y+c*d;return this},multiplyScalar:function(a){var b=this.elements;b[0]*=a;b[3]*=a;b[6]*=a;b[1]*=a;b[4]*=a;b[7]*=a;b[2]*=a;b[5]*=a;b[8]*=a;return this},determinant:function(){var a=this.elements,b=a[0],c=a[1],d=a[2],e=a[3],f=a[4],g=a[5],h=a[6],l=a[7];a=a[8];return b*f*a-b*g*l-c*e*a+c*g*h+d*e*l-d*f*h},getInverse:function(a,b){a&&a.isMatrix4&&console.error("THREE.Matrix3: .getInverse() no longer takes a Matrix4 argument.");
@@ -387,7 +387,7 @@ this.center.x,this.center.y)},clone:function(){return(new this.constructor).copy
 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.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=N.generateUUID());if(!b&&void 0===a.images[d.uuid]){if(Array.isArray(d)){var e=[];for(var f=0,g=d.length;f<
 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=N.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(Kb.getDataURL(d[f]))}else e=Kb.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-=
 g;f++)e.push(Kb.getDataURL(d[f]))}else e=Kb.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(ca.prototype,{width:{get:function(){return this.z},set:function(a){this.z=a}},height:{get:function(){return this.w},set:function(a){this.w=a}}});Object.assign(ca.prototype,{isVector4:!0,set:function(a,b,c,d){this.x=
+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(da.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(da.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;
 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},
 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-=
 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-=
@@ -462,12 +462,12 @@ g-h;var k=e*m;0<=a?b>=-k?b<=k?(e=1/m,a*=e,b*=e,f=a*(a+f*b+2*g)+b*(f*a+b+2*h)+l):
 d&&d.copy(uf).multiplyScalar(b).add(Mg);return f},intersectSphere:function(a,b){wb.subVectors(a.center,this.origin);var c=wb.dot(this.direction),d=wb.dot(wb)-c*c;a=a.radius*a.radius;if(d>a)return null;a=Math.sqrt(a-d);d=c-a;c+=a;return 0>d&&0>c?null:0>d?this.at(c,b):this.at(d,b)},intersectsSphere:function(a){return this.distanceSqToPoint(a.center)<=a.radius*a.radius},distanceToPlane:function(a){var b=a.normal.dot(this.direction);if(0===b)return 0===a.distanceToPoint(this.origin)?0:null;a=-(this.origin.dot(a.normal)+
 d&&d.copy(uf).multiplyScalar(b).add(Mg);return f},intersectSphere:function(a,b){wb.subVectors(a.center,this.origin);var c=wb.dot(this.direction),d=wb.dot(wb)-c*c;a=a.radius*a.radius;if(d>a)return null;a=Math.sqrt(a-d);d=c-a;c+=a;return 0>d&&0>c?null:0>d?this.at(c,b):this.at(d,b)},intersectsSphere:function(a){return this.distanceSqToPoint(a.center)<=a.radius*a.radius},distanceToPlane:function(a){var b=a.normal.dot(this.direction);if(0===b)return 0===a.distanceToPoint(this.origin)?0:null;a=-(this.origin.dot(a.normal)+
 a.constant)/b;return 0<=a?a:null},intersectPlane:function(a,b){a=this.distanceToPlane(a);return null===a?null:this.at(a,b)},intersectsPlane:function(a){var b=a.distanceToPoint(this.origin);return 0===b||0>a.normal.dot(this.direction)*b?!0:!1},intersectBox:function(a,b){var c=1/this.direction.x;var d=1/this.direction.y;var e=1/this.direction.z,f=this.origin;if(0<=c){var g=(a.min.x-f.x)*c;c*=a.max.x-f.x}else g=(a.max.x-f.x)*c,c*=a.min.x-f.x;if(0<=d){var h=(a.min.y-f.y)*d;d*=a.max.y-f.y}else h=(a.max.y-
 a.constant)/b;return 0<=a?a:null},intersectPlane:function(a,b){a=this.distanceToPlane(a);return null===a?null:this.at(a,b)},intersectsPlane:function(a){var b=a.distanceToPoint(this.origin);return 0===b||0>a.normal.dot(this.direction)*b?!0:!1},intersectBox:function(a,b){var c=1/this.direction.x;var d=1/this.direction.y;var e=1/this.direction.z,f=this.origin;if(0<=c){var g=(a.min.x-f.x)*c;c*=a.max.x-f.x}else g=(a.max.x-f.x)*c,c*=a.min.x-f.x;if(0<=d){var h=(a.min.y-f.y)*d;d*=a.max.y-f.y}else h=(a.max.y-
 f.y)*d,d*=a.min.y-f.y;if(g>d||h>c)return null;if(h>g||g!==g)g=h;if(d<c||c!==c)c=d;0<=e?(h=(a.min.z-f.z)*e,a=(a.max.z-f.z)*e):(h=(a.max.z-f.z)*e,a=(a.min.z-f.z)*e);if(g>a||h>c)return null;if(h>g||g!==g)g=h;if(a<c||c!==c)c=a;return 0>c?null:this.at(0<=g?g:c,b)},intersectsBox:function(a){return null!==this.intersectBox(a,wb)},intersectTriangle:function(a,b,c,d,e){Ng.subVectors(b,a);vf.subVectors(c,a);Og.crossVectors(Ng,vf);b=this.direction.dot(Og);if(0<b){if(d)return null;d=1}else if(0>b)d=-1,b=-b;else return null;
 f.y)*d,d*=a.min.y-f.y;if(g>d||h>c)return null;if(h>g||g!==g)g=h;if(d<c||c!==c)c=d;0<=e?(h=(a.min.z-f.z)*e,a=(a.max.z-f.z)*e):(h=(a.max.z-f.z)*e,a=(a.min.z-f.z)*e);if(g>a||h>c)return null;if(h>g||g!==g)g=h;if(a<c||c!==c)c=a;return 0>c?null:this.at(0<=g?g:c,b)},intersectsBox:function(a){return null!==this.intersectBox(a,wb)},intersectTriangle:function(a,b,c,d,e){Ng.subVectors(b,a);vf.subVectors(c,a);Og.crossVectors(Ng,vf);b=this.direction.dot(Og);if(0<b){if(d)return null;d=1}else if(0>b)d=-1,b=-b;else return null;
-Ob.subVectors(this.origin,a);a=d*this.direction.dot(vf.crossVectors(Ob,vf));if(0>a)return null;c=d*this.direction.dot(Ng.cross(Ob));if(0>c||a+c>b)return null;a=-d*Ob.dot(Og);return 0>a?null:this.at(a/b,e)},applyMatrix4:function(a){this.origin.applyMatrix4(a);this.direction.transformDirection(a);return this},equals:function(a){return a.origin.equals(this.origin)&&a.direction.equals(this.direction)}});var Ya=new n,xb=new n,Pg=new n,yb=new n,rd=new n,sd=new n,pi=new n,Qg=new n,Rg=new n,Sg=new n;Object.assign(aa,
+Ob.subVectors(this.origin,a);a=d*this.direction.dot(vf.crossVectors(Ob,vf));if(0>a)return null;c=d*this.direction.dot(Ng.cross(Ob));if(0>c||a+c>b)return null;a=-d*Ob.dot(Og);return 0>a?null:this.at(a/b,e)},applyMatrix4:function(a){this.origin.applyMatrix4(a);this.direction.transformDirection(a);return this},equals:function(a){return a.origin.equals(this.origin)&&a.direction.equals(this.direction)}});var Ya=new n,xb=new n,Pg=new n,yb=new n,rd=new n,sd=new n,pi=new n,Qg=new n,Rg=new n,Sg=new n;Object.assign(ba,
 {getNormal:function(a,b,c,d){void 0===d&&(console.warn("THREE.Triangle: .getNormal() target is now required"),d=new n);d.subVectors(c,b);Ya.subVectors(a,b);d.cross(Ya);a=d.lengthSq();return 0<a?d.multiplyScalar(1/Math.sqrt(a)):d.set(0,0,0)},getBarycoord:function(a,b,c,d,e){Ya.subVectors(d,b);xb.subVectors(c,b);Pg.subVectors(a,b);a=Ya.dot(Ya);b=Ya.dot(xb);c=Ya.dot(Pg);var f=xb.dot(xb);d=xb.dot(Pg);var g=a*f-b*b;void 0===e&&(console.warn("THREE.Triangle: .getBarycoord() target is now required"),e=new n);
 {getNormal:function(a,b,c,d){void 0===d&&(console.warn("THREE.Triangle: .getNormal() target is now required"),d=new n);d.subVectors(c,b);Ya.subVectors(a,b);d.cross(Ya);a=d.lengthSq();return 0<a?d.multiplyScalar(1/Math.sqrt(a)):d.set(0,0,0)},getBarycoord:function(a,b,c,d,e){Ya.subVectors(d,b);xb.subVectors(c,b);Pg.subVectors(a,b);a=Ya.dot(Ya);b=Ya.dot(xb);c=Ya.dot(Pg);var f=xb.dot(xb);d=xb.dot(Pg);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){aa.getBarycoord(a,b,c,d,yb);return 0<=yb.x&&0<=yb.y&&1>=yb.x+yb.y},getUV:function(a,b,c,d,e,f,g,h){this.getBarycoord(a,b,c,d,yb);h.set(0,0);h.addScaledVector(e,yb.x);h.addScaledVector(f,yb.y);h.addScaledVector(g,yb.z);return h},isFrontFacing:function(a,b,c,d){Ya.subVectors(c,b);xb.subVectors(a,b);return 0>Ya.cross(xb).dot(d)?!0:!1}});Object.assign(aa.prototype,{set:function(a,
+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){ba.getBarycoord(a,b,c,d,yb);return 0<=yb.x&&0<=yb.y&&1>=yb.x+yb.y},getUV:function(a,b,c,d,e,f,g,h){this.getBarycoord(a,b,c,d,yb);h.set(0,0);h.addScaledVector(e,yb.x);h.addScaledVector(f,yb.y);h.addScaledVector(g,yb.z);return h},isFrontFacing:function(a,b,c,d){Ya.subVectors(c,b);xb.subVectors(a,b);return 0>Ya.cross(xb).dot(d)?!0:!1}});Object.assign(ba.prototype,{set:function(a,
 b,c){this.a.copy(a);this.b.copy(b);this.c.copy(c);return this},setFromPointsAndIndices:function(a,b,c,d){this.a.copy(a[b]);this.b.copy(a[c]);this.c.copy(a[d]);return this},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.a.copy(a.a);this.b.copy(a.b);this.c.copy(a.c);return this},getArea:function(){Ya.subVectors(this.c,this.b);xb.subVectors(this.a,this.b);return.5*Ya.cross(xb).length()},getMidpoint:function(a){void 0===a&&(console.warn("THREE.Triangle: .getMidpoint() target is now required"),
 b,c){this.a.copy(a);this.b.copy(b);this.c.copy(c);return this},setFromPointsAndIndices:function(a,b,c,d){this.a.copy(a[b]);this.b.copy(a[c]);this.c.copy(a[d]);return this},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.a.copy(a.a);this.b.copy(a.b);this.c.copy(a.c);return this},getArea:function(){Ya.subVectors(this.c,this.b);xb.subVectors(this.a,this.b);return.5*Ya.cross(xb).length()},getMidpoint:function(a){void 0===a&&(console.warn("THREE.Triangle: .getMidpoint() target is now required"),
-a=new n);return a.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)},getNormal:function(a){return aa.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 n);return a.setFromCoplanarPoints(this.a,this.b,this.c)},getBarycoord:function(a,b){return aa.getBarycoord(a,this.a,this.b,this.c,b)},getUV:function(a,b,c,d,e){return aa.getUV(a,this.a,this.b,this.c,b,c,d,e)},containsPoint:function(a){return aa.containsPoint(a,
-this.a,this.b,this.c)},isFrontFacing:function(a){return aa.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;rd.subVectors(d,c);sd.subVectors(e,c);Qg.subVectors(a,c);var f=rd.dot(Qg),g=sd.dot(Qg);if(0>=f&&0>=g)return b.copy(c);Rg.subVectors(a,d);var h=rd.dot(Rg),l=sd.dot(Rg);if(0<=h&&l<=
+a=new n);return a.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)},getNormal:function(a){return ba.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 n);return a.setFromCoplanarPoints(this.a,this.b,this.c)},getBarycoord:function(a,b){return ba.getBarycoord(a,this.a,this.b,this.c,b)},getUV:function(a,b,c,d,e){return ba.getUV(a,this.a,this.b,this.c,b,c,d,e)},containsPoint:function(a){return ba.containsPoint(a,
+this.a,this.b,this.c)},isFrontFacing:function(a){return ba.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;rd.subVectors(d,c);sd.subVectors(e,c);Qg.subVectors(a,c);var f=rd.dot(Qg),g=sd.dot(Qg);if(0>=f&&0>=g)return b.copy(c);Rg.subVectors(a,d);var h=rd.dot(Rg),l=sd.dot(Rg);if(0<=h&&l<=
 h)return b.copy(d);var m=f*l-h*g;if(0>=m&&0<=f&&0>=h)return d=f/(f-h),b.copy(c).addScaledVector(rd,d);Sg.subVectors(a,e);a=rd.dot(Sg);var k=sd.dot(Sg);if(0<=k&&a<=k)return b.copy(e);f=a*g-f*k;if(0>=f&&0<=g&&0>=k)return m=g/(g-k),b.copy(c).addScaledVector(sd,m);g=h*k-a*l;if(0>=g&&0<=l-h&&0<=a-k)return pi.subVectors(e,d),m=(l-h)/(l-h+(a-k)),b.copy(d).addScaledVector(pi,m);e=1/(g+f+m);d=f*e;m*=e;return b.copy(c).addScaledVector(rd,d).addScaledVector(sd,m)},equals:function(a){return a.a.equals(this.a)&&
 h)return b.copy(d);var m=f*l-h*g;if(0>=m&&0<=f&&0>=h)return d=f/(f-h),b.copy(c).addScaledVector(rd,d);Sg.subVectors(a,e);a=rd.dot(Sg);var k=sd.dot(Sg);if(0<=k&&a<=k)return b.copy(e);f=a*g-f*k;if(0>=f&&0<=g&&0>=k)return m=g/(g-k),b.copy(c).addScaledVector(sd,m);g=h*k-a*l;if(0>=g&&0<=l-h&&0<=a-k)return pi.subVectors(e,d),m=(l-h)/(l-h+(a-k)),b.copy(d).addScaledVector(pi,m);e=1/(g+f+m);d=f*e;m*=e;return b.copy(c).addScaledVector(rd,d).addScaledVector(sd,m)},equals:function(a){return a.a.equals(this.a)&&
 a.b.equals(this.b)&&a.c.equals(this.c)}});var wk={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,
 a.b.equals(this.b)&&a.c.equals(this.c)}});var wk={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,
 darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,
 darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,
@@ -502,7 +502,7 @@ Ga;Ga.prototype.isMeshBasicMaterial=!0;Ga.prototype.copy=function(a){Q.prototype
 this.wireframeLinecap=a.wireframeLinecap;this.wireframeLinejoin=a.wireframeLinejoin;this.skinning=a.skinning;this.morphTargets=a.morphTargets;return this};Object.defineProperty(O.prototype,"needsUpdate",{set:function(a){!0===a&&this.version++}});Object.assign(O.prototype,{isBufferAttribute:!0,onUploadCallback:function(){},setDynamic:function(a){this.dynamic=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=
 this.wireframeLinecap=a.wireframeLinecap;this.wireframeLinejoin=a.wireframeLinejoin;this.skinning=a.skinning;this.morphTargets=a.morphTargets;return this};Object.defineProperty(O.prototype,"needsUpdate",{set:function(a){!0===a&&this.version++}});Object.assign(O.prototype,{isBufferAttribute:!0,onUploadCallback:function(){},setDynamic:function(a){this.dynamic=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.dynamic=a.dynamic;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 I);b[c++]=f.r;b[c++]=f.g;b[c++]=f.b}return this},copyVector2sArray:function(a){for(var b=
 a.normalized;this.dynamic=a.dynamic;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 I);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=
 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 ca);b[c++]=f.x;b[c++]=f.y;b[c++]=f.z;b[c++]=f.w}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*
+a[d];void 0===f&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",d),f=new da);b[c++]=f.x;b[c++]=f.y;b[c++]=f.z;b[c++]=f.w}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+0]=b;this.array[a+1]=c;this.array[a+2]=d;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+0]=b;this.array[a+1]=c;this.array[a+2]=d;this.array[a+
 3]=e;return this},onUpload:function(a){this.onUploadCallback=a;return this},clone:function(){return(new this.constructor(this.array,this.itemSize)).copy(this)},toJSON:function(){return{itemSize:this.itemSize,type:this.array.constructor.name,array:Array.prototype.slice.call(this.array),normalized:this.normalized}}});xd.prototype=Object.create(O.prototype);xd.prototype.constructor=xd;yd.prototype=Object.create(O.prototype);yd.prototype.constructor=yd;zd.prototype=Object.create(O.prototype);zd.prototype.constructor=
 3]=e;return this},onUpload:function(a){this.onUploadCallback=a;return this},clone:function(){return(new this.constructor(this.array,this.itemSize)).copy(this)},toJSON:function(){return{itemSize:this.itemSize,type:this.array.constructor.name,array:Array.prototype.slice.call(this.array),normalized:this.normalized}}});xd.prototype=Object.create(O.prototype);xd.prototype.constructor=xd;yd.prototype=Object.create(O.prototype);yd.prototype.constructor=yd;zd.prototype=Object.create(O.prototype);zd.prototype.constructor=
 zd;Ad.prototype=Object.create(O.prototype);Ad.prototype.constructor=Ad;Tb.prototype=Object.create(O.prototype);Tb.prototype.constructor=Tb;Bd.prototype=Object.create(O.prototype);Bd.prototype.constructor=Bd;Ub.prototype=Object.create(O.prototype);Ub.prototype.constructor=Ub;A.prototype=Object.create(O.prototype);A.prototype.constructor=A;Cd.prototype=Object.create(O.prototype);Cd.prototype.constructor=Cd;Object.assign(hh.prototype,{computeGroups:function(a){var b=[],c=void 0;a=a.faces;for(var d=0;d<
 zd;Ad.prototype=Object.create(O.prototype);Ad.prototype.constructor=Ad;Tb.prototype=Object.create(O.prototype);Tb.prototype.constructor=Tb;Bd.prototype=Object.create(O.prototype);Bd.prototype.constructor=Bd;Ub.prototype=Object.create(O.prototype);Ub.prototype.constructor=Ub;A.prototype=Object.create(O.prototype);A.prototype.constructor=A;Cd.prototype=Object.create(O.prototype);Cd.prototype.constructor=Cd;Object.assign(hh.prototype,{computeGroups:function(a){var b=[],c=void 0;a=a.faces;for(var d=0;d<
@@ -512,7 +512,7 @@ this.colors.push(x,x,x));!0===e&&(x=d[0][m],void 0!==x?this.uvs.push(x[0],x[1],x
 F.b,F.c);v&&this.skinIndices.push(r[z.a],r[z.b],r[z.c]);y&&this.skinWeights.push(q[z.a],q[z.b],q[z.c])}this.computeGroups(a);this.verticesNeedUpdate=a.verticesNeedUpdate;this.normalsNeedUpdate=a.normalsNeedUpdate;this.colorsNeedUpdate=a.colorsNeedUpdate;this.uvsNeedUpdate=a.uvsNeedUpdate;this.groupsNeedUpdate=a.groupsNeedUpdate;null!==a.boundingSphere&&(this.boundingSphere=a.boundingSphere.clone());null!==a.boundingBox&&(this.boundingBox=a.boundingBox.clone());return this}});var Ri=1,kb=new M,Tg=
 F.b,F.c);v&&this.skinIndices.push(r[z.a],r[z.b],r[z.c]);y&&this.skinWeights.push(q[z.a],q[z.b],q[z.c])}this.computeGroups(a);this.verticesNeedUpdate=a.verticesNeedUpdate;this.normalsNeedUpdate=a.normalsNeedUpdate;this.colorsNeedUpdate=a.colorsNeedUpdate;this.uvsNeedUpdate=a.uvsNeedUpdate;this.groupsNeedUpdate=a.groupsNeedUpdate;null!==a.boundingSphere&&(this.boundingSphere=a.boundingSphere.clone());null!==a.boundingBox&&(this.boundingBox=a.boundingBox.clone());return this}});var Ri=1,kb=new M,Tg=
 new C,xf=new n,sc=new ab,Ug=new ab,Za=new n;D.prototype=Object.assign(Object.create(Ba.prototype),{constructor:D,isBufferGeometry:!0,getIndex:function(){return this.index},setIndex:function(a){Array.isArray(a)?this.index=new (65535<ih(a)?Ub:Tb)(a,1):this.index=a},addAttribute:function(a,b,c){return b&&b.isBufferAttribute||b&&b.isInterleavedBufferAttribute?"index"===a?(console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),this.setIndex(b),this):this.setAttribute(a,
 new C,xf=new n,sc=new ab,Ug=new ab,Za=new n;D.prototype=Object.assign(Object.create(Ba.prototype),{constructor:D,isBufferGeometry:!0,getIndex:function(){return this.index},setIndex:function(a){Array.isArray(a)?this.index=new (65535<ih(a)?Ub:Tb)(a,1):this.index=a},addAttribute:function(a,b,c){return b&&b.isBufferAttribute||b&&b.isInterleavedBufferAttribute?"index"===a?(console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),this.setIndex(b),this):this.setAttribute(a,
 b):(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),this.addAttribute(a,new O(b,c)))},getAttribute:function(a){return this.attributes[a]},setAttribute:function(a,b){this.attributes[a]=b;return this},removeAttribute:function(a){delete this.attributes[a];return this},addGroup:function(a,b,c){this.groups.push({start:a,count:b,materialIndex:void 0!==c?c:0})},clearGroups:function(){this.groups=[]},setDrawRange:function(a,b){this.drawRange.start=a;this.drawRange.count=
 b):(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),this.addAttribute(a,new O(b,c)))},getAttribute:function(a){return this.attributes[a]},setAttribute:function(a,b){this.attributes[a]=b;return this},removeAttribute:function(a){delete this.attributes[a];return this},addGroup:function(a,b,c){this.groups.push({start:a,count:b,materialIndex:void 0!==c?c:0})},clearGroups:function(){this.groups=[]},setDrawRange:function(a,b){this.drawRange.start=a;this.drawRange.count=
-b},applyMatrix:function(a){var b=this.attributes.position;void 0!==b&&(a.applyToBufferAttribute(b),b.needsUpdate=!0);var c=this.attributes.normal;void 0!==c&&(b=(new S).getNormalMatrix(a),b.applyToBufferAttribute(c),c.needsUpdate=!0);c=this.attributes.tangent;void 0!==c&&(b=(new S).getNormalMatrix(a),b.applyToBufferAttribute(c),c.needsUpdate=!0);null!==this.boundingBox&&this.computeBoundingBox();null!==this.boundingSphere&&this.computeBoundingSphere();return this},rotateX:function(a){kb.makeRotationX(a);
+b},applyMatrix:function(a){var b=this.attributes.position;void 0!==b&&(a.applyToBufferAttribute(b),b.needsUpdate=!0);var c=this.attributes.normal;void 0!==c&&(b=(new ca).getNormalMatrix(a),b.applyToBufferAttribute(c),c.needsUpdate=!0);c=this.attributes.tangent;void 0!==c&&(b=(new ca).getNormalMatrix(a),b.applyToBufferAttribute(c),c.needsUpdate=!0);null!==this.boundingBox&&this.computeBoundingBox();null!==this.boundingSphere&&this.computeBoundingSphere();return this},rotateX:function(a){kb.makeRotationX(a);
 this.applyMatrix(kb);return this},rotateY:function(a){kb.makeRotationY(a);this.applyMatrix(kb);return this},rotateZ:function(a){kb.makeRotationZ(a);this.applyMatrix(kb);return this},translate:function(a,b,c){kb.makeTranslation(a,b,c);this.applyMatrix(kb);return this},scale:function(a,b,c){kb.makeScale(a,b,c);this.applyMatrix(kb);return this},lookAt:function(a){Tg.lookAt(a);Tg.updateMatrix();this.applyMatrix(Tg.matrix);return this},center:function(){this.computeBoundingBox();this.boundingBox.getCenter(xf).negate();
 this.applyMatrix(kb);return this},rotateY:function(a){kb.makeRotationY(a);this.applyMatrix(kb);return this},rotateZ:function(a){kb.makeRotationZ(a);this.applyMatrix(kb);return this},translate:function(a,b,c){kb.makeTranslation(a,b,c);this.applyMatrix(kb);return this},scale:function(a,b,c){kb.makeScale(a,b,c);this.applyMatrix(kb);return this},lookAt:function(a){Tg.lookAt(a);Tg.updateMatrix();this.applyMatrix(Tg.matrix);return this},center:function(){this.computeBoundingBox();this.boundingBox.getCenter(xf).negate();
 this.translate(xf.x,xf.y,xf.z);return this},setFromObject:function(a){var b=a.geometry;if(a.isPoints||a.isLine){a=new A(3*b.vertices.length,3);var c=new A(3*b.colors.length,3);this.addAttribute("position",a.copyVector3sArray(b.vertices));this.addAttribute("color",c.copyColorsArray(b.colors));b.lineDistances&&b.lineDistances.length===b.vertices.length&&(a=new A(b.lineDistances.length,1),this.addAttribute("lineDistance",a.copyArray(b.lineDistances)));null!==b.boundingSphere&&(this.boundingSphere=b.boundingSphere.clone());
 this.translate(xf.x,xf.y,xf.z);return this},setFromObject:function(a){var b=a.geometry;if(a.isPoints||a.isLine){a=new A(3*b.vertices.length,3);var c=new A(3*b.colors.length,3);this.addAttribute("position",a.copyVector3sArray(b.vertices));this.addAttribute("color",c.copyColorsArray(b.colors));b.lineDistances&&b.lineDistances.length===b.vertices.length&&(a=new A(b.lineDistances.length,1),this.addAttribute("lineDistance",a.copyArray(b.lineDistances)));null!==b.boundingSphere&&(this.boundingSphere=b.boundingSphere.clone());
 null!==b.boundingBox&&(this.boundingBox=b.boundingBox.clone())}else a.isMesh&&b&&b.isGeometry&&this.fromGeometry(b);return this},setFromPoints:function(a){for(var b=[],c=0,d=a.length;c<d;c++){var e=a[c];b.push(e.x,e.y,e.z||0)}this.addAttribute("position",new A(b,3));return this},updateFromObject:function(a){var b=a.geometry;if(a.isMesh){var c=b.__directGeometry;!0===b.elementsNeedUpdate&&(c=void 0,b.elementsNeedUpdate=!1);if(void 0===c)return this.fromGeometry(b);c.verticesNeedUpdate=b.verticesNeedUpdate;
 null!==b.boundingBox&&(this.boundingBox=b.boundingBox.clone())}else a.isMesh&&b&&b.isGeometry&&this.fromGeometry(b);return this},setFromPoints:function(a){for(var b=[],c=0,d=a.length;c<d;c++){var e=a[c];b.push(e.x,e.y,e.z||0)}this.addAttribute("position",new A(b,3));return this},updateFromObject:function(a){var b=a.geometry;if(a.isMesh){var c=b.__directGeometry;!0===b.elementsNeedUpdate&&(c=void 0,b.elementsNeedUpdate=!1);if(void 0===c)return this.fromGeometry(b);c.verticesNeedUpdate=b.verticesNeedUpdate;
@@ -537,7 +537,7 @@ c)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},a=0,b=c.length
 Vg.applyMatrix4(e),!1!==a.ray.intersectsSphere(Vg)&&(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,h=c.attributes.uv,l=c.attributes.uv2,m=c.groups,k=c.drawRange,n,t;if(null!==f)if(Array.isArray(d)){var r=0;for(n=m.length;r<n;r++){var q=m[r];var v=d[q.materialIndex];var y=Math.max(q.start,k.start);for(t=c=Math.min(q.start+q.count,k.start+k.count);y<
 Vg.applyMatrix4(e),!1!==a.ray.intersectsSphere(Vg)&&(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,h=c.attributes.uv,l=c.attributes.uv2,m=c.groups,k=c.drawRange,n,t;if(null!==f)if(Array.isArray(d)){var r=0;for(n=m.length;r<n;r++){var q=m[r];var v=d[q.materialIndex];var y=Math.max(q.start,k.start);for(t=c=Math.min(q.start+q.count,k.start+k.count);y<
 t;y+=3){c=f.getX(y);var z=f.getX(y+1);var x=f.getX(y+2);if(c=Fe(this,v,a,tc,e,g,h,l,c,z,x))c.faceIndex=Math.floor(y/3),c.face.materialIndex=q.materialIndex,b.push(c)}}}else for(y=Math.max(0,k.start),c=Math.min(f.count,k.start+k.count),r=y,n=c;r<n;r+=3){if(c=f.getX(r),z=f.getX(r+1),x=f.getX(r+2),c=Fe(this,d,a,tc,e,g,h,l,c,z,x))c.faceIndex=Math.floor(r/3),b.push(c)}else if(void 0!==e)if(Array.isArray(d))for(r=0,n=m.length;r<n;r++)for(q=m[r],v=d[q.materialIndex],y=Math.max(q.start,k.start),t=c=Math.min(q.start+
 t;y+=3){c=f.getX(y);var z=f.getX(y+1);var x=f.getX(y+2);if(c=Fe(this,v,a,tc,e,g,h,l,c,z,x))c.faceIndex=Math.floor(y/3),c.face.materialIndex=q.materialIndex,b.push(c)}}}else for(y=Math.max(0,k.start),c=Math.min(f.count,k.start+k.count),r=y,n=c;r<n;r+=3){if(c=f.getX(r),z=f.getX(r+1),x=f.getX(r+2),c=Fe(this,d,a,tc,e,g,h,l,c,z,x))c.faceIndex=Math.floor(r/3),b.push(c)}else if(void 0!==e)if(Array.isArray(d))for(r=0,n=m.length;r<n;r++)for(q=m[r],v=d[q.materialIndex],y=Math.max(q.start,k.start),t=c=Math.min(q.start+
 q.count,k.start+k.count);y<t;y+=3){if(c=y,z=y+1,x=y+2,c=Fe(this,v,a,tc,e,g,h,l,c,z,x))c.faceIndex=Math.floor(y/3),c.face.materialIndex=q.materialIndex,b.push(c)}else for(y=Math.max(0,k.start),c=Math.min(e.count,k.start+k.count),r=y,n=c;r<n;r+=3)if(c=r,z=r+1,x=r+2,c=Fe(this,d,a,tc,e,g,h,l,c,z,x))c.faceIndex=Math.floor(r/3),b.push(c)}else if(c.isGeometry)for(e=Array.isArray(d),g=c.vertices,h=c.faces,c=c.faceVertexUvs[0],0<c.length&&(f=c),r=0,n=h.length;r<n;r++)if(q=h[r],c=e?d[q.materialIndex]:d,void 0!==
 q.count,k.start+k.count);y<t;y+=3){if(c=y,z=y+1,x=y+2,c=Fe(this,v,a,tc,e,g,h,l,c,z,x))c.faceIndex=Math.floor(y/3),c.face.materialIndex=q.materialIndex,b.push(c)}else for(y=Math.max(0,k.start),c=Math.min(e.count,k.start+k.count),r=y,n=c;r<n;r+=3)if(c=r,z=r+1,x=r+2,c=Fe(this,d,a,tc,e,g,h,l,c,z,x))c.faceIndex=Math.floor(r/3),b.push(c)}else if(c.isGeometry)for(e=Array.isArray(d),g=c.vertices,h=c.faces,c=c.faceVertexUvs[0],0<c.length&&(f=c),r=0,n=h.length;r<n;r++)if(q=h[r],c=e?d[q.materialIndex]:d,void 0!==
-c&&(l=g[q.a],m=g[q.b],k=g[q.c],c=jh(this,c,a,tc,l,m,k,Dd)))f&&f[r]&&(v=f[r],Ac.copy(v[0]),Bc.copy(v[1]),Cc.copy(v[2]),c.uv=aa.getUV(Dd,l,m,k,Ac,Bc,Cc,new w)),c.face=q,c.faceIndex=r,b.push(c)},clone:function(){return(new this.constructor(this.geometry,this.material)).copy(this)}});var Si=0,lb=new M,Wg=new C,yf=new n;G.prototype=Object.assign(Object.create(Ba.prototype),{constructor:G,isGeometry:!0,applyMatrix:function(a){for(var b=(new S).getNormalMatrix(a),c=0,d=this.vertices.length;c<d;c++)this.vertices[c].applyMatrix4(a);
+c&&(l=g[q.a],m=g[q.b],k=g[q.c],c=jh(this,c,a,tc,l,m,k,Dd)))f&&f[r]&&(v=f[r],Ac.copy(v[0]),Bc.copy(v[1]),Cc.copy(v[2]),c.uv=ba.getUV(Dd,l,m,k,Ac,Bc,Cc,new w)),c.face=q,c.faceIndex=r,b.push(c)},clone:function(){return(new this.constructor(this.geometry,this.material)).copy(this)}});var Si=0,lb=new M,Wg=new C,yf=new n;G.prototype=Object.assign(Object.create(Ba.prototype),{constructor:G,isGeometry:!0,applyMatrix:function(a){for(var b=(new ca).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){lb.makeRotationX(a);this.applyMatrix(lb);return this},rotateY:function(a){lb.makeRotationY(a);this.applyMatrix(lb);return this},
 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){lb.makeRotationX(a);this.applyMatrix(lb);return this},rotateY:function(a){lb.makeRotationY(a);this.applyMatrix(lb);return this},
 rotateZ:function(a){lb.makeRotationZ(a);this.applyMatrix(lb);return this},translate:function(a,b,c){lb.makeTranslation(a,b,c);this.applyMatrix(lb);return this},scale:function(a,b,c){lb.makeScale(a,b,c);this.applyMatrix(lb);return this},lookAt:function(a){Wg.lookAt(a);Wg.updateMatrix();this.applyMatrix(Wg.matrix);return this},fromBufferGeometry:function(a){function b(a,b,d,e){var f=void 0===h?[]:[c.colors[a].clone(),c.colors[b].clone(),c.colors[d].clone()],m=void 0===g?[]:[(new n).fromArray(g,3*a),
 rotateZ:function(a){lb.makeRotationZ(a);this.applyMatrix(lb);return this},translate:function(a,b,c){lb.makeTranslation(a,b,c);this.applyMatrix(lb);return this},scale:function(a,b,c){lb.makeScale(a,b,c);this.applyMatrix(lb);return this},lookAt:function(a){Wg.lookAt(a);Wg.updateMatrix();this.applyMatrix(Wg.matrix);return this},fromBufferGeometry:function(a){function b(a,b,d,e){var f=void 0===h?[]:[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 zc(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!==k&&c.faceVertexUvs[1].push([(new w).fromArray(k,2*a),(new w).fromArray(k,2*b),(new w).fromArray(k,2*d)])}var c=this,d=null!==a.index?a.index.array:void 0,e=a.attributes,f=e.position.array,g=void 0!==e.normal?e.normal.array:void 0,h=void 0!==e.color?e.color.array:void 0,l=void 0!==e.uv?e.uv.array:
 (new n).fromArray(g,3*b),(new n).fromArray(g,3*d)];e=new zc(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!==k&&c.faceVertexUvs[1].push([(new w).fromArray(k,2*a),(new w).fromArray(k,2*b),(new w).fromArray(k,2*d)])}var c=this,d=null!==a.index?a.index.array:void 0,e=a.attributes,f=e.position.array,g=void 0!==e.normal?e.normal.array:void 0,h=void 0!==e.color?e.color.array:void 0,l=void 0!==e.uv?e.uv.array:
@@ -549,7 +549,7 @@ c[b.b].clone(),g[2]=c[b.c].clone());0<this.faces.length&&(this.normalsNeedUpdate
 b;c++){var d=this.faces[c];d.__originalFaceNormal?d.__originalFaceNormal.copy(d.normal):d.__originalFaceNormal=d.normal.clone();d.__originalVertexNormals||(d.__originalVertexNormals=[]);var e=0;for(a=d.vertexNormals.length;e<a;e++)d.__originalVertexNormals[e]?d.__originalVertexNormals[e].copy(d.vertexNormals[e]):d.__originalVertexNormals[e]=d.vertexNormals[e].clone()}var f=new G;f.faces=this.faces;e=0;for(a=this.morphTargets.length;e<a;e++){if(!this.morphNormals[e]){this.morphNormals[e]={};this.morphNormals[e].faceNormals=
 b;c++){var d=this.faces[c];d.__originalFaceNormal?d.__originalFaceNormal.copy(d.normal):d.__originalFaceNormal=d.normal.clone();d.__originalVertexNormals||(d.__originalVertexNormals=[]);var e=0;for(a=d.vertexNormals.length;e<a;e++)d.__originalVertexNormals[e]?d.__originalVertexNormals[e].copy(d.vertexNormals[e]):d.__originalVertexNormals[e]=d.vertexNormals[e].clone()}var f=new G;f.faces=this.faces;e=0;for(a=this.morphTargets.length;e<a;e++){if(!this.morphNormals[e]){this.morphNormals[e]={};this.morphNormals[e].faceNormals=
 [];this.morphNormals[e].vertexNormals=[];d=this.morphNormals[e].faceNormals;var g=this.morphNormals[e].vertexNormals;c=0;for(b=this.faces.length;c<b;c++){var h=new n;var l={a:new n,b:new n,c:new n};d.push(h);g.push(l)}}g=this.morphNormals[e];f.vertices=this.morphTargets[e].vertices;f.computeFaceNormals();f.computeVertexNormals();c=0;for(b=this.faces.length;c<b;c++)d=this.faces[c],h=g.faceNormals[c],l=g.vertexNormals[c],h.copy(d.normal),l.a.copy(d.vertexNormals[0]),l.b.copy(d.vertexNormals[1]),l.c.copy(d.vertexNormals[2])}c=
 [];this.morphNormals[e].vertexNormals=[];d=this.morphNormals[e].faceNormals;var g=this.morphNormals[e].vertexNormals;c=0;for(b=this.faces.length;c<b;c++){var h=new n;var l={a:new n,b:new n,c:new n};d.push(h);g.push(l)}}g=this.morphNormals[e];f.vertices=this.morphTargets[e].vertices;f.computeFaceNormals();f.computeVertexNormals();c=0;for(b=this.faces.length;c<b;c++)d=this.faces[c],h=g.faceNormals[c],l=g.vertexNormals[c],h.copy(d.normal),l.a.copy(d.vertexNormals[0]),l.b.copy(d.vertexNormals[1]),l.c.copy(d.vertexNormals[2])}c=
 0;for(b=this.faces.length;c<b;c++)d=this.faces[c],d.normal=d.__originalFaceNormal,d.vertexNormals=d.__originalVertexNormals},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new ab);this.boundingBox.setFromPoints(this.vertices)},computeBoundingSphere:function(){null===this.boundingSphere&&(this.boundingSphere=new nb);this.boundingSphere.setFromPoints(this.vertices)},merge:function(a,b,c){if(a&&a.isGeometry){var d,e=this.vertices.length,f=this.vertices,g=a.vertices,h=this.faces,
 0;for(b=this.faces.length;c<b;c++)d=this.faces[c],d.normal=d.__originalFaceNormal,d.vertexNormals=d.__originalVertexNormals},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new ab);this.boundingBox.setFromPoints(this.vertices)},computeBoundingSphere:function(){null===this.boundingSphere&&(this.boundingSphere=new nb);this.boundingSphere.setFromPoints(this.vertices)},merge:function(a,b,c){if(a&&a.isGeometry){var d,e=this.vertices.length,f=this.vertices,g=a.vertices,h=this.faces,
-l=a.faces,k=this.colors,p=a.colors;void 0===c&&(c=0);void 0!==b&&(d=(new S).getNormalMatrix(b));for(var n=0,t=g.length;n<t;n++){var r=g[n].clone();void 0!==b&&r.applyMatrix4(b);f.push(r)}n=0;for(t=p.length;n<t;n++)k.push(p[n].clone());n=0;for(t=l.length;n<t;n++){g=l[n];var q=g.vertexNormals;p=g.vertexColors;k=new zc(g.a+e,g.b+e,g.c+e);k.normal.copy(g.normal);void 0!==d&&k.normal.applyMatrix3(d).normalize();b=0;for(f=q.length;b<f;b++)r=q[b].clone(),void 0!==d&&r.applyMatrix3(d).normalize(),k.vertexNormals.push(r);
+l=a.faces,k=this.colors,p=a.colors;void 0===c&&(c=0);void 0!==b&&(d=(new ca).getNormalMatrix(b));for(var n=0,t=g.length;n<t;n++){var r=g[n].clone();void 0!==b&&r.applyMatrix4(b);f.push(r)}n=0;for(t=p.length;n<t;n++)k.push(p[n].clone());n=0;for(t=l.length;n<t;n++){g=l[n];var q=g.vertexNormals;p=g.vertexColors;k=new zc(g.a+e,g.b+e,g.c+e);k.normal.copy(g.normal);void 0!==d&&k.normal.applyMatrix3(d).normalize();b=0;for(f=q.length;b<f;b++)r=q[b].clone(),void 0!==d&&r.applyMatrix3(d).normalize(),k.vertexNormals.push(r);
 k.color.copy(g.color);b=0;for(f=p.length;b<f;b++)r=p[b],k.vertexColors.push(r.clone());k.materialIndex=g.materialIndex+c;h.push(k)}n=0;for(t=a.faceVertexUvs.length;n<t;n++)for(c=a.faceVertexUvs[n],void 0===this.faceVertexUvs[n]&&(this.faceVertexUvs[n]=[]),b=0,f=c.length;b<f;b++){d=c[b];e=[];h=0;for(l=d.length;h<l;h++)e.push(d[h].clone());this.faceVertexUvs[n].push(e)}}else console.error("THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.",a)},mergeMesh:function(a){a&&a.isMesh?(a.matrixAutoUpdate&&
 k.color.copy(g.color);b=0;for(f=p.length;b<f;b++)r=p[b],k.vertexColors.push(r.clone());k.materialIndex=g.materialIndex+c;h.push(k)}n=0;for(t=a.faceVertexUvs.length;n<t;n++)for(c=a.faceVertexUvs[n],void 0===this.faceVertexUvs[n]&&(this.faceVertexUvs[n]=[]),b=0,f=c.length;b<f;b++){d=c[b];e=[];h=0;for(l=d.length;h<l;h++)e.push(d[h].clone());this.faceVertexUvs[n].push(e)}}else console.error("THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.",a)},mergeMesh:function(a){a&&a.isMesh?(a.matrixAutoUpdate&&
 a.updateMatrix(),this.merge(a.geometry,a.matrix)):console.error("THREE.Geometry.mergeMesh(): mesh not an instance of THREE.Mesh.",a)},mergeVertices:function(){var a={},b=[],c=[],d=Math.pow(10,4),e;var f=0;for(e=this.vertices.length;f<e;f++){var g=this.vertices[f];g=Math.round(g.x*d)+"_"+Math.round(g.y*d)+"_"+Math.round(g.z*d);void 0===a[g]?(a[g]=f,b.push(this.vertices[f]),c[f]=b.length-1):c[f]=c[a[g]]}a=[];f=0;for(e=this.faces.length;f<e;f++)for(d=this.faces[f],d.a=c[d.a],d.b=c[d.b],d.c=c[d.c],d=
 a.updateMatrix(),this.merge(a.geometry,a.matrix)):console.error("THREE.Geometry.mergeMesh(): mesh not an instance of THREE.Mesh.",a)},mergeVertices:function(){var a={},b=[],c=[],d=Math.pow(10,4),e;var f=0;for(e=this.vertices.length;f<e;f++){var g=this.vertices[f];g=Math.round(g.x*d)+"_"+Math.round(g.y*d)+"_"+Math.round(g.z*d);void 0===a[g]?(a[g]=f,b.push(this.vertices[f]),c[f]=b.length-1):c[f]=c[a[g]]}a=[];f=0;for(e=this.faces.length;f<e;f++)for(d=this.faces[f],d.a=c[d.a],d.b=c[d.b],d.c=c[d.c],d=
 [d.a,d.b,d.c],g=0;3>g;g++)if(d[g]===d[(g+1)%3]){a.push(f);break}for(f=a.length-1;0<=f;f--)for(d=a[f],this.faces.splice(d,1),c=0,e=this.faceVertexUvs.length;c<e;c++)this.faceVertexUvs[c].splice(d,1);f=this.vertices.length-b.length;this.vertices=b;return f},setFromPoints:function(a){this.vertices=[];for(var b=0,c=a.length;b<c;b++){var d=a[b];this.vertices.push(new n(d.x,d.y,d.z||0))}return this},sortFacesByMaterialIndex:function(){for(var a=this.faces,b=a.length,c=0;c<b;c++)a[c]._id=c;a.sort(function(a,
 [d.a,d.b,d.c],g=0;3>g;g++)if(d[g]===d[(g+1)%3]){a.push(f);break}for(f=a.length-1;0<=f;f--)for(d=a[f],this.faces.splice(d,1),c=0,e=this.faceVertexUvs.length;c<e;c++)this.faceVertexUvs[c].splice(d,1);f=this.vertices.length-b.length;this.vertices=b;return f},setFromPoints:function(a){this.vertices=[];for(var b=0,c=a.length;b<c;b++){var d=a[b];this.vertices.push(new n(d.x,d.y,d.z||0))}return this},sortFacesByMaterialIndex:function(){for(var a=this.faces,b=a.length,c=0;c<b;c++)a[c]._id=c;a.sort(function(a,
@@ -574,7 +574,7 @@ d;this.view.width=e;this.view.height=f;this.updateProjectionMatrix()},clearViewO
 e+d,b,b-c,a,this.far);this.projectionMatrixInverse.getInverse(this.projectionMatrix)},toJSON:function(a){a=C.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}});Dc.prototype=Object.create(C.prototype);Dc.prototype.constructor=Dc;Ab.prototype=
 e+d,b,b-c,a,this.far);this.projectionMatrixInverse.getInverse(this.projectionMatrix)},toJSON:function(a){a=C.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}});Dc.prototype=Object.create(C.prototype);Dc.prototype.constructor=Dc;Ab.prototype=
 Object.create(ka.prototype);Ab.prototype.constructor=Ab;Ab.prototype.isWebGLRenderTargetCube=!0;Ab.prototype.fromEquirectangularTexture=function(a,b){this.texture.type=b.type;this.texture.format=b.format;this.texture.encoding=b.encoding;var c=new wd,d=new la({type:"CubemapFromEquirect",uniforms:Yb({tEquirect:{value:null}}),vertexShader:"varying vec3 vWorldDirection;\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n}",
 Object.create(ka.prototype);Ab.prototype.constructor=Ab;Ab.prototype.isWebGLRenderTargetCube=!0;Ab.prototype.fromEquirectangularTexture=function(a,b){this.texture.type=b.type;this.texture.format=b.format;this.texture.encoding=b.encoding;var c=new wd,d=new la({type:"CubemapFromEquirect",uniforms:Yb({tEquirect:{value:null}}),vertexShader:"varying vec3 vWorldDirection;\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <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 R(new Gd(5,
 fragmentShader:"uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#define RECIPROCAL_PI 0.31830988618\n#define RECIPROCAL_PI2 0.15915494\nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV;\n\tsampleUV.y = asin( clamp( direction.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\tsampleUV.x = atan( direction.z, direction.x ) * RECIPROCAL_PI2 + 0.5;\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n}",side:1,blending:0});d.uniforms.tEquirect.value=b;b=new R(new Gd(5,
-5,5),d);c.add(b);d=new Dc(1,10,1);d.renderTarget=this;d.renderTarget.texture.name="CubeCameraTexture";d.update(a,c);b.geometry.dispose();b.material.dispose();return this};Zb.prototype=Object.create(Z.prototype);Zb.prototype.constructor=Zb;Zb.prototype.isDataTexture=!0;var Yg=new n,yk=new n,zk=new S;Object.assign(cb.prototype,{isPlane:!0,set:function(a,b){this.normal.copy(a);this.constant=b;return this},setComponents:function(a,b,c,d){this.normal.set(a,b,c);this.constant=d;return this},setFromNormalAndCoplanarPoint:function(a,
+5,5),d);c.add(b);d=new Dc(1,10,1);d.renderTarget=this;d.renderTarget.texture.name="CubeCameraTexture";d.update(a,c);b.geometry.dispose();b.material.dispose();return this};Zb.prototype=Object.create(Z.prototype);Zb.prototype.constructor=Zb;Zb.prototype.isDataTexture=!0;var Yg=new n,yk=new n,zk=new ca;Object.assign(cb.prototype,{isPlane:!0,set:function(a,b){this.normal.copy(a);this.constant=b;return this},setComponents:function(a,b,c,d){this.normal.set(a,b,c);this.constant=d;return this},setFromNormalAndCoplanarPoint:function(a,
 b){this.normal.copy(a);this.constant=-b.dot(this.normal);return this},setFromCoplanarPoints:function(a,b,c){b=Yg.subVectors(c,b).cross(yk.subVectors(a,b)).normalize();this.setFromNormalAndCoplanarPoint(b,a);return this},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.normal.copy(a.normal);this.constant=a.constant;return this},normalize:function(){var a=1/this.normal.length();this.normal.multiplyScalar(a);this.constant*=a;return this},negate:function(){this.constant*=
 b){this.normal.copy(a);this.constant=-b.dot(this.normal);return this},setFromCoplanarPoints:function(a,b,c){b=Yg.subVectors(c,b).cross(yk.subVectors(a,b)).normalize();this.setFromNormalAndCoplanarPoint(b,a);return this},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.normal.copy(a.normal);this.constant=a.constant;return this},normalize:function(){var a=1/this.normal.length();this.normal.multiplyScalar(a);this.constant*=a;return this},negate:function(){this.constant*=
 -1;this.normal.negate();return this},distanceToPoint:function(a){return this.normal.dot(a)+this.constant},distanceToSphere:function(a){return this.distanceToPoint(a.center)-a.radius},projectPoint:function(a,b){void 0===b&&(console.warn("THREE.Plane: .projectPoint() target is now required"),b=new n);return b.copy(this.normal).multiplyScalar(-this.distanceToPoint(a)).add(a)},intersectLine:function(a,b){void 0===b&&(console.warn("THREE.Plane: .intersectLine() target is now required"),b=new n);var c=
 -1;this.normal.negate();return this},distanceToPoint:function(a){return this.normal.dot(a)+this.constant},distanceToSphere:function(a){return this.distanceToPoint(a.center)-a.radius},projectPoint:function(a,b){void 0===b&&(console.warn("THREE.Plane: .projectPoint() target is now required"),b=new n);return b.copy(this.normal).multiplyScalar(-this.distanceToPoint(a)).add(a)},intersectLine:function(a,b){void 0===b&&(console.warn("THREE.Plane: .intersectLine() target is now required"),b=new n);var c=
 a.delta(Yg),d=this.normal.dot(c);if(0===d){if(0===this.distanceToPoint(a.start))return b.copy(a.start)}else if(d=-(a.start.dot(this.normal)+this.constant)/d,!(0>d||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.delta(Yg),d=this.normal.dot(c);if(0===d){if(0===this.distanceToPoint(a.start))return b.copy(a.start)}else if(d=-(a.start.dot(this.normal)+this.constant)/d,!(0>d||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"),
@@ -649,14 +649,14 @@ 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 <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}",
 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 <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 <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 <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_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <uv_pars_fragment>\n#include <map_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 <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}"},
 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}"},
-J={common:{diffuse:{value:new I(15658734)},opacity:{value:1},map:{value:null},uvTransform:{value:new S},alphaMap:{value:null}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},refractionRatio:{value:.98},maxMipLevel:{value:0}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},
+J={common:{diffuse:{value:new I(15658734)},opacity:{value:1},map:{value:null},uvTransform:{value:new ca},alphaMap:{value:null}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},refractionRatio:{value:.98},maxMipLevel:{value:0}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},
 normalScale:{value:new w(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:2.5E-4},fogNear:{value:1},fogFar:{value:2E3},fogColor:{value:new I(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{},shadow:{},shadowBias:{},
 normalScale:{value:new w(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:2.5E-4},fogNear:{value:1},fogFar:{value:2E3},fogColor:{value:new I(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{},shadow:{},shadowBias:{},
 shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},
 shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},
-pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}}},points:{diffuse:{value:new I(15658734)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},uvTransform:{value:new S}},sprite:{diffuse:{value:new I(15658734)},opacity:{value:1},center:{value:new w(.5,.5)},rotation:{value:0},map:{value:null},uvTransform:{value:new S}}},db=
-{basic:{uniforms:Ea([J.common,J.specularmap,J.envmap,J.aomap,J.lightmap,J.fog]),vertexShader:P.meshbasic_vert,fragmentShader:P.meshbasic_frag},lambert:{uniforms:Ea([J.common,J.specularmap,J.envmap,J.aomap,J.lightmap,J.emissivemap,J.fog,J.lights,{emissive:{value:new I(0)}}]),vertexShader:P.meshlambert_vert,fragmentShader:P.meshlambert_frag},phong:{uniforms:Ea([J.common,J.specularmap,J.envmap,J.aomap,J.lightmap,J.emissivemap,J.bumpmap,J.normalmap,J.displacementmap,J.gradientmap,J.fog,J.lights,{emissive:{value:new I(0)},
+pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}}},points:{diffuse:{value:new I(15658734)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},uvTransform:{value:new ca}},sprite:{diffuse:{value:new I(15658734)},opacity:{value:1},center:{value:new w(.5,.5)},rotation:{value:0},map:{value:null},uvTransform:{value:new ca}}},
+db={basic:{uniforms:Ea([J.common,J.specularmap,J.envmap,J.aomap,J.lightmap,J.fog]),vertexShader:P.meshbasic_vert,fragmentShader:P.meshbasic_frag},lambert:{uniforms:Ea([J.common,J.specularmap,J.envmap,J.aomap,J.lightmap,J.emissivemap,J.fog,J.lights,{emissive:{value:new I(0)}}]),vertexShader:P.meshlambert_vert,fragmentShader:P.meshlambert_frag},phong:{uniforms:Ea([J.common,J.specularmap,J.envmap,J.aomap,J.lightmap,J.emissivemap,J.bumpmap,J.normalmap,J.displacementmap,J.gradientmap,J.fog,J.lights,{emissive:{value:new I(0)},
 specular:{value:new I(1118481)},shininess:{value:30}}]),vertexShader:P.meshphong_vert,fragmentShader:P.meshphong_frag},standard:{uniforms:Ea([J.common,J.envmap,J.aomap,J.lightmap,J.emissivemap,J.bumpmap,J.normalmap,J.displacementmap,J.roughnessmap,J.metalnessmap,J.fog,J.lights,{emissive:{value:new I(0)},roughness:{value:.5},metalness:{value:.5},envMapIntensity:{value:1}}]),vertexShader:P.meshphysical_vert,fragmentShader:P.meshphysical_frag},matcap:{uniforms:Ea([J.common,J.bumpmap,J.normalmap,J.displacementmap,
 specular:{value:new I(1118481)},shininess:{value:30}}]),vertexShader:P.meshphong_vert,fragmentShader:P.meshphong_frag},standard:{uniforms:Ea([J.common,J.envmap,J.aomap,J.lightmap,J.emissivemap,J.bumpmap,J.normalmap,J.displacementmap,J.roughnessmap,J.metalnessmap,J.fog,J.lights,{emissive:{value:new I(0)},roughness:{value:.5},metalness:{value:.5},envMapIntensity:{value:1}}]),vertexShader:P.meshphysical_vert,fragmentShader:P.meshphysical_frag},matcap:{uniforms:Ea([J.common,J.bumpmap,J.normalmap,J.displacementmap,
 J.fog,{matcap:{value:null}}]),vertexShader:P.meshmatcap_vert,fragmentShader:P.meshmatcap_frag},points:{uniforms:Ea([J.points,J.fog]),vertexShader:P.points_vert,fragmentShader:P.points_frag},dashed:{uniforms:Ea([J.common,J.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:P.linedashed_vert,fragmentShader:P.linedashed_frag},depth:{uniforms:Ea([J.common,J.displacementmap]),vertexShader:P.depth_vert,fragmentShader:P.depth_frag},normal:{uniforms:Ea([J.common,J.bumpmap,J.normalmap,
 J.fog,{matcap:{value:null}}]),vertexShader:P.meshmatcap_vert,fragmentShader:P.meshmatcap_frag},points:{uniforms:Ea([J.points,J.fog]),vertexShader:P.points_vert,fragmentShader:P.points_frag},dashed:{uniforms:Ea([J.common,J.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:P.linedashed_vert,fragmentShader:P.linedashed_frag},depth:{uniforms:Ea([J.common,J.displacementmap]),vertexShader:P.depth_vert,fragmentShader:P.depth_frag},normal:{uniforms:Ea([J.common,J.bumpmap,J.normalmap,
-J.displacementmap,{opacity:{value:1}}]),vertexShader:P.normal_vert,fragmentShader:P.normal_frag},sprite:{uniforms:Ea([J.sprite,J.fog]),vertexShader:P.sprite_vert,fragmentShader:P.sprite_frag},background:{uniforms:{uvTransform:{value:new S},t2D:{value:null}},vertexShader:P.background_vert,fragmentShader:P.background_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:P.cube_vert,fragmentShader:P.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:P.equirect_vert,
+J.displacementmap,{opacity:{value:1}}]),vertexShader:P.normal_vert,fragmentShader:P.normal_frag},sprite:{uniforms:Ea([J.sprite,J.fog]),vertexShader:P.sprite_vert,fragmentShader:P.sprite_frag},background:{uniforms:{uvTransform:{value:new ca},t2D:{value:null}},vertexShader:P.background_vert,fragmentShader:P.background_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:P.cube_vert,fragmentShader:P.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:P.equirect_vert,
 fragmentShader:P.equirect_frag},distanceRGBA:{uniforms:Ea([J.common,J.displacementmap,{referencePosition:{value:new n},nearDistance:{value:1},farDistance:{value:1E3}}]),vertexShader:P.distanceRGBA_vert,fragmentShader:P.distanceRGBA_frag},shadow:{uniforms:Ea([J.lights,J.fog,{color:{value:new I(0)},opacity:{value:1}}]),vertexShader:P.shadow_vert,fragmentShader:P.shadow_frag}};db.physical={uniforms:Ea([db.standard.uniforms,{transparency:{value:0},clearcoat:{value:0},clearcoatRoughness:{value:0},sheen:{value:new I(0)},
 fragmentShader:P.equirect_frag},distanceRGBA:{uniforms:Ea([J.common,J.displacementmap,{referencePosition:{value:new n},nearDistance:{value:1},farDistance:{value:1E3}}]),vertexShader:P.distanceRGBA_vert,fragmentShader:P.distanceRGBA_frag},shadow:{uniforms:Ea([J.lights,J.fog,{color:{value:new I(0)},opacity:{value:1}}]),vertexShader:P.shadow_vert,fragmentShader:P.shadow_frag}};db.physical={uniforms:Ea([db.standard.uniforms,{transparency:{value:0},clearcoat:{value:0},clearcoatRoughness:{value:0},sheen:{value:new I(0)},
 clearcoatNormalScale:{value:new w(1,1)},clearcoatNormalMap:{value:null}}]),vertexShader:P.meshphysical_vert,fragmentShader:P.meshphysical_frag};Fd.prototype=Object.create(G.prototype);Fd.prototype.constructor=Fd;$b.prototype=Object.create(D.prototype);$b.prototype.constructor=$b;ob.prototype=Object.create(Z.prototype);ob.prototype.constructor=ob;ob.prototype.isCubeTexture=!0;Object.defineProperty(ob.prototype,"images",{get:function(){return this.image},set:function(a){this.image=a}});Ec.prototype=
 clearcoatNormalScale:{value:new w(1,1)},clearcoatNormalMap:{value:null}}]),vertexShader:P.meshphysical_vert,fragmentShader:P.meshphysical_frag};Fd.prototype=Object.create(G.prototype);Fd.prototype.constructor=Fd;$b.prototype=Object.create(D.prototype);$b.prototype.constructor=$b;ob.prototype=Object.create(Z.prototype);ob.prototype.constructor=ob;ob.prototype.isCubeTexture=!0;Object.defineProperty(ob.prototype,"images",{get:function(){return this.image},set:function(a){this.image=a}});Ec.prototype=
 Object.create(Z.prototype);Ec.prototype.constructor=Ec;Ec.prototype.isDataTexture2DArray=!0;Fc.prototype=Object.create(Z.prototype);Fc.prototype.constructor=Fc;Fc.prototype.isDataTexture3D=!0;var th=new Z,nj=new Ec,pj=new Fc,uh=new ob,nh=[],ph=[],sh=new Float32Array(16),rh=new Float32Array(9),qh=new Float32Array(4);vh.prototype.updateCache=function(a){var b=this.cache;a instanceof Float32Array&&b.length!==a.length&&(this.cache=new Float32Array(a.length));Ha(b,a)};wh.prototype.setValue=function(a,
 Object.create(Z.prototype);Ec.prototype.constructor=Ec;Ec.prototype.isDataTexture2DArray=!0;Fc.prototype=Object.create(Z.prototype);Fc.prototype.constructor=Fc;Fc.prototype.isDataTexture3D=!0;var th=new Z,nj=new Ec,pj=new Fc,uh=new ob,nh=[],ph=[],sh=new Float32Array(16),rh=new Float32Array(9),qh=new Float32Array(4);vh.prototype.updateCache=function(a){var b=this.cache;a instanceof Float32Array&&b.length!==a.length&&(this.cache=new Float32Array(a.length));Ha(b,a)};wh.prototype.setValue=function(a,
@@ -671,11 +671,11 @@ b){this.data.array[a*this.data.stride+this.offset+2]=b;return this},setW:functio
 this.data.array[a+0]=b;this.data.array[a+1]=c;return this},setXYZ:function(a,b,c,d){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;return this},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}});Hb.prototype=Object.create(Q.prototype);Hb.prototype.constructor=Hb;Hb.prototype.isSpriteMaterial=!0;Hb.prototype.copy=function(a){Q.prototype.copy.call(this,
 this.data.array[a+0]=b;this.data.array[a+1]=c;return this},setXYZ:function(a,b,c,d){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;return this},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}});Hb.prototype=Object.create(Q.prototype);Hb.prototype.constructor=Hb;Hb.prototype.isSpriteMaterial=!0;Hb.prototype.copy=function(a){Q.prototype.copy.call(this,
 a);this.color.copy(a.color);this.map=a.map;this.rotation=a.rotation;this.sizeAttenuation=a.sizeAttenuation;return this};var Ic,ze=new n,ud=new n,vd=new n,Jc=new w,Md=new w,Nh=new M,Af=new n,Ae=new n,Bf=new n,ri=new w,Zg=new w,si=new w;Ld.prototype=Object.assign(Object.create(C.prototype),{constructor:Ld,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.');ud.setFromMatrixScale(this.matrixWorld);Nh.copy(a.camera.matrixWorld);
 a);this.color.copy(a.color);this.map=a.map;this.rotation=a.rotation;this.sizeAttenuation=a.sizeAttenuation;return this};var Ic,ze=new n,ud=new n,vd=new n,Jc=new w,Md=new w,Nh=new M,Af=new n,Ae=new n,Bf=new n,ri=new w,Zg=new w,si=new w;Ld.prototype=Object.assign(Object.create(C.prototype),{constructor:Ld,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.');ud.setFromMatrixScale(this.matrixWorld);Nh.copy(a.camera.matrixWorld);
 this.modelViewMatrix.multiplyMatrices(a.camera.matrixWorldInverse,this.matrixWorld);vd.setFromMatrixPosition(this.modelViewMatrix);a.camera.isPerspectiveCamera&&!1===this.material.sizeAttenuation&&ud.multiplyScalar(-vd.z);var c=this.material.rotation;if(0!==c){var d=Math.cos(c);var e=Math.sin(c)}c=this.center;Ke(Af.set(-.5,-.5,0),vd,c,ud,e,d);Ke(Ae.set(.5,-.5,0),vd,c,ud,e,d);Ke(Bf.set(.5,.5,0),vd,c,ud,e,d);ri.set(0,0);Zg.set(1,0);si.set(1,1);var f=a.ray.intersectTriangle(Af,Ae,Bf,!1,ze);if(null===
 this.modelViewMatrix.multiplyMatrices(a.camera.matrixWorldInverse,this.matrixWorld);vd.setFromMatrixPosition(this.modelViewMatrix);a.camera.isPerspectiveCamera&&!1===this.material.sizeAttenuation&&ud.multiplyScalar(-vd.z);var c=this.material.rotation;if(0!==c){var d=Math.cos(c);var e=Math.sin(c)}c=this.center;Ke(Af.set(-.5,-.5,0),vd,c,ud,e,d);Ke(Ae.set(.5,-.5,0),vd,c,ud,e,d);Ke(Bf.set(.5,.5,0),vd,c,ud,e,d);ri.set(0,0);Zg.set(1,0);si.set(1,1);var f=a.ray.intersectTriangle(Af,Ae,Bf,!1,ze);if(null===
-f&&(Ke(Ae.set(-.5,.5,0),vd,c,ud,e,d),Zg.set(0,1),f=a.ray.intersectTriangle(Af,Bf,Ae,!1,ze),null===f))return;e=a.ray.origin.distanceTo(ze);e<a.near||e>a.far||b.push({distance:e,point:ze.clone(),uv:aa.getUV(ze,Af,Ae,Bf,ri,Zg,si,new w),face:null,object:this})},clone:function(){return(new this.constructor(this.material)).copy(this)},copy:function(a){C.prototype.copy.call(this,a);void 0!==a.center&&this.center.copy(a.center);return this}});var Cf=new n,ti=new n;Nd.prototype=Object.assign(Object.create(C.prototype),
+f&&(Ke(Ae.set(-.5,.5,0),vd,c,ud,e,d),Zg.set(0,1),f=a.ray.intersectTriangle(Af,Bf,Ae,!1,ze),null===f))return;e=a.ray.origin.distanceTo(ze);e<a.near||e>a.far||b.push({distance:e,point:ze.clone(),uv:ba.getUV(ze,Af,Ae,Bf,ri,Zg,si,new w),face:null,object:this})},clone:function(){return(new this.constructor(this.material)).copy(this)},copy:function(a){C.prototype.copy.call(this,a);void 0!==a.center&&this.center.copy(a.center);return this}});var Cf=new n,ti=new n;Nd.prototype=Object.assign(Object.create(C.prototype),
 {constructor:Nd,isLOD:!0,copy:function(a){C.prototype.copy.call(this,a,!1);a=a.levels;for(var b=0,c=a.length;b<c;b++){var d=a[b];this.addLevel(d.object.clone(),d.distance)}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){for(var b=this.levels,c=1,d=b.length;c<d&&!(a<b[c].distance);c++);return b[c-1].object},raycast:function(a,
 {constructor:Nd,isLOD:!0,copy:function(a){C.prototype.copy.call(this,a,!1);a=a.levels;for(var b=0,c=a.length;b<c;b++){var d=a[b];this.addLevel(d.object.clone(),d.distance)}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){for(var b=this.levels,c=1,d=b.length;c<d&&!(a<b[c].distance);c++);return b[c-1].object},raycast:function(a,
 b){Cf.setFromMatrixPosition(this.matrixWorld);var c=a.ray.origin.distanceTo(Cf);this.getObjectForDistance(c).raycast(a,b)},update:function(a){var b=this.levels;if(1<b.length){Cf.setFromMatrixPosition(a.matrixWorld);ti.setFromMatrixPosition(this.matrixWorld);a=Cf.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=C.prototype.toJSON.call(this,a);
 b){Cf.setFromMatrixPosition(this.matrixWorld);var c=a.ray.origin.distanceTo(Cf);this.getObjectForDistance(c).raycast(a,b)},update:function(a){var b=this.levels;if(1<b.length){Cf.setFromMatrixPosition(a.matrixWorld);ti.setFromMatrixPosition(this.matrixWorld);a=Cf.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=C.prototype.toJSON.call(this,a);
 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}});Od.prototype=Object.assign(Object.create(R.prototype),{constructor:Od,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=
 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}});Od.prototype=Object.assign(Object.create(R.prototype),{constructor:Od,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 ca,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){R.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 da,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){R.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 M,Ak=new M;Object.assign(Le.prototype,{calculateInverses:function(){this.boneInverses=[];for(var a=0,b=this.bones.length;a<b;a++){var c=new M;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<
 this.bindMode)},clone:function(){return(new this.constructor(this.geometry,this.material)).copy(this)}});var ui=new M,Ak=new M;Object.assign(Le.prototype,{calculateInverses:function(){this.boneInverses=[];for(var a=0,b=this.bones.length;a<b;a++){var c=new M;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:Ak,b[e]),ui.toArray(c,16*e);void 0!==d&&(d.needsUpdate=!0)},clone:function(){return new Le(this.bones,this.boneInverses)},getBoneByName:function(a){for(var b=
 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:Ak,b[e]),ui.toArray(c,16*e);void 0!==d&&(d.needsUpdate=!0)},clone:function(){return new Le(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}}});hg.prototype=Object.assign(Object.create(C.prototype),{constructor:hg,isBone:!0});U.prototype=Object.create(Q.prototype);U.prototype.constructor=U;U.prototype.isLineBasicMaterial=!0;U.prototype.copy=function(a){Q.prototype.copy.call(this,a);this.color.copy(a.color);this.linewidth=a.linewidth;this.linecap=a.linecap;this.linejoin=a.linejoin;return this};var vi=new n,wi=new n,xi=new M,Df=new Sb,Be=new nb;wa.prototype=Object.assign(Object.create(C.prototype),
 0,c=this.bones.length;b<c;b++){var d=this.bones[b];if(d.name===a)return d}}});hg.prototype=Object.assign(Object.create(C.prototype),{constructor:hg,isBone:!0});U.prototype=Object.create(Q.prototype);U.prototype.constructor=U;U.prototype.isLineBasicMaterial=!0;U.prototype.copy=function(a){Q.prototype.copy.call(this,a);this.color.copy(a.color);this.linewidth=a.linewidth;this.linecap=a.linecap;this.linejoin=a.linejoin;return this};var vi=new n,wi=new n,xi=new M,Df=new Sb,Be=new nb;wa.prototype=Object.assign(Object.create(C.prototype),
@@ -776,25 +776,25 @@ a[0].y);for(var b=1,c=a.length;b<c;b++)this.lineTo(a[b].x,a[b].y)},moveTo:functi
 this.currentPoint.set(e,f)},splineThru:function(a){var b=[this.currentPoint.clone()].concat(a);b=new Va(b);this.curves.push(b);this.currentPoint.copy(a[a.length-1])},arc:function(a,b,c,d,e,f){this.absarc(a+this.currentPoint.x,b+this.currentPoint.y,c,d,e,f)},absarc:function(a,b,c,d,e,f){this.absellipse(a,b,c,c,d,e,f)},ellipse:function(a,b,c,d,e,f,g,h){this.absellipse(a+this.currentPoint.x,b+this.currentPoint.y,c,d,e,f,g,h)},absellipse:function(a,b,c,d,e,f,g,h){a=new Ja(a,b,c,d,e,f,g,h);0<this.curves.length&&
 this.currentPoint.set(e,f)},splineThru:function(a){var b=[this.currentPoint.clone()].concat(a);b=new Va(b);this.curves.push(b);this.currentPoint.copy(a[a.length-1])},arc:function(a,b,c,d,e,f){this.absarc(a+this.currentPoint.x,b+this.currentPoint.y,c,d,e,f)},absarc:function(a,b,c,d,e,f){this.absellipse(a,b,c,c,d,e,f)},ellipse:function(a,b,c,d,e,f,g,h){this.absellipse(a+this.currentPoint.x,b+this.currentPoint.y,c,d,e,f,g,h)},absellipse:function(a,b,c,d,e,f,g,h){a=new Ja(a,b,c,d,e,f,g,h);0<this.curves.length&&
 (b=a.getPoint(0),b.equals(this.currentPoint)||this.lineTo(b.x,b.y));this.curves.push(a);a=a.getPoint(1);this.currentPoint.copy(a)},copy:function(a){rb.prototype.copy.call(this,a);this.currentPoint.copy(a.currentPoint);return this},toJSON:function(){var a=rb.prototype.toJSON.call(this);a.currentPoint=this.currentPoint.toArray();return a},fromJSON:function(a){rb.prototype.fromJSON.call(this,a);this.currentPoint.fromArray(a.currentPoint);return this}});Jb.prototype=Object.assign(Object.create(Wa.prototype),
 (b=a.getPoint(0),b.equals(this.currentPoint)||this.lineTo(b.x,b.y));this.curves.push(a);a=a.getPoint(1);this.currentPoint.copy(a)},copy:function(a){rb.prototype.copy.call(this,a);this.currentPoint.copy(a.currentPoint);return this},toJSON:function(){var a=rb.prototype.toJSON.call(this);a.currentPoint=this.currentPoint.toArray();return a},fromJSON:function(a){rb.prototype.fromJSON.call(this,a);this.currentPoint.fromArray(a.currentPoint);return this}});Jb.prototype=Object.assign(Object.create(Wa.prototype),
 {constructor:Jb,getPointsHoles:function(a){for(var b=[],c=0,d=this.holes.length;c<d;c++)b[c]=this.holes[c].getPoints(a);return b},extractPoints:function(a){return{shape:this.getPoints(a),holes:this.getPointsHoles(a)}},copy:function(a){Wa.prototype.copy.call(this,a);this.holes=[];for(var b=0,c=a.holes.length;b<c;b++)this.holes.push(a.holes[b].clone());return this},toJSON:function(){var a=Wa.prototype.toJSON.call(this);a.uuid=this.uuid;a.holes=[];for(var b=0,c=this.holes.length;b<c;b++)a.holes.push(this.holes[b].toJSON());
 {constructor:Jb,getPointsHoles:function(a){for(var b=[],c=0,d=this.holes.length;c<d;c++)b[c]=this.holes[c].getPoints(a);return b},extractPoints:function(a){return{shape:this.getPoints(a),holes:this.getPointsHoles(a)}},copy:function(a){Wa.prototype.copy.call(this,a);this.holes=[];for(var b=0,c=a.holes.length;b<c;b++)this.holes.push(a.holes[b].clone());return this},toJSON:function(){var a=Wa.prototype.toJSON.call(this);a.uuid=this.uuid;a.holes=[];for(var b=0,c=this.holes.length;b<c;b++)a.holes.push(this.holes[b].toJSON());
-return a},fromJSON:function(a){Wa.prototype.fromJSON.call(this,a);this.uuid=a.uuid;this.holes=[];for(var b=0,c=a.holes.length;b<c;b++){var d=a.holes[b];this.holes.push((new Wa).fromJSON(d))}return this}});da.prototype=Object.assign(Object.create(C.prototype),{constructor:da,isLight:!0,copy:function(a){C.prototype.copy.call(this,a);this.color.copy(a.color);this.intensity=a.intensity;return this},toJSON:function(a){a=C.prototype.toJSON.call(this,a);a.object.color=this.color.getHex();a.object.intensity=
-this.intensity;void 0!==this.groundColor&&(a.object.groundColor=this.groundColor.getHex());void 0!==this.distance&&(a.object.distance=this.distance);void 0!==this.angle&&(a.object.angle=this.angle);void 0!==this.decay&&(a.object.decay=this.decay);void 0!==this.penumbra&&(a.object.penumbra=this.penumbra);void 0!==this.shadow&&(a.object.shadow=this.shadow.toJSON());return a}});We.prototype=Object.assign(Object.create(da.prototype),{constructor:We,isHemisphereLight:!0,copy:function(a){da.prototype.copy.call(this,
+return a},fromJSON:function(a){Wa.prototype.fromJSON.call(this,a);this.uuid=a.uuid;this.holes=[];for(var b=0,c=a.holes.length;b<c;b++){var d=a.holes[b];this.holes.push((new Wa).fromJSON(d))}return this}});aa.prototype=Object.assign(Object.create(C.prototype),{constructor:aa,isLight:!0,copy:function(a){C.prototype.copy.call(this,a);this.color.copy(a.color);this.intensity=a.intensity;return this},toJSON:function(a){a=C.prototype.toJSON.call(this,a);a.object.color=this.color.getHex();a.object.intensity=
+this.intensity;void 0!==this.groundColor&&(a.object.groundColor=this.groundColor.getHex());void 0!==this.distance&&(a.object.distance=this.distance);void 0!==this.angle&&(a.object.angle=this.angle);void 0!==this.decay&&(a.object.decay=this.decay);void 0!==this.penumbra&&(a.object.penumbra=this.penumbra);void 0!==this.shadow&&(a.object.shadow=this.shadow.toJSON());return a}});We.prototype=Object.assign(Object.create(aa.prototype),{constructor:We,isHemisphereLight:!0,copy:function(a){aa.prototype.copy.call(this,
 a);this.groundColor.copy(a.groundColor);return this}});Object.assign(ib.prototype,{_projScreenMatrix:new M,_lightPositionWorld:new n,_lookTarget:new n,getViewportCount:function(){return this._viewportCount},getFrustum:function(){return this._frustum},updateMatrices:function(a){var b=this.camera,c=this.matrix,d=this._projScreenMatrix,e=this._lookTarget,f=this._lightPositionWorld;f.setFromMatrixPosition(a.matrixWorld);b.position.copy(f);e.setFromMatrixPosition(a.target.matrixWorld);b.lookAt(e);b.updateMatrixWorld();
 a);this.groundColor.copy(a.groundColor);return this}});Object.assign(ib.prototype,{_projScreenMatrix:new M,_lightPositionWorld:new n,_lookTarget:new n,getViewportCount:function(){return this._viewportCount},getFrustum:function(){return this._frustum},updateMatrices:function(a){var b=this.camera,c=this.matrix,d=this._projScreenMatrix,e=this._lookTarget,f=this._lightPositionWorld;f.setFromMatrixPosition(a.matrixWorld);b.position.copy(f);e.setFromMatrixPosition(a.target.matrixWorld);b.lookAt(e);b.updateMatrixWorld();
 d.multiplyMatrices(b.projectionMatrix,b.matrixWorldInverse);this._frustum.setFromMatrix(d);c.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1);c.multiply(b.projectionMatrix);c.multiply(b.matrixWorldInverse)},getViewport:function(a){return this._viewports[a]},getFrameExtents:function(){return this._frameExtents},copy:function(a){this.camera=a.camera.clone();this.bias=a.bias;this.radius=a.radius;this.mapSize.copy(a.mapSize);return this},clone:function(){return(new this.constructor).copy(this)},toJSON:function(){var a=
 d.multiplyMatrices(b.projectionMatrix,b.matrixWorldInverse);this._frustum.setFromMatrix(d);c.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1);c.multiply(b.projectionMatrix);c.multiply(b.matrixWorldInverse)},getViewport:function(a){return this._viewports[a]},getFrameExtents:function(){return this._frameExtents},copy:function(a){this.camera=a.camera.clone();this.bias=a.bias;this.radius=a.radius;this.mapSize.copy(a.mapSize);return this},clone:function(){return(new this.constructor).copy(this)},toJSON:function(){var a=
 {};0!==this.bias&&(a.bias=this.bias);1!==this.radius&&(a.radius=this.radius);if(512!==this.mapSize.x||512!==this.mapSize.y)a.mapSize=this.mapSize.toArray();a.camera=this.camera.toJSON(!1).object;delete a.camera.matrix;return a}});Xe.prototype=Object.assign(Object.create(ib.prototype),{constructor:Xe,isSpotLightShadow:!0,updateMatrices:function(a,b,c){var d=this.camera,e=2*N.RAD2DEG*a.angle,f=this.mapSize.width/this.mapSize.height,g=a.distance||d.far;if(e!==d.fov||f!==d.aspect||g!==d.far)d.fov=e,d.aspect=
 {};0!==this.bias&&(a.bias=this.bias);1!==this.radius&&(a.radius=this.radius);if(512!==this.mapSize.x||512!==this.mapSize.y)a.mapSize=this.mapSize.toArray();a.camera=this.camera.toJSON(!1).object;delete a.camera.matrix;return a}});Xe.prototype=Object.assign(Object.create(ib.prototype),{constructor:Xe,isSpotLightShadow:!0,updateMatrices:function(a,b,c){var d=this.camera,e=2*N.RAD2DEG*a.angle,f=this.mapSize.width/this.mapSize.height,g=a.distance||d.far;if(e!==d.fov||f!==d.aspect||g!==d.far)d.fov=e,d.aspect=
-f,d.far=g,d.updateProjectionMatrix();ib.prototype.updateMatrices.call(this,a,b,c)}});Ye.prototype=Object.assign(Object.create(da.prototype),{constructor:Ye,isSpotLight:!0,copy:function(a){da.prototype.copy.call(this,a);this.distance=a.distance;this.angle=a.angle;this.penumbra=a.penumbra;this.decay=a.decay;this.target=a.target.clone();this.shadow=a.shadow.clone();return this}});rg.prototype=Object.assign(Object.create(ib.prototype),{constructor:rg,isPointLightShadow:!0,updateMatrices:function(a,b,
-c){b=this.camera;var d=this.matrix,e=this._lightPositionWorld,f=this._lookTarget,g=this._projScreenMatrix;e.setFromMatrixPosition(a.matrixWorld);b.position.copy(e);f.copy(b.position);f.add(this._cubeDirections[c]);b.up.copy(this._cubeUps[c]);b.lookAt(f);b.updateMatrixWorld();d.makeTranslation(-e.x,-e.y,-e.z);g.multiplyMatrices(b.projectionMatrix,b.matrixWorldInverse);this._frustum.setFromMatrix(g)}});Ze.prototype=Object.assign(Object.create(da.prototype),{constructor:Ze,isPointLight:!0,copy:function(a){da.prototype.copy.call(this,
+f,d.far=g,d.updateProjectionMatrix();ib.prototype.updateMatrices.call(this,a,b,c)}});Ye.prototype=Object.assign(Object.create(aa.prototype),{constructor:Ye,isSpotLight:!0,copy:function(a){aa.prototype.copy.call(this,a);this.distance=a.distance;this.angle=a.angle;this.penumbra=a.penumbra;this.decay=a.decay;this.target=a.target.clone();this.shadow=a.shadow.clone();return this}});rg.prototype=Object.assign(Object.create(ib.prototype),{constructor:rg,isPointLightShadow:!0,updateMatrices:function(a,b,
+c){b=this.camera;var d=this.matrix,e=this._lightPositionWorld,f=this._lookTarget,g=this._projScreenMatrix;e.setFromMatrixPosition(a.matrixWorld);b.position.copy(e);f.copy(b.position);f.add(this._cubeDirections[c]);b.up.copy(this._cubeUps[c]);b.lookAt(f);b.updateMatrixWorld();d.makeTranslation(-e.x,-e.y,-e.z);g.multiplyMatrices(b.projectionMatrix,b.matrixWorldInverse);this._frustum.setFromMatrix(g)}});Ze.prototype=Object.assign(Object.create(aa.prototype),{constructor:Ze,isPointLight:!0,copy:function(a){aa.prototype.copy.call(this,
 a);this.distance=a.distance;this.decay=a.decay;this.shadow=a.shadow.clone();return this}});oe.prototype=Object.assign(Object.create(bb.prototype),{constructor:oe,isOrthographicCamera:!0,copy:function(a,b){bb.prototype.copy.call(this,a,b);this.left=a.left;this.right=a.right;this.top=a.top;this.bottom=a.bottom;this.near=a.near;this.far=a.far;this.zoom=a.zoom;this.view=null===a.view?null:Object.assign({},a.view);return this},setViewOffset:function(a,b,c,d,e,f){null===this.view&&(this.view={enabled:!0,
 a);this.distance=a.distance;this.decay=a.decay;this.shadow=a.shadow.clone();return this}});oe.prototype=Object.assign(Object.create(bb.prototype),{constructor:oe,isOrthographicCamera:!0,copy:function(a,b){bb.prototype.copy.call(this,a,b);this.left=a.left;this.right=a.right;this.top=a.top;this.bottom=a.bottom;this.near=a.near;this.far=a.far;this.zoom=a.zoom;this.view=null===a.view?null:Object.assign({},a.view);return this},setViewOffset:function(a,b,c,d,e,f){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.right-this.left)/(2*this.zoom),b=(this.top-this.bottom)/(2*this.zoom),c=(this.right+this.left)/2,d=(this.top+this.bottom)/
 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.right-this.left)/(2*this.zoom),b=(this.top-this.bottom)/(2*this.zoom),c=(this.right+this.left)/2,d=(this.top+this.bottom)/
 2,e=c-a;c+=a;a=d+b;b=d-b;if(null!==this.view&&this.view.enabled){c=this.zoom/(this.view.width/this.view.fullWidth);b=this.zoom/(this.view.height/this.view.fullHeight);var f=(this.right-this.left)/this.view.width;d=(this.top-this.bottom)/this.view.height;e+=this.view.offsetX/c*f;c=e+this.view.width/c*f;a-=this.view.offsetY/b*d;b=a-this.view.height/b*d}this.projectionMatrix.makeOrthographic(e,c,a,b,this.near,this.far);this.projectionMatrixInverse.getInverse(this.projectionMatrix)},toJSON:function(a){a=
 2,e=c-a;c+=a;a=d+b;b=d-b;if(null!==this.view&&this.view.enabled){c=this.zoom/(this.view.width/this.view.fullWidth);b=this.zoom/(this.view.height/this.view.fullHeight);var f=(this.right-this.left)/this.view.width;d=(this.top-this.bottom)/this.view.height;e+=this.view.offsetX/c*f;c=e+this.view.width/c*f;a-=this.view.offsetY/b*d;b=a-this.view.height/b*d}this.projectionMatrix.makeOrthographic(e,c,a,b,this.near,this.far);this.projectionMatrixInverse.getInverse(this.projectionMatrix)},toJSON:function(a){a=
-C.prototype.toJSON.call(this,a);a.object.zoom=this.zoom;a.object.left=this.left;a.object.right=this.right;a.object.top=this.top;a.object.bottom=this.bottom;a.object.near=this.near;a.object.far=this.far;null!==this.view&&(a.object.view=Object.assign({},this.view));return a}});$e.prototype=Object.assign(Object.create(ib.prototype),{constructor:$e,isDirectionalLightShadow:!0,updateMatrices:function(a,b,c){ib.prototype.updateMatrices.call(this,a,b,c)}});af.prototype=Object.assign(Object.create(da.prototype),
-{constructor:af,isDirectionalLight:!0,copy:function(a){da.prototype.copy.call(this,a);this.target=a.target.clone();this.shadow=a.shadow.clone();return this}});bf.prototype=Object.assign(Object.create(da.prototype),{constructor:bf,isAmbientLight:!0});cf.prototype=Object.assign(Object.create(da.prototype),{constructor:cf,isRectAreaLight:!0,copy:function(a){da.prototype.copy.call(this,a);this.width=a.width;this.height=a.height;return this},toJSON:function(a){a=da.prototype.toJSON.call(this,a);a.object.width=
+C.prototype.toJSON.call(this,a);a.object.zoom=this.zoom;a.object.left=this.left;a.object.right=this.right;a.object.top=this.top;a.object.bottom=this.bottom;a.object.near=this.near;a.object.far=this.far;null!==this.view&&(a.object.view=Object.assign({},this.view));return a}});$e.prototype=Object.assign(Object.create(ib.prototype),{constructor:$e,isDirectionalLightShadow:!0,updateMatrices:function(a,b,c){ib.prototype.updateMatrices.call(this,a,b,c)}});af.prototype=Object.assign(Object.create(aa.prototype),
+{constructor:af,isDirectionalLight:!0,copy:function(a){aa.prototype.copy.call(this,a);this.target=a.target.clone();this.shadow=a.shadow.clone();return this}});bf.prototype=Object.assign(Object.create(aa.prototype),{constructor:bf,isAmbientLight:!0});cf.prototype=Object.assign(Object.create(aa.prototype),{constructor:cf,isRectAreaLight:!0,copy:function(a){aa.prototype.copy.call(this,a);this.width=a.width;this.height=a.height;return this},toJSON:function(a){a=aa.prototype.toJSON.call(this,a);a.object.width=
 this.width;a.object.height=this.height;return a}});df.prototype=Object.assign(Object.create(Y.prototype),{constructor:df,load:function(a,b,c,d){var e=this,f=new Na(e.manager);f.setPath(e.path);f.load(a,function(a){b(e.parse(JSON.parse(a)))},c,d)},parse:function(a){function b(a){void 0===c[a]&&console.warn("THREE.MaterialLoader: Undefined texture",a);return c[a]}var c=this.textures,d=new Ck[a.type];void 0!==a.uuid&&(d.uuid=a.uuid);void 0!==a.name&&(d.name=a.name);void 0!==a.color&&d.color.setHex(a.color);
 this.width;a.object.height=this.height;return a}});df.prototype=Object.assign(Object.create(Y.prototype),{constructor:df,load:function(a,b,c,d){var e=this,f=new Na(e.manager);f.setPath(e.path);f.load(a,function(a){b(e.parse(JSON.parse(a)))},c,d)},parse:function(a){function b(a){void 0===c[a]&&console.warn("THREE.MaterialLoader: Undefined texture",a);return c[a]}var c=this.textures,d=new Ck[a.type];void 0!==a.uuid&&(d.uuid=a.uuid);void 0!==a.name&&(d.name=a.name);void 0!==a.color&&d.color.setHex(a.color);
 void 0!==a.roughness&&(d.roughness=a.roughness);void 0!==a.metalness&&(d.metalness=a.metalness);void 0!==a.sheen&&(d.sheen=(new I).setHex(a.sheen));void 0!==a.emissive&&d.emissive.setHex(a.emissive);void 0!==a.specular&&d.specular.setHex(a.specular);void 0!==a.shininess&&(d.shininess=a.shininess);void 0!==a.clearcoat&&(d.clearcoat=a.clearcoat);void 0!==a.clearcoatRoughness&&(d.clearcoatRoughness=a.clearcoatRoughness);void 0!==a.vertexColors&&(d.vertexColors=a.vertexColors);void 0!==a.fog&&(d.fog=
 void 0!==a.roughness&&(d.roughness=a.roughness);void 0!==a.metalness&&(d.metalness=a.metalness);void 0!==a.sheen&&(d.sheen=(new I).setHex(a.sheen));void 0!==a.emissive&&d.emissive.setHex(a.emissive);void 0!==a.specular&&d.specular.setHex(a.specular);void 0!==a.shininess&&(d.shininess=a.shininess);void 0!==a.clearcoat&&(d.clearcoat=a.clearcoat);void 0!==a.clearcoatRoughness&&(d.clearcoatRoughness=a.clearcoatRoughness);void 0!==a.vertexColors&&(d.vertexColors=a.vertexColors);void 0!==a.fog&&(d.fog=
 a.fog);void 0!==a.flatShading&&(d.flatShading=a.flatShading);void 0!==a.blending&&(d.blending=a.blending);void 0!==a.combine&&(d.combine=a.combine);void 0!==a.side&&(d.side=a.side);void 0!==a.opacity&&(d.opacity=a.opacity);void 0!==a.transparent&&(d.transparent=a.transparent);void 0!==a.alphaTest&&(d.alphaTest=a.alphaTest);void 0!==a.depthTest&&(d.depthTest=a.depthTest);void 0!==a.depthWrite&&(d.depthWrite=a.depthWrite);void 0!==a.colorWrite&&(d.colorWrite=a.colorWrite);void 0!==a.stencilWrite&&(d.stencilWrite=
 a.fog);void 0!==a.flatShading&&(d.flatShading=a.flatShading);void 0!==a.blending&&(d.blending=a.blending);void 0!==a.combine&&(d.combine=a.combine);void 0!==a.side&&(d.side=a.side);void 0!==a.opacity&&(d.opacity=a.opacity);void 0!==a.transparent&&(d.transparent=a.transparent);void 0!==a.alphaTest&&(d.alphaTest=a.alphaTest);void 0!==a.depthTest&&(d.depthTest=a.depthTest);void 0!==a.depthWrite&&(d.depthWrite=a.depthWrite);void 0!==a.colorWrite&&(d.colorWrite=a.colorWrite);void 0!==a.stencilWrite&&(d.stencilWrite=
 a.stencilWrite);void 0!==a.stencilWriteMask&&(d.stencilWriteMask=a.stencilWriteMask);void 0!==a.stencilFunc&&(d.stencilFunc=a.stencilFunc);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&&
 a.stencilWrite);void 0!==a.stencilWriteMask&&(d.stencilWriteMask=a.stencilWriteMask);void 0!==a.stencilFunc&&(d.stencilFunc=a.stencilFunc);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=
 (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];
 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 I).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 ca).fromArray(f.value);break;case "m3":d.uniforms[e].value=(new S).fromArray(f.value);case "m4":d.uniforms[e].value=(new M).fromArray(f.value);break;default:d.uniforms[e].value=f.value}}void 0!==a.defines&&
+d.uniforms[e]={};switch(f.type){case "t":d.uniforms[e].value=b(f.value);break;case "c":d.uniforms[e].value=(new I).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 da).fromArray(f.value);break;case "m3":d.uniforms[e].value=(new ca).fromArray(f.value);case "m4":d.uniforms[e].value=(new M).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=
 (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=
 !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&&
 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&&
@@ -836,8 +836,8 @@ a.length-2))}a=e.parse(c);b&&b(a)},c,d)},parse:function(a){return new ug(a)}});v
 {isSphericalHarmonics3:!0,set:function(a){for(var b=0;9>b;b++)this.coefficients[b].copy(a[b]);return this},zero:function(){for(var a=0;9>a;a++)this.coefficients[a].set(0,0,0);return this},getAt:function(a,b){var c=a.x,d=a.y;a=a.z;var e=this.coefficients;b.copy(e[0]).multiplyScalar(.282095);b.addScale(e[1],.488603*d);b.addScale(e[2],.488603*a);b.addScale(e[3],.488603*c);b.addScale(e[4],1.092548*c*d);b.addScale(e[5],1.092548*d*a);b.addScale(e[6],.315392*(3*a*a-1));b.addScale(e[7],1.092548*c*a);b.addScale(e[8],
 {isSphericalHarmonics3:!0,set:function(a){for(var b=0;9>b;b++)this.coefficients[b].copy(a[b]);return this},zero:function(){for(var a=0;9>a;a++)this.coefficients[a].set(0,0,0);return this},getAt:function(a,b){var c=a.x,d=a.y;a=a.z;var e=this.coefficients;b.copy(e[0]).multiplyScalar(.282095);b.addScale(e[1],.488603*d);b.addScale(e[2],.488603*a);b.addScale(e[3],.488603*c);b.addScale(e[4],1.092548*c*d);b.addScale(e[5],1.092548*d*a);b.addScale(e[6],.315392*(3*a*a-1));b.addScale(e[7],1.092548*c*a);b.addScale(e[8],
 .546274*(c*c-d*d));return b},getIrradianceAt:function(a,b){var c=a.x,d=a.y;a=a.z;var e=this.coefficients;b.copy(e[0]).multiplyScalar(.886227);b.addScale(e[1],1.023328*d);b.addScale(e[2],1.023328*a);b.addScale(e[3],1.023328*c);b.addScale(e[4],.858086*c*d);b.addScale(e[5],.858086*d*a);b.addScale(e[6],.743125*a*a-.247708);b.addScale(e[7],.858086*c*a);b.addScale(e[8],.429043*(c*c-d*d));return b},add:function(a){for(var b=0;9>b;b++)this.coefficients[b].add(a.coefficients[b]);return this},scale:function(a){for(var b=
 .546274*(c*c-d*d));return b},getIrradianceAt:function(a,b){var c=a.x,d=a.y;a=a.z;var e=this.coefficients;b.copy(e[0]).multiplyScalar(.886227);b.addScale(e[1],1.023328*d);b.addScale(e[2],1.023328*a);b.addScale(e[3],1.023328*c);b.addScale(e[4],.858086*c*d);b.addScale(e[5],.858086*d*a);b.addScale(e[6],.743125*a*a-.247708);b.addScale(e[7],.858086*c*a);b.addScale(e[8],.429043*(c*c-d*d));return b},add:function(a){for(var b=0;9>b;b++)this.coefficients[b].add(a.coefficients[b]);return this},scale:function(a){for(var b=
 0;9>b;b++)this.coefficients[b].multiplyScalar(a);return this},lerp:function(a,b){for(var c=0;9>c;c++)this.coefficients[c].lerp(a.coefficients[c],b);return this},equals:function(a){for(var b=0;9>b;b++)if(!this.coefficients[b].equals(a.coefficients[b]))return!1;return!0},copy:function(a){return this.set(a.coefficients)},clone:function(){return(new this.constructor).copy(this)},fromArray:function(a,b){void 0===b&&(b=0);for(var c=this.coefficients,d=0;9>d;d++)c[d].fromArray(a,b+3*d);return this},toArray:function(a,
 0;9>b;b++)this.coefficients[b].multiplyScalar(a);return this},lerp:function(a,b){for(var c=0;9>c;c++)this.coefficients[c].lerp(a.coefficients[c],b);return this},equals:function(a){for(var b=0;9>b;b++)if(!this.coefficients[b].equals(a.coefficients[b]))return!1;return!0},copy:function(a){return this.set(a.coefficients)},clone:function(){return(new this.constructor).copy(this)},fromArray:function(a,b){void 0===b&&(b=0);for(var c=this.coefficients,d=0;9>d;d++)c[d].fromArray(a,b+3*d);return this},toArray:function(a,
-b){void 0===a&&(a=[]);void 0===b&&(b=0);for(var c=this.coefficients,d=0;9>d;d++)c[d].toArray(a,b+3*d);return a}});Object.assign(kf,{getBasisAt:function(a,b){var c=a.x,d=a.y;a=a.z;b[0]=.282095;b[1]=.488603*d;b[2]=.488603*a;b[3]=.488603*c;b[4]=1.092548*c*d;b[5]=1.092548*d*a;b[6]=.315392*(3*a*a-1);b[7]=1.092548*c*a;b[8]=.546274*(c*c-d*d)}});Xa.prototype=Object.assign(Object.create(da.prototype),{constructor:Xa,isLightProbe:!0,copy:function(a){da.prototype.copy.call(this,a);this.sh.copy(a.sh);this.intensity=
-a.intensity;return this},toJSON:function(a){return da.prototype.toJSON.call(this,a)}});wg.prototype=Object.assign(Object.create(Xa.prototype),{constructor:wg,isHemisphereLightProbe:!0,copy:function(a){Xa.prototype.copy.call(this,a);return this},toJSON:function(a){return Xa.prototype.toJSON.call(this,a)}});xg.prototype=Object.assign(Object.create(Xa.prototype),{constructor:xg,isAmbientLightProbe:!0,copy:function(a){Xa.prototype.copy.call(this,a);return this},toJSON:function(a){return Xa.prototype.toJSON.call(this,
+b){void 0===a&&(a=[]);void 0===b&&(b=0);for(var c=this.coefficients,d=0;9>d;d++)c[d].toArray(a,b+3*d);return a}});Object.assign(kf,{getBasisAt:function(a,b){var c=a.x,d=a.y;a=a.z;b[0]=.282095;b[1]=.488603*d;b[2]=.488603*a;b[3]=.488603*c;b[4]=1.092548*c*d;b[5]=1.092548*d*a;b[6]=.315392*(3*a*a-1);b[7]=1.092548*c*a;b[8]=.546274*(c*c-d*d)}});Xa.prototype=Object.assign(Object.create(aa.prototype),{constructor:Xa,isLightProbe:!0,copy:function(a){aa.prototype.copy.call(this,a);this.sh.copy(a.sh);this.intensity=
+a.intensity;return this},toJSON:function(a){return aa.prototype.toJSON.call(this,a)}});wg.prototype=Object.assign(Object.create(Xa.prototype),{constructor:wg,isHemisphereLightProbe:!0,copy:function(a){Xa.prototype.copy.call(this,a);return this},toJSON:function(a){return Xa.prototype.toJSON.call(this,a)}});xg.prototype=Object.assign(Object.create(Xa.prototype),{constructor:xg,isAmbientLightProbe:!0,copy:function(a){Xa.prototype.copy.call(this,a);return this},toJSON:function(a){return Xa.prototype.toJSON.call(this,
 a)}});var Bi=new M,Ci=new M;Object.assign(Yh.prototype,{update:function(a){var b=this._cache;if(b.focus!==a.focus||b.fov!==a.fov||b.aspect!==a.aspect*this.aspect||b.near!==a.near||b.far!==a.far||b.zoom!==a.zoom||b.eyeSep!==this.eyeSep){b.focus=a.focus;b.fov=a.fov;b.aspect=a.aspect*this.aspect;b.near=a.near;b.far=a.far;b.zoom=a.zoom;b.eyeSep=this.eyeSep;var c=a.projectionMatrix.clone(),d=b.eyeSep/2,e=d*b.near/b.focus,f=b.near*Math.tan(N.DEG2RAD*b.fov*.5)/b.zoom;Ci.elements[12]=-d;Bi.elements[12]=d;
 a)}});var Bi=new M,Ci=new M;Object.assign(Yh.prototype,{update:function(a){var b=this._cache;if(b.focus!==a.focus||b.fov!==a.fov||b.aspect!==a.aspect*this.aspect||b.near!==a.near||b.far!==a.far||b.zoom!==a.zoom||b.eyeSep!==this.eyeSep){b.focus=a.focus;b.fov=a.fov;b.aspect=a.aspect*this.aspect;b.near=a.near;b.far=a.far;b.zoom=a.zoom;b.eyeSep=this.eyeSep;var c=a.projectionMatrix.clone(),d=b.eyeSep/2,e=d*b.near/b.focus,f=b.near*Math.tan(N.DEG2RAD*b.fov*.5)/b.zoom;Ci.elements[12]=-d;Bi.elements[12]=d;
 d=-f*b.aspect+e;var g=f*b.aspect+e;c.elements[0]=2*b.near/(g-d);c.elements[8]=(g+d)/(g-d);this.cameraL.projectionMatrix.copy(c);d=-f*b.aspect-e;g=f*b.aspect-e;c.elements[0]=2*b.near/(g-d);c.elements[8]=(g+d)/(g-d);this.cameraR.projectionMatrix.copy(c)}this.cameraL.matrixWorld.copy(a.matrixWorld).multiply(Ci);this.cameraR.matrixWorld.copy(a.matrixWorld).multiply(Bi)}});Object.assign(yg.prototype,{start:function(){this.oldTime=this.startTime=("undefined"===typeof performance?Date:performance).now();
 d=-f*b.aspect+e;var g=f*b.aspect+e;c.elements[0]=2*b.near/(g-d);c.elements[8]=(g+d)/(g-d);this.cameraL.projectionMatrix.copy(c);d=-f*b.aspect-e;g=f*b.aspect-e;c.elements[0]=2*b.near/(g-d);c.elements[8]=(g+d)/(g-d);this.cameraR.projectionMatrix.copy(c)}this.cameraL.matrixWorld.copy(a.matrixWorld).multiply(Ci);this.cameraR.matrixWorld.copy(a.matrixWorld).multiply(Bi)}});Object.assign(yg.prototype,{start:function(){this.oldTime=this.startTime=("undefined"===typeof performance?Date:performance).now();
 this.elapsedTime=0;this.running=!0},stop:function(){this.getElapsedTime();this.autoStart=this.running=!1},getElapsedTime:function(){this.getDelta();return this.elapsedTime},getDelta:function(){var a=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){var b=("undefined"===typeof performance?Date:performance).now();a=(b-this.oldTime)/1E3;this.oldTime=b;this.elapsedTime+=a}return a}});var vc=new n,Di=new sa,Ek=new n,wc=new n;zg.prototype=Object.assign(Object.create(C.prototype),
 this.elapsedTime=0;this.running=!0},stop:function(){this.getElapsedTime();this.autoStart=this.running=!1},getElapsedTime:function(){this.getDelta();return this.elapsedTime},getDelta:function(){var a=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){var b=("undefined"===typeof performance?Date:performance).now();a=(b-this.oldTime)/1E3;this.oldTime=b;this.elapsedTime+=a}return a}});var vc=new n,Di=new sa,Ek=new n,wc=new n;zg.prototype=Object.assign(Object.create(C.prototype),
@@ -891,64 +891,65 @@ d=this._nActiveActions++,e=b[d];a._cacheIndex=d;b[d]=a;e._cacheIndex=c;b[c]=e},_
 f=e[d],g=b[b.length-1];a=a._cacheIndex;g._cacheIndex=a;b[a]=g;b.pop();delete f[c];0===Object.keys(f).length&&delete e[d]},_lendBinding:function(a){var b=this._bindings,c=a._cacheIndex,d=this._nActiveBindings++,e=b[d];a._cacheIndex=d;b[d]=a;e._cacheIndex=c;b[c]=e},_takeBackBinding:function(a){var b=this._bindings,c=a._cacheIndex,d=--this._nActiveBindings,e=b[d];a._cacheIndex=d;b[d]=a;e._cacheIndex=c;b[c]=e},_lendControlInterpolant:function(){var a=this._controlInterpolants,b=this._nActiveControlInterpolants++,
 f=e[d],g=b[b.length-1];a=a._cacheIndex;g._cacheIndex=a;b[a]=g;b.pop();delete f[c];0===Object.keys(f).length&&delete e[d]},_lendBinding:function(a){var b=this._bindings,c=a._cacheIndex,d=this._nActiveBindings++,e=b[d];a._cacheIndex=d;b[d]=a;e._cacheIndex=c;b[c]=e},_takeBackBinding:function(a){var b=this._bindings,c=a._cacheIndex,d=--this._nActiveBindings,e=b[d];a._cacheIndex=d;b[d]=a;e._cacheIndex=c;b[c]=e},_lendControlInterpolant:function(){var a=this._controlInterpolants,b=this._nActiveControlInterpolants++,
 c=a[b];void 0===c&&(c=new ke(new Float32Array(2),new Float32Array(2),1,this._controlInterpolantsResultBuffer),c.__cacheIndex=b,a[b]=c);return c},_takeBackControlInterpolant:function(a){var b=this._controlInterpolants,c=a.__cacheIndex,d=--this._nActiveControlInterpolants,e=b[d];a.__cacheIndex=d;b[d]=a;e.__cacheIndex=c;b[c]=e},_controlInterpolantsResultBuffer:new Float32Array(1),clipAction:function(a,b){var c=b||this._root,d=c.uuid;c="string"===typeof a?Ma.findByName(c,a):a;a=null!==c?c.uuid:a;var e=
 c=a[b];void 0===c&&(c=new ke(new Float32Array(2),new Float32Array(2),1,this._controlInterpolantsResultBuffer),c.__cacheIndex=b,a[b]=c);return c},_takeBackControlInterpolant:function(a){var b=this._controlInterpolants,c=a.__cacheIndex,d=--this._nActiveControlInterpolants,e=b[d];a.__cacheIndex=d;b[d]=a;e.__cacheIndex=c;b[c]=e},_controlInterpolantsResultBuffer:new Float32Array(1),clipAction:function(a,b){var c=b||this._root,d=c.uuid;c="string"===typeof a?Ma.findByName(c,a):a;a=null!==c?c.uuid:a;var e=
 this._actionsByClip[a],f=null;if(void 0!==e){f=e.actionByRoot[d];if(void 0!==f)return f;f=e.knownActions[0];null===c&&(c=f._clip)}if(null===c)return null;b=new ai(this,c,b);this._bindAction(b,f);this._addInactiveAction(b,a,d);return b},existingAction:function(a,b){var c=b||this._root;b=c.uuid;c="string"===typeof a?Ma.findByName(c,a):a;a=this._actionsByClip[c?c.uuid:a];return void 0!==a?a.actionByRoot[b]||null:null},stopAllAction:function(){for(var a=this._actions,b=this._nActiveActions,c=this._bindings,
 this._actionsByClip[a],f=null;if(void 0!==e){f=e.actionByRoot[d];if(void 0!==f)return f;f=e.knownActions[0];null===c&&(c=f._clip)}if(null===c)return null;b=new ai(this,c,b);this._bindAction(b,f);this._addInactiveAction(b,a,d);return b},existingAction:function(a,b){var c=b||this._root;b=c.uuid;c="string"===typeof a?Ma.findByName(c,a):a;a=this._actionsByClip[c?c.uuid:a];return void 0!==a?a.actionByRoot[b]||null:null},stopAllAction:function(){for(var a=this._actions,b=this._nActiveActions,c=this._bindings,
-d=this._nActiveBindings,e=this._nActiveBindings=this._nActiveActions=0;e!==b;++e)a[e].reset();for(e=0;e!==d;++e)c[e].useCount=0;return this},update:function(a){a*=this.timeScale;for(var b=this._actions,c=this._nActiveActions,d=this.time+=a,e=Math.sign(a),f=this._accuIndex^=1,g=0;g!==c;++g)b[g]._update(d,a,e,f);a=this._bindings;b=this._nActiveBindings;for(g=0;g!==b;++g)a[g].apply(f);return this},getRoot:function(){return this._root},uncacheClip:function(a){var b=this._actions;a=a.uuid;var c=this._actionsByClip,
-d=c[a];if(void 0!==d){d=d.knownActions;for(var e=0,f=d.length;e!==f;++e){var g=d[e];this._deactivateAction(g);var h=g._cacheIndex,k=b[b.length-1];g._cacheIndex=null;g._byClipCacheIndex=null;k._cacheIndex=h;b[h]=k;b.pop();this._removeInactiveBindingsForAction(g)}delete c[a]}},uncacheRoot:function(a){a=a.uuid;var b=this._actionsByClip;for(d in b){var c=b[d].actionByRoot[a];void 0!==c&&(this._deactivateAction(c),this._removeInactiveAction(c))}var d=this._bindingsByRootAndName[a];if(void 0!==d)for(var e in d)a=
-d[e],a.restoreOriginalState(),this._removeInactiveBinding(a)},uncacheAction:function(a,b){a=this.existingAction(a,b);null!==a&&(this._deactivateAction(a),this._removeInactiveAction(a))}});lf.prototype.clone=function(){return new lf(void 0===this.value.clone?this.value:this.value.clone())};Fg.prototype=Object.assign(Object.create(Gb.prototype),{constructor:Fg,isInstancedInterleavedBuffer:!0,copy:function(a){Gb.prototype.copy.call(this,a);this.meshPerAttribute=a.meshPerAttribute;return this}});Object.assign(bi.prototype,
-{linePrecision:1,set:function(a,b){this.ray.set(a,b)},setFromCamera:function(a,b){b&&b.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(b.matrixWorld),this.ray.direction.set(a.x,a.y,.5).unproject(b).sub(this.ray.origin).normalize(),this.camera=b):b&&b.isOrthographicCamera?(this.ray.origin.set(a.x,a.y,(b.near+b.far)/(b.near-b.far)).unproject(b),this.ray.direction.set(0,0,-1).transformDirection(b.matrixWorld),this.camera=b):console.error("THREE.Raycaster: Unsupported camera type.")},intersectObject:function(a,
-b,c){c=c||[];Gg(a,this,c,b);c.sort(ci);return c},intersectObjects:function(a,b,c){c=c||[];if(!1===Array.isArray(a))return console.warn("THREE.Raycaster.intersectObjects: objects is not an Array."),c;for(var d=0,e=a.length;d<e;d++)Gg(a[d],this,c,b);c.sort(ci);return c}});Object.assign(di.prototype,{set:function(a,b,c){this.radius=a;this.phi=b;this.theta=c;return this},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.radius=a.radius;this.phi=a.phi;this.theta=a.theta;return this},
-makeSafe:function(){this.phi=Math.max(1E-6,Math.min(Math.PI-1E-6,this.phi));return this},setFromVector3:function(a){return this.setFromCartesianCoords(a.x,a.y,a.z)},setFromCartesianCoords:function(a,b,c){this.radius=Math.sqrt(a*a+b*b+c*c);0===this.radius?this.phi=this.theta=0:(this.theta=Math.atan2(a,c),this.phi=Math.acos(N.clamp(b/this.radius,-1,1)));return this}});Object.assign(ei.prototype,{set:function(a,b,c){this.radius=a;this.theta=b;this.y=c;return this},clone:function(){return(new this.constructor).copy(this)},
-copy:function(a){this.radius=a.radius;this.theta=a.theta;this.y=a.y;return this},setFromVector3:function(a){return this.setFromCartesianCoords(a.x,a.y,a.z)},setFromCartesianCoords:function(a,b,c){this.radius=Math.sqrt(a*a+c*c);this.theta=Math.atan2(a,c);this.y=b;return this}});var Fi=new w;Object.assign(Hg.prototype,{set:function(a,b){this.min.copy(a);this.max.copy(b);return this},setFromPoints:function(a){this.makeEmpty();for(var b=0,c=a.length;b<c;b++)this.expandByPoint(a[b]);return this},setFromCenterAndSize:function(a,
-b){b=Fi.copy(b).multiplyScalar(.5);this.min.copy(a).sub(b);this.max.copy(a).add(b);return this},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.min.copy(a.min);this.max.copy(a.max);return this},makeEmpty:function(){this.min.x=this.min.y=Infinity;this.max.x=this.max.y=-Infinity;return this},isEmpty:function(){return this.max.x<this.min.x||this.max.y<this.min.y},getCenter:function(a){void 0===a&&(console.warn("THREE.Box2: .getCenter() target is now required"),a=new w);
-return this.isEmpty()?a.set(0,0):a.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(a){void 0===a&&(console.warn("THREE.Box2: .getSize() target is now required"),a=new w);return this.isEmpty()?a.set(0,0):a.subVectors(this.max,this.min)},expandByPoint:function(a){this.min.min(a);this.max.max(a);return this},expandByVector:function(a){this.min.sub(a);this.max.add(a);return this},expandByScalar:function(a){this.min.addScalar(-a);this.max.addScalar(a);return this},containsPoint:function(a){return a.x<
-this.min.x||a.x>this.max.x||a.y<this.min.y||a.y>this.max.y?!1:!0},containsBox:function(a){return this.min.x<=a.min.x&&a.max.x<=this.max.x&&this.min.y<=a.min.y&&a.max.y<=this.max.y},getParameter:function(a,b){void 0===b&&(console.warn("THREE.Box2: .getParameter() target is now required"),b=new w);return b.set((a.x-this.min.x)/(this.max.x-this.min.x),(a.y-this.min.y)/(this.max.y-this.min.y))},intersectsBox:function(a){return a.max.x<this.min.x||a.min.x>this.max.x||a.max.y<this.min.y||a.min.y>this.max.y?
-!1:!0},clampPoint:function(a,b){void 0===b&&(console.warn("THREE.Box2: .clampPoint() target is now required"),b=new w);return b.copy(a).clamp(this.min,this.max)},distanceToPoint:function(a){return Fi.copy(a).clamp(this.min,this.max).sub(a).length()},intersect:function(a){this.min.max(a.min);this.max.min(a.max);return this},union:function(a){this.min.min(a.min);this.max.max(a.max);return this},translate:function(a){this.min.add(a);this.max.add(a);return this},equals:function(a){return a.min.equals(this.min)&&
-a.max.equals(this.max)}});var Gi=new n,Jf=new n;Object.assign(Ig.prototype,{set:function(a,b){this.start.copy(a);this.end.copy(b);return this},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.start.copy(a.start);this.end.copy(a.end);return this},getCenter:function(a){void 0===a&&(console.warn("THREE.Line3: .getCenter() target is now required"),a=new n);return a.addVectors(this.start,this.end).multiplyScalar(.5)},delta:function(a){void 0===a&&(console.warn("THREE.Line3: .delta() target is now required"),
-a=new n);return a.subVectors(this.end,this.start)},distanceSq:function(){return this.start.distanceToSquared(this.end)},distance:function(){return this.start.distanceTo(this.end)},at:function(a,b){void 0===b&&(console.warn("THREE.Line3: .at() target is now required"),b=new n);return this.delta(b).multiplyScalar(a).add(this.start)},closestPointToPointParameter:function(a,b){Gi.subVectors(a,this.start);Jf.subVectors(this.end,this.start);a=Jf.dot(Jf);a=Jf.dot(Gi)/a;b&&(a=N.clamp(a,0,1));return a},closestPointToPoint:function(a,
-b,c){a=this.closestPointToPointParameter(a,b);void 0===c&&(console.warn("THREE.Line3: .closestPointToPoint() target is now required"),c=new n);return this.delta(c).multiplyScalar(a).add(this.start)},applyMatrix4:function(a){this.start.applyMatrix4(a);this.end.applyMatrix4(a);return this},equals:function(a){return a.start.equals(this.start)&&a.end.equals(this.end)}});pe.prototype=Object.create(C.prototype);pe.prototype.constructor=pe;pe.prototype.isImmediateRenderObject=!0;var mb=new n,zb=new n,fh=
-new S,Ok=["a","b","c"];qe.prototype=Object.create(T.prototype);qe.prototype.constructor=qe;qe.prototype.update=function(){this.object.updateMatrixWorld(!0);fh.getNormalMatrix(this.object.matrixWorld);var a=this.object.matrixWorld,b=this.geometry.attributes.position,c=this.object.geometry;if(c&&c.isGeometry)for(var d=c.vertices,e=c.faces,f=c=0,g=e.length;f<g;f++)for(var h=e[f],k=0,m=h.vertexNormals.length;k<m;k++){var n=h.vertexNormals[k];mb.copy(d[h[Ok[k]]]).applyMatrix4(a);zb.copy(n).applyMatrix3(fh).normalize().multiplyScalar(this.size).add(mb);
-b.setXYZ(c,mb.x,mb.y,mb.z);c+=1;b.setXYZ(c,zb.x,zb.y,zb.z);c+=1}else if(c&&c.isBufferGeometry)for(d=c.attributes.position,e=c.attributes.normal,k=c=0,m=d.count;k<m;k++)mb.set(d.getX(k),d.getY(k),d.getZ(k)).applyMatrix4(a),zb.set(e.getX(k),e.getY(k),e.getZ(k)),zb.applyMatrix3(fh).normalize().multiplyScalar(this.size).add(mb),b.setXYZ(c,mb.x,mb.y,mb.z),c+=1,b.setXYZ(c,zb.x,zb.y,zb.z),c+=1;b.needsUpdate=!0};var Hi=new n;ed.prototype=Object.create(C.prototype);ed.prototype.constructor=ed;ed.prototype.dispose=
-function(){this.cone.geometry.dispose();this.cone.material.dispose()};ed.prototype.update=function(){this.light.updateMatrixWorld();var a=this.light.distance?this.light.distance:1E3,b=a*Math.tan(this.light.angle);this.cone.scale.set(b,b,a);Hi.setFromMatrixPosition(this.light.target.matrixWorld);this.cone.lookAt(Hi);void 0!==this.color?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)};var Pb=new n,Kf=new M,gh=new M;fd.prototype=Object.create(T.prototype);fd.prototype.constructor=
-fd;fd.prototype.updateMatrixWorld=function(a){var b=this.bones,c=this.geometry,d=c.getAttribute("position");gh.getInverse(this.root.matrixWorld);for(var e=0,f=0;e<b.length;e++){var g=b[e];g.parent&&g.parent.isBone&&(Kf.multiplyMatrices(gh,g.matrixWorld),Pb.setFromMatrixPosition(Kf),d.setXYZ(f,Pb.x,Pb.y,Pb.z),Kf.multiplyMatrices(gh,g.parent.matrixWorld),Pb.setFromMatrixPosition(Kf),d.setXYZ(f+1,Pb.x,Pb.y,Pb.z),f+=2)}c.getAttribute("position").needsUpdate=!0;C.prototype.updateMatrixWorld.call(this,
-a)};gd.prototype=Object.create(R.prototype);gd.prototype.constructor=gd;gd.prototype.dispose=function(){this.geometry.dispose();this.material.dispose()};gd.prototype.update=function(){void 0!==this.color?this.material.color.set(this.color):this.material.color.copy(this.light.color)};hd.prototype=Object.create(wa.prototype);hd.prototype.constructor=hd;hd.prototype.update=function(){this.scale.set(.5*this.light.width,.5*this.light.height,1);if(void 0!==this.color)this.material.color.set(this.color),
-this.children[0].material.color.set(this.color);else{this.material.color.copy(this.light.color).multiplyScalar(this.light.intensity);var a=this.material.color,b=Math.max(a.r,a.g,a.b);1<b&&a.multiplyScalar(1/b);this.children[0].material.color.copy(this.material.color)}};hd.prototype.dispose=function(){this.geometry.dispose();this.material.dispose();this.children[0].geometry.dispose();this.children[0].material.dispose()};var Pk=new n,Ii=new I,Ji=new I;id.prototype=Object.create(C.prototype);id.prototype.constructor=
-id;id.prototype.dispose=function(){this.children[0].geometry.dispose();this.children[0].material.dispose()};id.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");Ii.copy(this.light.color);Ji.copy(this.light.groundColor);for(var c=0,d=b.count;c<d;c++){var e=c<d/2?Ii:Ji;b.setXYZ(c,e.r,e.g,e.b)}b.needsUpdate=!0}a.lookAt(Pk.setFromMatrixPosition(this.light.matrixWorld).negate())};jd.prototype=Object.create(R.prototype);
-jd.prototype.constructor=jd;jd.prototype.dispose=function(){this.geometry.dispose();this.material.dispose()};jd.prototype.onBeforeRender=function(){this.position.copy(this.lightProbe.position);this.scale.set(1,1,1).multiplyScalar(this.size);this.material.uniforms.intensity.value=this.lightProbe.intensity};mf.prototype=Object.assign(Object.create(T.prototype),{constructor:mf,copy:function(a){T.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)}});
-nf.prototype=Object.create(T.prototype);nf.prototype.constructor=nf;kd.prototype=Object.create(wa.prototype);kd.prototype.constructor=kd;kd.prototype.update=function(){function a(a,b,d,e){d=(b-a)/d;r.setXYZ(k,0,0,0);m++;for(n=a;n<b;n+=d)u=k+m,r.setXYZ(u,Math.sin(n)*c,0,Math.cos(n)*c),r.setXYZ(u+1,Math.sin(Math.min(n+d,b))*c,0,Math.cos(Math.min(n+d,b))*c),r.setXYZ(u+2,0,0,0),m+=3;t.addGroup(k,m,e);k+=m;m=0}var b=this.audio,c=this.range,d=this.divisionsInnerAngle,e=this.divisionsOuterAngle,f=N.degToRad(b.panner.coneInnerAngle);
-b=N.degToRad(b.panner.coneOuterAngle);var g=f/2,h=b/2,k=0,m=0,n,u,t=this.geometry,r=t.attributes.position;t.clearGroups();a(-h,-g,e,0);a(-g,g,d,1);a(g,h,e,0);r.needsUpdate=!0;f===b&&(this.material[0].visible=!1)};kd.prototype.dispose=function(){this.geometry.dispose();this.material[0].dispose();this.material[1].dispose()};var De=new n,Lf=new n,Ki=new S;re.prototype=Object.create(T.prototype);re.prototype.constructor=re;re.prototype.update=function(){this.object.updateMatrixWorld(!0);Ki.getNormalMatrix(this.object.matrixWorld);
-var a=this.object.matrixWorld,b=this.geometry.attributes.position,c=this.object.geometry,d=c.vertices;c=c.faces;for(var e=0,f=0,g=c.length;f<g;f++){var h=c[f],k=h.normal;De.copy(d[h.a]).add(d[h.b]).add(d[h.c]).divideScalar(3).applyMatrix4(a);Lf.copy(k).applyMatrix3(Ki).normalize().multiplyScalar(this.size).add(De);b.setXYZ(e,De.x,De.y,De.z);e+=1;b.setXYZ(e,Lf.x,Lf.y,Lf.z);e+=1}b.needsUpdate=!0};var Li=new n,Mf=new n,Mi=new n;ld.prototype=Object.create(C.prototype);ld.prototype.constructor=ld;ld.prototype.dispose=
-function(){this.lightPlane.geometry.dispose();this.lightPlane.material.dispose();this.targetLine.geometry.dispose();this.targetLine.material.dispose()};ld.prototype.update=function(){Li.setFromMatrixPosition(this.light.matrixWorld);Mf.setFromMatrixPosition(this.light.target.matrixWorld);Mi.subVectors(Mf,Li);this.lightPlane.lookAt(Mf);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(Mf);this.targetLine.scale.z=Mi.length()};var of=new n,ba=new bb;se.prototype=Object.create(T.prototype);se.prototype.constructor=se;se.prototype.update=function(){var a=this.geometry,b=this.pointMap;ba.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse);na("c",b,a,ba,0,0,-1);na("t",b,a,ba,0,0,1);na("n1",b,a,ba,-1,-1,-1);na("n2",b,a,ba,1,-1,-1);na("n3",b,a,ba,-1,1,-1);na("n4",b,a,ba,1,1,-1);na("f1",b,a,ba,-1,
--1,1);na("f2",b,a,ba,1,-1,1);na("f3",b,a,ba,-1,1,1);na("f4",b,a,ba,1,1,1);na("u1",b,a,ba,.7,1.1,-1);na("u2",b,a,ba,-.7,1.1,-1);na("u3",b,a,ba,0,2,-1);na("cf1",b,a,ba,-1,0,1);na("cf2",b,a,ba,1,0,1);na("cf3",b,a,ba,0,-1,1);na("cf4",b,a,ba,0,1,1);na("cn1",b,a,ba,-1,0,-1);na("cn2",b,a,ba,1,0,-1);na("cn3",b,a,ba,0,-1,-1);na("cn4",b,a,ba,0,1,-1);a.getAttribute("position").needsUpdate=!0};var Nf=new ab;sb.prototype=Object.create(T.prototype);sb.prototype.constructor=sb;sb.prototype.update=function(a){void 0!==
-a&&console.warn("THREE.BoxHelper: .update() has no longer arguments.");void 0!==this.object&&Nf.setFromObject(this.object);if(!Nf.isEmpty()){a=Nf.min;var b=Nf.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()}};sb.prototype.setFromObject=
-function(a){this.object=a;this.update();return this};sb.prototype.copy=function(a){T.prototype.copy.call(this,a);this.object=a.object;return this};sb.prototype.clone=function(){return(new this.constructor).copy(this)};te.prototype=Object.create(T.prototype);te.prototype.constructor=te;te.prototype.updateMatrixWorld=function(a){var b=this.box;b.isEmpty()||(b.getCenter(this.position),b.getSize(this.scale),this.scale.multiplyScalar(.5),C.prototype.updateMatrixWorld.call(this,a))};ue.prototype=Object.create(wa.prototype);
-ue.prototype.constructor=ue;ue.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);C.prototype.updateMatrixWorld.call(this,a)};var Ni=new n,pf,Jg;tb.prototype=Object.create(C.prototype);tb.prototype.constructor=tb;tb.prototype.setDirection=function(a){.99999<a.y?this.quaternion.set(0,0,0,1):-.99999>a.y?this.quaternion.set(1,0,0,0):(Ni.set(a.z,
-0,-a.x).normalize(),this.quaternion.setFromAxisAngle(Ni,Math.acos(a.y)))};tb.prototype.setLength=function(a,b,c){void 0===b&&(b=.2*a);void 0===c&&(c=.2*b);this.line.scale.set(1,Math.max(1E-4,a-b),1);this.line.updateMatrix();this.cone.scale.set(c,b,c);this.cone.position.y=a;this.cone.updateMatrix()};tb.prototype.setColor=function(a){this.line.material.color.set(a);this.cone.material.color.set(a)};tb.prototype.copy=function(a){C.prototype.copy.call(this,a,!1);this.line.copy(a.line);this.cone.copy(a.cone);
-return this};tb.prototype.clone=function(){return(new this.constructor).copy(this)};ve.prototype=Object.create(T.prototype);ve.prototype.constructor=ve;E.create=function(a,b){console.log("THREE.Curve.create() has been deprecated");a.prototype=Object.create(E.prototype);a.prototype.constructor=a;a.prototype.getPoint=b;return a};Object.assign(rb.prototype,{createPointsGeometry:function(a){console.warn("THREE.CurvePath: .createPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");
-a=this.getPoints(a);return this.createGeometry(a)},createSpacedPointsGeometry:function(a){console.warn("THREE.CurvePath: .createSpacedPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");a=this.getSpacedPoints(a);return this.createGeometry(a)},createGeometry:function(a){console.warn("THREE.CurvePath: .createGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");for(var b=new G,c=0,d=a.length;c<d;c++){var e=a[c];b.vertices.push(new n(e.x,
-e.y,e.z||0))}return b}});Object.assign(Wa.prototype,{fromPoints:function(a){console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints().");this.setFromPoints(a)}});gi.prototype=Object.create(ya.prototype);hi.prototype=Object.create(ya.prototype);Kg.prototype=Object.create(ya.prototype);Object.assign(Kg.prototype,{initFromArray:function(){console.error("THREE.Spline: .initFromArray() has been removed.")},getControlPointsArray:function(){console.error("THREE.Spline: .getControlPointsArray() has been removed.")},
-reparametrizeByArcLength:function(){console.error("THREE.Spline: .reparametrizeByArcLength() has been removed.")}});mf.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")};fd.prototype.update=function(){console.error("THREE.SkeletonHelper: update() no longer needs to be called.")};Object.assign(Y.prototype,{extractUrlBase:function(a){console.warn("THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead.");
-return dh.extractUrlBase(a)}});Y.Handlers={add:function(){console.error("THREE.Loader: Handlers.add() has been removed. Use LoadingManager.addHandler() instead.")},get:function(){console.error("THREE.Loader: Handlers.get() has been removed. Use LoadingManager.getHandler() instead.")}};Object.assign(hf.prototype,{setTexturePath:function(a){console.warn("THREE.ObjectLoader: .setTexturePath() has been renamed to .setResourcePath().");return this.setResourcePath(a)}});Object.assign(Hg.prototype,{center:function(a){console.warn("THREE.Box2: .center() has been renamed to .getCenter().");
-return this.getCenter(a)},empty:function(){console.warn("THREE.Box2: .empty() has been renamed to .isEmpty().");return this.isEmpty()},isIntersectionBox:function(a){console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox().");return this.intersectsBox(a)},size:function(a){console.warn("THREE.Box2: .size() has been renamed to .getSize().");return this.getSize(a)}});Object.assign(ab.prototype,{center:function(a){console.warn("THREE.Box3: .center() has been renamed to .getCenter().");
-return this.getCenter(a)},empty:function(){console.warn("THREE.Box3: .empty() has been renamed to .isEmpty().");return this.isEmpty()},isIntersectionBox:function(a){console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox().");return this.intersectsBox(a)},isIntersectionSphere:function(a){console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere().");return this.intersectsSphere(a)},size:function(a){console.warn("THREE.Box3: .size() has been renamed to .getSize().");
-return this.getSize(a)}});Ig.prototype.center=function(a){console.warn("THREE.Line3: .center() has been renamed to .getCenter().");return this.getCenter(a)};Object.assign(N,{random16:function(){console.warn("THREE.Math: .random16() has been deprecated. Use Math.random() instead.");return Math.random()},nearestPowerOfTwo:function(a){console.warn("THREE.Math: .nearestPowerOfTwo() has been renamed to .floorPowerOfTwo().");return N.floorPowerOfTwo(a)},nextPowerOfTwo:function(a){console.warn("THREE.Math: .nextPowerOfTwo() has been renamed to .ceilPowerOfTwo().");
-return N.ceilPowerOfTwo(a)}});Object.assign(S.prototype,{flattenToArrayOffset:function(a,b){console.warn("THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead.");return this.toArray(a,b)},multiplyVector3:function(a){console.warn("THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead.");return a.applyMatrix3(this)},multiplyVector3Array:function(){console.error("THREE.Matrix3: .multiplyVector3Array() has been removed.")},applyToBuffer:function(a){console.warn("THREE.Matrix3: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead.");
-return this.applyToBufferAttribute(a)},applyToVector3Array:function(){console.error("THREE.Matrix3: .applyToVector3Array() has been removed.")}});Object.assign(M.prototype,{extractPosition:function(a){console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition().");return this.copyPosition(a)},flattenToArrayOffset:function(a,b){console.warn("THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead.");return this.toArray(a,b)},getPosition:function(){console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead.");
-return(new n).setFromMatrixColumn(this,3)},setRotationFromQuaternion:function(a){console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion().");return this.makeRotationFromQuaternion(a)},multiplyToArray:function(){console.warn("THREE.Matrix4: .multiplyToArray() has been removed.")},multiplyVector3:function(a){console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead.");return a.applyMatrix4(this)},multiplyVector4:function(a){console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead.");
+d=this._nActiveBindings,e=this._nActiveBindings=this._nActiveActions=0;e!==b;++e)a[e].reset();for(e=0;e!==d;++e)c[e].useCount=0;return this},update:function(a){a*=this.timeScale;for(var b=this._actions,c=this._nActiveActions,d=this.time+=a,e=Math.sign(a),f=this._accuIndex^=1,g=0;g!==c;++g)b[g]._update(d,a,e,f);a=this._bindings;b=this._nActiveBindings;for(g=0;g!==b;++g)a[g].apply(f);return this},setTime:function(a){for(var b=this.time=0;b<this._actions.length;b++)this._actions[b].time=0;return this.update(a)},
+getRoot:function(){return this._root},uncacheClip:function(a){var b=this._actions;a=a.uuid;var c=this._actionsByClip,d=c[a];if(void 0!==d){d=d.knownActions;for(var e=0,f=d.length;e!==f;++e){var g=d[e];this._deactivateAction(g);var h=g._cacheIndex,k=b[b.length-1];g._cacheIndex=null;g._byClipCacheIndex=null;k._cacheIndex=h;b[h]=k;b.pop();this._removeInactiveBindingsForAction(g)}delete c[a]}},uncacheRoot:function(a){a=a.uuid;var b=this._actionsByClip;for(d in b){var c=b[d].actionByRoot[a];void 0!==c&&
+(this._deactivateAction(c),this._removeInactiveAction(c))}var d=this._bindingsByRootAndName[a];if(void 0!==d)for(var e in d)a=d[e],a.restoreOriginalState(),this._removeInactiveBinding(a)},uncacheAction:function(a,b){a=this.existingAction(a,b);null!==a&&(this._deactivateAction(a),this._removeInactiveAction(a))}});lf.prototype.clone=function(){return new lf(void 0===this.value.clone?this.value:this.value.clone())};Fg.prototype=Object.assign(Object.create(Gb.prototype),{constructor:Fg,isInstancedInterleavedBuffer:!0,
+copy:function(a){Gb.prototype.copy.call(this,a);this.meshPerAttribute=a.meshPerAttribute;return this}});Object.assign(bi.prototype,{linePrecision:1,set:function(a,b){this.ray.set(a,b)},setFromCamera:function(a,b){b&&b.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(b.matrixWorld),this.ray.direction.set(a.x,a.y,.5).unproject(b).sub(this.ray.origin).normalize(),this.camera=b):b&&b.isOrthographicCamera?(this.ray.origin.set(a.x,a.y,(b.near+b.far)/(b.near-b.far)).unproject(b),this.ray.direction.set(0,
+0,-1).transformDirection(b.matrixWorld),this.camera=b):console.error("THREE.Raycaster: Unsupported camera type.")},intersectObject:function(a,b,c){c=c||[];Gg(a,this,c,b);c.sort(ci);return c},intersectObjects:function(a,b,c){c=c||[];if(!1===Array.isArray(a))return console.warn("THREE.Raycaster.intersectObjects: objects is not an Array."),c;for(var d=0,e=a.length;d<e;d++)Gg(a[d],this,c,b);c.sort(ci);return c}});Object.assign(di.prototype,{set:function(a,b,c){this.radius=a;this.phi=b;this.theta=c;return this},
+clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.radius=a.radius;this.phi=a.phi;this.theta=a.theta;return this},makeSafe:function(){this.phi=Math.max(1E-6,Math.min(Math.PI-1E-6,this.phi));return this},setFromVector3:function(a){return this.setFromCartesianCoords(a.x,a.y,a.z)},setFromCartesianCoords:function(a,b,c){this.radius=Math.sqrt(a*a+b*b+c*c);0===this.radius?this.phi=this.theta=0:(this.theta=Math.atan2(a,c),this.phi=Math.acos(N.clamp(b/this.radius,-1,1)));return this}});
+Object.assign(ei.prototype,{set:function(a,b,c){this.radius=a;this.theta=b;this.y=c;return this},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.radius=a.radius;this.theta=a.theta;this.y=a.y;return this},setFromVector3:function(a){return this.setFromCartesianCoords(a.x,a.y,a.z)},setFromCartesianCoords:function(a,b,c){this.radius=Math.sqrt(a*a+c*c);this.theta=Math.atan2(a,c);this.y=b;return this}});var Fi=new w;Object.assign(Hg.prototype,{set:function(a,b){this.min.copy(a);
+this.max.copy(b);return this},setFromPoints:function(a){this.makeEmpty();for(var b=0,c=a.length;b<c;b++)this.expandByPoint(a[b]);return this},setFromCenterAndSize:function(a,b){b=Fi.copy(b).multiplyScalar(.5);this.min.copy(a).sub(b);this.max.copy(a).add(b);return this},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.min.copy(a.min);this.max.copy(a.max);return this},makeEmpty:function(){this.min.x=this.min.y=Infinity;this.max.x=this.max.y=-Infinity;return this},isEmpty:function(){return this.max.x<
+this.min.x||this.max.y<this.min.y},getCenter:function(a){void 0===a&&(console.warn("THREE.Box2: .getCenter() target is now required"),a=new w);return this.isEmpty()?a.set(0,0):a.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(a){void 0===a&&(console.warn("THREE.Box2: .getSize() target is now required"),a=new w);return this.isEmpty()?a.set(0,0):a.subVectors(this.max,this.min)},expandByPoint:function(a){this.min.min(a);this.max.max(a);return this},expandByVector:function(a){this.min.sub(a);
+this.max.add(a);return this},expandByScalar:function(a){this.min.addScalar(-a);this.max.addScalar(a);return this},containsPoint:function(a){return a.x<this.min.x||a.x>this.max.x||a.y<this.min.y||a.y>this.max.y?!1:!0},containsBox:function(a){return this.min.x<=a.min.x&&a.max.x<=this.max.x&&this.min.y<=a.min.y&&a.max.y<=this.max.y},getParameter:function(a,b){void 0===b&&(console.warn("THREE.Box2: .getParameter() target is now required"),b=new w);return b.set((a.x-this.min.x)/(this.max.x-this.min.x),
+(a.y-this.min.y)/(this.max.y-this.min.y))},intersectsBox:function(a){return a.max.x<this.min.x||a.min.x>this.max.x||a.max.y<this.min.y||a.min.y>this.max.y?!1:!0},clampPoint:function(a,b){void 0===b&&(console.warn("THREE.Box2: .clampPoint() target is now required"),b=new w);return b.copy(a).clamp(this.min,this.max)},distanceToPoint:function(a){return Fi.copy(a).clamp(this.min,this.max).sub(a).length()},intersect:function(a){this.min.max(a.min);this.max.min(a.max);return this},union:function(a){this.min.min(a.min);
+this.max.max(a.max);return this},translate:function(a){this.min.add(a);this.max.add(a);return this},equals:function(a){return a.min.equals(this.min)&&a.max.equals(this.max)}});var Gi=new n,Jf=new n;Object.assign(Ig.prototype,{set:function(a,b){this.start.copy(a);this.end.copy(b);return this},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.start.copy(a.start);this.end.copy(a.end);return this},getCenter:function(a){void 0===a&&(console.warn("THREE.Line3: .getCenter() target is now required"),
+a=new n);return a.addVectors(this.start,this.end).multiplyScalar(.5)},delta:function(a){void 0===a&&(console.warn("THREE.Line3: .delta() target is now required"),a=new n);return a.subVectors(this.end,this.start)},distanceSq:function(){return this.start.distanceToSquared(this.end)},distance:function(){return this.start.distanceTo(this.end)},at:function(a,b){void 0===b&&(console.warn("THREE.Line3: .at() target is now required"),b=new n);return this.delta(b).multiplyScalar(a).add(this.start)},closestPointToPointParameter:function(a,
+b){Gi.subVectors(a,this.start);Jf.subVectors(this.end,this.start);a=Jf.dot(Jf);a=Jf.dot(Gi)/a;b&&(a=N.clamp(a,0,1));return a},closestPointToPoint:function(a,b,c){a=this.closestPointToPointParameter(a,b);void 0===c&&(console.warn("THREE.Line3: .closestPointToPoint() target is now required"),c=new n);return this.delta(c).multiplyScalar(a).add(this.start)},applyMatrix4:function(a){this.start.applyMatrix4(a);this.end.applyMatrix4(a);return this},equals:function(a){return a.start.equals(this.start)&&a.end.equals(this.end)}});
+pe.prototype=Object.create(C.prototype);pe.prototype.constructor=pe;pe.prototype.isImmediateRenderObject=!0;var mb=new n,zb=new n,fh=new ca,Ok=["a","b","c"];qe.prototype=Object.create(T.prototype);qe.prototype.constructor=qe;qe.prototype.update=function(){this.object.updateMatrixWorld(!0);fh.getNormalMatrix(this.object.matrixWorld);var a=this.object.matrixWorld,b=this.geometry.attributes.position,c=this.object.geometry;if(c&&c.isGeometry)for(var d=c.vertices,e=c.faces,f=c=0,g=e.length;f<g;f++)for(var h=
+e[f],k=0,m=h.vertexNormals.length;k<m;k++){var n=h.vertexNormals[k];mb.copy(d[h[Ok[k]]]).applyMatrix4(a);zb.copy(n).applyMatrix3(fh).normalize().multiplyScalar(this.size).add(mb);b.setXYZ(c,mb.x,mb.y,mb.z);c+=1;b.setXYZ(c,zb.x,zb.y,zb.z);c+=1}else if(c&&c.isBufferGeometry)for(d=c.attributes.position,e=c.attributes.normal,k=c=0,m=d.count;k<m;k++)mb.set(d.getX(k),d.getY(k),d.getZ(k)).applyMatrix4(a),zb.set(e.getX(k),e.getY(k),e.getZ(k)),zb.applyMatrix3(fh).normalize().multiplyScalar(this.size).add(mb),
+b.setXYZ(c,mb.x,mb.y,mb.z),c+=1,b.setXYZ(c,zb.x,zb.y,zb.z),c+=1;b.needsUpdate=!0};var Hi=new n;ed.prototype=Object.create(C.prototype);ed.prototype.constructor=ed;ed.prototype.dispose=function(){this.cone.geometry.dispose();this.cone.material.dispose()};ed.prototype.update=function(){this.light.updateMatrixWorld();var a=this.light.distance?this.light.distance:1E3,b=a*Math.tan(this.light.angle);this.cone.scale.set(b,b,a);Hi.setFromMatrixPosition(this.light.target.matrixWorld);this.cone.lookAt(Hi);
+void 0!==this.color?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)};var Pb=new n,Kf=new M,gh=new M;fd.prototype=Object.create(T.prototype);fd.prototype.constructor=fd;fd.prototype.updateMatrixWorld=function(a){var b=this.bones,c=this.geometry,d=c.getAttribute("position");gh.getInverse(this.root.matrixWorld);for(var e=0,f=0;e<b.length;e++){var g=b[e];g.parent&&g.parent.isBone&&(Kf.multiplyMatrices(gh,g.matrixWorld),Pb.setFromMatrixPosition(Kf),d.setXYZ(f,Pb.x,
+Pb.y,Pb.z),Kf.multiplyMatrices(gh,g.parent.matrixWorld),Pb.setFromMatrixPosition(Kf),d.setXYZ(f+1,Pb.x,Pb.y,Pb.z),f+=2)}c.getAttribute("position").needsUpdate=!0;C.prototype.updateMatrixWorld.call(this,a)};gd.prototype=Object.create(R.prototype);gd.prototype.constructor=gd;gd.prototype.dispose=function(){this.geometry.dispose();this.material.dispose()};gd.prototype.update=function(){void 0!==this.color?this.material.color.set(this.color):this.material.color.copy(this.light.color)};hd.prototype=Object.create(wa.prototype);
+hd.prototype.constructor=hd;hd.prototype.update=function(){this.scale.set(.5*this.light.width,.5*this.light.height,1);if(void 0!==this.color)this.material.color.set(this.color),this.children[0].material.color.set(this.color);else{this.material.color.copy(this.light.color).multiplyScalar(this.light.intensity);var a=this.material.color,b=Math.max(a.r,a.g,a.b);1<b&&a.multiplyScalar(1/b);this.children[0].material.color.copy(this.material.color)}};hd.prototype.dispose=function(){this.geometry.dispose();
+this.material.dispose();this.children[0].geometry.dispose();this.children[0].material.dispose()};var Pk=new n,Ii=new I,Ji=new I;id.prototype=Object.create(C.prototype);id.prototype.constructor=id;id.prototype.dispose=function(){this.children[0].geometry.dispose();this.children[0].material.dispose()};id.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");Ii.copy(this.light.color);Ji.copy(this.light.groundColor);
+for(var c=0,d=b.count;c<d;c++){var e=c<d/2?Ii:Ji;b.setXYZ(c,e.r,e.g,e.b)}b.needsUpdate=!0}a.lookAt(Pk.setFromMatrixPosition(this.light.matrixWorld).negate())};jd.prototype=Object.create(R.prototype);jd.prototype.constructor=jd;jd.prototype.dispose=function(){this.geometry.dispose();this.material.dispose()};jd.prototype.onBeforeRender=function(){this.position.copy(this.lightProbe.position);this.scale.set(1,1,1).multiplyScalar(this.size);this.material.uniforms.intensity.value=this.lightProbe.intensity};
+mf.prototype=Object.assign(Object.create(T.prototype),{constructor:mf,copy:function(a){T.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)}});nf.prototype=Object.create(T.prototype);nf.prototype.constructor=nf;kd.prototype=Object.create(wa.prototype);kd.prototype.constructor=kd;kd.prototype.update=function(){function a(a,b,d,e){d=(b-a)/d;r.setXYZ(k,0,0,0);m++;for(n=a;n<b;n+=d)u=k+m,r.setXYZ(u,
+Math.sin(n)*c,0,Math.cos(n)*c),r.setXYZ(u+1,Math.sin(Math.min(n+d,b))*c,0,Math.cos(Math.min(n+d,b))*c),r.setXYZ(u+2,0,0,0),m+=3;t.addGroup(k,m,e);k+=m;m=0}var b=this.audio,c=this.range,d=this.divisionsInnerAngle,e=this.divisionsOuterAngle,f=N.degToRad(b.panner.coneInnerAngle);b=N.degToRad(b.panner.coneOuterAngle);var g=f/2,h=b/2,k=0,m=0,n,u,t=this.geometry,r=t.attributes.position;t.clearGroups();a(-h,-g,e,0);a(-g,g,d,1);a(g,h,e,0);r.needsUpdate=!0;f===b&&(this.material[0].visible=!1)};kd.prototype.dispose=
+function(){this.geometry.dispose();this.material[0].dispose();this.material[1].dispose()};var De=new n,Lf=new n,Ki=new ca;re.prototype=Object.create(T.prototype);re.prototype.constructor=re;re.prototype.update=function(){this.object.updateMatrixWorld(!0);Ki.getNormalMatrix(this.object.matrixWorld);var a=this.object.matrixWorld,b=this.geometry.attributes.position,c=this.object.geometry,d=c.vertices;c=c.faces;for(var e=0,f=0,g=c.length;f<g;f++){var h=c[f],k=h.normal;De.copy(d[h.a]).add(d[h.b]).add(d[h.c]).divideScalar(3).applyMatrix4(a);
+Lf.copy(k).applyMatrix3(Ki).normalize().multiplyScalar(this.size).add(De);b.setXYZ(e,De.x,De.y,De.z);e+=1;b.setXYZ(e,Lf.x,Lf.y,Lf.z);e+=1}b.needsUpdate=!0};var Li=new n,Mf=new n,Mi=new n;ld.prototype=Object.create(C.prototype);ld.prototype.constructor=ld;ld.prototype.dispose=function(){this.lightPlane.geometry.dispose();this.lightPlane.material.dispose();this.targetLine.geometry.dispose();this.targetLine.material.dispose()};ld.prototype.update=function(){Li.setFromMatrixPosition(this.light.matrixWorld);
+Mf.setFromMatrixPosition(this.light.target.matrixWorld);Mi.subVectors(Mf,Li);this.lightPlane.lookAt(Mf);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(Mf);this.targetLine.scale.z=Mi.length()};var of=new n,S=new bb;se.prototype=Object.create(T.prototype);se.prototype.constructor=se;se.prototype.update=
+function(){var a=this.geometry,b=this.pointMap;S.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse);na("c",b,a,S,0,0,-1);na("t",b,a,S,0,0,1);na("n1",b,a,S,-1,-1,-1);na("n2",b,a,S,1,-1,-1);na("n3",b,a,S,-1,1,-1);na("n4",b,a,S,1,1,-1);na("f1",b,a,S,-1,-1,1);na("f2",b,a,S,1,-1,1);na("f3",b,a,S,-1,1,1);na("f4",b,a,S,1,1,1);na("u1",b,a,S,.7,1.1,-1);na("u2",b,a,S,-.7,1.1,-1);na("u3",b,a,S,0,2,-1);na("cf1",b,a,S,-1,0,1);na("cf2",b,a,S,1,0,1);na("cf3",b,a,S,0,-1,1);na("cf4",b,a,S,0,1,1);na("cn1",
+b,a,S,-1,0,-1);na("cn2",b,a,S,1,0,-1);na("cn3",b,a,S,0,-1,-1);na("cn4",b,a,S,0,1,-1);a.getAttribute("position").needsUpdate=!0};var Nf=new ab;sb.prototype=Object.create(T.prototype);sb.prototype.constructor=sb;sb.prototype.update=function(a){void 0!==a&&console.warn("THREE.BoxHelper: .update() has no longer arguments.");void 0!==this.object&&Nf.setFromObject(this.object);if(!Nf.isEmpty()){a=Nf.min;var b=Nf.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()}};sb.prototype.setFromObject=function(a){this.object=a;this.update();return this};sb.prototype.copy=function(a){T.prototype.copy.call(this,a);this.object=a.object;return this};sb.prototype.clone=function(){return(new this.constructor).copy(this)};te.prototype=
+Object.create(T.prototype);te.prototype.constructor=te;te.prototype.updateMatrixWorld=function(a){var b=this.box;b.isEmpty()||(b.getCenter(this.position),b.getSize(this.scale),this.scale.multiplyScalar(.5),C.prototype.updateMatrixWorld.call(this,a))};ue.prototype=Object.create(wa.prototype);ue.prototype.constructor=ue;ue.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);
+C.prototype.updateMatrixWorld.call(this,a)};var Ni=new n,pf,Jg;tb.prototype=Object.create(C.prototype);tb.prototype.constructor=tb;tb.prototype.setDirection=function(a){.99999<a.y?this.quaternion.set(0,0,0,1):-.99999>a.y?this.quaternion.set(1,0,0,0):(Ni.set(a.z,0,-a.x).normalize(),this.quaternion.setFromAxisAngle(Ni,Math.acos(a.y)))};tb.prototype.setLength=function(a,b,c){void 0===b&&(b=.2*a);void 0===c&&(c=.2*b);this.line.scale.set(1,Math.max(1E-4,a-b),1);this.line.updateMatrix();this.cone.scale.set(c,
+b,c);this.cone.position.y=a;this.cone.updateMatrix()};tb.prototype.setColor=function(a){this.line.material.color.set(a);this.cone.material.color.set(a)};tb.prototype.copy=function(a){C.prototype.copy.call(this,a,!1);this.line.copy(a.line);this.cone.copy(a.cone);return this};tb.prototype.clone=function(){return(new this.constructor).copy(this)};ve.prototype=Object.create(T.prototype);ve.prototype.constructor=ve;E.create=function(a,b){console.log("THREE.Curve.create() has been deprecated");a.prototype=
+Object.create(E.prototype);a.prototype.constructor=a;a.prototype.getPoint=b;return a};Object.assign(rb.prototype,{createPointsGeometry:function(a){console.warn("THREE.CurvePath: .createPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");a=this.getPoints(a);return this.createGeometry(a)},createSpacedPointsGeometry:function(a){console.warn("THREE.CurvePath: .createSpacedPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");
+a=this.getSpacedPoints(a);return this.createGeometry(a)},createGeometry:function(a){console.warn("THREE.CurvePath: .createGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");for(var b=new G,c=0,d=a.length;c<d;c++){var e=a[c];b.vertices.push(new n(e.x,e.y,e.z||0))}return b}});Object.assign(Wa.prototype,{fromPoints:function(a){console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints().");this.setFromPoints(a)}});gi.prototype=Object.create(ya.prototype);
+hi.prototype=Object.create(ya.prototype);Kg.prototype=Object.create(ya.prototype);Object.assign(Kg.prototype,{initFromArray:function(){console.error("THREE.Spline: .initFromArray() has been removed.")},getControlPointsArray:function(){console.error("THREE.Spline: .getControlPointsArray() has been removed.")},reparametrizeByArcLength:function(){console.error("THREE.Spline: .reparametrizeByArcLength() has been removed.")}});mf.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")};
+fd.prototype.update=function(){console.error("THREE.SkeletonHelper: update() no longer needs to be called.")};Object.assign(Y.prototype,{extractUrlBase:function(a){console.warn("THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead.");return dh.extractUrlBase(a)}});Y.Handlers={add:function(){console.error("THREE.Loader: Handlers.add() has been removed. Use LoadingManager.addHandler() instead.")},get:function(){console.error("THREE.Loader: Handlers.get() has been removed. Use LoadingManager.getHandler() instead.")}};
+Object.assign(hf.prototype,{setTexturePath:function(a){console.warn("THREE.ObjectLoader: .setTexturePath() has been renamed to .setResourcePath().");return this.setResourcePath(a)}});Object.assign(Hg.prototype,{center:function(a){console.warn("THREE.Box2: .center() has been renamed to .getCenter().");return this.getCenter(a)},empty:function(){console.warn("THREE.Box2: .empty() has been renamed to .isEmpty().");return this.isEmpty()},isIntersectionBox:function(a){console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox().");
+return this.intersectsBox(a)},size:function(a){console.warn("THREE.Box2: .size() has been renamed to .getSize().");return this.getSize(a)}});Object.assign(ab.prototype,{center:function(a){console.warn("THREE.Box3: .center() has been renamed to .getCenter().");return this.getCenter(a)},empty:function(){console.warn("THREE.Box3: .empty() has been renamed to .isEmpty().");return this.isEmpty()},isIntersectionBox:function(a){console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox().");
+return this.intersectsBox(a)},isIntersectionSphere:function(a){console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere().");return this.intersectsSphere(a)},size:function(a){console.warn("THREE.Box3: .size() has been renamed to .getSize().");return this.getSize(a)}});Ig.prototype.center=function(a){console.warn("THREE.Line3: .center() has been renamed to .getCenter().");return this.getCenter(a)};Object.assign(N,{random16:function(){console.warn("THREE.Math: .random16() has been deprecated. Use Math.random() instead.");
+return Math.random()},nearestPowerOfTwo:function(a){console.warn("THREE.Math: .nearestPowerOfTwo() has been renamed to .floorPowerOfTwo().");return N.floorPowerOfTwo(a)},nextPowerOfTwo:function(a){console.warn("THREE.Math: .nextPowerOfTwo() has been renamed to .ceilPowerOfTwo().");return N.ceilPowerOfTwo(a)}});Object.assign(ca.prototype,{flattenToArrayOffset:function(a,b){console.warn("THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead.");return this.toArray(a,b)},
+multiplyVector3:function(a){console.warn("THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead.");return a.applyMatrix3(this)},multiplyVector3Array:function(){console.error("THREE.Matrix3: .multiplyVector3Array() has been removed.")},applyToBuffer:function(a){console.warn("THREE.Matrix3: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead.");return this.applyToBufferAttribute(a)},applyToVector3Array:function(){console.error("THREE.Matrix3: .applyToVector3Array() has been removed.")}});
+Object.assign(M.prototype,{extractPosition:function(a){console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition().");return this.copyPosition(a)},flattenToArrayOffset:function(a,b){console.warn("THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead.");return this.toArray(a,b)},getPosition:function(){console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead.");return(new n).setFromMatrixColumn(this,
+3)},setRotationFromQuaternion:function(a){console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion().");return this.makeRotationFromQuaternion(a)},multiplyToArray:function(){console.warn("THREE.Matrix4: .multiplyToArray() has been removed.")},multiplyVector3:function(a){console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead.");return a.applyMatrix4(this)},multiplyVector4:function(a){console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead.");
 return a.applyMatrix4(this)},multiplyVector3Array:function(){console.error("THREE.Matrix4: .multiplyVector3Array() has been removed.")},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.")},
 return a.applyMatrix4(this)},multiplyVector3Array:function(){console.error("THREE.Matrix4: .multiplyVector3Array() has been removed.")},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.")},applyToBuffer:function(a){console.warn("THREE.Matrix4: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead.");return this.applyToBufferAttribute(a)},
 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.")},applyToBuffer:function(a){console.warn("THREE.Matrix4: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead.");return this.applyToBufferAttribute(a)},
 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)}});cb.prototype.isIntersectionLine=function(a){console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine().");return this.intersectsLine(a)};sa.prototype.multiplyVector3=
 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)}});cb.prototype.isIntersectionLine=function(a){console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine().");return this.intersectsLine(a)};sa.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(Sb.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().");
 function(a){console.warn("THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead.");return a.applyQuaternion(this)};Object.assign(Sb.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(aa.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(aa,{barycoordFromPoint:function(a,b,c,d,e){console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord().");return aa.getBarycoord(a,b,c,d,e)},normal:function(a,b,c,d){console.warn("THREE.Triangle: .normal() has been renamed to .getNormal().");return aa.getNormal(a,b,c,d)}});Object.assign(Jb.prototype,{extractAllPoints:function(a){console.warn("THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead.");
+return this.intersectsSphere(a)}});Object.assign(ba.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(ba,{barycoordFromPoint:function(a,b,c,d,e){console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord().");return ba.getBarycoord(a,b,c,d,e)},normal:function(a,b,c,d){console.warn("THREE.Triangle: .normal() has been renamed to .getNormal().");return ba.getNormal(a,b,c,d)}});Object.assign(Jb.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 fc(this,a)},makeGeometry:function(a){console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead.");return new gc(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.extractPoints(a)},extrude:function(a){console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead.");return new fc(this,a)},makeGeometry:function(a){console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead.");return new gc(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.")},
 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,
 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().");
 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(ca.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(G.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.")}});
+return this.manhattanLength()}});Object.assign(da.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(G.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.")}});
 Object.assign(C.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.")}});
 Object.assign(C.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.")}});
 Object.defineProperties(C.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.defineProperties(C.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.defineProperties(Nd.prototype,{objects:{get:function(){console.warn("THREE.LOD: .objects has been renamed to .levels.");return this.levels}}});Object.defineProperty(Le.prototype,"useVertexTexture",{get:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")},set:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")}});Od.prototype.initBones=function(){console.error("THREE.SkinnedMesh: initBones() has been removed.")};Object.defineProperty(E.prototype,
 Object.defineProperties(Nd.prototype,{objects:{get:function(){console.warn("THREE.LOD: .objects has been renamed to .levels.");return this.levels}}});Object.defineProperty(Le.prototype,"useVertexTexture",{get:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")},set:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")}});Od.prototype.initBones=function(){console.error("THREE.SkinnedMesh: initBones() has been removed.")};Object.defineProperty(E.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}});ja.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(da.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}});ja.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(aa.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.");
 {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.")}},
 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(O.prototype,
 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(O.prototype,
@@ -988,8 +989,8 @@ return new A(a,b)};k.Float32BufferAttribute=A;k.Float64Attribute=function(a,b){c
 if(b.isMesh){b.matrixAutoUpdate&&b.updateMatrix();var d=b.matrix;b=b.geometry}a.merge(b,d,c)},center:function(a){console.warn("THREE.GeometryUtils: .center() has been moved to Geometry. Use geometry.center() instead.");return a.center()}};k.GreaterDepth=6;k.GreaterEqualDepth=5;k.GreaterEqualStencilFunc=518;k.GreaterStencilFunc=516;k.GridHelper=mf;k.Group=Hc;k.HalfFloatType=1016;k.HemisphereLight=We;k.HemisphereLightHelper=id;k.HemisphereLightProbe=wg;k.IcosahedronBufferGeometry=Pc;k.IcosahedronGeometry=
 if(b.isMesh){b.matrixAutoUpdate&&b.updateMatrix();var d=b.matrix;b=b.geometry}a.merge(b,d,c)},center:function(a){console.warn("THREE.GeometryUtils: .center() has been moved to Geometry. Use geometry.center() instead.");return a.center()}};k.GreaterDepth=6;k.GreaterEqualDepth=5;k.GreaterEqualStencilFunc=518;k.GreaterStencilFunc=516;k.GridHelper=mf;k.Group=Hc;k.HalfFloatType=1016;k.HemisphereLight=We;k.HemisphereLightHelper=id;k.HemisphereLightProbe=wg;k.IcosahedronBufferGeometry=Pc;k.IcosahedronGeometry=
 Vd;k.ImageBitmapLoader=sg;k.ImageLoader=bd;k.ImageUtils=Kb;k.ImmediateRenderObject=pe;k.IncrementStencilOp=7682;k.IncrementWrapStencilOp=34055;k.InstancedBufferAttribute=ff;k.InstancedBufferGeometry=ef;k.InstancedInterleavedBuffer=Fg;k.Int16Attribute=function(a,b){console.warn("THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead.");return new Ad(a,b)};k.Int16BufferAttribute=Ad;k.Int32Attribute=function(a,b){console.warn("THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead.");
 Vd;k.ImageBitmapLoader=sg;k.ImageLoader=bd;k.ImageUtils=Kb;k.ImmediateRenderObject=pe;k.IncrementStencilOp=7682;k.IncrementWrapStencilOp=34055;k.InstancedBufferAttribute=ff;k.InstancedBufferGeometry=ef;k.InstancedInterleavedBuffer=Fg;k.Int16Attribute=function(a,b){console.warn("THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead.");return new Ad(a,b)};k.Int16BufferAttribute=Ad;k.Int32Attribute=function(a,b){console.warn("THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead.");
 return new Bd(a,b)};k.Int32BufferAttribute=Bd;k.Int8Attribute=function(a,b){console.warn("THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead.");return new xd(a,b)};k.Int8BufferAttribute=xd;k.IntType=1013;k.InterleavedBuffer=Gb;k.InterleavedBufferAttribute=Kd;k.Interpolant=Ia;k.InterpolateDiscrete=2300;k.InterpolateLinear=2301;k.InterpolateSmooth=2302;k.InvertStencilOp=5386;k.JSONLoader=function(){console.error("THREE.JSONLoader has been removed.")};k.KeepStencilOp=7680;
 return new Bd(a,b)};k.Int32BufferAttribute=Bd;k.Int8Attribute=function(a,b){console.warn("THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead.");return new xd(a,b)};k.Int8BufferAttribute=xd;k.IntType=1013;k.InterleavedBuffer=Gb;k.InterleavedBufferAttribute=Kd;k.Interpolant=Ia;k.InterpolateDiscrete=2300;k.InterpolateLinear=2301;k.InterpolateSmooth=2302;k.InvertStencilOp=5386;k.JSONLoader=function(){console.error("THREE.JSONLoader has been removed.")};k.KeepStencilOp=7680;
-k.KeyframeTrack=ma;k.LOD=Nd;k.LatheBufferGeometry=Wc;k.LatheGeometry=ge;k.Layers=Pf;k.LensFlare=function(){console.error("THREE.LensFlare has been moved to /examples/js/objects/Lensflare.js")};k.LessDepth=2;k.LessEqualDepth=3;k.LessEqualStencilFunc=515;k.LessStencilFunc=513;k.Light=da;k.LightProbe=Xa;k.LightProbeHelper=jd;k.LightShadow=ib;k.Line=wa;k.Line3=Ig;k.LineBasicMaterial=U;k.LineCurve=za;k.LineCurve3=Ta;k.LineDashedMaterial=pc;k.LineLoop=Me;k.LinePieces=1;k.LineSegments=T;k.LineStrip=0;k.LinearEncoding=
-3E3;k.LinearFilter=1006;k.LinearInterpolant=ke;k.LinearMipMapLinearFilter=1008;k.LinearMipMapNearestFilter=1007;k.LinearMipmapLinearFilter=1008;k.LinearMipmapNearestFilter=1007;k.LinearToneMapping=1;k.Loader=Y;k.LoaderUtils=dh;k.LoadingManager=ng;k.LogLuvEncoding=3003;k.LoopOnce=2200;k.LoopPingPong=2202;k.LoopRepeat=2201;k.LuminanceAlphaFormat=1025;k.LuminanceFormat=1024;k.MOUSE={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2};k.Material=Q;k.MaterialLoader=df;k.Math=N;k.Matrix3=S;k.Matrix4=M;k.MaxEquation=
+k.KeyframeTrack=ma;k.LOD=Nd;k.LatheBufferGeometry=Wc;k.LatheGeometry=ge;k.Layers=Pf;k.LensFlare=function(){console.error("THREE.LensFlare has been moved to /examples/js/objects/Lensflare.js")};k.LessDepth=2;k.LessEqualDepth=3;k.LessEqualStencilFunc=515;k.LessStencilFunc=513;k.Light=aa;k.LightProbe=Xa;k.LightProbeHelper=jd;k.LightShadow=ib;k.Line=wa;k.Line3=Ig;k.LineBasicMaterial=U;k.LineCurve=za;k.LineCurve3=Ta;k.LineDashedMaterial=pc;k.LineLoop=Me;k.LinePieces=1;k.LineSegments=T;k.LineStrip=0;k.LinearEncoding=
+3E3;k.LinearFilter=1006;k.LinearInterpolant=ke;k.LinearMipMapLinearFilter=1008;k.LinearMipMapNearestFilter=1007;k.LinearMipmapLinearFilter=1008;k.LinearMipmapNearestFilter=1007;k.LinearToneMapping=1;k.Loader=Y;k.LoaderUtils=dh;k.LoadingManager=ng;k.LogLuvEncoding=3003;k.LoopOnce=2200;k.LoopPingPong=2202;k.LoopRepeat=2201;k.LuminanceAlphaFormat=1025;k.LuminanceFormat=1024;k.MOUSE={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2};k.Material=Q;k.MaterialLoader=df;k.Math=N;k.Matrix3=ca;k.Matrix4=M;k.MaxEquation=
 104;k.Mesh=R;k.MeshBasicMaterial=Ga;k.MeshDepthMaterial=Db;k.MeshDistanceMaterial=Eb;k.MeshFaceMaterial=function(a){console.warn("THREE.MeshFaceMaterial has been removed. Use an Array instead.");return a};k.MeshLambertMaterial=nc;k.MeshMatcapMaterial=oc;k.MeshNormalMaterial=mc;k.MeshPhongMaterial=Ra;k.MeshPhysicalMaterial=kc;k.MeshStandardMaterial=fb;k.MeshToonMaterial=lc;k.MinEquation=103;k.MirroredRepeatWrapping=1002;k.MixOperation=1;k.MultiMaterial=function(a){void 0===a&&(a=[]);console.warn("THREE.MultiMaterial has been removed. Use an Array instead.");
 104;k.Mesh=R;k.MeshBasicMaterial=Ga;k.MeshDepthMaterial=Db;k.MeshDistanceMaterial=Eb;k.MeshFaceMaterial=function(a){console.warn("THREE.MeshFaceMaterial has been removed. Use an Array instead.");return a};k.MeshLambertMaterial=nc;k.MeshMatcapMaterial=oc;k.MeshNormalMaterial=mc;k.MeshPhongMaterial=Ra;k.MeshPhysicalMaterial=kc;k.MeshStandardMaterial=fb;k.MeshToonMaterial=lc;k.MinEquation=103;k.MirroredRepeatWrapping=1002;k.MixOperation=1;k.MultiMaterial=function(a){void 0===a&&(a=[]);console.warn("THREE.MultiMaterial has been removed. Use an Array instead.");
 a.isMultiMaterial=!0;a.materials=a;a.clone=function(){return a.slice()};return a};k.MultiplyBlending=4;k.MultiplyOperation=0;k.NearestFilter=1003;k.NearestMipMapLinearFilter=1005;k.NearestMipMapNearestFilter=1004;k.NearestMipmapLinearFilter=1005;k.NearestMipmapNearestFilter=1004;k.NeverDepth=0;k.NeverStencilFunc=512;k.NoBlending=0;k.NoColors=0;k.NoToneMapping=0;k.NormalBlending=1;k.NotEqualDepth=7;k.NotEqualStencilFunc=517;k.NumberKeyframeTrack=$c;k.Object3D=C;k.ObjectLoader=hf;k.ObjectSpaceNormalMap=
 a.isMultiMaterial=!0;a.materials=a;a.clone=function(){return a.slice()};return a};k.MultiplyBlending=4;k.MultiplyOperation=0;k.NearestFilter=1003;k.NearestMipMapLinearFilter=1005;k.NearestMipMapNearestFilter=1004;k.NearestMipmapLinearFilter=1005;k.NearestMipmapNearestFilter=1004;k.NeverDepth=0;k.NeverStencilFunc=512;k.NoBlending=0;k.NoColors=0;k.NoToneMapping=0;k.NormalBlending=1;k.NotEqualDepth=7;k.NotEqualStencilFunc=517;k.NumberKeyframeTrack=$c;k.Object3D=C;k.ObjectLoader=hf;k.ObjectSpaceNormalMap=
 1;k.OctahedronBufferGeometry=cc;k.OctahedronGeometry=Ud;k.OneFactor=201;k.OneMinusDstAlphaFactor=207;k.OneMinusDstColorFactor=209;k.OneMinusSrcAlphaFactor=205;k.OneMinusSrcColorFactor=203;k.OrthographicCamera=oe;k.PCFShadowMap=1;k.PCFSoftShadowMap=2;k.ParametricBufferGeometry=Nc;k.ParametricGeometry=Rd;k.Particle=function(a){console.warn("THREE.Particle has been renamed to THREE.Sprite.");return new Ld(a)};k.ParticleBasicMaterial=function(a){console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial.");
 1;k.OctahedronBufferGeometry=cc;k.OctahedronGeometry=Ud;k.OneFactor=201;k.OneMinusDstAlphaFactor=207;k.OneMinusDstColorFactor=209;k.OneMinusSrcAlphaFactor=205;k.OneMinusSrcColorFactor=203;k.OrthographicCamera=oe;k.PCFShadowMap=1;k.PCFSoftShadowMap=2;k.ParametricBufferGeometry=Nc;k.ParametricGeometry=Rd;k.Particle=function(a){console.warn("THREE.Particle has been renamed to THREE.Sprite.");return new Ld(a)};k.ParticleBasicMaterial=function(a){console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial.");
@@ -999,8 +1000,8 @@ k.PointCloudMaterial=function(a){console.warn("THREE.PointCloudMaterial has been
 35842;k.RGBA_S3TC_DXT1_Format=33777;k.RGBA_S3TC_DXT3_Format=33778;k.RGBA_S3TC_DXT5_Format=33779;k.RGBDEncoding=3006;k.RGBEEncoding=3002;k.RGBEFormat=1023;k.RGBFormat=1022;k.RGBM16Encoding=3005;k.RGBM7Encoding=3004;k.RGB_ETC1_Format=36196;k.RGB_PVRTC_2BPPV1_Format=35841;k.RGB_PVRTC_4BPPV1_Format=35840;k.RGB_S3TC_DXT1_Format=33776;k.RawShaderMaterial=Zc;k.Ray=Sb;k.Raycaster=bi;k.RectAreaLight=cf;k.RectAreaLightHelper=hd;k.RedFormat=1028;k.ReinhardToneMapping=2;k.RepeatWrapping=1E3;k.ReplaceStencilOp=
 35842;k.RGBA_S3TC_DXT1_Format=33777;k.RGBA_S3TC_DXT3_Format=33778;k.RGBA_S3TC_DXT5_Format=33779;k.RGBDEncoding=3006;k.RGBEEncoding=3002;k.RGBEFormat=1023;k.RGBFormat=1022;k.RGBM16Encoding=3005;k.RGBM7Encoding=3004;k.RGB_ETC1_Format=36196;k.RGB_PVRTC_2BPPV1_Format=35841;k.RGB_PVRTC_4BPPV1_Format=35840;k.RGB_S3TC_DXT1_Format=33776;k.RawShaderMaterial=Zc;k.Ray=Sb;k.Raycaster=bi;k.RectAreaLight=cf;k.RectAreaLightHelper=hd;k.RedFormat=1028;k.ReinhardToneMapping=2;k.RepeatWrapping=1E3;k.ReplaceStencilOp=
 7681;k.ReverseSubtractEquation=102;k.RingBufferGeometry=Vc;k.RingGeometry=fe;k.Scene=wd;k.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")}};k.ShaderChunk=P;k.ShaderLib=db;k.ShaderMaterial=la;k.ShadowMaterial=
 7681;k.ReverseSubtractEquation=102;k.RingBufferGeometry=Vc;k.RingGeometry=fe;k.Scene=wd;k.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")}};k.ShaderChunk=P;k.ShaderLib=db;k.ShaderMaterial=la;k.ShadowMaterial=
 jc;k.Shape=Jb;k.ShapeBufferGeometry=hc;k.ShapeGeometry=gc;k.ShapePath=tg;k.ShapeUtils=pb;k.ShortType=1011;k.Skeleton=Le;k.SkeletonHelper=fd;k.SkinnedMesh=Od;k.SmoothShading=2;k.Sphere=nb;k.SphereBufferGeometry=Ib;k.SphereGeometry=ee;k.Spherical=di;k.SphericalHarmonics3=kf;k.SphericalReflectionMapping=305;k.Spline=Kg;k.SplineCurve=Va;k.SplineCurve3=hi;k.SpotLight=Ye;k.SpotLightHelper=ed;k.SpotLightShadow=Xe;k.Sprite=Ld;k.SpriteMaterial=Hb;k.SrcAlphaFactor=204;k.SrcAlphaSaturateFactor=210;k.SrcColorFactor=
 jc;k.Shape=Jb;k.ShapeBufferGeometry=hc;k.ShapeGeometry=gc;k.ShapePath=tg;k.ShapeUtils=pb;k.ShortType=1011;k.Skeleton=Le;k.SkeletonHelper=fd;k.SkinnedMesh=Od;k.SmoothShading=2;k.Sphere=nb;k.SphereBufferGeometry=Ib;k.SphereGeometry=ee;k.Spherical=di;k.SphericalHarmonics3=kf;k.SphericalReflectionMapping=305;k.Spline=Kg;k.SplineCurve=Va;k.SplineCurve3=hi;k.SpotLight=Ye;k.SpotLightHelper=ed;k.SpotLightShadow=Xe;k.Sprite=Ld;k.SpriteMaterial=Hb;k.SrcAlphaFactor=204;k.SrcAlphaSaturateFactor=210;k.SrcColorFactor=
-202;k.StereoCamera=Yh;k.StringKeyframeTrack=Se;k.SubtractEquation=101;k.SubtractiveBlending=3;k.TOUCH={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3};k.TangentSpaceNormalMap=0;k.TetrahedronBufferGeometry=Oc;k.TetrahedronGeometry=Td;k.TextBufferGeometry=Uc;k.TextGeometry=de;k.Texture=Z;k.TextureLoader=Ve;k.TorusBufferGeometry=Sc;k.TorusGeometry=Zd;k.TorusKnotBufferGeometry=Rc;k.TorusKnotGeometry=Yd;k.Triangle=aa;k.TriangleFanDrawMode=2;k.TriangleStripDrawMode=1;k.TrianglesDrawMode=0;k.TubeBufferGeometry=
+202;k.StereoCamera=Yh;k.StringKeyframeTrack=Se;k.SubtractEquation=101;k.SubtractiveBlending=3;k.TOUCH={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3};k.TangentSpaceNormalMap=0;k.TetrahedronBufferGeometry=Oc;k.TetrahedronGeometry=Td;k.TextBufferGeometry=Uc;k.TextGeometry=de;k.Texture=Z;k.TextureLoader=Ve;k.TorusBufferGeometry=Sc;k.TorusGeometry=Zd;k.TorusKnotBufferGeometry=Rc;k.TorusKnotGeometry=Yd;k.Triangle=ba;k.TriangleFanDrawMode=2;k.TriangleStripDrawMode=1;k.TrianglesDrawMode=0;k.TubeBufferGeometry=
 dc;k.TubeGeometry=Xd;k.UVMapping=300;k.Uint16Attribute=function(a,b){console.warn("THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead.");return new Tb(a,b)};k.Uint16BufferAttribute=Tb;k.Uint32Attribute=function(a,b){console.warn("THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead.");return new Ub(a,b)};k.Uint32BufferAttribute=Ub;k.Uint8Attribute=function(a,b){console.warn("THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead.");
 dc;k.TubeGeometry=Xd;k.UVMapping=300;k.Uint16Attribute=function(a,b){console.warn("THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead.");return new Tb(a,b)};k.Uint16BufferAttribute=Tb;k.Uint32Attribute=function(a,b){console.warn("THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead.");return new Ub(a,b)};k.Uint32BufferAttribute=Ub;k.Uint8Attribute=function(a,b){console.warn("THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead.");
 return new yd(a,b)};k.Uint8BufferAttribute=yd;k.Uint8ClampedAttribute=function(a,b){console.warn("THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead.");return new zd(a,b)};k.Uint8ClampedBufferAttribute=zd;k.Uncharted2ToneMapping=3;k.Uniform=lf;k.UniformsLib=J;k.UniformsUtils=xk;k.UnsignedByteType=1009;k.UnsignedInt248Type=1020;k.UnsignedIntType=1014;k.UnsignedShort4444Type=1017;k.UnsignedShort5551Type=1018;k.UnsignedShort565Type=1019;k.UnsignedShortType=
 return new yd(a,b)};k.Uint8BufferAttribute=yd;k.Uint8ClampedAttribute=function(a,b){console.warn("THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead.");return new zd(a,b)};k.Uint8ClampedBufferAttribute=zd;k.Uncharted2ToneMapping=3;k.Uniform=lf;k.UniformsLib=J;k.UniformsUtils=xk;k.UnsignedByteType=1009;k.UnsignedInt248Type=1020;k.UnsignedIntType=1014;k.UnsignedShort4444Type=1017;k.UnsignedShort5551Type=1018;k.UnsignedShort565Type=1019;k.UnsignedShortType=
-1012;k.VSMShadowMap=3;k.Vector2=w;k.Vector3=n;k.Vector4=ca;k.VectorKeyframeTrack=ad;k.Vertex=function(a,b,c){console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead.");return new n(a,b,c)};k.VertexColors=2;k.VertexNormalsHelper=qe;k.VideoTexture=kg;k.WebGLMultisampleRenderTarget=Of;k.WebGLRenderTarget=ka;k.WebGLRenderTargetCube=Ab;k.WebGLRenderer=gg;k.WebGLUtils=Hh;k.WireframeGeometry=Mc;k.WireframeHelper=function(a,b){console.warn("THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead.");
+1012;k.VSMShadowMap=3;k.Vector2=w;k.Vector3=n;k.Vector4=da;k.VectorKeyframeTrack=ad;k.Vertex=function(a,b,c){console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead.");return new n(a,b,c)};k.VertexColors=2;k.VertexNormalsHelper=qe;k.VideoTexture=kg;k.WebGLMultisampleRenderTarget=Of;k.WebGLRenderTarget=ka;k.WebGLRenderTargetCube=Ab;k.WebGLRenderer=gg;k.WebGLUtils=Hh;k.WireframeGeometry=Mc;k.WireframeHelper=function(a,b){console.warn("THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead.");
 return new T(new Mc(a.geometry),new U({color:void 0!==b?b:16777215}))};k.WrapAroundEnding=2402;k.XHRLoader=function(a){console.warn("THREE.XHRLoader has been renamed to THREE.FileLoader.");return new Na(a)};k.ZeroCurvatureEnding=2400;k.ZeroFactor=200;k.ZeroSlopeEnding=2401;k.ZeroStencilOp=0;k.sRGBEncoding=3001;Object.defineProperty(k,"__esModule",{value:!0})});
 return new T(new Mc(a.geometry),new U({color:void 0!==b?b:16777215}))};k.WrapAroundEnding=2402;k.XHRLoader=function(a){console.warn("THREE.XHRLoader has been renamed to THREE.FileLoader.");return new Na(a)};k.ZeroCurvatureEnding=2400;k.ZeroFactor=200;k.ZeroSlopeEnding=2401;k.ZeroStencilOp=0;k.sRGBEncoding=3001;Object.defineProperty(k,"__esModule",{value:!0})});

+ 24 - 1
build/three.module.js

@@ -24570,7 +24570,14 @@ function WebGLRenderer( parameters ) {
 
 
 				if ( object.isSkinnedMesh ) {
 				if ( object.isSkinnedMesh ) {
 
 
-					object.skeleton.update();
+					// update skeleton only once in a frame
+
+					if ( object.skeleton.frame !== info.render.frame ) {
+
+						object.skeleton.update();
+						object.skeleton.frame = info.render.frame;
+
+					}
 
 
 				}
 				}
 
 
@@ -26749,6 +26756,8 @@ function Skeleton( bones, boneInverses ) {
 	this.bones = bones.slice( 0 );
 	this.bones = bones.slice( 0 );
 	this.boneMatrices = new Float32Array( this.bones.length * 16 );
 	this.boneMatrices = new Float32Array( this.bones.length * 16 );
 
 
+	this.frame = - 1;
+
 	// use the supplied bone inverses or calculate the inverses
 	// use the supplied bone inverses or calculate the inverses
 
 
 	if ( boneInverses === undefined ) {
 	if ( boneInverses === undefined ) {
@@ -44545,6 +44554,20 @@ AnimationMixer.prototype = Object.assign( Object.create( EventDispatcher.prototy
 
 
 	},
 	},
 
 
+	// Allows you to seek to a specific time in an animation.
+	setTime: function ( timeInSeconds ) {
+
+		this.time = 0; // Zero out time attribute for AnimationMixer object;
+		for ( var i = 0; i < this._actions.length; i ++ ) {
+
+			this._actions[ i ].time = 0; // Zero out time attribute for all associated AnimationAction objects.
+
+		}
+
+		return this.update( timeInSeconds ); // Update used to set exact time. Returns "this" AnimationMixer object.
+
+	},
+
 	// return this mixer's root target object
 	// return this mixer's root target object
 	getRoot: function () {
 	getRoot: function () {
 
 

+ 4 - 0
docs/api/en/loaders/managers/LoadingManager.html

@@ -167,6 +167,10 @@
 		Registers a loader with the given regular expression. Can be used to define what loader should be used in
 		Registers a loader with the given regular expression. Can be used to define what loader should be used in
 		order to load specific files. A typical use case is to overwrite the default loader for textures.
 		order to load specific files. A typical use case is to overwrite the default loader for textures.
 		</p>
 		</p>
+		<code>
+// add handler for TGA textures
+manager.addHandler( /\.tga$/i, new TGALoader() );
+		</code>
 
 
 		<h3>[method:null getHandler]( [param:String file] )</h3>
 		<h3>[method:null getHandler]( [param:String file] )</h3>
 		<p>
 		<p>

+ 4 - 0
docs/api/zh/loaders/managers/LoadingManager.html

@@ -165,6 +165,10 @@
 		Registers a loader with the given regular expression. Can be used to define what loader should be used in
 		Registers a loader with the given regular expression. Can be used to define what loader should be used in
 		order to load specific files. A typical use case is to overwrite the default loader for textures.
 		order to load specific files. A typical use case is to overwrite the default loader for textures.
 		</p>
 		</p>
+		<code>
+// add handler for TGA textures
+manager.addHandler( /\.tga$/i, new TGALoader() );
+		</code>
 
 
 		<h3>[method:LoadingManager removeHandler]( [param:Object regex] )</h3>
 		<h3>[method:LoadingManager removeHandler]( [param:Object regex] )</h3>
 		<p>
 		<p>

+ 19 - 7
examples/js/controls/TransformControls.js

@@ -539,15 +539,27 @@ THREE.TransformControls = function ( camera, domElement ) {
 
 
 	function getPointer( event ) {
 	function getPointer( event ) {
 
 
-		var pointer = event.changedTouches ? event.changedTouches[ 0 ] : event;
+		if ( document.pointerLockElement ) {
 
 
-		var rect = domElement.getBoundingClientRect();
+			return {
+				x: 0,
+				y: 0,
+				button: event.button
+			};
 
 
-		return {
-			x: ( pointer.clientX - rect.left ) / rect.width * 2 - 1,
-			y: - ( pointer.clientY - rect.top ) / rect.height * 2 + 1,
-			button: event.button
-		};
+		} else {
+
+			var pointer = event.changedTouches ? event.changedTouches[ 0 ] : event;
+
+			var rect = domElement.getBoundingClientRect();
+
+			return {
+				x: ( pointer.clientX - rect.left ) / rect.width * 2 - 1,
+				y: - ( pointer.clientY - rect.top ) / rect.height * 2 + 1,
+				button: event.button
+			};
+
+		}
 
 
 	}
 	}
 
 

+ 8 - 1
examples/js/loaders/TDSLoader.js

@@ -272,6 +272,13 @@ THREE.TDSLoader.prototype = Object.assign( Object.create( THREE.Loader.prototype
 				material.shininess = shininess;
 				material.shininess = shininess;
 				this.debugMessage( '   Shininess : ' + shininess );
 				this.debugMessage( '   Shininess : ' + shininess );
 
 
+			} else if ( next === MAT_TRANSPARENCY ) {
+
+				var opacity = this.readWord( data );
+				material.opacity = opacity * 0.01;
+				this.debugMessage( '  Opacity : ' + opacity );
+				material.transparent = opacity < 100 ? true : false;
+
 			} else if ( next === MAT_TEXMAP ) {
 			} else if ( next === MAT_TEXMAP ) {
 
 
 				this.debugMessage( '   ColorMap' );
 				this.debugMessage( '   ColorMap' );
@@ -912,7 +919,7 @@ var MAT_DIFFUSE = 0xA020;
 var MAT_SPECULAR = 0xA030;
 var MAT_SPECULAR = 0xA030;
 var MAT_SHININESS = 0xA040;
 var MAT_SHININESS = 0xA040;
 // var MAT_SHIN2PCT = 0xA041;
 // var MAT_SHIN2PCT = 0xA041;
-// var MAT_TRANSPARENCY = 0xA050;
+var MAT_TRANSPARENCY = 0xA050;
 // var MAT_XPFALL = 0xA052;
 // var MAT_XPFALL = 0xA052;
 // var MAT_USE_XPFALL = 0xA240;
 // var MAT_USE_XPFALL = 0xA240;
 // var MAT_REFBLUR = 0xA053;
 // var MAT_REFBLUR = 0xA053;

+ 19 - 7
examples/jsm/controls/TransformControls.js

@@ -562,15 +562,27 @@ var TransformControls = function ( camera, domElement ) {
 
 
 	function getPointer( event ) {
 	function getPointer( event ) {
 
 
-		var pointer = event.changedTouches ? event.changedTouches[ 0 ] : event;
+		if ( document.pointerLockElement ) {
 
 
-		var rect = domElement.getBoundingClientRect();
+			return {
+				x: 0,
+				y: 0,
+				button: event.button
+			};
 
 
-		return {
-			x: ( pointer.clientX - rect.left ) / rect.width * 2 - 1,
-			y: - ( pointer.clientY - rect.top ) / rect.height * 2 + 1,
-			button: event.button
-		};
+		} else {
+
+			var pointer = event.changedTouches ? event.changedTouches[ 0 ] : event;
+
+			var rect = domElement.getBoundingClientRect();
+
+			return {
+				x: ( pointer.clientX - rect.left ) / rect.width * 2 - 1,
+				y: - ( pointer.clientY - rect.top ) / rect.height * 2 + 1,
+				button: event.button
+			};
+
+		}
 
 
 	}
 	}
 
 

+ 8 - 1
examples/jsm/loaders/TDSLoader.js

@@ -288,6 +288,13 @@ TDSLoader.prototype = Object.assign( Object.create( Loader.prototype ), {
 				material.shininess = shininess;
 				material.shininess = shininess;
 				this.debugMessage( '   Shininess : ' + shininess );
 				this.debugMessage( '   Shininess : ' + shininess );
 
 
+			} else if ( next === MAT_TRANSPARENCY ) {
+
+				var opacity = this.readWord( data );
+				material.opacity = opacity * 0.01;
+				this.debugMessage( '  Opacity : ' + opacity );
+				material.transparent = opacity < 100 ? true : false;
+
 			} else if ( next === MAT_TEXMAP ) {
 			} else if ( next === MAT_TEXMAP ) {
 
 
 				this.debugMessage( '   ColorMap' );
 				this.debugMessage( '   ColorMap' );
@@ -928,7 +935,7 @@ var MAT_DIFFUSE = 0xA020;
 var MAT_SPECULAR = 0xA030;
 var MAT_SPECULAR = 0xA030;
 var MAT_SHININESS = 0xA040;
 var MAT_SHININESS = 0xA040;
 // var MAT_SHIN2PCT = 0xA041;
 // var MAT_SHIN2PCT = 0xA041;
-// var MAT_TRANSPARENCY = 0xA050;
+var MAT_TRANSPARENCY = 0xA050;
 // var MAT_XPFALL = 0xA052;
 // var MAT_XPFALL = 0xA052;
 // var MAT_USE_XPFALL = 0xA240;
 // var MAT_USE_XPFALL = 0xA240;
 // var MAT_REFBLUR = 0xA053;
 // var MAT_REFBLUR = 0xA053;

+ 9 - 9
examples/jsm/shaders/AfterimageShader.js

@@ -24,8 +24,8 @@ var AfterimageShader = {
 
 
 		"void main() {",
 		"void main() {",
 
 
-			"vUv = uv;",
-			"gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
+		"	vUv = uv;",
+		"	gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
 
 
 		"}"
 		"}"
 
 
@@ -39,21 +39,21 @@ var AfterimageShader = {
 		"uniform sampler2D tNew;",
 		"uniform sampler2D tNew;",
 
 
 		"varying vec2 vUv;",
 		"varying vec2 vUv;",
-		
+
 		"vec4 when_gt( vec4 x, float y ) {",
 		"vec4 when_gt( vec4 x, float y ) {",
 
 
-			"return max( sign( x - y ), 0.0 );",
+		"	return max( sign( x - y ), 0.0 );",
 
 
 		"}",
 		"}",
 
 
 		"void main() {",
 		"void main() {",
 
 
-			"vec4 texelOld = texture2D( tOld, vUv );",
-			"vec4 texelNew = texture2D( tNew, vUv );",
-			
-			"texelOld *= damp * when_gt( texelOld, 0.1 );",
+		"	vec4 texelOld = texture2D( tOld, vUv );",
+		"	vec4 texelNew = texture2D( tNew, vUv );",
+
+		"	texelOld *= damp * when_gt( texelOld, 0.1 );",
 
 
-			"gl_FragColor = max(texelNew, texelOld);",
+		"	gl_FragColor = max(texelNew, texelOld);",
 
 
 		"}"
 		"}"
 
 

+ 2 - 2
examples/jsm/shaders/BasicShader.js

@@ -14,7 +14,7 @@ var BasicShader = {
 
 
 		"void main() {",
 		"void main() {",
 
 
-			"gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
+		"	gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
 
 
 		"}"
 		"}"
 
 
@@ -24,7 +24,7 @@ var BasicShader = {
 
 
 		"void main() {",
 		"void main() {",
 
 
-			"gl_FragColor = vec4( 1.0, 0.0, 0.0, 0.5 );",
+		"	gl_FragColor = vec4( 1.0, 0.0, 0.0, 0.5 );",
 
 
 		"}"
 		"}"
 
 

+ 14 - 14
examples/jsm/shaders/BleachBypassShader.js

@@ -23,8 +23,8 @@ var BleachBypassShader = {
 
 
 		"void main() {",
 		"void main() {",
 
 
-			"vUv = uv;",
-			"gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
+		"	vUv = uv;",
+		"	gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
 
 
 		"}"
 		"}"
 
 
@@ -40,24 +40,24 @@ var BleachBypassShader = {
 
 
 		"void main() {",
 		"void main() {",
 
 
-			"vec4 base = texture2D( tDiffuse, vUv );",
+		"	vec4 base = texture2D( tDiffuse, vUv );",
 
 
-			"vec3 lumCoeff = vec3( 0.25, 0.65, 0.1 );",
-			"float lum = dot( lumCoeff, base.rgb );",
-			"vec3 blend = vec3( lum );",
+		"	vec3 lumCoeff = vec3( 0.25, 0.65, 0.1 );",
+		"	float lum = dot( lumCoeff, base.rgb );",
+		"	vec3 blend = vec3( lum );",
 
 
-			"float L = min( 1.0, max( 0.0, 10.0 * ( lum - 0.45 ) ) );",
+		"	float L = min( 1.0, max( 0.0, 10.0 * ( lum - 0.45 ) ) );",
 
 
-			"vec3 result1 = 2.0 * base.rgb * blend;",
-			"vec3 result2 = 1.0 - 2.0 * ( 1.0 - blend ) * ( 1.0 - base.rgb );",
+		"	vec3 result1 = 2.0 * base.rgb * blend;",
+		"	vec3 result2 = 1.0 - 2.0 * ( 1.0 - blend ) * ( 1.0 - base.rgb );",
 
 
-			"vec3 newColor = mix( result1, result2, L );",
+		"	vec3 newColor = mix( result1, result2, L );",
 
 
-			"float A2 = opacity * base.a;",
-			"vec3 mixRGB = A2 * newColor.rgb;",
-			"mixRGB += ( ( 1.0 - A2 ) * base.rgb );",
+		"	float A2 = opacity * base.a;",
+		"	vec3 mixRGB = A2 * newColor.rgb;",
+		"	mixRGB += ( ( 1.0 - A2 ) * base.rgb );",
 
 
-			"gl_FragColor = vec4( mixRGB, base.a );",
+		"	gl_FragColor = vec4( mixRGB, base.a );",
 
 
 		"}"
 		"}"
 
 

+ 5 - 5
examples/jsm/shaders/BlendShader.js

@@ -23,8 +23,8 @@ var BlendShader = {
 
 
 		"void main() {",
 		"void main() {",
 
 
-			"vUv = uv;",
-			"gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
+		"	vUv = uv;",
+		"	gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
 
 
 		"}"
 		"}"
 
 
@@ -42,9 +42,9 @@ var BlendShader = {
 
 
 		"void main() {",
 		"void main() {",
 
 
-			"vec4 texel1 = texture2D( tDiffuse1, vUv );",
-			"vec4 texel2 = texture2D( tDiffuse2, vUv );",
-			"gl_FragColor = opacity * mix( texel1, texel2, mixRatio );",
+		"	vec4 texel1 = texture2D( tDiffuse1, vUv );",
+		"	vec4 texel2 = texture2D( tDiffuse2, vUv );",
+		"	gl_FragColor = opacity * mix( texel1, texel2, mixRatio );",
 
 
 		"}"
 		"}"
 
 

+ 63 - 63
examples/jsm/shaders/BokehShader.js

@@ -34,8 +34,8 @@ var BokehShader = {
 
 
 		"void main() {",
 		"void main() {",
 
 
-			"vUv = uv;",
-			"gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
+		"	vUv = uv;",
+		"	gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
 
 
 		"}"
 		"}"
 
 
@@ -79,67 +79,67 @@ var BokehShader = {
 
 
 		"void main() {",
 		"void main() {",
 
 
-			"vec2 aspectcorrect = vec2( 1.0, aspect );",
-
-			"float viewZ = getViewZ( getDepth( vUv ) );",
-
-			"float factor = ( focus + viewZ );", // viewZ is <= 0, so this is a difference equation
-
-			"vec2 dofblur = vec2 ( clamp( factor * aperture, -maxblur, maxblur ) );",
-
-			"vec2 dofblur9 = dofblur * 0.9;",
-			"vec2 dofblur7 = dofblur * 0.7;",
-			"vec2 dofblur4 = dofblur * 0.4;",
-
-			"vec4 col = vec4( 0.0 );",
-
-			"col += texture2D( tColor, vUv.xy );",
-			"col += texture2D( tColor, vUv.xy + ( vec2(  0.0,   0.4  ) * aspectcorrect ) * dofblur );",
-			"col += texture2D( tColor, vUv.xy + ( vec2(  0.15,  0.37 ) * aspectcorrect ) * dofblur );",
-			"col += texture2D( tColor, vUv.xy + ( vec2(  0.29,  0.29 ) * aspectcorrect ) * dofblur );",
-			"col += texture2D( tColor, vUv.xy + ( vec2( -0.37,  0.15 ) * aspectcorrect ) * dofblur );",
-			"col += texture2D( tColor, vUv.xy + ( vec2(  0.40,  0.0  ) * aspectcorrect ) * dofblur );",
-			"col += texture2D( tColor, vUv.xy + ( vec2(  0.37, -0.15 ) * aspectcorrect ) * dofblur );",
-			"col += texture2D( tColor, vUv.xy + ( vec2(  0.29, -0.29 ) * aspectcorrect ) * dofblur );",
-			"col += texture2D( tColor, vUv.xy + ( vec2( -0.15, -0.37 ) * aspectcorrect ) * dofblur );",
-			"col += texture2D( tColor, vUv.xy + ( vec2(  0.0,  -0.4  ) * aspectcorrect ) * dofblur );",
-			"col += texture2D( tColor, vUv.xy + ( vec2( -0.15,  0.37 ) * aspectcorrect ) * dofblur );",
-			"col += texture2D( tColor, vUv.xy + ( vec2( -0.29,  0.29 ) * aspectcorrect ) * dofblur );",
-			"col += texture2D( tColor, vUv.xy + ( vec2(  0.37,  0.15 ) * aspectcorrect ) * dofblur );",
-			"col += texture2D( tColor, vUv.xy + ( vec2( -0.4,   0.0  ) * aspectcorrect ) * dofblur );",
-			"col += texture2D( tColor, vUv.xy + ( vec2( -0.37, -0.15 ) * aspectcorrect ) * dofblur );",
-			"col += texture2D( tColor, vUv.xy + ( vec2( -0.29, -0.29 ) * aspectcorrect ) * dofblur );",
-			"col += texture2D( tColor, vUv.xy + ( vec2(  0.15, -0.37 ) * aspectcorrect ) * dofblur );",
-
-			"col += texture2D( tColor, vUv.xy + ( vec2(  0.15,  0.37 ) * aspectcorrect ) * dofblur9 );",
-			"col += texture2D( tColor, vUv.xy + ( vec2( -0.37,  0.15 ) * aspectcorrect ) * dofblur9 );",
-			"col += texture2D( tColor, vUv.xy + ( vec2(  0.37, -0.15 ) * aspectcorrect ) * dofblur9 );",
-			"col += texture2D( tColor, vUv.xy + ( vec2( -0.15, -0.37 ) * aspectcorrect ) * dofblur9 );",
-			"col += texture2D( tColor, vUv.xy + ( vec2( -0.15,  0.37 ) * aspectcorrect ) * dofblur9 );",
-			"col += texture2D( tColor, vUv.xy + ( vec2(  0.37,  0.15 ) * aspectcorrect ) * dofblur9 );",
-			"col += texture2D( tColor, vUv.xy + ( vec2( -0.37, -0.15 ) * aspectcorrect ) * dofblur9 );",
-			"col += texture2D( tColor, vUv.xy + ( vec2(  0.15, -0.37 ) * aspectcorrect ) * dofblur9 );",
-
-			"col += texture2D( tColor, vUv.xy + ( vec2(  0.29,  0.29 ) * aspectcorrect ) * dofblur7 );",
-			"col += texture2D( tColor, vUv.xy + ( vec2(  0.40,  0.0  ) * aspectcorrect ) * dofblur7 );",
-			"col += texture2D( tColor, vUv.xy + ( vec2(  0.29, -0.29 ) * aspectcorrect ) * dofblur7 );",
-			"col += texture2D( tColor, vUv.xy + ( vec2(  0.0,  -0.4  ) * aspectcorrect ) * dofblur7 );",
-			"col += texture2D( tColor, vUv.xy + ( vec2( -0.29,  0.29 ) * aspectcorrect ) * dofblur7 );",
-			"col += texture2D( tColor, vUv.xy + ( vec2( -0.4,   0.0  ) * aspectcorrect ) * dofblur7 );",
-			"col += texture2D( tColor, vUv.xy + ( vec2( -0.29, -0.29 ) * aspectcorrect ) * dofblur7 );",
-			"col += texture2D( tColor, vUv.xy + ( vec2(  0.0,   0.4  ) * aspectcorrect ) * dofblur7 );",
-
-			"col += texture2D( tColor, vUv.xy + ( vec2(  0.29,  0.29 ) * aspectcorrect ) * dofblur4 );",
-			"col += texture2D( tColor, vUv.xy + ( vec2(  0.4,   0.0  ) * aspectcorrect ) * dofblur4 );",
-			"col += texture2D( tColor, vUv.xy + ( vec2(  0.29, -0.29 ) * aspectcorrect ) * dofblur4 );",
-			"col += texture2D( tColor, vUv.xy + ( vec2(  0.0,  -0.4  ) * aspectcorrect ) * dofblur4 );",
-			"col += texture2D( tColor, vUv.xy + ( vec2( -0.29,  0.29 ) * aspectcorrect ) * dofblur4 );",
-			"col += texture2D( tColor, vUv.xy + ( vec2( -0.4,   0.0  ) * aspectcorrect ) * dofblur4 );",
-			"col += texture2D( tColor, vUv.xy + ( vec2( -0.29, -0.29 ) * aspectcorrect ) * dofblur4 );",
-			"col += texture2D( tColor, vUv.xy + ( vec2(  0.0,   0.4  ) * aspectcorrect ) * dofblur4 );",
-
-			"gl_FragColor = col / 41.0;",
-			"gl_FragColor.a = 1.0;",
+		"	vec2 aspectcorrect = vec2( 1.0, aspect );",
+
+		"	float viewZ = getViewZ( getDepth( vUv ) );",
+
+		"	float factor = ( focus + viewZ );", // viewZ is <= 0, so this is a difference equation
+
+		"	vec2 dofblur = vec2 ( clamp( factor * aperture, -maxblur, maxblur ) );",
+
+		"	vec2 dofblur9 = dofblur * 0.9;",
+		"	vec2 dofblur7 = dofblur * 0.7;",
+		"	vec2 dofblur4 = dofblur * 0.4;",
+
+		"	vec4 col = vec4( 0.0 );",
+
+		"	col += texture2D( tColor, vUv.xy );",
+		"	col += texture2D( tColor, vUv.xy + ( vec2(  0.0,   0.4  ) * aspectcorrect ) * dofblur );",
+		"	col += texture2D( tColor, vUv.xy + ( vec2(  0.15,  0.37 ) * aspectcorrect ) * dofblur );",
+		"	col += texture2D( tColor, vUv.xy + ( vec2(  0.29,  0.29 ) * aspectcorrect ) * dofblur );",
+		"	col += texture2D( tColor, vUv.xy + ( vec2( -0.37,  0.15 ) * aspectcorrect ) * dofblur );",
+		"	col += texture2D( tColor, vUv.xy + ( vec2(  0.40,  0.0  ) * aspectcorrect ) * dofblur );",
+		"	col += texture2D( tColor, vUv.xy + ( vec2(  0.37, -0.15 ) * aspectcorrect ) * dofblur );",
+		"	col += texture2D( tColor, vUv.xy + ( vec2(  0.29, -0.29 ) * aspectcorrect ) * dofblur );",
+		"	col += texture2D( tColor, vUv.xy + ( vec2( -0.15, -0.37 ) * aspectcorrect ) * dofblur );",
+		"	col += texture2D( tColor, vUv.xy + ( vec2(  0.0,  -0.4  ) * aspectcorrect ) * dofblur );",
+		"	col += texture2D( tColor, vUv.xy + ( vec2( -0.15,  0.37 ) * aspectcorrect ) * dofblur );",
+		"	col += texture2D( tColor, vUv.xy + ( vec2( -0.29,  0.29 ) * aspectcorrect ) * dofblur );",
+		"	col += texture2D( tColor, vUv.xy + ( vec2(  0.37,  0.15 ) * aspectcorrect ) * dofblur );",
+		"	col += texture2D( tColor, vUv.xy + ( vec2( -0.4,   0.0  ) * aspectcorrect ) * dofblur );",
+		"	col += texture2D( tColor, vUv.xy + ( vec2( -0.37, -0.15 ) * aspectcorrect ) * dofblur );",
+		"	col += texture2D( tColor, vUv.xy + ( vec2( -0.29, -0.29 ) * aspectcorrect ) * dofblur );",
+		"	col += texture2D( tColor, vUv.xy + ( vec2(  0.15, -0.37 ) * aspectcorrect ) * dofblur );",
+
+		"	col += texture2D( tColor, vUv.xy + ( vec2(  0.15,  0.37 ) * aspectcorrect ) * dofblur9 );",
+		"	col += texture2D( tColor, vUv.xy + ( vec2( -0.37,  0.15 ) * aspectcorrect ) * dofblur9 );",
+		"	col += texture2D( tColor, vUv.xy + ( vec2(  0.37, -0.15 ) * aspectcorrect ) * dofblur9 );",
+		"	col += texture2D( tColor, vUv.xy + ( vec2( -0.15, -0.37 ) * aspectcorrect ) * dofblur9 );",
+		"	col += texture2D( tColor, vUv.xy + ( vec2( -0.15,  0.37 ) * aspectcorrect ) * dofblur9 );",
+		"	col += texture2D( tColor, vUv.xy + ( vec2(  0.37,  0.15 ) * aspectcorrect ) * dofblur9 );",
+		"	col += texture2D( tColor, vUv.xy + ( vec2( -0.37, -0.15 ) * aspectcorrect ) * dofblur9 );",
+		"	col += texture2D( tColor, vUv.xy + ( vec2(  0.15, -0.37 ) * aspectcorrect ) * dofblur9 );",
+
+		"	col += texture2D( tColor, vUv.xy + ( vec2(  0.29,  0.29 ) * aspectcorrect ) * dofblur7 );",
+		"	col += texture2D( tColor, vUv.xy + ( vec2(  0.40,  0.0  ) * aspectcorrect ) * dofblur7 );",
+		"	col += texture2D( tColor, vUv.xy + ( vec2(  0.29, -0.29 ) * aspectcorrect ) * dofblur7 );",
+		"	col += texture2D( tColor, vUv.xy + ( vec2(  0.0,  -0.4  ) * aspectcorrect ) * dofblur7 );",
+		"	col += texture2D( tColor, vUv.xy + ( vec2( -0.29,  0.29 ) * aspectcorrect ) * dofblur7 );",
+		"	col += texture2D( tColor, vUv.xy + ( vec2( -0.4,   0.0  ) * aspectcorrect ) * dofblur7 );",
+		"	col += texture2D( tColor, vUv.xy + ( vec2( -0.29, -0.29 ) * aspectcorrect ) * dofblur7 );",
+		"	col += texture2D( tColor, vUv.xy + ( vec2(  0.0,   0.4  ) * aspectcorrect ) * dofblur7 );",
+
+		"	col += texture2D( tColor, vUv.xy + ( vec2(  0.29,  0.29 ) * aspectcorrect ) * dofblur4 );",
+		"	col += texture2D( tColor, vUv.xy + ( vec2(  0.4,   0.0  ) * aspectcorrect ) * dofblur4 );",
+		"	col += texture2D( tColor, vUv.xy + ( vec2(  0.29, -0.29 ) * aspectcorrect ) * dofblur4 );",
+		"	col += texture2D( tColor, vUv.xy + ( vec2(  0.0,  -0.4  ) * aspectcorrect ) * dofblur4 );",
+		"	col += texture2D( tColor, vUv.xy + ( vec2( -0.29,  0.29 ) * aspectcorrect ) * dofblur4 );",
+		"	col += texture2D( tColor, vUv.xy + ( vec2( -0.4,   0.0  ) * aspectcorrect ) * dofblur4 );",
+		"	col += texture2D( tColor, vUv.xy + ( vec2( -0.29, -0.29 ) * aspectcorrect ) * dofblur4 );",
+		"	col += texture2D( tColor, vUv.xy + ( vec2(  0.0,   0.4  ) * aspectcorrect ) * dofblur4 );",
+
+		"	gl_FragColor = col / 41.0;",
+		"	gl_FragColor.a = 1.0;",
 
 
 		"}"
 		"}"
 
 

+ 138 - 138
examples/jsm/shaders/BokehShader2.js

@@ -59,8 +59,8 @@ var BokehShader = {
 
 
 		"void main() {",
 		"void main() {",
 
 
-			"vUv = uv;",
-			"gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
+		"	vUv = uv;",
+		"	gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
 
 
 		"}"
 		"}"
 
 
@@ -146,213 +146,213 @@ var BokehShader = {
 		"//------------------------------------------",
 		"//------------------------------------------",
 
 
 		"float penta(vec2 coords) {",
 		"float penta(vec2 coords) {",
-			"//pentagonal shape",
-			"float scale = float(rings) - 1.3;",
-			"vec4  HS0 = vec4( 1.0,         0.0,         0.0,  1.0);",
-			"vec4  HS1 = vec4( 0.309016994, 0.951056516, 0.0,  1.0);",
-			"vec4  HS2 = vec4(-0.809016994, 0.587785252, 0.0,  1.0);",
-			"vec4  HS3 = vec4(-0.809016994,-0.587785252, 0.0,  1.0);",
-			"vec4  HS4 = vec4( 0.309016994,-0.951056516, 0.0,  1.0);",
-			"vec4  HS5 = vec4( 0.0        ,0.0         , 1.0,  1.0);",
+		"	//pentagonal shape",
+		"	float scale = float(rings) - 1.3;",
+		"	vec4  HS0 = vec4( 1.0,         0.0,         0.0,  1.0);",
+		"	vec4  HS1 = vec4( 0.309016994, 0.951056516, 0.0,  1.0);",
+		"	vec4  HS2 = vec4(-0.809016994, 0.587785252, 0.0,  1.0);",
+		"	vec4  HS3 = vec4(-0.809016994,-0.587785252, 0.0,  1.0);",
+		"	vec4  HS4 = vec4( 0.309016994,-0.951056516, 0.0,  1.0);",
+		"	vec4  HS5 = vec4( 0.0        ,0.0         , 1.0,  1.0);",
 
 
-			"vec4  one = vec4( 1.0 );",
+		"	vec4  one = vec4( 1.0 );",
 
 
-			"vec4 P = vec4((coords),vec2(scale, scale));",
+		"	vec4 P = vec4((coords),vec2(scale, scale));",
 
 
-			"vec4 dist = vec4(0.0);",
-			"float inorout = -4.0;",
+		"	vec4 dist = vec4(0.0);",
+		"	float inorout = -4.0;",
 
 
-			"dist.x = dot( P, HS0 );",
-			"dist.y = dot( P, HS1 );",
-			"dist.z = dot( P, HS2 );",
-			"dist.w = dot( P, HS3 );",
+		"	dist.x = dot( P, HS0 );",
+		"	dist.y = dot( P, HS1 );",
+		"	dist.z = dot( P, HS2 );",
+		"	dist.w = dot( P, HS3 );",
 
 
-			"dist = smoothstep( -feather, feather, dist );",
+		"	dist = smoothstep( -feather, feather, dist );",
 
 
-			"inorout += dot( dist, one );",
+		"	inorout += dot( dist, one );",
 
 
-			"dist.x = dot( P, HS4 );",
-			"dist.y = HS5.w - abs( P.z );",
+		"	dist.x = dot( P, HS4 );",
+		"	dist.y = HS5.w - abs( P.z );",
 
 
-			"dist = smoothstep( -feather, feather, dist );",
-			"inorout += dist.x;",
+		"	dist = smoothstep( -feather, feather, dist );",
+		"	inorout += dist.x;",
 
 
-			"return clamp( inorout, 0.0, 1.0 );",
+		"	return clamp( inorout, 0.0, 1.0 );",
 		"}",
 		"}",
 
 
 		"float bdepth(vec2 coords) {",
 		"float bdepth(vec2 coords) {",
-			"// Depth buffer blur",
-			"float d = 0.0;",
-			"float kernel[9];",
-			"vec2 offset[9];",
+		"	// Depth buffer blur",
+		"	float d = 0.0;",
+		"	float kernel[9];",
+		"	vec2 offset[9];",
 
 
-			"vec2 wh = vec2(1.0/textureWidth,1.0/textureHeight) * dbsize;",
+		"	vec2 wh = vec2(1.0/textureWidth,1.0/textureHeight) * dbsize;",
 
 
-			"offset[0] = vec2(-wh.x,-wh.y);",
-			"offset[1] = vec2( 0.0, -wh.y);",
-			"offset[2] = vec2( wh.x -wh.y);",
+		"	offset[0] = vec2(-wh.x,-wh.y);",
+		"	offset[1] = vec2( 0.0, -wh.y);",
+		"	offset[2] = vec2( wh.x -wh.y);",
 
 
-			"offset[3] = vec2(-wh.x,  0.0);",
-			"offset[4] = vec2( 0.0,   0.0);",
-			"offset[5] = vec2( wh.x,  0.0);",
+		"	offset[3] = vec2(-wh.x,  0.0);",
+		"	offset[4] = vec2( 0.0,   0.0);",
+		"	offset[5] = vec2( wh.x,  0.0);",
 
 
-			"offset[6] = vec2(-wh.x, wh.y);",
-			"offset[7] = vec2( 0.0,  wh.y);",
-			"offset[8] = vec2( wh.x, wh.y);",
+		"	offset[6] = vec2(-wh.x, wh.y);",
+		"	offset[7] = vec2( 0.0,  wh.y);",
+		"	offset[8] = vec2( wh.x, wh.y);",
 
 
-			"kernel[0] = 1.0/16.0;   kernel[1] = 2.0/16.0;   kernel[2] = 1.0/16.0;",
-			"kernel[3] = 2.0/16.0;   kernel[4] = 4.0/16.0;   kernel[5] = 2.0/16.0;",
-			"kernel[6] = 1.0/16.0;   kernel[7] = 2.0/16.0;   kernel[8] = 1.0/16.0;",
+		"	kernel[0] = 1.0/16.0;   kernel[1] = 2.0/16.0;   kernel[2] = 1.0/16.0;",
+		"	kernel[3] = 2.0/16.0;   kernel[4] = 4.0/16.0;   kernel[5] = 2.0/16.0;",
+		"	kernel[6] = 1.0/16.0;   kernel[7] = 2.0/16.0;   kernel[8] = 1.0/16.0;",
 
 
 
 
-			"for( int i=0; i<9; i++ ) {",
-				"float tmp = texture2D(tDepth, coords + offset[i]).r;",
-				"d += tmp * kernel[i];",
-			"}",
+		"	for( int i=0; i<9; i++ ) {",
+		"		float tmp = texture2D(tDepth, coords + offset[i]).r;",
+		"		d += tmp * kernel[i];",
+		"	}",
 
 
-			"return d;",
+		"	return d;",
 		"}",
 		"}",
 
 
 
 
 		"vec3 color(vec2 coords,float blur) {",
 		"vec3 color(vec2 coords,float blur) {",
-			"//processing the sample",
+		"	//processing the sample",
 
 
-			"vec3 col = vec3(0.0);",
-			"vec2 texel = vec2(1.0/textureWidth,1.0/textureHeight);",
+		"	vec3 col = vec3(0.0);",
+		"	vec2 texel = vec2(1.0/textureWidth,1.0/textureHeight);",
 
 
-			"col.r = texture2D(tColor,coords + vec2(0.0,1.0)*texel*fringe*blur).r;",
-			"col.g = texture2D(tColor,coords + vec2(-0.866,-0.5)*texel*fringe*blur).g;",
-			"col.b = texture2D(tColor,coords + vec2(0.866,-0.5)*texel*fringe*blur).b;",
+		"	col.r = texture2D(tColor,coords + vec2(0.0,1.0)*texel*fringe*blur).r;",
+		"	col.g = texture2D(tColor,coords + vec2(-0.866,-0.5)*texel*fringe*blur).g;",
+		"	col.b = texture2D(tColor,coords + vec2(0.866,-0.5)*texel*fringe*blur).b;",
 
 
-			"vec3 lumcoeff = vec3(0.299,0.587,0.114);",
-			"float lum = dot(col.rgb, lumcoeff);",
-			"float thresh = max((lum-threshold)*gain, 0.0);",
-			"return col+mix(vec3(0.0),col,thresh*blur);",
+		"	vec3 lumcoeff = vec3(0.299,0.587,0.114);",
+		"	float lum = dot(col.rgb, lumcoeff);",
+		"	float thresh = max((lum-threshold)*gain, 0.0);",
+		"	return col+mix(vec3(0.0),col,thresh*blur);",
 		"}",
 		"}",
 
 
 		"vec3 debugFocus(vec3 col, float blur, float depth) {",
 		"vec3 debugFocus(vec3 col, float blur, float depth) {",
-			"float edge = 0.002*depth; //distance based edge smoothing",
-			"float m = clamp(smoothstep(0.0,edge,blur),0.0,1.0);",
-			"float e = clamp(smoothstep(1.0-edge,1.0,blur),0.0,1.0);",
+		"	float edge = 0.002*depth; //distance based edge smoothing",
+		"	float m = clamp(smoothstep(0.0,edge,blur),0.0,1.0);",
+		"	float e = clamp(smoothstep(1.0-edge,1.0,blur),0.0,1.0);",
 
 
-			"col = mix(col,vec3(1.0,0.5,0.0),(1.0-m)*0.6);",
-			"col = mix(col,vec3(0.0,0.5,1.0),((1.0-e)-(1.0-m))*0.2);",
+		"	col = mix(col,vec3(1.0,0.5,0.0),(1.0-m)*0.6);",
+		"	col = mix(col,vec3(0.0,0.5,1.0),((1.0-e)-(1.0-m))*0.2);",
 
 
-			"return col;",
+		"	return col;",
 		"}",
 		"}",
 
 
 		"float linearize(float depth) {",
 		"float linearize(float depth) {",
-			"return -zfar * znear / (depth * (zfar - znear) - zfar);",
+		"	return -zfar * znear / (depth * (zfar - znear) - zfar);",
 		"}",
 		"}",
 
 
 
 
 		"float vignette() {",
 		"float vignette() {",
-			"float dist = distance(vUv.xy, vec2(0.5,0.5));",
-			"dist = smoothstep(vignout+(fstop/vignfade), vignin+(fstop/vignfade), dist);",
-			"return clamp(dist,0.0,1.0);",
+		"	float dist = distance(vUv.xy, vec2(0.5,0.5));",
+		"	dist = smoothstep(vignout+(fstop/vignfade), vignin+(fstop/vignfade), dist);",
+		"	return clamp(dist,0.0,1.0);",
 		"}",
 		"}",
 
 
 		"float gather(float i, float j, int ringsamples, inout vec3 col, float w, float h, float blur) {",
 		"float gather(float i, float j, int ringsamples, inout vec3 col, float w, float h, float blur) {",
-			"float rings2 = float(rings);",
-			"float step = PI*2.0 / float(ringsamples);",
-			"float pw = cos(j*step)*i;",
-			"float ph = sin(j*step)*i;",
-			"float p = 1.0;",
-			"if (pentagon) {",
-				"p = penta(vec2(pw,ph));",
-			"}",
-			"col += color(vUv.xy + vec2(pw*w,ph*h), blur) * mix(1.0, i/rings2, bias) * p;",
-			"return 1.0 * mix(1.0, i /rings2, bias) * p;",
+		"	float rings2 = float(rings);",
+		"	float step = PI*2.0 / float(ringsamples);",
+		"	float pw = cos(j*step)*i;",
+		"	float ph = sin(j*step)*i;",
+		"	float p = 1.0;",
+		"	if (pentagon) {",
+		"		p = penta(vec2(pw,ph));",
+		"	}",
+		"	col += color(vUv.xy + vec2(pw*w,ph*h), blur) * mix(1.0, i/rings2, bias) * p;",
+		"	return 1.0 * mix(1.0, i /rings2, bias) * p;",
 		"}",
 		"}",
 
 
 		"void main() {",
 		"void main() {",
-			"//scene depth calculation",
+		"	//scene depth calculation",
 
 
-			"float depth = linearize(texture2D(tDepth,vUv.xy).x);",
+		"	float depth = linearize(texture2D(tDepth,vUv.xy).x);",
 
 
-			"// Blur depth?",
-			"if ( depthblur ) {",
-				"depth = linearize(bdepth(vUv.xy));",
-			"}",
+		"	// Blur depth?",
+		"	if ( depthblur ) {",
+		"		depth = linearize(bdepth(vUv.xy));",
+		"	}",
 
 
-			"//focal plane calculation",
+		"	//focal plane calculation",
 
 
-			"float fDepth = focalDepth;",
+		"	float fDepth = focalDepth;",
 
 
-			"if (shaderFocus) {",
+		"	if (shaderFocus) {",
 
 
-				"fDepth = linearize(texture2D(tDepth,focusCoords).x);",
+		"		fDepth = linearize(texture2D(tDepth,focusCoords).x);",
 
 
-			"}",
+		"	}",
 
 
-			"// dof blur factor calculation",
+		"	// dof blur factor calculation",
 
 
-			"float blur = 0.0;",
+		"	float blur = 0.0;",
 
 
-			"if (manualdof) {",
-				"float a = depth-fDepth; // Focal plane",
-				"float b = (a-fdofstart)/fdofdist; // Far DoF",
-				"float c = (-a-ndofstart)/ndofdist; // Near Dof",
-				"blur = (a>0.0) ? b : c;",
-			"} else {",
-				"float f = focalLength; // focal length in mm",
-				"float d = fDepth*1000.0; // focal plane in mm",
-				"float o = depth*1000.0; // depth in mm",
+		"	if (manualdof) {",
+		"		float a = depth-fDepth; // Focal plane",
+		"		float b = (a-fdofstart)/fdofdist; // Far DoF",
+		"		float c = (-a-ndofstart)/ndofdist; // Near Dof",
+		"		blur = (a>0.0) ? b : c;",
+		"	} else {",
+		"		float f = focalLength; // focal length in mm",
+		"		float d = fDepth*1000.0; // focal plane in mm",
+		"		float o = depth*1000.0; // depth in mm",
 
 
-				"float a = (o*f)/(o-f);",
-				"float b = (d*f)/(d-f);",
-				"float c = (d-f)/(d*fstop*CoC);",
+		"		float a = (o*f)/(o-f);",
+		"		float b = (d*f)/(d-f);",
+		"		float c = (d-f)/(d*fstop*CoC);",
 
 
-				"blur = abs(a-b)*c;",
-			"}",
+		"		blur = abs(a-b)*c;",
+		"	}",
 
 
-			"blur = clamp(blur,0.0,1.0);",
+		"	blur = clamp(blur,0.0,1.0);",
 
 
-			"// calculation of pattern for dithering",
+		"	// calculation of pattern for dithering",
 
 
-			"vec2 noise = vec2(rand(vUv.xy), rand( vUv.xy + vec2( 0.4, 0.6 ) ) )*dithering*blur;",
+		"	vec2 noise = vec2(rand(vUv.xy), rand( vUv.xy + vec2( 0.4, 0.6 ) ) )*dithering*blur;",
 
 
-			"// getting blur x and y step factor",
+		"	// getting blur x and y step factor",
 
 
-			"float w = (1.0/textureWidth)*blur*maxblur+noise.x;",
-			"float h = (1.0/textureHeight)*blur*maxblur+noise.y;",
+		"	float w = (1.0/textureWidth)*blur*maxblur+noise.x;",
+		"	float h = (1.0/textureHeight)*blur*maxblur+noise.y;",
 
 
-			"// calculation of final color",
+		"	// calculation of final color",
 
 
-			"vec3 col = vec3(0.0);",
+		"	vec3 col = vec3(0.0);",
 
 
-			"if(blur < 0.05) {",
-				"//some optimization thingy",
-				"col = texture2D(tColor, vUv.xy).rgb;",
-			"} else {",
-				"col = texture2D(tColor, vUv.xy).rgb;",
-				"float s = 1.0;",
-				"int ringsamples;",
+		"	if(blur < 0.05) {",
+		"		//some optimization thingy",
+		"		col = texture2D(tColor, vUv.xy).rgb;",
+		"	} else {",
+		"		col = texture2D(tColor, vUv.xy).rgb;",
+		"		float s = 1.0;",
+		"		int ringsamples;",
 
 
-				"for (int i = 1; i <= rings; i++) {",
-					"/*unboxstart*/",
-					"ringsamples = i * samples;",
+		"		for (int i = 1; i <= rings; i++) {",
+		"			/*unboxstart*/",
+		"			ringsamples = i * samples;",
 
 
-					"for (int j = 0 ; j < maxringsamples ; j++) {",
-						"if (j >= ringsamples) break;",
-						"s += gather(float(i), float(j), ringsamples, col, w, h, blur);",
-					"}",
-					"/*unboxend*/",
-				"}",
+		"			for (int j = 0 ; j < maxringsamples ; j++) {",
+		"				if (j >= ringsamples) break;",
+		"				s += gather(float(i), float(j), ringsamples, col, w, h, blur);",
+		"			}",
+		"			/*unboxend*/",
+		"		}",
 
 
-				"col /= s; //divide by sample count",
-			"}",
+		"		col /= s; //divide by sample count",
+		"	}",
 
 
-			"if (showFocus) {",
-				"col = debugFocus(col, blur, depth);",
-			"}",
+		"	if (showFocus) {",
+		"		col = debugFocus(col, blur, depth);",
+		"	}",
 
 
-			"if (vignetting) {",
-				"col *= vignette();",
-			"}",
+		"	if (vignetting) {",
+		"		col *= vignette();",
+		"	}",
 
 
-			"gl_FragColor.rgb = col;",
-			"gl_FragColor.a = 1.0;",
+		"	gl_FragColor.rgb = col;",
+		"	gl_FragColor.a = 1.0;",
 		"} "
 		"} "
 
 
 	].join( "\n" )
 	].join( "\n" )

+ 9 - 9
examples/jsm/shaders/BrightnessContrastShader.js

@@ -25,9 +25,9 @@ var BrightnessContrastShader = {
 
 
 		"void main() {",
 		"void main() {",
 
 
-			"vUv = uv;",
+		"	vUv = uv;",
 
 
-			"gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
+		"	gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
 
 
 		"}"
 		"}"
 
 
@@ -43,15 +43,15 @@ var BrightnessContrastShader = {
 
 
 		"void main() {",
 		"void main() {",
 
 
-			"gl_FragColor = texture2D( tDiffuse, vUv );",
+		"	gl_FragColor = texture2D( tDiffuse, vUv );",
 
 
-			"gl_FragColor.rgb += brightness;",
+		"	gl_FragColor.rgb += brightness;",
 
 
-			"if (contrast > 0.0) {",
-				"gl_FragColor.rgb = (gl_FragColor.rgb - 0.5) / (1.0 - contrast) + 0.5;",
-			"} else {",
-				"gl_FragColor.rgb = (gl_FragColor.rgb - 0.5) * (1.0 + contrast) + 0.5;",
-			"}",
+		"	if (contrast > 0.0) {",
+		"		gl_FragColor.rgb = (gl_FragColor.rgb - 0.5) / (1.0 - contrast) + 0.5;",
+		"	} else {",
+		"		gl_FragColor.rgb = (gl_FragColor.rgb - 0.5) * (1.0 + contrast) + 0.5;",
+		"	}",
 
 
 		"}"
 		"}"
 
 

+ 4 - 4
examples/jsm/shaders/ColorCorrectionShader.js

@@ -25,9 +25,9 @@ var ColorCorrectionShader = {
 
 
 		"void main() {",
 		"void main() {",
 
 
-			"vUv = uv;",
+		"	vUv = uv;",
 
 
-			"gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
+		"	gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
 
 
 		"}"
 		"}"
 
 
@@ -44,8 +44,8 @@ var ColorCorrectionShader = {
 
 
 		"void main() {",
 		"void main() {",
 
 
-			"gl_FragColor = texture2D( tDiffuse, vUv );",
-			"gl_FragColor.rgb = mulRGB * pow( ( gl_FragColor.rgb + addRGB ), powRGB );",
+		"	gl_FragColor = texture2D( tDiffuse, vUv );",
+		"	gl_FragColor.rgb = mulRGB * pow( ( gl_FragColor.rgb + addRGB ), powRGB );",
 
 
 		"}"
 		"}"
 
 

+ 6 - 6
examples/jsm/shaders/ColorifyShader.js

@@ -23,8 +23,8 @@ var ColorifyShader = {
 
 
 		"void main() {",
 		"void main() {",
 
 
-			"vUv = uv;",
-			"gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
+		"	vUv = uv;",
+		"	gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
 
 
 		"}"
 		"}"
 
 
@@ -39,12 +39,12 @@ var ColorifyShader = {
 
 
 		"void main() {",
 		"void main() {",
 
 
-			"vec4 texel = texture2D( tDiffuse, vUv );",
+		"	vec4 texel = texture2D( tDiffuse, vUv );",
 
 
-			"vec3 luma = vec3( 0.299, 0.587, 0.114 );",
-			"float v = dot( texel.xyz, luma );",
+		"	vec3 luma = vec3( 0.299, 0.587, 0.114 );",
+		"	float v = dot( texel.xyz, luma );",
 
 
-			"gl_FragColor = vec4( v * color, texel.w );",
+		"	gl_FragColor = vec4( v * color, texel.w );",
 
 
 		"}"
 		"}"
 
 

+ 9 - 9
examples/jsm/shaders/ConvolutionShader.js

@@ -35,8 +35,8 @@ var ConvolutionShader = {
 
 
 		"void main() {",
 		"void main() {",
 
 
-			"vUv = uv - ( ( KERNEL_SIZE_FLOAT - 1.0 ) / 2.0 ) * uImageIncrement;",
-			"gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
+		"	vUv = uv - ( ( KERNEL_SIZE_FLOAT - 1.0 ) / 2.0 ) * uImageIncrement;",
+		"	gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
 
 
 		"}"
 		"}"
 
 
@@ -53,17 +53,17 @@ var ConvolutionShader = {
 
 
 		"void main() {",
 		"void main() {",
 
 
-			"vec2 imageCoord = vUv;",
-			"vec4 sum = vec4( 0.0, 0.0, 0.0, 0.0 );",
+		"	vec2 imageCoord = vUv;",
+		"	vec4 sum = vec4( 0.0, 0.0, 0.0, 0.0 );",
 
 
-			"for( int i = 0; i < KERNEL_SIZE_INT; i ++ ) {",
+		"	for( int i = 0; i < KERNEL_SIZE_INT; i ++ ) {",
 
 
-				"sum += texture2D( tDiffuse, imageCoord ) * cKernel[ i ];",
-				"imageCoord += uImageIncrement;",
+		"		sum += texture2D( tDiffuse, imageCoord ) * cKernel[ i ];",
+		"		imageCoord += uImageIncrement;",
 
 
-			"}",
+		"	}",
 
 
-			"gl_FragColor = sum;",
+		"	gl_FragColor = sum;",
 
 
 		"}"
 		"}"
 
 

+ 4 - 4
examples/jsm/shaders/CopyShader.js

@@ -21,8 +21,8 @@ var CopyShader = {
 
 
 		"void main() {",
 		"void main() {",
 
 
-			"vUv = uv;",
-			"gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
+		"	vUv = uv;",
+		"	gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
 
 
 		"}"
 		"}"
 
 
@@ -38,8 +38,8 @@ var CopyShader = {
 
 
 		"void main() {",
 		"void main() {",
 
 
-			"vec4 texel = texture2D( tDiffuse, vUv );",
-			"gl_FragColor = opacity * texel;",
+		"	vec4 texel = texture2D( tDiffuse, vUv );",
+		"	gl_FragColor = opacity * texel;",
 
 
 		"}"
 		"}"
 
 

+ 40 - 40
examples/jsm/shaders/DigitalGlitch.js

@@ -33,8 +33,8 @@ var DigitalGlitch = {
 
 
 		"varying vec2 vUv;",
 		"varying vec2 vUv;",
 		"void main() {",
 		"void main() {",
-			"vUv = uv;",
-			"gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
+		"	vUv = uv;",
+		"	gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
 		"}"
 		"}"
 	].join( "\n" ),
 	].join( "\n" ),
 
 
@@ -57,47 +57,47 @@ var DigitalGlitch = {
 
 
 
 
 		"float rand(vec2 co){",
 		"float rand(vec2 co){",
-			"return fract(sin(dot(co.xy ,vec2(12.9898,78.233))) * 43758.5453);",
+		"	return fract(sin(dot(co.xy ,vec2(12.9898,78.233))) * 43758.5453);",
 		"}",
 		"}",
 
 
 		"void main() {",
 		"void main() {",
-			"if(byp<1) {",
-				"vec2 p = vUv;",
-				"float xs = floor(gl_FragCoord.x / 0.5);",
-				"float ys = floor(gl_FragCoord.y / 0.5);",
-				//based on staffantans glitch shader for unity https://github.com/staffantan/unityglitch
-				"vec4 normal = texture2D (tDisp, p*seed*seed);",
-				"if(p.y<distortion_x+col_s && p.y>distortion_x-col_s*seed) {",
-					"if(seed_x>0.){",
-						"p.y = 1. - (p.y + distortion_y);",
-					"}",
-					"else {",
-						"p.y = distortion_y;",
-					"}",
-				"}",
-				"if(p.x<distortion_y+col_s && p.x>distortion_y-col_s*seed) {",
-					"if(seed_y>0.){",
-						"p.x=distortion_x;",
-					"}",
-					"else {",
-						"p.x = 1. - (p.x + distortion_x);",
-					"}",
-				"}",
-				"p.x+=normal.x*seed_x*(seed/5.);",
-				"p.y+=normal.y*seed_y*(seed/5.);",
-				//base from RGB shift shader
-				"vec2 offset = amount * vec2( cos(angle), sin(angle));",
-				"vec4 cr = texture2D(tDiffuse, p + offset);",
-				"vec4 cga = texture2D(tDiffuse, p);",
-				"vec4 cb = texture2D(tDiffuse, p - offset);",
-				"gl_FragColor = vec4(cr.r, cga.g, cb.b, cga.a);",
-				//add noise
-				"vec4 snow = 200.*amount*vec4(rand(vec2(xs * seed,ys * seed*50.))*0.2);",
-				"gl_FragColor = gl_FragColor+ snow;",
-			"}",
-			"else {",
-				"gl_FragColor=texture2D (tDiffuse, vUv);",
-			"}",
+		"	if(byp<1) {",
+		"		vec2 p = vUv;",
+		"		float xs = floor(gl_FragCoord.x / 0.5);",
+		"		float ys = floor(gl_FragCoord.y / 0.5);",
+		//based on staffantans glitch shader for unity https://github.com/staffantan/unityglitch
+		"		vec4 normal = texture2D (tDisp, p*seed*seed);",
+		"		if(p.y<distortion_x+col_s && p.y>distortion_x-col_s*seed) {",
+		"			if(seed_x>0.){",
+		"				p.y = 1. - (p.y + distortion_y);",
+		"			}",
+		"			else {",
+		"				p.y = distortion_y;",
+		"			}",
+		"		}",
+		"		if(p.x<distortion_y+col_s && p.x>distortion_y-col_s*seed) {",
+		"			if(seed_y>0.){",
+		"				p.x=distortion_x;",
+		"			}",
+		"			else {",
+		"				p.x = 1. - (p.x + distortion_x);",
+		"			}",
+		"		}",
+		"		p.x+=normal.x*seed_x*(seed/5.);",
+		"		p.y+=normal.y*seed_y*(seed/5.);",
+		//base from RGB shift shader
+		"		vec2 offset = amount * vec2( cos(angle), sin(angle));",
+		"		vec4 cr = texture2D(tDiffuse, p + offset);",
+		"		vec4 cga = texture2D(tDiffuse, p);",
+		"		vec4 cb = texture2D(tDiffuse, p - offset);",
+		"		gl_FragColor = vec4(cr.r, cga.g, cb.b, cga.a);",
+		//add noise
+		"		vec4 snow = 200.*amount*vec4(rand(vec2(xs * seed,ys * seed*50.))*0.2);",
+		"		gl_FragColor = gl_FragColor+ snow;",
+		"	}",
+		"	else {",
+		"		gl_FragColor=texture2D (tDiffuse, vUv);",
+		"	}",
 		"}"
 		"}"
 
 
 	].join( "\n" )
 	].join( "\n" )

+ 2 - 0
src/objects/Skeleton.js

@@ -19,6 +19,8 @@ function Skeleton( bones, boneInverses ) {
 	this.bones = bones.slice( 0 );
 	this.bones = bones.slice( 0 );
 	this.boneMatrices = new Float32Array( this.bones.length * 16 );
 	this.boneMatrices = new Float32Array( this.bones.length * 16 );
 
 
+	this.frame = - 1;
+
 	// use the supplied bone inverses or calculate the inverses
 	// use the supplied bone inverses or calculate the inverses
 
 
 	if ( boneInverses === undefined ) {
 	if ( boneInverses === undefined ) {

+ 8 - 1
src/renderers/WebGLRenderer.js

@@ -1322,7 +1322,14 @@ function WebGLRenderer( parameters ) {
 
 
 				if ( object.isSkinnedMesh ) {
 				if ( object.isSkinnedMesh ) {
 
 
-					object.skeleton.update();
+					// update skeleton only once in a frame
+
+					if ( object.skeleton.frame !== info.render.frame ) {
+
+						object.skeleton.update();
+						object.skeleton.frame = info.render.frame;
+
+					}
 
 
 				}
 				}