فهرست منبع

Updated builds.

Mr.doob 5 سال پیش
والد
کامیت
3d46972396
3فایلهای تغییر یافته به همراه120 افزوده شده و 121 حذف شده
  1. 3 4
      build/three.js
  2. 114 113
      build/three.min.js
  3. 3 4
      build/three.module.js

+ 3 - 4
build/three.js

@@ -9991,7 +9991,8 @@
 
 				var normalMatrix = new Matrix3().getNormalMatrix( matrix );
 
-				normalMatrix.applyToBufferAttribute( normal );
+				normal.applyNormalMatrix( normalMatrix );
+
 				normal.needsUpdate = true;
 
 			}
@@ -10000,10 +10001,8 @@
 
 			if ( tangent !== undefined ) {
 
-				var normalMatrix = new Matrix3().getNormalMatrix( matrix );
+				tangent.transformDirection( matrix );
 
-				// Tangent is vec4, but the '.w' component is a sign value (+1/-1).
-				normalMatrix.applyToBufferAttribute( tangent );
 				tangent.needsUpdate = true;
 
 			}

+ 114 - 113
build/three.min.js

@@ -1,10 +1,11 @@
-(function(k,oa){"object"===typeof exports&&"undefined"!==typeof module?oa(exports):"function"===typeof define&&define.amd?define(["exports"],oa):(k=k||self,oa(k.THREE={}))})(this,function(k){function oa(){}function y(a,b){this.x=a||0;this.y=b||0}function wa(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 W(){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.")}
+// threejs.org/license
+(function(k,oa){"object"===typeof exports&&"undefined"!==typeof module?oa(exports):"function"===typeof define&&define.amd?define(["exports"],oa):(k=k||self,oa(k.THREE={}))})(this,function(k){function oa(){}function y(a,b){this.x=a||0;this.y=b||0}function wa(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 T(a,b,c,d,e,f,g,h,l,m){Object.defineProperty(this,"id",{value:Zi++});this.uuid=R.generateUUID();this.name="";this.image=void 0!==a?a:T.DEFAULT_IMAGE;this.mipmaps=[];this.mapping=void 0!==b?b:T.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 y(0,0);this.repeat=new y(1,1);this.center=new y(0,0);this.rotation=
-0;this.matrixAutoUpdate=!0;this.matrix=new W;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 T(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 T(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 $f(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 Pb(a,b,c,d){this._x=a||0;this._y=b||0;this._z=c||0;this._order=d||Pb.DefaultOrder}function ag(){this.mask=1}function E(){Object.defineProperty(this,"id",{value:$i++});this.uuid=R.generateUUID();this.name="";this.type="Object3D";this.parent=null;this.children=[];this.up=E.DefaultUp.clone();var a=new n,b=new Pb,c=new wa,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 W}});this.matrix=new M;this.matrixWorld=new M;this.matrixAutoUpdate=E.DefaultMatrixAutoUpdate;this.matrixWorldNeedsUpdate=!1;this.layers=new ag;this.visible=!0;
-this.receiveShadow=this.castShadow=!1;this.frustumCulled=!0;this.renderOrder=0;this.userData={}}function vd(){E.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 Ra(a,b){this.min=void 0!==a?a:new n(Infinity,Infinity,Infinity);this.max=void 0!==b?b:new n(-Infinity,-Infinity,-Infinity)}function bg(a,b,c,d,e){var f;var g=0;for(f=
+!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=E.DefaultMatrixAutoUpdate;this.matrixWorldNeedsUpdate=!1;this.layers=new ag;this.visible=
+!0;this.receiveShadow=this.castShadow=!1;this.frustumCulled=!0;this.renderOrder=0;this.userData={}}function vd(){E.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 Ra(a,b){this.min=void 0!==a?a:new n(Infinity,Infinity,Infinity);this.max=void 0!==b?b:new n(-Infinity,-Infinity,-Infinity)}function bg(a,b,c,d,e){var f;var g=0;for(f=
 a.length-3;g<=f;g+=3){Qb.fromArray(a,g);var h=e.x*Math.abs(Qb.x)+e.y*Math.abs(Qb.y)+e.z*Math.abs(Qb.z),l=b.dot(Qb),m=c.dot(Qb),p=d.dot(Qb);if(Math.max(-Math.max(l,m,p),Math.min(l,m,p))>h)return!1}return!0}function mb(a,b){this.center=void 0!==a?a:new n;this.radius=void 0!==b?b:0}function Rb(a,b){this.origin=void 0!==a?a:new n;this.direction=void 0!==b?b:new n(0,0,-1)}function Sa(a,b){this.normal=void 0!==a?a:new n(1,0,0);this.constant=void 0!==b?b:0}function pa(a,b,c){this.a=void 0!==a?a:new n;this.b=
 void 0!==b?b:new n;this.c=void 0!==c?c:new n}function A(a,b,c){return void 0===b&&void 0===c?this.set(a):this.setRGB(a,b,c)}function cg(a,b,c){0>c&&(c+=1);1<c&&--c;return c<1/6?a+6*(b-a)*c:.5>c?b:c<2/3?a+6*(b-a)*(2/3-c):a}function dg(a){return.04045>a?.0773993808*a:Math.pow(.9478672986*a+.0521327014,2.4)}function eg(a){return.0031308>a?12.92*a:1.055*Math.pow(a,.41666)-.055}function vc(a,b,c,d,e,f){this.a=a;this.b=b;this.c=c;this.normal=d&&d.isVector3?d:new n;this.vertexNormals=Array.isArray(d)?d:
 [];this.color=e&&e.isColor?e:new A;this.vertexColors=Array.isArray(e)?e:[];this.materialIndex=void 0!==f?f:0}function N(){Object.defineProperty(this,"id",{value:aj++});this.uuid=R.generateUUID();this.name="";this.type="Material";this.fog=!0;this.blending=1;this.side=0;this.vertexTangents=this.flatShading=!1;this.vertexColors=0;this.opacity=1;this.transparent=!1;this.blendSrc=204;this.blendDst=205;this.blendEquation=100;this.blendEquationAlpha=this.blendDstAlpha=this.blendSrcAlpha=null;this.depthFunc=
@@ -12,7 +13,7 @@ void 0!==b?b:new n;this.c=void 0!==c?c:new n}function A(a,b,c){return void 0===b
 {};this.version=0}function Ia(a){N.call(this);this.type="MeshBasicMaterial";this.color=new A(16777215);this.lightMap=this.map=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.envMap=this.alphaMap=this.specularMap=null;this.combine=0;this.reflectivity=1;this.refractionRatio=.98;this.wireframe=!1;this.wireframeLinewidth=1;this.wireframeLinejoin=this.wireframeLinecap="round";this.morphTargets=this.skinning=!1;this.setValues(a)}function P(a,b,c){if(Array.isArray(a))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");
 this.name="";this.array=a;this.itemSize=b;this.count=void 0!==a?a.length/b:0;this.normalized=!0===c;this.usage=35044;this.updateRange={offset:0,count:-1};this.version=0}function wd(a,b,c){P.call(this,new Int8Array(a),b,c)}function xd(a,b,c){P.call(this,new Uint8Array(a),b,c)}function yd(a,b,c){P.call(this,new Uint8ClampedArray(a),b,c)}function zd(a,b,c){P.call(this,new Int16Array(a),b,c)}function Sb(a,b,c){P.call(this,new Uint16Array(a),b,c)}function Ad(a,b,c){P.call(this,new Int32Array(a),b,c)}function Tb(a,
 b,c){P.call(this,new Uint32Array(a),b,c)}function C(a,b,c){P.call(this,new Float32Array(a),b,c)}function Bd(a,b,c){P.call(this,new Float64Array(a),b,c)}function qh(){this.vertices=[];this.normals=[];this.colors=[];this.uvs=[];this.uvs2=[];this.groups=[];this.morphTargets={};this.skinWeights=[];this.skinIndices=[];this.boundingSphere=this.boundingBox=null;this.groupsNeedUpdate=this.uvsNeedUpdate=this.colorsNeedUpdate=this.normalsNeedUpdate=this.verticesNeedUpdate=!1}function rh(a){if(0===a.length)return-Infinity;
-for(var b=a[0],c=1,d=a.length;c<d;++c)a[c]>b&&(b=a[c]);return b}function D(){Object.defineProperty(this,"id",{value:bj+=2});this.uuid=R.generateUUID();this.name="";this.type="BufferGeometry";this.index=null;this.attributes={};this.morphAttributes={};this.morphTargetsRelative=!1;this.groups=[];this.boundingSphere=this.boundingBox=null;this.drawRange={start:0,count:Infinity};this.userData={}}function fa(a,b){E.call(this);this.type="Mesh";this.geometry=void 0!==a?a:new D;this.material=void 0!==b?b:new Ia({color:16777215*
+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:bj+=2});this.uuid=R.generateUUID();this.name="";this.type="BufferGeometry";this.index=null;this.attributes={};this.morphAttributes={};this.morphTargetsRelative=!1;this.groups=[];this.boundingSphere=this.boundingBox=null;this.drawRange={start:0,count:Infinity};this.userData={}}function W(a,b){E.call(this);this.type="Mesh";this.geometry=void 0!==a?a:new D;this.material=void 0!==b?b:new Ia({color:16777215*
 Math.random()});this.updateMorphTargets()}function sh(a,b,c,d,e,f,g,h){if(null===(1===b.side?d.intersectTriangle(g,f,e,!0,h):d.intersectTriangle(e,f,g,2!==b.side,h)))return null;Le.copy(h);Le.applyMatrix4(a.matrixWorld);b=c.ray.origin.distanceTo(Le);return b<c.near||b>c.far?null:{distance:b,point:Le.clone(),object:a}}function Me(a,b,c,d,e,f,g,h,l,m,p,t){Ub.fromBufferAttribute(e,m);Vb.fromBufferAttribute(e,p);Wb.fromBufferAttribute(e,t);e=a.morphTargetInfluences;if(b.morphTargets&&f&&e){Ne.set(0,0,
 0);Oe.set(0,0,0);Pe.set(0,0,0);for(var q=0,u=f.length;q<u;q++){var k=e[q],v=f[q];0!==k&&(fg.fromBufferAttribute(v,m),gg.fromBufferAttribute(v,p),hg.fromBufferAttribute(v,t),g?(Ne.addScaledVector(fg,k),Oe.addScaledVector(gg,k),Pe.addScaledVector(hg,k)):(Ne.addScaledVector(fg.sub(Ub),k),Oe.addScaledVector(gg.sub(Vb),k),Pe.addScaledVector(hg.sub(Wb),k)))}Ub.add(Ne);Vb.add(Oe);Wb.add(Pe)}if(a=sh(a,b,c,d,Ub,Vb,Wb,Cd))h&&(wc.fromBufferAttribute(h,m),xc.fromBufferAttribute(h,p),yc.fromBufferAttribute(h,
 t),a.uv=pa.getUV(Cd,Ub,Vb,Wb,wc,xc,yc,new y)),l&&(wc.fromBufferAttribute(l,m),xc.fromBufferAttribute(l,p),yc.fromBufferAttribute(l,t),a.uv2=pa.getUV(Cd,Ub,Vb,Wb,wc,xc,yc,new y)),h=new vc(m,p,t),pa.getNormal(Ub,Vb,Wb,h.normal),a.face=h;return a}function Q(){Object.defineProperty(this,"id",{value:cj+=2});this.uuid=R.generateUUID();this.name="";this.type="Geometry";this.vertices=[];this.colors=[];this.faces=[];this.faceVertexUvs=[[]];this.morphTargets=[];this.morphNormals=[];this.skinWeights=[];this.skinIndices=
@@ -28,14 +29,14 @@ d instanceof Int16Array?c=5122:d instanceof Uint32Array?c=5125:d instanceof Int3
 (d=d.data);var f=c.get(d);if(void 0===f)c.set(d,b(d,e));else if(f.version<d.version){var g=d.array,h=d.updateRange;a.bindBuffer(e,f.buffer);-1===h.count?a.bufferSubData(e,0,g):(a.bufferSubData(e,h.offset*g.BYTES_PER_ELEMENT,g.subarray(h.offset,h.offset+h.count)),h.count=-1);f.version=d.version}}}}function Ed(a,b,c,d){Q.call(this);this.type="PlaneGeometry";this.parameters={width:a,height:b,widthSegments:c,heightSegments:d};this.fromBufferGeometry(new Zb(a,b,c,d));this.mergeVertices()}function Zb(a,
 b,c,d){D.call(this);this.type="PlaneBufferGeometry";this.parameters={width:a,height:b,widthSegments:c,heightSegments:d};a=a||1;b=b||1;var e=a/2,f=b/2;c=Math.floor(c)||1;d=Math.floor(d)||1;var g=c+1,h=d+1,l=a/c,m=b/d,p=[],t=[],q=[],k=[];for(a=0;a<h;a++){var r=a*m-f;for(b=0;b<g;b++)t.push(b*l-e,-r,0),q.push(0,0,1),k.push(b/c),k.push(1-a/d)}for(a=0;a<d;a++)for(b=0;b<c;b++)e=b+g*(a+1),f=b+1+g*(a+1),h=b+1+g*a,p.push(b+g*a,e,h),p.push(e,f,h);this.setIndex(p);this.setAttribute("position",new C(t,3));this.setAttribute("normal",
 new C(q,3));this.setAttribute("uv",new C(k,2))}function ej(a,b,c,d){function e(a,c){b.buffers.color.setClear(a.r,a.g,a.b,c,d)}var f=new A(0),g=0,h,l,m=null,p=0;return{getClearColor:function(){return f},setClearColor:function(a,b){f.set(a);g=void 0!==b?b:1;e(f,g)},getClearAlpha:function(){return g},setClearAlpha:function(a){g=a;e(f,g)},render:function(b,d,k,r){d=d.background;k=a.xr;(k=k.getSession&&k.getSession())&&"additive"===k.environmentBlendMode&&(d=null);null===d?(e(f,g),m=null,p=0):d&&d.isColor&&
-(e(d,1),r=!0,m=null,p=0);(a.autoClear||r)&&a.clear(a.autoClearColor,a.autoClearDepth,a.autoClearStencil);if(d&&(d.isCubeTexture||d.isWebGLRenderTargetCube||306===d.mapping)){void 0===l&&(l=new fa(new Fd(1,1,1),new za({type:"BackgroundCubeMaterial",uniforms:Xb(cb.cube.uniforms),vertexShader:cb.cube.vertexShader,fragmentShader:cb.cube.fragmentShader,side:1,depthTest:!1,depthWrite:!1,fog:!1})),l.geometry.deleteAttribute("normal"),l.geometry.deleteAttribute("uv"),l.onBeforeRender=function(a,b,c){this.matrixWorld.copyPosition(c.matrixWorld)},
-Object.defineProperty(l.material,"map",{get:function(){return this.envMap.value}}),c.update(l));r=d.isWebGLRenderTargetCube?d.texture:d;l.material.envMap=r;if(m!==d||p!==r.version)l.material.needsUpdate=!0,m=d,p=r.version;b.unshift(l,l.geometry,l.material,0,0,null)}else if(d&&d.isTexture){void 0===h&&(h=new fa(new Zb(2,2),new za({type:"BackgroundMaterial",uniforms:Xb(cb.background.uniforms),vertexShader:cb.background.vertexShader,fragmentShader:cb.background.fragmentShader,side:0,depthTest:!1,depthWrite:!1,
+(e(d,1),r=!0,m=null,p=0);(a.autoClear||r)&&a.clear(a.autoClearColor,a.autoClearDepth,a.autoClearStencil);if(d&&(d.isCubeTexture||d.isWebGLRenderTargetCube||306===d.mapping)){void 0===l&&(l=new W(new Fd(1,1,1),new za({type:"BackgroundCubeMaterial",uniforms:Xb(cb.cube.uniforms),vertexShader:cb.cube.vertexShader,fragmentShader:cb.cube.fragmentShader,side:1,depthTest:!1,depthWrite:!1,fog:!1})),l.geometry.deleteAttribute("normal"),l.geometry.deleteAttribute("uv"),l.onBeforeRender=function(a,b,c){this.matrixWorld.copyPosition(c.matrixWorld)},
+Object.defineProperty(l.material,"map",{get:function(){return this.envMap.value}}),c.update(l));r=d.isWebGLRenderTargetCube?d.texture:d;l.material.envMap=r;if(m!==d||p!==r.version)l.material.needsUpdate=!0,m=d,p=r.version;b.unshift(l,l.geometry,l.material,0,0,null)}else if(d&&d.isTexture){void 0===h&&(h=new W(new Zb(2,2),new za({type:"BackgroundMaterial",uniforms:Xb(cb.background.uniforms),vertexShader:cb.background.vertexShader,fragmentShader:cb.background.fragmentShader,side:0,depthTest:!1,depthWrite:!1,
 fog:!1})),h.geometry.deleteAttribute("normal"),Object.defineProperty(h.material,"map",{get:function(){return this.uniforms.t2D.value}}),c.update(h));h.material.uniforms.t2D.value=d;!0===d.matrixAutoUpdate&&d.updateMatrix();h.material.uniforms.uvTransform.value.copy(d.matrix);if(m!==d||p!==d.version)h.material.needsUpdate=!0,m=d,p=d.version;b.unshift(h,h.geometry,h.material,0,0,null)}}}}function fj(a,b,c,d){var e=d.isWebGL2,f;this.setMode=function(a){f=a};this.render=function(b,d){a.drawArrays(f,b,
 d);c.update(d,f)};this.renderInstances=function(d,h,l,m){if(0!==m){if(e){d=a;var g="drawArraysInstanced"}else if(d=b.get("ANGLE_instanced_arrays"),g="drawArraysInstancedANGLE",null===d){console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");return}d[g](f,h,l,m);c.update(l,f,m)}}}function gj(a,b,c){function d(b){if("highp"===b){if(0<a.getShaderPrecisionFormat(35633,36338).precision&&0<a.getShaderPrecisionFormat(35632,
 36338).precision)return"highp";b="mediump"}return"mediump"===b&&0<a.getShaderPrecisionFormat(35633,36337).precision&&0<a.getShaderPrecisionFormat(35632,36337).precision?"mediump":"lowp"}var e,f="undefined"!==typeof WebGL2RenderingContext&&a instanceof WebGL2RenderingContext||"undefined"!==typeof WebGL2ComputeRenderingContext&&a instanceof WebGL2ComputeRenderingContext,g=void 0!==c.precision?c.precision:"highp",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),t=a.getParameter(34921),q=a.getParameter(36347),k=a.getParameter(36348),r=a.getParameter(36349),v=0<l,n=f||!!b.get("OES_texture_float"),w=v&&n,x=f?a.getParameter(36183):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:t,maxVertexUniforms:q,maxVaryings:k,maxFragmentUniforms:r,vertexTextures:v,floatFragmentTextures:n,floatVertexTextures:w,maxSamples:x}}function hj(){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 Sa,l=new W,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=
+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 Sa,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,r,v){if(!f||null===c||0===c.length||g&&!l)g?b(null):a();else{l=g?0:e;var p=4*l,t=r.clippingState||null;m.value=t;t=b(c,k,p,v);for(c=0;c!==p;++c)t[c]=d[c];r.clippingState=t;this.numIntersection=h?this.numPlanes:0;this.numPlanes+=l}}}function ij(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.");return b[c]=d}}}function jj(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<
@@ -108,7 +109,7 @@ a)}else!1===b.get(c).has(d)?(e=new Mh,b.get(c).set(d,e)):e=b.get(c).get(d);retur
 (t=b.uuid,p=c.uuid,m=u[t],void 0===m&&(m={},u[t]=m),t=m[p],void 0===t&&(t=b.clone(),m[p]=t),b=t);b.visible=c.visible;b.wireframe=c.wireframe;b.side=3===l?null!==c.shadowSide?c.shadowSide:c.side:null!==c.shadowSide?c.shadowSide:r[c.side];b.clipShadows=c.clipShadows;b.clippingPlanes=c.clippingPlanes;b.clipIntersection=c.clipIntersection;b.wireframeLinewidth=c.wireframeLinewidth;b.linewidth=c.linewidth;!0===f.isPointLight&&!0===b.isMeshDistanceMaterial&&(b.referencePosition.setFromMatrixPosition(f.matrixWorld),
 b.nearDistance=g,b.farDistance=h);return b}function g(c,d,e,l,m){if(!1!==c.visible){if(c.layers.test(d.layers)&&(c.isMesh||c.isLine||c.isPoints)&&(c.castShadow||c.receiveShadow&&3===m)&&(!c.frustumCulled||h.intersectsObject(c))){c.modelViewMatrix.multiplyMatrices(e.matrixWorldInverse,c.matrixWorld);var p=b.update(c),t=c.material;if(Array.isArray(t))for(var k=p.groups,q=0,r=k.length;q<r;q++){var v=k[q],u=t[v.materialIndex];u&&u.visible&&(u=f(c,u,l,e.near,e.far,m),a.renderBufferDirect(e,null,p,u,c,
 v))}else t.visible&&(u=f(c,t,l,e.near,e.far,m),a.renderBufferDirect(e,null,p,u,c,null))}c=c.children;p=0;for(t=c.length;p<t;p++)g(c[p],d,e,l,m)}}var h=new Dd,l=new y,m=new y,p=new da,t=[],k=[],u={},r={0:1,1:0,2:2},v=new za({defines:{SAMPLE_RATE:.25,HALF_SAMPLE_RATE:.125},uniforms:{shadow_pass:{value:null},resolution:{value:new y},radius:{value:4}},vertexShader:"void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",fragmentShader:"uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include <packing>\nvoid main() {\n  float mean = 0.0;\n  float squared_mean = 0.0;\n\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy  ) / resolution ) );\n  for ( float i = -1.0; i < 1.0 ; i += SAMPLE_RATE) {\n    #ifdef HORIZONAL_PASS\n      vec2 distribution = unpack2HalfToRGBA ( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( i, 0.0 ) * radius ) / resolution ) );\n      mean += distribution.x;\n      squared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n    #else\n      float depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0,  i )  * radius ) / resolution ) );\n      mean += depth;\n      squared_mean += depth * depth;\n    #endif\n  }\n  mean = mean * HALF_SAMPLE_RATE;\n  squared_mean = squared_mean * HALF_SAMPLE_RATE;\n  float std_dev = sqrt( squared_mean - mean * mean );\n  gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}"}),
-n=v.clone();n.defines.HORIZONAL_PASS=1;var w=new D;w.setAttribute("position",new P(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));var x=new fa(w,v),J=this;this.enabled=!1;this.autoUpdate=!0;this.needsUpdate=!1;this.type=1;this.render=function(d,e,f){if(!1!==J.enabled&&(!1!==J.autoUpdate||!1!==J.needsUpdate)&&0!==d.length){var t=a.getRenderTarget(),k=a.getActiveCubeFace(),q=a.getActiveMipmapLevel(),r=a.state;r.setBlending(0);r.buffers.color.setClear(1,1,1,1);r.buffers.depth.setTest(!0);r.setScissorTest(!1);
+n=v.clone();n.defines.HORIZONAL_PASS=1;var w=new D;w.setAttribute("position",new P(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));var x=new W(w,v),J=this;this.enabled=!1;this.autoUpdate=!0;this.needsUpdate=!1;this.type=1;this.render=function(d,e,f){if(!1!==J.enabled&&(!1!==J.autoUpdate||!1!==J.needsUpdate)&&0!==d.length){var t=a.getRenderTarget(),k=a.getActiveCubeFace(),q=a.getActiveMipmapLevel(),r=a.state;r.setBlending(0);r.buffers.color.setClear(1,1,1,1);r.buffers.depth.setTest(!0);r.setScissorTest(!1);
 for(var u=0,w=d.length;u<w;u++){var B=d[u],z=B.shadow;if(void 0===z)console.warn("THREE.WebGLShadowMap:",B,"has no shadow.");else{l.copy(z.mapSize);var H=z.getFrameExtents();l.multiply(H);m.copy(z.mapSize);if(l.x>c||l.y>c)console.warn("THREE.WebGLShadowMap:",B,"has shadow exceeding max texture size, reducing"),l.x>c&&(m.x=Math.floor(c/H.x),l.x=m.x*H.x,z.mapSize.x=m.x),l.y>c&&(m.y=Math.floor(c/H.y),l.y=m.y*H.y,z.mapSize.y=m.y);null!==z.map||z.isPointLightShadow||3!==this.type||(H={minFilter:1006,magFilter:1006,
 format:1023},z.map=new ka(l.x,l.y,H),z.map.texture.name=B.name+".shadowMap",z.mapPass=new ka(l.x,l.y,H),z.camera.updateProjectionMatrix());null===z.map&&(H={minFilter:1003,magFilter:1003,format:1023},z.map=new ka(l.x,l.y,H),z.map.texture.name=B.name+".shadowMap",z.camera.updateProjectionMatrix());a.setRenderTarget(z.map);a.clear();H=z.getViewportCount();for(var Da=0;Da<H;Da++){var y=z.getViewport(Da);p.set(m.x*y.x,m.y*y.y,m.x*y.z,m.y*y.w);r.viewport(p);z.updateMatrices(B,Da);h=z.getFrustum();g(e,
 f,z.camera,B,this.type)}z.isPointLightShadow||3!==this.type||(B=z,z=f,H=b.update(x),v.uniforms.shadow_pass.value=B.map.texture,v.uniforms.resolution.value=B.mapSize,v.uniforms.radius.value=B.radius,a.setRenderTarget(B.mapPass),a.clear(),a.renderBufferDirect(z,null,H,v,x,null),n.uniforms.shadow_pass.value=B.mapPass.texture,n.uniforms.resolution.value=B.mapSize,n.uniforms.radius.value=B.radius,a.setRenderTarget(B.map),a.clear(),a.renderBufferDirect(z,null,H,n,x,null))}}J.needsUpdate=!1;a.setRenderTarget(t,
@@ -156,7 +157,7 @@ O=!0),a=a.texture);a&&a.isCubeTexture||Array.isArray(a.image)&&6===a.image.lengt
 null}if(1021===a)return 6406;if(1022===a)return 6407;if(1023===a)return 6408;if(1024===a)return 6409;if(1025===a)return 6410;if(1026===a)return 6402;if(1027===a)return 34041;if(1028===a)return 6403;if(33776===a||33777===a||33778===a||33779===a)if(c=b.get("WEBGL_compressed_texture_s3tc"),null!==c){if(33776===a)return c.COMPRESSED_RGB_S3TC_DXT1_EXT;if(33777===a)return c.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(33778===a)return c.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(33779===a)return c.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;
 if(35840===a||35841===a||35842===a||35843===a)if(c=b.get("WEBGL_compressed_texture_pvrtc"),null!==c){if(35840===a)return c.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(35841===a)return c.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(35842===a)return c.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(35843===a)return c.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(36196===a)return c=b.get("WEBGL_compressed_texture_etc1"),null!==c?c.COMPRESSED_RGB_ETC1_WEBGL:null;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)return c=b.get("WEBGL_compressed_texture_astc"),null!==c?a:null;if(1020===a){if(d)return 34042;c=b.get("WEBGL_depth_texture");return null!==c?c.UNSIGNED_INT_24_8_WEBGL:null}}}}function og(a,b,c,d){ka.call(this,a,b,d);this.stencilBuffer=this.depthBuffer=!1;this.numViews=c}function sk(a,b){function c(a){if(a.isArrayCamera)return a.cameras;p[0]=a;return p}function d(a){if(void 0===a.isArrayCamera)return!0;a=a.cameras;
-if(a.length>u)return!1;for(var b=1,c=a.length;b<c;b++)if(a[0].viewport.z!==a[b].viewport.z||a[0].viewport.w!==a[b].viewport.w)return!1;return!0}var e=a.extensions,f=a.properties,g,h,l,m,p,t,k,u=0;this.isAvailable=function(){if(void 0===k){var a=e.get("OVR_multiview2");if(k=null!==a&&!1===b.getContextAttributes().antialias)for(u=b.getParameter(a.MAX_VIEWS_OVR),g=new og(0,0,2),t=new y,m=[],l=[],p=[],a=0;a<u;a++)m[a]=new M,l[a]=new W}return k};this.attachCamera=function(b){if(!1!==d(b)){(h=a.getRenderTarget())?
+if(a.length>u)return!1;for(var b=1,c=a.length;b<c;b++)if(a[0].viewport.z!==a[b].viewport.z||a[0].viewport.w!==a[b].viewport.w)return!1;return!0}var e=a.extensions,f=a.properties,g,h,l,m,p,t,k,u=0;this.isAvailable=function(){if(void 0===k){var a=e.get("OVR_multiview2");if(k=null!==a&&!1===b.getContextAttributes().antialias)for(u=b.getParameter(a.MAX_VIEWS_OVR),g=new og(0,0,2),t=new y,m=[],l=[],p=[],a=0;a<u;a++)m[a]=new M,l[a]=new ca}return k};this.attachCamera=function(b){if(!1!==d(b)){(h=a.getRenderTarget())?
 t.set(h.width,h.height):a.getDrawingBufferSize(t);if(b.isArrayCamera){var c=b.cameras[0].viewport;g.setSize(c.z,c.w);g.setNumViews(b.cameras.length)}else g.setSize(t.x,t.y),g.setNumViews(2);a.setRenderTarget(g)}};this.detachCamera=function(c){if(g===a.getRenderTarget()){a.setRenderTarget(h);var d=g,e=d.numViews,l=f.get(d).__webglViewFramebuffers,m=d.width;d=d.height;if(c.isArrayCamera)for(var p=0;p<e;p++){var k=c.cameras[p].viewport,q=k.x,r=k.y,u=q+k.z;k=r+k.w;b.bindFramebuffer(36008,l[p]);b.blitFramebuffer(0,
 0,m,d,q,r,u,k,16384,9728)}else b.bindFramebuffer(36008,l[0]),b.blitFramebuffer(0,0,m,d,0,0,t.x,t.y,16384,9728)}};this.updateCameraProjectionMatricesUniform=function(a,d){a=c(a);for(var e=0;e<a.length;e++)m[e].copy(a[e].projectionMatrix);d.setValue(b,"projectionMatrices",m)};this.updateCameraViewMatricesUniform=function(a,d){a=c(a);for(var e=0;e<a.length;e++)m[e].copy(a[e].matrixWorldInverse);d.setValue(b,"viewMatrices",m)};this.updateObjectMatricesUniforms=function(a,d,e){d=c(d);for(var f=0;f<d.length;f++)m[f].multiplyMatrices(d[f].matrixWorldInverse,
 a.matrixWorld),l[f].getNormalMatrix(m[f]);e.setValue(b,"modelViewMatrices",m);e.setValue(b,"normalMatrices",l)}}function Ec(){E.call(this);this.type="Group"}function Kd(a){ja.call(this);this.cameras=a||[]}function Qh(a,b,c){Rh.setFromMatrixPosition(b.matrixWorld);Sh.setFromMatrixPosition(c.matrixWorld);var d=Rh.distanceTo(Sh),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*
@@ -175,20 +176,20 @@ e;break a}}c=void 0}u[b]=c}}function g(a,b){null===b?a.matrixWorld.copy(a.matrix
 l.addEventListener("inputsourceschange",f),f())};this.getCamera=function(a){var b=a.parent,c=n.cameras;g(n,b);for(var d=0;d<c.length;d++)g(c[d],b);a.matrixWorld.copy(n.matrixWorld);a=a.children;d=0;for(b=a.length;d<b;d++)a[d].updateMatrixWorld(!0);Qh(n,r,v);return n};this.isPresenting=function(){return null!==l&&null!==m};var w=null,x=new ig;x.setAnimationLoop(function(b,c){t=c.getViewerPose(m);if(null!==t){var d=t.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=n.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&&n.matrix.copy(p.matrix)}}for(f=0;f<k.length;f++){d=k[f];if(e=u[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}w&&w(b)});this.setAnimationLoop=function(a){w=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 qg(a){var b;
-function c(){ta=new ij(I);Ga=new gj(I,ta,a);!1===Ga.isWebGL2&&(ta.get("WEBGL_depth_texture"),ta.get("OES_texture_float"),ta.get("OES_texture_half_float"),ta.get("OES_texture_half_float_linear"),ta.get("OES_standard_derivatives"),ta.get("OES_element_index_uint"),ta.get("ANGLE_instanced_arrays"));ta.get("OES_texture_float_linear");oa=new Ph(I,ta,Ga);ba=new qk(I,ta,Ga);ba.scissor(T.copy(ja).multiplyScalar(U).floor());ba.viewport(db.copy(fa).multiplyScalar(U).floor());ca=new lj(I);aa=new hk;W=new rk(I,
-ta,ba,aa,Ga,oa,ca);pa=new dj(I);ya=new jj(I,pa,ca);ua=new oj(I,ya,pa,ca);za=new nj(I);ra=new gk(A,ta,Ga);xa=new kk;wa=new pk;qa=new ej(A,ba,ua,z);Aa=new fj(I,ta,ca,Ga);Ca=new kj(I,ta,ca,Ga);ca.programs=ra.programs;A.capabilities=Ga;A.extensions=ta;A.properties=aa;A.renderLists=xa;A.state=ba;A.info=ca}function d(a){a.preventDefault();console.log("THREE.WebGLRenderer: Context Lost.");K=!0}function e(){console.log("THREE.WebGLRenderer: Context Restored.");K=!1;c()}function f(a){a=a.target;a.removeEventListener("dispose",
+function c(){ta=new ij(I);Ga=new gj(I,ta,a);!1===Ga.isWebGL2&&(ta.get("WEBGL_depth_texture"),ta.get("OES_texture_float"),ta.get("OES_texture_half_float"),ta.get("OES_texture_half_float_linear"),ta.get("OES_standard_derivatives"),ta.get("OES_element_index_uint"),ta.get("ANGLE_instanced_arrays"));ta.get("OES_texture_float_linear");oa=new Ph(I,ta,Ga);ba=new qk(I,ta,Ga);ba.scissor(T.copy(ja).multiplyScalar(U).floor());ba.viewport(db.copy(W).multiplyScalar(U).floor());fa=new lj(I);aa=new hk;ca=new rk(I,
+ta,ba,aa,Ga,oa,fa);pa=new dj(I);ya=new jj(I,pa,fa);ua=new oj(I,ya,pa,fa);za=new nj(I);ra=new gk(A,ta,Ga);xa=new kk;wa=new pk;qa=new ej(A,ba,ua,z);Aa=new fj(I,ta,fa,Ga);Ca=new kj(I,ta,fa,Ga);fa.programs=ra.programs;A.capabilities=Ga;A.extensions=ta;A.properties=aa;A.renderLists=xa;A.state=ba;A.info=fa}function d(a){a.preventDefault();console.log("THREE.WebGLRenderer: Context Lost.");K=!0}function e(){console.log("THREE.WebGLRenderer: Context Restored.");K=!1;c()}function f(a){a=a.target;a.removeEventListener("dispose",
 f);g(a);aa.remove(a)}function g(a){var b=aa.get(a).program;a.program=void 0;void 0!==b&&ra.releaseProgram(b)}function h(a,b){a.render(function(a){A.renderBufferImmediate(a,b)})}function l(a,b,c,d){if(!1!==a.visible){if(a.layers.test(b.layers))if(a.isGroup)c=a.renderOrder;else if(a.isLOD)!0===a.autoUpdate&&a.update(b);else if(a.isLight)F.pushLight(a),a.castShadow&&F.pushShadow(a);else if(a.isSprite){if(!a.frustumCulled||sa.intersectsSprite(a)){d&&Eb.setFromMatrixPosition(a.matrixWorld).applyMatrix4(ma);
-var e=ua.update(a),f=a.material;f.visible&&Z.push(a,e,f,c,Eb.z,null)}}else if(a.isImmediateRenderObject)d&&Eb.setFromMatrixPosition(a.matrixWorld).applyMatrix4(ma),Z.push(a,null,a.material,c,Eb.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||sa.intersectsObject(a))if(d&&Eb.setFromMatrixPosition(a.matrixWorld).applyMatrix4(ma),e=ua.update(a),f=a.material,Array.isArray(f))for(var g=
+var e=ua.update(a),f=a.material;f.visible&&Z.push(a,e,f,c,Eb.z,null)}}else if(a.isImmediateRenderObject)d&&Eb.setFromMatrixPosition(a.matrixWorld).applyMatrix4(ma),Z.push(a,null,a.material,c,Eb.z,null);else if(a.isMesh||a.isLine||a.isPoints)if(a.isSkinnedMesh&&a.skeleton.frame!==fa.render.frame&&(a.skeleton.update(),a.skeleton.frame=fa.render.frame),!a.frustumCulled||sa.intersectsObject(a))if(d&&Eb.setFromMatrixPosition(a.matrixWorld).applyMatrix4(ma),e=ua.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&&Z.push(a,e,k,c,Eb.z,p)}else f.visible&&Z.push(a,e,f,c,Eb.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(Y=c,ka.enabled&&va.isAvailable())p(h,b,c,l,m,g);else for(var k=c.cameras,t=0,q=k.length;t<q;t++){var r=k[t];h.layers.test(r.layers)&&(ba.viewport(db.copy(r.viewport)),
 F.setupLights(r),p(h,b,r,l,m,g))}else Y=null,p(h,b,c,l,m,g)}}function p(a,c,d,e,f,g){a.onBeforeRender(A,c,d,e,f,g);F=wa.get(c,Y||d);a.modelViewMatrix.multiplyMatrices(d.matrixWorldInverse,a.matrixWorld);a.normalMatrix.getNormalMatrix(a.modelViewMatrix);if(a.isImmediateRenderObject){var l=k(d,c.fog,f,a);ba.setMaterial(f);ia=b=null;Se=!1;h(a,l)}else A.renderBufferDirect(d,c.fog,e,f,a,g);a.onAfterRender(A,c,d,e,f,g);F=wa.get(c,Y||d)}function t(a,b,c){var d=aa.get(a),e=F.state.lights,h=e.state.version;
 c=ra.getParameters(a,e.state,F.state.shadowsArray,b,ha.numPlanes,ha.numIntersection,c);var l=ra.getProgramCacheKey(a,c),m=d.program,p=!0;if(void 0===m)a.addEventListener("dispose",f);else if(m.cacheKey!==l)g(a);else{if(d.lightsStateVersion!==h)d.lightsStateVersion=h;else if(void 0!==c.shaderID)return;p=!1}p&&(c.shaderID?(l=cb[c.shaderID],d.shader={name:a.type,uniforms:Xb(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,A),l=ra.getProgramCacheKey(a,c),m=ra.acquireProgram(a,d.shader,c,l),d.program=m,a.program=m);c=m.getAttributes();if(a.morphTargets)for(l=a.numSupportedMorphTargets=0;l<A.maxMorphTargets;l++)0<=c["morphTarget"+l]&&a.numSupportedMorphTargets++;if(a.morphNormals)for(l=a.numSupportedMorphNormals=0;l<A.maxMorphNormals;l++)0<=c["morphNormal"+l]&&a.numSupportedMorphNormals++;c=d.shader.uniforms;if(!a.isShaderMaterial&&!a.isRawShaderMaterial||!0===
 a.clipping)d.numClippingPlanes=ha.numPlanes,d.numIntersection=ha.numIntersection,c.clippingPlanes=ha.uniform;d.fog=b;d.needsLights=a.isMeshLambertMaterial||a.isMeshToonMaterial||a.isMeshPhongMaterial||a.isMeshStandardMaterial||a.isShadowMaterial||a.isShaderMaterial&&!0===a.lights;d.lightsStateVersion=h;d.needsLights&&(c.ambientLightColor.value=e.state.ambient,c.lightProbe.value=e.state.probe,c.directionalLights.value=e.state.directional,c.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){W.resetTextureUnits();var e=
+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){ca.resetTextureUnits();var e=
 aa.get(c),f=F.state.lights;Qe&&(mg||a!==S)&&ha.setState(c.clippingPlanes,c.clipIntersection,c.clipShadows,a,e,a===S&&c.id===Re);c.version===e.__version&&(void 0===e.program?c.needsUpdate=!0:c.fog&&e.fog!==b?c.needsUpdate=!0:e.needsLights&&e.lightsStateVersion!==f.state.version?c.needsUpdate=!0:void 0===e.numClippingPlanes||e.numClippingPlanes===ha.numPlanes&&e.numIntersection===ha.numIntersection||(c.needsUpdate=!0));c.version!==e.__version&&(t(c,b,d),e.__version=c.version);var g=!1,h=!1,l=!1;f=e.program;
 var m=f.getUniforms(),p=e.shader.uniforms;ba.useProgram(f.program)&&(l=h=g=!0);c.id!==Re&&(Re=c.id,h=!0);if(g||S!==a){0<f.numMultiviewViews?va.updateCameraProjectionMatricesUniform(a,m):m.setValue(I,"projectionMatrix",a.projectionMatrix);Ga.logarithmicDepthBuffer&&m.setValue(I,"logDepthBufFC",2/(Math.log(a.far+1)/Math.LN2));S!==a&&(S=a,l=h=!0);if(c.isShaderMaterial||c.isMeshPhongMaterial||c.isMeshToonMaterial||c.isMeshStandardMaterial||c.envMap)g=m.map.cameraPosition,void 0!==g&&g.setValue(I,Eb.setFromMatrixPosition(a.matrixWorld));
 (c.isMeshPhongMaterial||c.isMeshToonMaterial||c.isMeshLambertMaterial||c.isMeshBasicMaterial||c.isMeshStandardMaterial||c.isShaderMaterial)&&m.setValue(I,"isOrthographic",!0===a.isOrthographicCamera);if(c.isMeshPhongMaterial||c.isMeshToonMaterial||c.isMeshLambertMaterial||c.isMeshBasicMaterial||c.isMeshStandardMaterial||c.isShaderMaterial||c.skinning)0<f.numMultiviewViews?va.updateCameraViewMatricesUniform(a,m):m.setValue(I,"viewMatrix",a.matrixWorldInverse)}if(c.skinning&&(m.setOptional(I,d,"bindMatrix"),
-m.setOptional(I,d,"bindMatrixInverse"),g=d.skeleton)){var k=g.bones;if(Ga.floatVertexTextures){if(void 0===g.boneTexture){k=Math.sqrt(4*k.length);k=R.ceilPowerOfTwo(k);k=Math.max(k,4);var q=new Float32Array(k*k*4);q.set(g.boneMatrices);var n=new Yb(q,k,k,1023,1015);g.boneMatrices=q;g.boneTexture=n;g.boneTextureSize=k}m.setValue(I,"boneTexture",g.boneTexture,W);m.setValue(I,"boneTextureSize",g.boneTextureSize)}else m.setOptional(I,g,"boneMatrices")}if(h||e.receiveShadow!==d.receiveShadow)e.receiveShadow=
+m.setOptional(I,d,"bindMatrixInverse"),g=d.skeleton)){var k=g.bones;if(Ga.floatVertexTextures){if(void 0===g.boneTexture){k=Math.sqrt(4*k.length);k=R.ceilPowerOfTwo(k);k=Math.max(k,4);var q=new Float32Array(k*k*4);q.set(g.boneMatrices);var n=new Yb(q,k,k,1023,1015);g.boneMatrices=q;g.boneTexture=n;g.boneTextureSize=k}m.setValue(I,"boneTexture",g.boneTexture,ca);m.setValue(I,"boneTextureSize",g.boneTextureSize)}else m.setOptional(I,g,"boneMatrices")}if(h||e.receiveShadow!==d.receiveShadow)e.receiveShadow=
 d.receiveShadow,m.setValue(I,"receiveShadow",d.receiveShadow);if(h){m.setValue(I,"toneMappingExposure",A.toneMappingExposure);m.setValue(I,"toneMappingWhitePoint",A.toneMappingWhitePoint);e.needsLights&&(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));if(c.isMeshBasicMaterial)u(p,c);else if(c.isMeshLambertMaterial)u(p,c),c.emissiveMap&&(p.emissiveMap.value=c.emissiveMap);else if(c.isMeshToonMaterial)u(p,c),p.specular.value.copy(c.specular),p.shininess.value=Math.max(c.shininess,1E-4),c.gradientMap&&(p.gradientMap.value=c.gradientMap),c.emissiveMap&&(p.emissiveMap.value=c.emissiveMap),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);else if(c.isMeshPhongMaterial)u(p,c),p.specular.value.copy(c.specular),p.shininess.value=Math.max(c.shininess,1E-4),c.emissiveMap&&(p.emissiveMap.value=c.emissiveMap),c.bumpMap&&(p.bumpMap.value=c.bumpMap,p.bumpScale.value=c.bumpScale,
@@ -198,40 +199,40 @@ c.sheen&&p.sheen.value.copy(c.sheen),c.clearcoatNormalMap&&(p.clearcoatNormalSca
 c.displacementScale,p.displacementBias.value=c.displacementBias),p.referencePosition.value.copy(c.referencePosition),p.nearDistance.value=c.nearDistance,p.farDistance.value=c.farDistance;else if(c.isMeshNormalMaterial)u(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);else if(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);else if(c.isPointsMaterial){p.diffuse.value.copy(c.color);p.opacity.value=c.opacity;p.size.value=c.size*U;p.scale.value=.5*L;c.map&&(p.map.value=c.map);c.alphaMap&&(p.alphaMap.value=c.alphaMap);if(c.map)var v=
 c.map;else c.alphaMap&&(v=c.alphaMap);void 0!==v&&(!0===v.matrixAutoUpdate&&v.updateMatrix(),p.uvTransform.value.copy(v.matrix))}else if(c.isSpriteMaterial){p.diffuse.value.copy(c.color);p.opacity.value=c.opacity;p.rotation.value=c.rotation;c.map&&(p.map.value=c.map);c.alphaMap&&(p.alphaMap.value=c.alphaMap);if(c.map)var w=c.map;else c.alphaMap&&(w=c.alphaMap);void 0!==w&&(!0===w.matrixAutoUpdate&&w.updateMatrix(),p.uvTransform.value.copy(w.matrix))}else c.isShadowMaterial?(p.color.value.copy(c.color),
-p.opacity.value=c.opacity):c.envMap&&u(p,c);void 0!==p.ltc_1&&(p.ltc_1.value=G.LTC_1);void 0!==p.ltc_2&&(p.ltc_2.value=G.LTC_2);Bb.upload(I,e.uniformsList,p,W);c.isShaderMaterial&&(c.uniformsNeedUpdate=!1)}c.isShaderMaterial&&!0===c.uniformsNeedUpdate&&(Bb.upload(I,e.uniformsList,p,W),c.uniformsNeedUpdate=!1);c.isSpriteMaterial&&m.setValue(I,"center",d.center);0<f.numMultiviewViews?va.updateObjectMatricesUniforms(d,a,m):(m.setValue(I,"modelViewMatrix",d.modelViewMatrix),m.setValue(I,"normalMatrix",
+p.opacity.value=c.opacity):c.envMap&&u(p,c);void 0!==p.ltc_1&&(p.ltc_1.value=G.LTC_1);void 0!==p.ltc_2&&(p.ltc_2.value=G.LTC_2);Bb.upload(I,e.uniformsList,p,ca);c.isShaderMaterial&&(c.uniformsNeedUpdate=!1)}c.isShaderMaterial&&!0===c.uniformsNeedUpdate&&(Bb.upload(I,e.uniformsList,p,ca),c.uniformsNeedUpdate=!1);c.isSpriteMaterial&&m.setValue(I,"center",d.center);0<f.numMultiviewViews?va.updateObjectMatricesUniforms(d,a,m):(m.setValue(I,"modelViewMatrix",d.modelViewMatrix),m.setValue(I,"normalMatrix",
 d.normalMatrix));m.setValue(I,"modelMatrix",d.matrixWorld);return f}function u(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=aa.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 r(a,b){a.roughness.value=b.roughness;a.metalness.value=b.metalness;b.roughnessMap&&(a.roughnessMap.value=b.roughnessMap);b.metalnessMap&&(a.metalnessMap.value=b.metalnessMap);b.emissiveMap&&(a.emissiveMap.value=b.emissiveMap);b.bumpMap&&(a.bumpMap.value=b.bumpMap,a.bumpScale.value=b.bumpScale,1===b.side&&(a.bumpScale.value*=-1));b.normalMap&&(a.normalMap.value=b.normalMap,a.normalScale.value.copy(b.normalScale),
 1===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 v=void 0!==a.canvas?a.canvas:document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),B=void 0!==a.context?a.context:null,w=void 0!==a.alpha?a.alpha:!1,x=void 0!==a.depth?a.depth:!0,J=void 0!==a.stencil?a.stencil:!0,H=void 0!==a.antialias?
 a.antialias:!1,z=void 0!==a.premultipliedAlpha?a.premultipliedAlpha:!0,C=void 0!==a.preserveDrawingBuffer?a.preserveDrawingBuffer:!1,D=void 0!==a.powerPreference?a.powerPreference:"default",E=void 0!==a.failIfMajorPerformanceCaveat?a.failIfMajorPerformanceCaveat:!1,Z=null,F=null;this.domElement=v;this.debug={checkShaderErrors:!0};this.sortObjects=this.autoClearStencil=this.autoClearDepth=this.autoClearColor=this.autoClear=!0;this.clippingPlanes=[];this.localClippingEnabled=!1;this.gammaFactor=2;this.physicallyCorrectLights=
-this.gammaOutput=this.gammaInput=!1;this.toneMappingWhitePoint=this.toneMappingExposure=this.toneMapping=1;this.maxMorphTargets=8;this.maxMorphNormals=4;var A=this,K=!1,N=null,P=0,Q=0,O=null,X=null,Re=-1;var ia=b=null;var Se=!1;var S=null,Y=null,db=new da,T=new da,ea=null,V=v.width,L=v.height,U=1,fa=new da(0,0,V,L),ja=new da(0,0,V,L),na=!1,sa=new Dd,ha=new hj,Qe=!1,mg=!1,ma=new M,Eb=new n;try{w={alpha:w,depth:x,stencil:J,antialias:H,premultipliedAlpha:z,preserveDrawingBuffer:C,powerPreference:D,failIfMajorPerformanceCaveat:E,
+this.gammaOutput=this.gammaInput=!1;this.toneMappingWhitePoint=this.toneMappingExposure=this.toneMapping=1;this.maxMorphTargets=8;this.maxMorphNormals=4;var A=this,K=!1,N=null,P=0,Q=0,O=null,X=null,Re=-1;var ia=b=null;var Se=!1;var S=null,Y=null,db=new da,T=new da,ea=null,V=v.width,L=v.height,U=1,W=new da(0,0,V,L),ja=new da(0,0,V,L),na=!1,sa=new Dd,ha=new hj,Qe=!1,mg=!1,ma=new M,Eb=new n;try{w={alpha:w,depth:x,stencil:J,antialias:H,premultipliedAlpha:z,preserveDrawingBuffer:C,powerPreference:D,failIfMajorPerformanceCaveat:E,
 xrCompatible:!0};v.addEventListener("webglcontextlost",d,!1);v.addEventListener("webglcontextrestored",e,!1);var I=B||v.getContext("webgl",w)||v.getContext("experimental-webgl",w);if(null===I){if(null!==v.getContext("webgl"))throw Error("Error creating WebGL context with your selected attributes.");throw Error("Error creating WebGL context.");}void 0===I.getShaderPrecisionFormat&&(I.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(Uh){throw console.error("THREE.WebGLRenderer: "+
-Uh.message),Uh;}var ta,Ga,ba,ca,aa,W,pa,ya,ua,ra,xa,wa,qa,za,Aa,Ca,oa;c();var ka="undefined"!==typeof navigator&&"xr"in navigator?new Th(A,I):new pg(A);this.xr=ka;var va=new sk(A,I),Fa=new Nh(A,ua,Ga.maxTextureSize);this.shadowMap=Fa;this.getContext=function(){return I};this.getContextAttributes=function(){return I.getContextAttributes()};this.forceContextLoss=function(){var a=ta.get("WEBGL_lose_context");a&&a.loseContext()};this.forceContextRestore=function(){var a=ta.get("WEBGL_lose_context");a&&
-a.restoreContext()};this.getPixelRatio=function(){return U};this.setPixelRatio=function(a){void 0!==a&&(U=a,this.setSize(V,L,!1))};this.getSize=function(a){void 0===a&&(console.warn("WebGLRenderer: .getsize() now requires a Vector2 as an argument"),a=new y);return a.set(V,L)};this.setSize=function(a,b,c){ka.isPresenting()?console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting."):(V=a,L=b,v.width=Math.floor(a*U),v.height=Math.floor(b*U),!1!==c&&(v.style.width=a+"px",v.style.height=
-b+"px"),this.setViewport(0,0,a,b))};this.getDrawingBufferSize=function(a){void 0===a&&(console.warn("WebGLRenderer: .getdrawingBufferSize() now requires a Vector2 as an argument"),a=new y);return a.set(V*U,L*U).floor()};this.setDrawingBufferSize=function(a,b,c){V=a;L=b;U=c;v.width=Math.floor(a*c);v.height=Math.floor(b*c);this.setViewport(0,0,a,b)};this.getCurrentViewport=function(a){void 0===a&&(console.warn("WebGLRenderer: .getCurrentViewport() now requires a Vector4 as an argument"),a=new da);return a.copy(db)};
-this.getViewport=function(a){return a.copy(fa)};this.setViewport=function(a,b,c,d){a.isVector4?fa.set(a.x,a.y,a.z,a.w):fa.set(a,b,c,d);ba.viewport(db.copy(fa).multiplyScalar(U).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);ba.scissor(T.copy(ja).multiplyScalar(U).floor())};this.getScissorTest=function(){return na};this.setScissorTest=function(a){ba.setScissorTest(na=a)};this.getClearColor=function(){return qa.getClearColor()};
-this.setClearColor=function(){qa.setClearColor.apply(qa,arguments)};this.getClearAlpha=function(){return qa.getClearAlpha()};this.setClearAlpha=function(){qa.setClearAlpha.apply(qa,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;I.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(){v.removeEventListener("webglcontextlost",
-d,!1);v.removeEventListener("webglcontextrestored",e,!1);xa.dispose();wa.dispose();aa.dispose();ua.dispose();ka.dispose();Ba.stop()};this.renderBufferImmediate=function(a,b){ba.initAttributes();var c=aa.get(a);a.hasPositions&&!c.position&&(c.position=I.createBuffer());a.hasNormals&&!c.normal&&(c.normal=I.createBuffer());a.hasUvs&&!c.uv&&(c.uv=I.createBuffer());a.hasColors&&!c.color&&(c.color=I.createBuffer());b=b.getAttributes();a.hasPositions&&(I.bindBuffer(34962,c.position),I.bufferData(34962,a.positionArray,
-35048),ba.enableAttribute(b.position),I.vertexAttribPointer(b.position,3,5126,!1,0,0));a.hasNormals&&(I.bindBuffer(34962,c.normal),I.bufferData(34962,a.normalArray,35048),ba.enableAttribute(b.normal),I.vertexAttribPointer(b.normal,3,5126,!1,0,0));a.hasUvs&&(I.bindBuffer(34962,c.uv),I.bufferData(34962,a.uvArray,35048),ba.enableAttribute(b.uv),I.vertexAttribPointer(b.uv,2,5126,!1,0,0));a.hasColors&&(I.bindBuffer(34962,c.color),I.bufferData(34962,a.colorArray,35048),ba.enableAttribute(b.color),I.vertexAttribPointer(b.color,
-3,5126,!1,0,0));ba.disableUnusedAttributes();I.drawArrays(4,0,a.count);a.count=0};this.renderBufferDirect=function(a,c,d,e,f,g){var h=f.isMesh&&0>f.matrixWorld.determinant(),l=k(a,c,e,f);ba.setMaterial(e,h);var m=!1;if(b!==d.id||ia!==l.id||Se!==(!0===e.wireframe))b=d.id,ia=l.id,Se=!0===e.wireframe,m=!0;if(e.morphTargets||e.morphNormals)za.update(f,d,e,l),m=!0;c=d.index;var p=d.attributes.position;if((null===c||0!==c.count)&&void 0!==p&&0!==p.count){a=1;!0===e.wireframe&&(c=ya.getWireframeAttribute(d),
-a=2);h=Aa;if(null!==c){var t=pa.get(c);h=Ca;h.setIndex(t)}if(m){if(!1!==Ga.isWebGL2||!f.isInstancedMesh&&!d.isInstancedBufferGeometry||null!==ta.get("ANGLE_instanced_arrays")){ba.initAttributes();m=d.attributes;l=l.getAttributes();var q=e.defaultAttributeValues;for(H in l){var r=l[H];if(0<=r){var u=m[H];if(void 0!==u){var v=u.normalized,n=u.itemSize,w=pa.get(u);if(void 0!==w){var B=w.buffer,x=w.type;w=w.bytesPerElement;if(u.isInterleavedBufferAttribute){var z=u.data,J=z.stride;u=u.offset;z&&z.isInstancedInterleavedBuffer?
-(ba.enableAttributeAndDivisor(r,z.meshPerAttribute),void 0===d.maxInstancedCount&&(d.maxInstancedCount=z.meshPerAttribute*z.count)):ba.enableAttribute(r);I.bindBuffer(34962,B);I.vertexAttribPointer(r,n,x,v,J*w,u*w)}else u.isInstancedBufferAttribute?(ba.enableAttributeAndDivisor(r,u.meshPerAttribute),void 0===d.maxInstancedCount&&(d.maxInstancedCount=u.meshPerAttribute*u.count)):ba.enableAttribute(r),I.bindBuffer(34962,B),I.vertexAttribPointer(r,n,x,v,0,0)}}else if("instanceMatrix"===H)w=pa.get(f.instanceMatrix),
-void 0!==w&&(B=w.buffer,x=w.type,ba.enableAttributeAndDivisor(r+0,1),ba.enableAttributeAndDivisor(r+1,1),ba.enableAttributeAndDivisor(r+2,1),ba.enableAttributeAndDivisor(r+3,1),I.bindBuffer(34962,B),I.vertexAttribPointer(r+0,4,x,!1,64,0),I.vertexAttribPointer(r+1,4,x,!1,64,16),I.vertexAttribPointer(r+2,4,x,!1,64,32),I.vertexAttribPointer(r+3,4,x,!1,64,48));else if(void 0!==q&&(v=q[H],void 0!==v))switch(v.length){case 2:I.vertexAttrib2fv(r,v);break;case 3:I.vertexAttrib3fv(r,v);break;case 4:I.vertexAttrib4fv(r,
-v);break;default:I.vertexAttrib1fv(r,v)}}}ba.disableUnusedAttributes()}null!==c&&I.bindBuffer(34963,t.buffer)}t=Infinity;null!==c?t=c.count:void 0!==p&&(t=p.count);c=d.drawRange.start*a;p=null!==g?g.start*a:0;var H=Math.max(c,p);g=Math.max(0,Math.min(t,c+d.drawRange.count*a,p+(null!==g?g.count*a:Infinity))-1-H+1);0!==g&&(f.isMesh?!0===e.wireframe?(ba.setLineWidth(e.wireframeLinewidth*(null===O?U:1)),h.setMode(1)):h.setMode(4):f.isLine?(e=e.linewidth,void 0===e&&(e=1),ba.setLineWidth(e*(null===O?U:
-1)),f.isLineSegments?h.setMode(1):f.isLineLoop?h.setMode(2):h.setMode(3)):f.isPoints?h.setMode(0):f.isSprite&&h.setMode(4),f.isInstancedMesh?h.renderInstances(d,H,g,f.count):d.isInstancedBufferGeometry?h.renderInstances(d,H,g,d.maxInstancedCount):h.render(H,g))}};this.compile=function(a,b){F=wa.get(a,b);F.init();a.traverse(function(a){a.isLight&&(F.pushLight(a),a.castShadow&&F.pushShadow(a))});F.setupLights(b);a.traverse(function(b){if(b.material)if(Array.isArray(b.material))for(var c=0;c<b.material.length;c++)t(b.material[c],
-a.fog,b);else t(b.material,a.fog,b)})};var Ea=null,Ba=new ig;Ba.setAnimationLoop(function(a){ka.isPresenting()||Ea&&Ea(a)});"undefined"!==typeof window&&Ba.setContext(window);this.setAnimationLoop=function(a){Ea=a;ka.setAnimationLoop(a);Ba.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?K||(ia=b=null,Se=!1,Re=-1,S=null,!0===a.autoUpdate&&a.updateMatrixWorld(),null===c.parent&&c.updateMatrixWorld(),ka.enabled&&ka.isPresenting()&&(c=ka.getCamera(c)),F=wa.get(a,c),F.init(),a.onBeforeRender(A,a,c,f||O),ma.multiplyMatrices(c.projectionMatrix,c.matrixWorldInverse),sa.setFromMatrix(ma),mg=this.localClippingEnabled,Qe=ha.init(this.clippingPlanes,mg,c),Z=xa.get(a,c),Z.init(),l(a,c,0,A.sortObjects),!0===A.sortObjects&&Z.sort(),Qe&&ha.beginShadows(),Fa.render(F.state.shadowsArray,
-a,c),F.setupLights(c),Qe&&ha.endShadows(),this.info.autoReset&&this.info.reset(),void 0!==f&&this.setRenderTarget(f),ka.enabled&&va.isAvailable()&&va.attachCamera(c),qa.render(Z,a,c,g),d=Z.opaque,e=Z.transparent,a.overrideMaterial?(f=a.overrideMaterial,d.length&&m(d,a,c,f),e.length&&m(e,a,c,f)):(d.length&&m(d,a,c),e.length&&m(e,a,c)),a.onAfterRender(A,a,c),null!==O&&(W.updateRenderTargetMipmap(O),W.updateMultisampleRenderTarget(O)),ba.buffers.depth.setTest(!0),ba.buffers.depth.setMask(!0),ba.buffers.color.setMask(!0),
-ba.setPolygonOffset(!1),ka.enabled&&(va.isAvailable()&&va.detachCamera(c),ka.submitFrame()),F=Z=null):console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.")};this.setFramebuffer=function(a){N!==a&&null===O&&I.bindFramebuffer(36160,a);N=a};this.getActiveCubeFace=function(){return P};this.getActiveMipmapLevel=function(){return Q};this.getRenderTarget=function(){return O};this.setRenderTarget=function(a,b,c){O=a;P=b;Q=c;a&&void 0===aa.get(a).__webglFramebuffer&&W.setupRenderTarget(a);
-var d=N,e=!1;a?(d=aa.get(a).__webglFramebuffer,a.isWebGLRenderTargetCube?(d=d[b||0],e=!0):d=a.isWebGLMultisampleRenderTarget?aa.get(a).__webglMultisampledFramebuffer:d,db.copy(a.viewport),T.copy(a.scissor),ea=a.scissorTest):(db.copy(fa).multiplyScalar(U).floor(),T.copy(ja).multiplyScalar(U).floor(),ea=na);X!==d&&(I.bindFramebuffer(36160,d),X=d);ba.viewport(db);ba.scissor(T);ba.setScissorTest(ea);e&&(a=aa.get(a.texture),I.framebufferTexture2D(36160,36064,34069+(b||0),a.__webglTexture,c||0))};this.readRenderTargetPixels=
-function(a,b,c,d,e,f,g){if(a&&a.isWebGLRenderTarget){var h=aa.get(a).__webglFramebuffer;a.isWebGLRenderTargetCube&&void 0!==g&&(h=h[g]);if(h){g=!1;h!==X&&(I.bindFramebuffer(36160,h),g=!0);try{var l=a.texture,m=l.format,p=l.type;1023!==m&&oa.convert(m)!==I.getParameter(35739)?console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format."):1009===p||oa.convert(p)===I.getParameter(35738)||1015===p&&(Ga.isWebGL2||ta.get("OES_texture_float")||
-ta.get("WEBGL_color_buffer_float"))||1016===p&&(Ga.isWebGL2?ta.get("EXT_color_buffer_float"):ta.get("EXT_color_buffer_half_float"))?36053===I.checkFramebufferStatus(36160)?0<=b&&b<=a.width-d&&0<=c&&c<=a.height-e&&I.readPixels(b,c,d,e,oa.convert(m),oa.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&&
-I.bindFramebuffer(36160,X)}}}else console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.")};this.copyFramebufferToTexture=function(a,b,c){void 0===c&&(c=0);var d=Math.pow(2,-c),e=Math.floor(b.image.width*d);d=Math.floor(b.image.height*d);var f=oa.convert(b.format);W.setTexture2D(b,0);I.copyTexImage2D(3553,c,f,a.x,a.y,e,d,0);ba.unbindTexture()};this.copyTextureToTexture=function(a,b,c,d){var e=b.image.width,f=b.image.height,g=oa.convert(c.format),h=
-oa.convert(c.type);W.setTexture2D(c,0);b.isDataTexture?I.texSubImage2D(3553,d||0,a.x,a.y,e,f,g,h,b.image.data):I.texSubImage2D(3553,d||0,a.x,a.y,g,h,b.image);ba.unbindTexture()};this.initTexture=function(a){W.setTexture2D(a,0);ba.unbindTexture()};"undefined"!==typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}function Te(a,b){this.name="";this.color=new A(a);this.density=void 0!==b?b:2.5E-4}function Ue(a,b,c){this.name="";this.color=new A(a);this.near=
+Uh.message),Uh;}var ta,Ga,ba,fa,aa,ca,pa,ya,ua,ra,xa,wa,qa,za,Aa,Ca,oa;c();var ka="undefined"!==typeof navigator&&"xr"in navigator?new Th(A,I):new pg(A);this.xr=ka;var va=new sk(A,I),Fa=new Nh(A,ua,Ga.maxTextureSize);this.shadowMap=Fa;this.getContext=function(){return I};this.getContextAttributes=function(){return I.getContextAttributes()};this.forceContextLoss=function(){var a=ta.get("WEBGL_lose_context");a&&a.loseContext()};this.forceContextRestore=function(){var a=ta.get("WEBGL_lose_context");
+a&&a.restoreContext()};this.getPixelRatio=function(){return U};this.setPixelRatio=function(a){void 0!==a&&(U=a,this.setSize(V,L,!1))};this.getSize=function(a){void 0===a&&(console.warn("WebGLRenderer: .getsize() now requires a Vector2 as an argument"),a=new y);return a.set(V,L)};this.setSize=function(a,b,c){ka.isPresenting()?console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting."):(V=a,L=b,v.width=Math.floor(a*U),v.height=Math.floor(b*U),!1!==c&&(v.style.width=a+"px",
+v.style.height=b+"px"),this.setViewport(0,0,a,b))};this.getDrawingBufferSize=function(a){void 0===a&&(console.warn("WebGLRenderer: .getdrawingBufferSize() now requires a Vector2 as an argument"),a=new y);return a.set(V*U,L*U).floor()};this.setDrawingBufferSize=function(a,b,c){V=a;L=b;U=c;v.width=Math.floor(a*c);v.height=Math.floor(b*c);this.setViewport(0,0,a,b)};this.getCurrentViewport=function(a){void 0===a&&(console.warn("WebGLRenderer: .getCurrentViewport() now requires a Vector4 as an argument"),
+a=new da);return a.copy(db)};this.getViewport=function(a){return a.copy(W)};this.setViewport=function(a,b,c,d){a.isVector4?W.set(a.x,a.y,a.z,a.w):W.set(a,b,c,d);ba.viewport(db.copy(W).multiplyScalar(U).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);ba.scissor(T.copy(ja).multiplyScalar(U).floor())};this.getScissorTest=function(){return na};this.setScissorTest=function(a){ba.setScissorTest(na=a)};this.getClearColor=
+function(){return qa.getClearColor()};this.setClearColor=function(){qa.setClearColor.apply(qa,arguments)};this.getClearAlpha=function(){return qa.getClearAlpha()};this.setClearAlpha=function(){qa.setClearAlpha.apply(qa,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;I.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(){v.removeEventListener("webglcontextlost",d,!1);v.removeEventListener("webglcontextrestored",e,!1);xa.dispose();wa.dispose();aa.dispose();ua.dispose();ka.dispose();Ba.stop()};this.renderBufferImmediate=function(a,b){ba.initAttributes();var c=aa.get(a);a.hasPositions&&!c.position&&(c.position=I.createBuffer());a.hasNormals&&!c.normal&&(c.normal=I.createBuffer());a.hasUvs&&!c.uv&&(c.uv=I.createBuffer());a.hasColors&&!c.color&&(c.color=I.createBuffer());b=b.getAttributes();a.hasPositions&&
+(I.bindBuffer(34962,c.position),I.bufferData(34962,a.positionArray,35048),ba.enableAttribute(b.position),I.vertexAttribPointer(b.position,3,5126,!1,0,0));a.hasNormals&&(I.bindBuffer(34962,c.normal),I.bufferData(34962,a.normalArray,35048),ba.enableAttribute(b.normal),I.vertexAttribPointer(b.normal,3,5126,!1,0,0));a.hasUvs&&(I.bindBuffer(34962,c.uv),I.bufferData(34962,a.uvArray,35048),ba.enableAttribute(b.uv),I.vertexAttribPointer(b.uv,2,5126,!1,0,0));a.hasColors&&(I.bindBuffer(34962,c.color),I.bufferData(34962,
+a.colorArray,35048),ba.enableAttribute(b.color),I.vertexAttribPointer(b.color,3,5126,!1,0,0));ba.disableUnusedAttributes();I.drawArrays(4,0,a.count);a.count=0};this.renderBufferDirect=function(a,c,d,e,f,g){var h=f.isMesh&&0>f.matrixWorld.determinant(),l=k(a,c,e,f);ba.setMaterial(e,h);var m=!1;if(b!==d.id||ia!==l.id||Se!==(!0===e.wireframe))b=d.id,ia=l.id,Se=!0===e.wireframe,m=!0;if(e.morphTargets||e.morphNormals)za.update(f,d,e,l),m=!0;c=d.index;var p=d.attributes.position;if((null===c||0!==c.count)&&
+void 0!==p&&0!==p.count){a=1;!0===e.wireframe&&(c=ya.getWireframeAttribute(d),a=2);h=Aa;if(null!==c){var t=pa.get(c);h=Ca;h.setIndex(t)}if(m){if(!1!==Ga.isWebGL2||!f.isInstancedMesh&&!d.isInstancedBufferGeometry||null!==ta.get("ANGLE_instanced_arrays")){ba.initAttributes();m=d.attributes;l=l.getAttributes();var q=e.defaultAttributeValues;for(H in l){var r=l[H];if(0<=r){var u=m[H];if(void 0!==u){var v=u.normalized,n=u.itemSize,w=pa.get(u);if(void 0!==w){var B=w.buffer,x=w.type;w=w.bytesPerElement;
+if(u.isInterleavedBufferAttribute){var z=u.data,J=z.stride;u=u.offset;z&&z.isInstancedInterleavedBuffer?(ba.enableAttributeAndDivisor(r,z.meshPerAttribute),void 0===d.maxInstancedCount&&(d.maxInstancedCount=z.meshPerAttribute*z.count)):ba.enableAttribute(r);I.bindBuffer(34962,B);I.vertexAttribPointer(r,n,x,v,J*w,u*w)}else u.isInstancedBufferAttribute?(ba.enableAttributeAndDivisor(r,u.meshPerAttribute),void 0===d.maxInstancedCount&&(d.maxInstancedCount=u.meshPerAttribute*u.count)):ba.enableAttribute(r),
+I.bindBuffer(34962,B),I.vertexAttribPointer(r,n,x,v,0,0)}}else if("instanceMatrix"===H)w=pa.get(f.instanceMatrix),void 0!==w&&(B=w.buffer,x=w.type,ba.enableAttributeAndDivisor(r+0,1),ba.enableAttributeAndDivisor(r+1,1),ba.enableAttributeAndDivisor(r+2,1),ba.enableAttributeAndDivisor(r+3,1),I.bindBuffer(34962,B),I.vertexAttribPointer(r+0,4,x,!1,64,0),I.vertexAttribPointer(r+1,4,x,!1,64,16),I.vertexAttribPointer(r+2,4,x,!1,64,32),I.vertexAttribPointer(r+3,4,x,!1,64,48));else if(void 0!==q&&(v=q[H],
+void 0!==v))switch(v.length){case 2:I.vertexAttrib2fv(r,v);break;case 3:I.vertexAttrib3fv(r,v);break;case 4:I.vertexAttrib4fv(r,v);break;default:I.vertexAttrib1fv(r,v)}}}ba.disableUnusedAttributes()}null!==c&&I.bindBuffer(34963,t.buffer)}t=Infinity;null!==c?t=c.count:void 0!==p&&(t=p.count);c=d.drawRange.start*a;p=null!==g?g.start*a:0;var H=Math.max(c,p);g=Math.max(0,Math.min(t,c+d.drawRange.count*a,p+(null!==g?g.count*a:Infinity))-1-H+1);0!==g&&(f.isMesh?!0===e.wireframe?(ba.setLineWidth(e.wireframeLinewidth*
+(null===O?U:1)),h.setMode(1)):h.setMode(4):f.isLine?(e=e.linewidth,void 0===e&&(e=1),ba.setLineWidth(e*(null===O?U:1)),f.isLineSegments?h.setMode(1):f.isLineLoop?h.setMode(2):h.setMode(3)):f.isPoints?h.setMode(0):f.isSprite&&h.setMode(4),f.isInstancedMesh?h.renderInstances(d,H,g,f.count):d.isInstancedBufferGeometry?h.renderInstances(d,H,g,d.maxInstancedCount):h.render(H,g))}};this.compile=function(a,b){F=wa.get(a,b);F.init();a.traverse(function(a){a.isLight&&(F.pushLight(a),a.castShadow&&F.pushShadow(a))});
+F.setupLights(b);a.traverse(function(b){if(b.material)if(Array.isArray(b.material))for(var c=0;c<b.material.length;c++)t(b.material[c],a.fog,b);else t(b.material,a.fog,b)})};var Ea=null,Ba=new ig;Ba.setAnimationLoop(function(a){ka.isPresenting()||Ea&&Ea(a)});"undefined"!==typeof window&&Ba.setContext(window);this.setAnimationLoop=function(a){Ea=a;ka.setAnimationLoop(a);Ba.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?K||(ia=b=null,Se=!1,Re=-1,S=null,!0===a.autoUpdate&&a.updateMatrixWorld(),null===c.parent&&c.updateMatrixWorld(),ka.enabled&&ka.isPresenting()&&(c=ka.getCamera(c)),F=wa.get(a,c),F.init(),a.onBeforeRender(A,a,c,f||O),ma.multiplyMatrices(c.projectionMatrix,c.matrixWorldInverse),sa.setFromMatrix(ma),mg=this.localClippingEnabled,Qe=ha.init(this.clippingPlanes,
+mg,c),Z=xa.get(a,c),Z.init(),l(a,c,0,A.sortObjects),!0===A.sortObjects&&Z.sort(),Qe&&ha.beginShadows(),Fa.render(F.state.shadowsArray,a,c),F.setupLights(c),Qe&&ha.endShadows(),this.info.autoReset&&this.info.reset(),void 0!==f&&this.setRenderTarget(f),ka.enabled&&va.isAvailable()&&va.attachCamera(c),qa.render(Z,a,c,g),d=Z.opaque,e=Z.transparent,a.overrideMaterial?(f=a.overrideMaterial,d.length&&m(d,a,c,f),e.length&&m(e,a,c,f)):(d.length&&m(d,a,c),e.length&&m(e,a,c)),a.onAfterRender(A,a,c),null!==O&&
+(ca.updateRenderTargetMipmap(O),ca.updateMultisampleRenderTarget(O)),ba.buffers.depth.setTest(!0),ba.buffers.depth.setMask(!0),ba.buffers.color.setMask(!0),ba.setPolygonOffset(!1),ka.enabled&&(va.isAvailable()&&va.detachCamera(c),ka.submitFrame()),F=Z=null):console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.")};this.setFramebuffer=function(a){N!==a&&null===O&&I.bindFramebuffer(36160,a);N=a};this.getActiveCubeFace=function(){return P};this.getActiveMipmapLevel=function(){return Q};
+this.getRenderTarget=function(){return O};this.setRenderTarget=function(a,b,c){O=a;P=b;Q=c;a&&void 0===aa.get(a).__webglFramebuffer&&ca.setupRenderTarget(a);var d=N,e=!1;a?(d=aa.get(a).__webglFramebuffer,a.isWebGLRenderTargetCube?(d=d[b||0],e=!0):d=a.isWebGLMultisampleRenderTarget?aa.get(a).__webglMultisampledFramebuffer:d,db.copy(a.viewport),T.copy(a.scissor),ea=a.scissorTest):(db.copy(W).multiplyScalar(U).floor(),T.copy(ja).multiplyScalar(U).floor(),ea=na);X!==d&&(I.bindFramebuffer(36160,d),X=d);
+ba.viewport(db);ba.scissor(T);ba.setScissorTest(ea);e&&(a=aa.get(a.texture),I.framebufferTexture2D(36160,36064,34069+(b||0),a.__webglTexture,c||0))};this.readRenderTargetPixels=function(a,b,c,d,e,f,g){if(a&&a.isWebGLRenderTarget){var h=aa.get(a).__webglFramebuffer;a.isWebGLRenderTargetCube&&void 0!==g&&(h=h[g]);if(h){g=!1;h!==X&&(I.bindFramebuffer(36160,h),g=!0);try{var l=a.texture,m=l.format,p=l.type;1023!==m&&oa.convert(m)!==I.getParameter(35739)?console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format."):
+1009===p||oa.convert(p)===I.getParameter(35738)||1015===p&&(Ga.isWebGL2||ta.get("OES_texture_float")||ta.get("WEBGL_color_buffer_float"))||1016===p&&(Ga.isWebGL2?ta.get("EXT_color_buffer_float"):ta.get("EXT_color_buffer_half_float"))?36053===I.checkFramebufferStatus(36160)?0<=b&&b<=a.width-d&&0<=c&&c<=a.height-e&&I.readPixels(b,c,d,e,oa.convert(m),oa.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&&
+I.bindFramebuffer(36160,X)}}}else console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.")};this.copyFramebufferToTexture=function(a,b,c){void 0===c&&(c=0);var d=Math.pow(2,-c),e=Math.floor(b.image.width*d);d=Math.floor(b.image.height*d);var f=oa.convert(b.format);ca.setTexture2D(b,0);I.copyTexImage2D(3553,c,f,a.x,a.y,e,d,0);ba.unbindTexture()};this.copyTextureToTexture=function(a,b,c,d){var e=b.image.width,f=b.image.height,g=oa.convert(c.format),h=
+oa.convert(c.type);ca.setTexture2D(c,0);b.isDataTexture?I.texSubImage2D(3553,d||0,a.x,a.y,e,f,g,h,b.image.data):I.texSubImage2D(3553,d||0,a.x,a.y,g,h,b.image);ba.unbindTexture()};this.initTexture=function(a){ca.setTexture2D(a,0);ba.unbindTexture()};"undefined"!==typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}function Te(a,b){this.name="";this.color=new A(a);this.density=void 0!==b?b:2.5E-4}function Ue(a,b,c){this.name="";this.color=new A(a);this.near=
 void 0!==b?b:1;this.far=void 0!==c?c:1E3}function ob(a,b){this.array=a;this.stride=b;this.count=void 0!==a?a.length/b:0;this.usage=35044;this.updateRange={offset:0,count:-1};this.version=0}function Ld(a,b,c,d){this.data=a;this.itemSize=b;this.offset=c;this.normalized=!0===d}function Fb(a){N.call(this);this.type="SpriteMaterial";this.color=new A(16777215);this.alphaMap=this.map=null;this.rotation=0;this.transparent=this.sizeAttenuation=!0;this.setValues(a)}function Md(a){E.call(this);this.type="Sprite";
 if(void 0===Fc){Fc=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 ob(b,5);Fc.setIndex([0,1,2,0,2,3]);Fc.setAttribute("position",new Ld(b,3,0,!1));Fc.setAttribute("uv",new Ld(b,2,3,!1))}this.geometry=Fc;this.material=void 0!==a?a:new Fb;this.center=new y(.5,.5)}function Ve(a,b,c,d,e,f){Gc.subVectors(a,c).addScalar(.5).multiply(d);void 0!==e?(Nd.x=f*Gc.x-e*Gc.y,Nd.y=e*Gc.x+f*Gc.y):Nd.copy(Gc);a.copy(b);a.x+=Nd.x;a.y+=Nd.y;a.applyMatrix4(Vh)}function Od(){E.call(this);
-this.type="LOD";Object.defineProperties(this,{levels:{enumerable:!0,value:[]}});this.autoUpdate=!0}function Pd(a,b){a&&a.isGeometry&&console.error("THREE.SkinnedMesh no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");fa.call(this,a,b);this.type="SkinnedMesh";this.bindMode="attached";this.bindMatrix=new M;this.bindMatrixInverse=new M}function We(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 rg(){E.call(this);this.type="Bone"}function Xe(a,b,c){fa.call(this,a,b);this.instanceMatrix=new P(new Float32Array(16*c),16);this.count=c}function X(a){N.call(this);this.type="LineBasicMaterial";this.color=new A(16777215);this.linewidth=1;this.linejoin=this.linecap="round";
+this.type="LOD";Object.defineProperties(this,{levels:{enumerable:!0,value:[]}});this.autoUpdate=!0}function Pd(a,b){a&&a.isGeometry&&console.error("THREE.SkinnedMesh no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");W.call(this,a,b);this.type="SkinnedMesh";this.bindMode="attached";this.bindMatrix=new M;this.bindMatrixInverse=new M}function We(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 rg(){E.call(this);this.type="Bone"}function Xe(a,b,c){W.call(this,a,b);this.instanceMatrix=new P(new Float32Array(16*c),16);this.count=c}function X(a){N.call(this);this.type="LineBasicMaterial";this.color=new A(16777215);this.linewidth=1;this.linejoin=this.linecap="round";
 this.setValues(a)}function ya(a,b,c){1===c&&console.error("THREE.Line: parameter THREE.LinePieces no longer supported. Use THREE.LineSegments instead.");E.call(this);this.type="Line";this.geometry=void 0!==a?a:new D;this.material=void 0!==b?b:new X({color:16777215*Math.random()})}function Y(a,b){ya.call(this,a,b);this.type="LineSegments"}function Ye(a,b){ya.call(this,a,b);this.type="LineLoop"}function Ta(a){N.call(this);this.type="PointsMaterial";this.color=new A(16777215);this.alphaMap=this.map=
 null;this.size=1;this.sizeAttenuation=!0;this.morphTargets=!1;this.setValues(a)}function Hc(a,b){E.call(this);this.type="Points";this.geometry=void 0!==a?a:new D;this.material=void 0!==b?b:new Ta({color:16777215*Math.random()});this.updateMorphTargets()}function sg(a,b,c,d,e,f,g){var h=tg.distanceSqToPoint(a);h<c&&(c=new n,tg.closestPointToPoint(a,c),c.applyMatrix4(d),a=e.ray.origin.distanceTo(c),a<e.near||a>e.far||f.push({distance:a,distanceToRay:Math.sqrt(h),point:c,index:b,face:null,object:g}))}
 function ug(a,b,c,d,e,f,g,h,l){T.call(this,a,b,c,d,e,f,g,h,l);this.format=void 0!==g?g:1022;this.minFilter=void 0!==f?f:1006;this.magFilter=void 0!==e?e:1006;this.generateMipmaps=!1}function Ic(a,b,c,d,e,f,g,h,l,m,p,k){T.call(this,null,f,g,h,l,m,d,e,p,k);this.image={width:b,height:c};this.mipmaps=a;this.generateMipmaps=this.flipY=!1}function Qd(a,b,c,d,e,f,g,h,l){T.call(this,a,b,c,d,e,f,g,h,l);this.needsUpdate=!0}function Rd(a,b,c,d,e,f,g,h,l,m){m=void 0!==m?m:1026;if(1026!==m&&1027!==m)throw Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");
@@ -327,21 +328,21 @@ a.length;d<e;d++)Qg(a[d],b,c,!0)}}function li(a,b,c){this.radius=void 0!==a?a:1;
 function re(a,b,c,d){this.object=a;this.size=void 0!==b?b:1;a=void 0!==c?c:16711680;d=void 0!==d?d:1;b=0;(c=this.object.geometry)&&c.isGeometry?b=3*c.faces.length:c&&c.isBufferGeometry&&(b=c.attributes.normal.count);c=new D;b=new C(6*b,3);c.setAttribute("position",b);Y.call(this,c,new X({color:a,linewidth:d}));this.matrixAutoUpdate=!1;this.update()}function se(a,b,c,d){this.object=a;this.size=void 0!==b?b:1;a=void 0!==c?c:65535;d=void 0!==d?d:1;(b=this.object.geometry)&&b.isBufferGeometry?(c=b.attributes.tangent.count,
 b=new D,c=new C(6*c,3),b.setAttribute("position",c),Y.call(this,b,new X({color:a,linewidth:d})),this.matrixAutoUpdate=!1,this.update()):console.error("THREE.VertexTangentsHelper: geometry not an instance of THREE.BufferGeometry.",b)}function bd(a,b){E.call(this);this.light=a;this.light.updateMatrixWorld();this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1;this.color=b;a=new D;b=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(var c=0,d=1;32>c;c++,d++){var e=c/32*Math.PI*2,f=d/32*
 Math.PI*2;b.push(Math.cos(e),Math.sin(e),1,Math.cos(f),Math.sin(f),1)}a.setAttribute("position",new C(b,3));b=new X({fog:!1});this.cone=new Y(a,b);this.add(this.cone);this.update()}function ni(a){var b=[];a&&a.isBone&&b.push(a);for(var c=0;c<a.children.length;c++)b.push.apply(b,ni(a.children[c]));return b}function cd(a){for(var b=ni(a),c=new D,d=[],e=[],f=new A(0,0,1),g=new A(0,1,0),h=0;h<b.length;h++){var l=b[h];l.parent&&l.parent.isBone&&(d.push(0,0,0),d.push(0,0,0),e.push(f.r,f.g,f.b),e.push(g.r,
-g.g,g.b))}c.setAttribute("position",new C(d,3));c.setAttribute("color",new C(e,3));d=new X({vertexColors:2,depthTest:!1,depthWrite:!1,transparent:!0});Y.call(this,c,d);this.root=a;this.bones=b;this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1}function dd(a,b,c){this.light=a;this.light.updateMatrixWorld();this.color=c;a=new Gb(b,4,2);b=new Ia({wireframe:!0,fog:!1});fa.call(this,a,b);this.matrix=this.light.matrixWorld;this.matrixAutoUpdate=!1;this.update()}function ed(a,b){this.type="RectAreaLightHelper";
-this.light=a;this.color=b;a=new D;a.setAttribute("position",new C([1,1,0,-1,1,0,-1,-1,0,1,-1,0,1,1,0],3));a.computeBoundingSphere();b=new X({fog:!1});ya.call(this,a,b);a=new D;a.setAttribute("position",new C([1,1,0,-1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,-1,0],3));a.computeBoundingSphere();this.add(new fa(a,new Ia({side:1,fog:!1})));this.update()}function fd(a,b,c){E.call(this);this.light=a;this.light.updateMatrixWorld();this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1;this.color=c;a=new $b(b);a.rotateY(.5*
-Math.PI);this.material=new Ia({wireframe:!0,fog:!1});void 0===this.color&&(this.material.vertexColors=2);b=a.getAttribute("position");b=new Float32Array(3*b.count);a.setAttribute("color",new P(b,3));this.add(new fa(a,this.material));this.update()}function gd(a,b){this.lightProbe=a;this.size=b;a=new za({defines:{GAMMA_OUTPUT:""},uniforms:{sh:{value:this.lightProbe.sh.coefficients},intensity:{value:this.lightProbe.intensity}},vertexShader:"varying vec3 vNormal;\nvoid main() {\n\tvNormal = normalize( normalMatrix * normal );\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}",
+g.g,g.b))}c.setAttribute("position",new C(d,3));c.setAttribute("color",new C(e,3));d=new X({vertexColors:2,depthTest:!1,depthWrite:!1,transparent:!0});Y.call(this,c,d);this.root=a;this.bones=b;this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1}function dd(a,b,c){this.light=a;this.light.updateMatrixWorld();this.color=c;a=new Gb(b,4,2);b=new Ia({wireframe:!0,fog:!1});W.call(this,a,b);this.matrix=this.light.matrixWorld;this.matrixAutoUpdate=!1;this.update()}function ed(a,b){this.type="RectAreaLightHelper";
+this.light=a;this.color=b;a=new D;a.setAttribute("position",new C([1,1,0,-1,1,0,-1,-1,0,1,-1,0,1,1,0],3));a.computeBoundingSphere();b=new X({fog:!1});ya.call(this,a,b);a=new D;a.setAttribute("position",new C([1,1,0,-1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,-1,0],3));a.computeBoundingSphere();this.add(new W(a,new Ia({side:1,fog:!1})));this.update()}function fd(a,b,c){E.call(this);this.light=a;this.light.updateMatrixWorld();this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1;this.color=c;a=new $b(b);a.rotateY(.5*
+Math.PI);this.material=new Ia({wireframe:!0,fog:!1});void 0===this.color&&(this.material.vertexColors=2);b=a.getAttribute("position");b=new Float32Array(3*b.count);a.setAttribute("color",new P(b,3));this.add(new W(a,this.material));this.update()}function gd(a,b){this.lightProbe=a;this.size=b;a=new za({defines:{GAMMA_OUTPUT:""},uniforms:{sh:{value:this.lightProbe.sh.coefficients},intensity:{value:this.lightProbe.intensity}},vertexShader:"varying vec3 vNormal;\nvoid main() {\n\tvNormal = normalize( normalMatrix * normal );\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}",
 fragmentShader:"#define RECIPROCAL_PI 0.318309886\nvec3 inverseTransformDirection( in vec3 normal, in mat4 matrix ) {\n\t// matrix is assumed to be orthogonal\n\treturn normalize( ( vec4( normal, 0.0 ) * matrix ).xyz );\n}\nvec3 linearToOutput( in vec3 a ) {\n\t#ifdef GAMMA_OUTPUT\n\t\treturn pow( a, vec3( 1.0 / float( GAMMA_FACTOR ) ) );\n\t#else\n\t\treturn a;\n\t#endif\n}\n// source: https://graphics.stanford.edu/papers/envmap/envmap.pdf\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\t// normal is assumed to have unit length\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\t// band 0\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\t// band 1\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\t// band 2\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nuniform vec3 sh[ 9 ]; // sh coefficients\nuniform float intensity; // light probe intensity\nvarying vec3 vNormal;\nvoid main() {\n\tvec3 normal = normalize( vNormal );\n\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, sh );\n\tvec3 outgoingLight = RECIPROCAL_PI * irradiance * intensity;\n\toutgoingLight = linearToOutput( outgoingLight );\n\tgl_FragColor = vec4( outgoingLight, 1.0 );\n}"});
-b=new Gb(1,32,16);fa.call(this,b,a);this.onBeforeRender()}function yf(a,b,c,d){a=a||10;b=b||10;c=new A(void 0!==c?c:4473924);d=new A(void 0!==d?d:8947848);var e=b/2,f=a/b,g=a/2;a=[];for(var h=[],l=0,m=0,k=-g;l<=b;l++,k+=f){a.push(-g,0,k,g,0,k);a.push(k,0,-g,k,0,g);var t=l===e?c:d;t.toArray(h,m);m+=3;t.toArray(h,m);m+=3;t.toArray(h,m);m+=3;t.toArray(h,m);m+=3}b=new D;b.setAttribute("position",new C(a,3));b.setAttribute("color",new C(h,3));c=new X({vertexColors:2});Y.call(this,b,c)}function zf(a,b,
-c,d,e,f){a=a||10;b=b||16;c=c||8;d=d||64;e=new A(void 0!==e?e:4473924);f=new A(void 0!==f?f:8947848);var g=[],h=[],l;for(l=0;l<=b;l++){var m=l/b*2*Math.PI;var k=Math.sin(m)*a;m=Math.cos(m)*a;g.push(0,0,0);g.push(k,0,m);var t=l&1?e:f;h.push(t.r,t.g,t.b);h.push(t.r,t.g,t.b)}for(l=0;l<=c;l++){t=l&1?e:f;var q=a-a/c*l;for(b=0;b<d;b++)m=b/d*2*Math.PI,k=Math.sin(m)*q,m=Math.cos(m)*q,g.push(k,0,m),h.push(t.r,t.g,t.b),m=(b+1)/d*2*Math.PI,k=Math.sin(m)*q,m=Math.cos(m)*q,g.push(k,0,m),h.push(t.r,t.g,t.b)}a=new D;
+b=new Gb(1,32,16);W.call(this,b,a);this.onBeforeRender()}function yf(a,b,c,d){a=a||10;b=b||10;c=new A(void 0!==c?c:4473924);d=new A(void 0!==d?d:8947848);var e=b/2,f=a/b,g=a/2;a=[];for(var h=[],l=0,m=0,k=-g;l<=b;l++,k+=f){a.push(-g,0,k,g,0,k);a.push(k,0,-g,k,0,g);var t=l===e?c:d;t.toArray(h,m);m+=3;t.toArray(h,m);m+=3;t.toArray(h,m);m+=3;t.toArray(h,m);m+=3}b=new D;b.setAttribute("position",new C(a,3));b.setAttribute("color",new C(h,3));c=new X({vertexColors:2});Y.call(this,b,c)}function zf(a,b,c,
+d,e,f){a=a||10;b=b||16;c=c||8;d=d||64;e=new A(void 0!==e?e:4473924);f=new A(void 0!==f?f:8947848);var g=[],h=[],l;for(l=0;l<=b;l++){var m=l/b*2*Math.PI;var k=Math.sin(m)*a;m=Math.cos(m)*a;g.push(0,0,0);g.push(k,0,m);var t=l&1?e:f;h.push(t.r,t.g,t.b);h.push(t.r,t.g,t.b)}for(l=0;l<=c;l++){t=l&1?e:f;var q=a-a/c*l;for(b=0;b<d;b++)m=b/d*2*Math.PI,k=Math.sin(m)*q,m=Math.cos(m)*q,g.push(k,0,m),h.push(t.r,t.g,t.b),m=(b+1)/d*2*Math.PI,k=Math.sin(m)*q,m=Math.cos(m)*q,g.push(k,0,m),h.push(t.r,t.g,t.b)}a=new D;
 a.setAttribute("position",new C(g,3));a.setAttribute("color",new C(h,3));g=new X({vertexColors:2});Y.call(this,a,g)}function hd(a,b,c,d){this.audio=a;this.range=b||1;this.divisionsInnerAngle=c||16;this.divisionsOuterAngle=d||2;a=new D;b=new Float32Array(3*(3*(this.divisionsInnerAngle+2*this.divisionsOuterAngle)+3));a.setAttribute("position",new P(b,3));b=new X({color:65280});c=new X({color:16776960});ya.call(this,a,[c,b]);this.update()}function te(a,b,c,d){this.object=a;this.size=void 0!==b?b:1;a=
 void 0!==c?c:16776960;d=void 0!==d?d:1;b=0;(c=this.object.geometry)&&c.isGeometry?b=c.faces.length:console.warn("THREE.FaceNormalsHelper: only THREE.Geometry is supported. Use THREE.VertexNormalsHelper, instead.");c=new D;b=new C(6*b,3);c.setAttribute("position",b);Y.call(this,c,new X({color:a,linewidth:d}));this.matrixAutoUpdate=!1;this.update()}function id(a,b,c){E.call(this);this.light=a;this.light.updateMatrixWorld();this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1;this.color=c;void 0===b&&
 (b=1);a=new D;a.setAttribute("position",new C([-b,b,0,b,b,0,b,-b,0,-b,-b,0,-b,b,0],3));b=new X({fog:!1});this.lightPlane=new ya(a,b);this.add(this.lightPlane);a=new D;a.setAttribute("position",new C([0,0,0,0,0,1],3));this.targetLine=new ya(a,b);this.add(this.targetLine);this.update()}function ue(a){function b(a,b,d){c(a,d);c(b,d)}function c(a,b){f.push(0,0,0);g.push(b.r,b.g,b.b);void 0===h[a]&&(h[a]=[]);h[a].push(f.length/3-1)}var d=new D,e=new X({color:16777215,vertexColors:1}),f=[],g=[],h={},l=
 new A(16755200),m=new A(16711680),k=new A(43775),t=new A(16777215),q=new A(3355443);b("n1","n2",l);b("n2","n4",l);b("n4","n3",l);b("n3","n1",l);b("f1","f2",l);b("f2","f4",l);b("f4","f3",l);b("f3","f1",l);b("n1","f1",l);b("n2","f2",l);b("n3","f3",l);b("n4","f4",l);b("p","n1",m);b("p","n2",m);b("p","n3",m);b("p","n4",m);b("u1","u2",k);b("u2","u3",k);b("u3","u1",k);b("c","t",t);b("p","c",q);b("cn1","cn2",q);b("cn3","cn4",q);b("cf1","cf2",q);b("cf3","cf4",q);d.setAttribute("position",new C(f,3));d.setAttribute("color",
 new C(g,3));Y.call(this,d,e);this.camera=a;this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix();this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1;this.pointMap=h;this.update()}function sa(a,b,c,d,e,f,g){Af.set(e,f,g).unproject(d);a=b[a];if(void 0!==a)for(c=c.getAttribute("position"),b=0,d=a.length;b<d;b++)c.setXYZ(a[b],Af.x,Af.y,Af.z)}function sb(a,b){this.object=a;void 0===b&&(b=16776960);a=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]);var c=new Float32Array(24),
 d=new D;d.setIndex(new P(a,1));d.setAttribute("position",new P(c,3));Y.call(this,d,new X({color:b}));this.matrixAutoUpdate=!1;this.update()}function ve(a,b){this.type="Box3Helper";this.box=a;b=b||16776960;a=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]);var c=new D;c.setIndex(new P(a,1));c.setAttribute("position",new C([1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1],3));Y.call(this,c,new X({color:b}));this.geometry.computeBoundingSphere()}function we(a,b,c){this.type=
-"PlaneHelper";this.plane=a;this.size=void 0===b?1:b;a=void 0!==c?c:16776960;b=new D;b.setAttribute("position",new C([1,-1,1,-1,1,1,-1,-1,1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,0,0,1,0,0,0],3));b.computeBoundingSphere();ya.call(this,b,new X({color:a}));b=new D;b.setAttribute("position",new C([1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1],3));b.computeBoundingSphere();this.add(new fa(b,new Ia({color:a,opacity:.2,transparent:!0,depthWrite:!1})))}function tb(a,b,c,d,e,f){E.call(this);void 0===a&&(a=new n(0,
-0,1));void 0===b&&(b=new n(0,0,0));void 0===c&&(c=1);void 0===d&&(d=16776960);void 0===e&&(e=.2*c);void 0===f&&(f=.2*e);void 0===Bf&&(Bf=new D,Bf.setAttribute("position",new C([0,0,0,0,1,0],3)),Tg=new qb(0,.5,1,5,1),Tg.translate(0,-.5,0));this.position.copy(b);this.line=new ya(Bf,new X({color:d}));this.line.matrixAutoUpdate=!1;this.add(this.line);this.cone=new fa(Tg,new Ia({color:d}));this.cone.matrixAutoUpdate=!1;this.add(this.cone);this.setDirection(a);this.setLength(c,e,f)}function xe(a){a=a||
-1;var b=[0,0,0,a,0,0,0,0,0,0,a,0,0,0,0,0,0,a];a=new D;a.setAttribute("position",new C(b,3));a.setAttribute("color",new C([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],3));b=new X({vertexColors:2});Y.call(this,a,b)}function oi(a){console.warn("THREE.ClosedSplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead.");Aa.call(this,a);this.type="catmullrom";this.closed=!0}function pi(a){console.warn("THREE.SplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead.");Aa.call(this,a);this.type=
+"PlaneHelper";this.plane=a;this.size=void 0===b?1:b;a=void 0!==c?c:16776960;b=new D;b.setAttribute("position",new C([1,-1,1,-1,1,1,-1,-1,1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,0,0,1,0,0,0],3));b.computeBoundingSphere();ya.call(this,b,new X({color:a}));b=new D;b.setAttribute("position",new C([1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1],3));b.computeBoundingSphere();this.add(new W(b,new Ia({color:a,opacity:.2,transparent:!0,depthWrite:!1})))}function tb(a,b,c,d,e,f){E.call(this);void 0===a&&(a=new n(0,
+0,1));void 0===b&&(b=new n(0,0,0));void 0===c&&(c=1);void 0===d&&(d=16776960);void 0===e&&(e=.2*c);void 0===f&&(f=.2*e);void 0===Bf&&(Bf=new D,Bf.setAttribute("position",new C([0,0,0,0,1,0],3)),Tg=new qb(0,.5,1,5,1),Tg.translate(0,-.5,0));this.position.copy(b);this.line=new ya(Bf,new X({color:d}));this.line.matrixAutoUpdate=!1;this.add(this.line);this.cone=new W(Tg,new Ia({color:d}));this.cone.matrixAutoUpdate=!1;this.add(this.cone);this.setDirection(a);this.setLength(c,e,f)}function xe(a){a=a||1;
+var b=[0,0,0,a,0,0,0,0,0,0,a,0,0,0,0,0,0,a];a=new D;a.setAttribute("position",new C(b,3));a.setAttribute("color",new C([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],3));b=new X({vertexColors:2});Y.call(this,a,b)}function oi(a){console.warn("THREE.ClosedSplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead.");Aa.call(this,a);this.type="catmullrom";this.closed=!0}function pi(a){console.warn("THREE.SplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead.");Aa.call(this,a);this.type=
 "catmullrom"}function Ug(a){console.warn("THREE.Spline has been removed. Use THREE.CatmullRomCurve3 instead.");Aa.call(this,a);this.type="catmullrom"}void 0===Number.EPSILON&&(Number.EPSILON=Math.pow(2,-52));void 0===Number.isInteger&&(Number.isInteger=function(a){return"number"===typeof a&&isFinite(a)&&Math.floor(a)===a});void 0===Math.sign&&(Math.sign=function(a){return 0>a?-1:0<a?1:+a});!1==="name"in Function.prototype&&Object.defineProperty(Function.prototype,"name",{get:function(){return this.toString().match(/^\s*function\s*([^\(\s]*)/)[1]}});
 void 0===Object.assign&&(Object.assign=function(a){if(void 0===a||null===a)throw new TypeError("Cannot convert undefined or null to object");for(var b=Object(a),c=1;c<arguments.length;c++){var d=arguments[c];if(void 0!==d&&null!==d)for(var e in d)Object.prototype.hasOwnProperty.call(d,e)&&(b[e]=d[e])}return b});Object.assign(oa.prototype,{addEventListener:function(a,b){void 0===this._listeners&&(this._listeners={});var c=this._listeners;void 0===c[a]&&(c[a]=[]);-1===c[a].indexOf(b)&&c[a].push(b)},
 hasEventListener:function(a,b){if(void 0===this._listeners)return!1;var c=this._listeners;return void 0!==c[a]&&-1!==c[a].indexOf(b)},removeEventListener:function(a,b){void 0!==this._listeners&&(a=this._listeners[a],void 0!==a&&(b=a.indexOf(b),-1!==b&&a.splice(b,1)))},dispatchEvent:function(a){if(void 0!==this._listeners){var b=this._listeners[a.type];if(void 0!==b){a.target=this;b=b.slice(0);for(var c=0,d=b.length;c<d;c++)b[c].call(this,a)}}}});for(var xa=[],ye=0;256>ye;ye++)xa[ye]=(16>ye?"0":"")+
@@ -381,8 +382,8 @@ this.crossVectors(a,b)):this.crossVectors(this,a)},crossVectors:function(a,b){va
 0===b&&console.error("THREE.Vector3: angleTo() can't handle zero length vectors.");a=this.dot(a)/b;return Math.acos(R.clamp(a,-1,1))},distanceTo:function(a){return Math.sqrt(this.distanceToSquared(a))},distanceToSquared:function(a){var b=this.x-a.x,c=this.y-a.y;a=this.z-a.z;return b*b+c*c+a*a},manhattanDistanceTo:function(a){return Math.abs(this.x-a.x)+Math.abs(this.y-a.y)+Math.abs(this.z-a.z)},setFromSpherical:function(a){return this.setFromSphericalCoords(a.radius,a.phi,a.theta)},setFromSphericalCoords:function(a,
 b,c){var d=Math.sin(b)*a;this.x=d*Math.sin(c);this.y=Math.cos(b)*a;this.z=d*Math.cos(c);return this},setFromCylindrical:function(a){return this.setFromCylindricalCoords(a.radius,a.theta,a.y)},setFromCylindricalCoords:function(a,b,c){this.x=a*Math.sin(b);this.y=c;this.z=a*Math.cos(b);return this},setFromMatrixPosition:function(a){a=a.elements;this.x=a[12];this.y=a[13];this.z=a[14];return this},setFromMatrixScale:function(a){var b=this.setFromMatrixColumn(a,0).length(),c=this.setFromMatrixColumn(a,
 1).length();a=this.setFromMatrixColumn(a,2).length();this.x=b;this.y=c;this.z=a;return this},setFromMatrixColumn:function(a,b){return this.fromArray(a.elements,4*b)},equals:function(a){return a.x===this.x&&a.y===this.y&&a.z===this.z},fromArray:function(a,b){void 0===b&&(b=0);this.x=a[b];this.y=a[b+1];this.z=a[b+2];return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);a[b]=this.x;a[b+1]=this.y;a[b+2]=this.z;return a},fromBufferAttribute:function(a,b,c){void 0!==c&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute().");
-this.x=a.getX(b);this.y=a.getY(b);this.z=a.getZ(b);return this}});var nc=new n;Object.assign(W.prototype,{isMatrix3:!0,set:function(a,b,c,d,e,f,g,h,l){var m=this.elements;m[0]=a;m[1]=d;m[2]=g;m[3]=b;m[4]=e;m[5]=h;m[6]=c;m[7]=f;m[8]=l;return this},identity:function(){this.set(1,0,0,0,1,0,0,0,1);return this},clone:function(){return(new this.constructor).fromArray(this.elements)},copy:function(a){var b=this.elements;a=a.elements;b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]=a[3];b[4]=a[4];b[5]=a[5];b[6]=a[6];b[7]=
-a[7];b[8]=a[8];return this},setFromMatrix4:function(a){a=a.elements;this.set(a[0],a[4],a[8],a[1],a[5],a[9],a[2],a[6],a[10]);return this},applyToBufferAttribute:function(a){for(var b=0,c=a.count;b<c;b++)nc.x=a.getX(b),nc.y=a.getY(b),nc.z=a.getZ(b),nc.applyMatrix3(this),a.setXYZ(b,nc.x,nc.y,nc.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;
+this.x=a.getX(b);this.y=a.getY(b);this.z=a.getZ(b);return this}});var nc=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},applyToBufferAttribute:function(a){for(var b=0,c=a.count;b<c;b++)nc.x=a.getX(b),nc.y=a.getY(b),nc.z=a.getZ(b),nc.applyMatrix3(this),a.setXYZ(b,nc.x,nc.y,nc.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 t=d[0],q=d[3],n=d[6],r=d[1],v=d[4],B=d[7],w=d[2],x=d[5];d=d[8];b[0]=a*t+e*r+f*w;b[3]=a*q+e*v+f*x;b[6]=a*n+e*B+f*d;b[1]=g*t+h*r+l*w;b[4]=g*q+h*v+l*x;b[7]=g*n+h*B+l*d;b[2]=m*t+k*r+c*w;b[5]=m*q+k*v+c*x;b[8]=m*n+k*B+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.");var c=a.elements;a=this.elements;var d=c[0],e=c[1],f=c[2],g=c[3],h=c[4],l=c[5],m=c[6],k=c[7];c=c[8];var t=c*h-l*k,q=l*m-c*g,n=k*g-h*m,r=d*t+e*q+f*n;if(0===r){if(!0===b)throw Error("THREE.Matrix3: .getInverse() can't invert matrix, determinant is 0");console.warn("THREE.Matrix3: .getInverse() can't invert matrix, determinant is 0");
 return this.identity()}b=1/r;a[0]=t*b;a[1]=(f*k-c*e)*b;a[2]=(l*e-f*h)*b;a[3]=q*b;a[4]=(c*d-f*m)*b;a[5]=(f*g-l*d)*b;a[6]=n*b;a[7]=(e*m-k*d)*b;a[8]=(h*d-e*g)*b;return this},transpose:function(){var a=this.elements;var b=a[1];a[1]=a[3];a[3]=b;b=a[2];a[2]=a[6];a[6]=b;b=a[5];a[5]=a[7];a[7]=b;return this},getNormalMatrix:function(a){return this.setFromMatrix4(a).getInverse(this).transpose()},transposeIntoArray:function(a){var b=this.elements;a[0]=b[0];a[1]=b[3];a[2]=b[6];a[3]=b[1];a[4]=b[4];a[5]=b[7];a[6]=
@@ -407,7 +408,7 @@ this.y=-this.y;this.z=-this.z;this.w=-this.w;return this},dot:function(a){return
 lerp:function(a,b){this.x+=(a.x-this.x)*b;this.y+=(a.y-this.y)*b;this.z+=(a.z-this.z)*b;this.w+=(a.w-this.w)*b;return this},lerpVectors:function(a,b,c){return this.subVectors(b,a).multiplyScalar(c).add(a)},equals:function(a){return a.x===this.x&&a.y===this.y&&a.z===this.z&&a.w===this.w},fromArray:function(a,b){void 0===b&&(b=0);this.x=a[b];this.y=a[b+1];this.z=a[b+2];this.w=a[b+3];return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);a[b]=this.x;a[b+1]=this.y;a[b+2]=this.z;a[b+3]=
 this.w;return a},fromBufferAttribute:function(a,b,c){void 0!==c&&console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute().");this.x=a.getX(b);this.y=a.getY(b);this.z=a.getZ(b);this.w=a.getW(b);return this}});ka.prototype=Object.assign(Object.create(oa.prototype),{constructor:ka,isWebGLRenderTarget:!0,setSize:function(a,b){if(this.width!==a||this.height!==b)this.width=a,this.height=b,this.texture.image.width=a,this.texture.image.height=b,this.dispose();this.viewport.set(0,0,
 a,b);this.scissor.set(0,0,a,b)},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.width=a.width;this.height=a.height;this.viewport.copy(a.viewport);this.texture=a.texture.clone();this.depthBuffer=a.depthBuffer;this.stencilBuffer=a.stencilBuffer;this.depthTexture=a.depthTexture;return this},dispose:function(){this.dispatchEvent({type:"dispose"})}});$f.prototype=Object.assign(Object.create(ka.prototype),{constructor:$f,isWebGLMultisampleRenderTarget:!0,copy:function(a){ka.prototype.copy.call(this,
-a);this.samples=a.samples;return this}});var Ma=new n,ca=new M,Ak=new n(0,0,0),Bk=new n(1,1,1),Kb=new n,Cf=new n,va=new n;Object.assign(M.prototype,{isMatrix4:!0,set:function(a,b,c,d,e,f,g,h,l,m,k,t,q,n,r,v){var p=this.elements;p[0]=a;p[4]=b;p[8]=c;p[12]=d;p[1]=e;p[5]=f;p[9]=g;p[13]=h;p[2]=l;p[6]=m;p[10]=k;p[14]=t;p[3]=q;p[7]=n;p[11]=r;p[15]=v;return this},identity:function(){this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1);return this},clone:function(){return(new M).fromArray(this.elements)},copy:function(a){var b=
+a);this.samples=a.samples;return this}});var Ma=new n,fa=new M,Ak=new n(0,0,0),Bk=new n(1,1,1),Kb=new n,Cf=new n,va=new n;Object.assign(M.prototype,{isMatrix4:!0,set:function(a,b,c,d,e,f,g,h,l,m,k,t,q,n,r,v){var p=this.elements;p[0]=a;p[4]=b;p[8]=c;p[12]=d;p[1]=e;p[5]=f;p[9]=g;p[13]=h;p[2]=l;p[6]=m;p[10]=k;p[14]=t;p[3]=q;p[7]=n;p[11]=r;p[15]=v;return this},identity:function(){this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1);return this},clone:function(){return(new M).fromArray(this.elements)},copy:function(a){var b=
 this.elements;a=a.elements;b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]=a[3];b[4]=a[4];b[5]=a[5];b[6]=a[6];b[7]=a[7];b[8]=a[8];b[9]=a[9];b[10]=a[10];b[11]=a[11];b[12]=a[12];b[13]=a[13];b[14]=a[14];b[15]=a[15];return this},copyPosition:function(a){var b=this.elements;a=a.elements;b[12]=a[12];b[13]=a[13];b[14]=a[14];return this},extractBasis:function(a,b,c){a.setFromMatrixColumn(this,0);b.setFromMatrixColumn(this,1);c.setFromMatrixColumn(this,2);return this},makeBasis:function(a,b,c){this.set(a.x,b.x,c.x,0,a.y,
 b.y,c.y,0,a.z,b.z,c.z,0,0,0,0,1);return this},extractRotation:function(a){var b=this.elements,c=a.elements,d=1/Ma.setFromMatrixColumn(a,0).length(),e=1/Ma.setFromMatrixColumn(a,1).length();a=1/Ma.setFromMatrixColumn(a,2).length();b[0]=c[0]*d;b[1]=c[1]*d;b[2]=c[2]*d;b[3]=0;b[4]=c[4]*e;b[5]=c[5]*e;b[6]=c[6]*e;b[7]=0;b[8]=c[8]*a;b[9]=c[9]*a;b[10]=c[10]*a;b[11]=0;b[12]=0;b[13]=0;b[14]=0;b[15]=1;return this},makeRotationFromEuler:function(a){a&&a.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");
 var b=this.elements,c=a.x,d=a.y,e=a.z,f=Math.cos(c);c=Math.sin(c);var g=Math.cos(d);d=Math.sin(d);var h=Math.cos(e);e=Math.sin(e);if("XYZ"===a.order){a=f*h;var l=f*e,m=c*h,k=c*e;b[0]=g*h;b[4]=-g*e;b[8]=d;b[1]=l+m*d;b[5]=a-k*d;b[9]=-c*g;b[2]=k-a*d;b[6]=m+l*d;b[10]=f*g}else"YXZ"===a.order?(a=g*h,l=g*e,m=d*h,k=d*e,b[0]=a+k*c,b[4]=m*c-l,b[8]=f*d,b[1]=f*e,b[5]=f*h,b[9]=-c,b[2]=l*c-m,b[6]=k+a*c,b[10]=f*g):"ZXY"===a.order?(a=g*h,l=g*e,m=d*h,k=d*e,b[0]=a-k*c,b[4]=-f*e,b[8]=m+l*c,b[1]=l+m*c,b[5]=f*h,b[9]=
@@ -422,7 +423,7 @@ y=v*n*k-t*w*k-v*m*r+h*w*r+t*m*d-h*n*d,A=t*B*k-v*q*k+v*l*r-h*B*r-t*l*d+h*q*d,z=v*
 b[4]*=d;b[8]*=a;b[1]*=c;b[5]*=d;b[9]*=a;b[2]*=c;b[6]*=d;b[10]*=a;b[3]*=c;b[7]*=d;b[11]*=a;return this},getMaxScaleOnAxis:function(){var a=this.elements;return Math.sqrt(Math.max(a[0]*a[0]+a[1]*a[1]+a[2]*a[2],a[4]*a[4]+a[5]*a[5]+a[6]*a[6],a[8]*a[8]+a[9]*a[9]+a[10]*a[10]))},makeTranslation:function(a,b,c){this.set(1,0,0,a,0,1,0,b,0,0,1,c,0,0,0,1);return this},makeRotationX:function(a){var b=Math.cos(a);a=Math.sin(a);this.set(1,0,0,0,0,b,-a,0,0,a,b,0,0,0,0,1);return this},makeRotationY:function(a){var b=
 Math.cos(a);a=Math.sin(a);this.set(b,0,a,0,0,1,0,0,-a,0,b,0,0,0,0,1);return this},makeRotationZ:function(a){var b=Math.cos(a);a=Math.sin(a);this.set(b,-a,0,0,a,b,0,0,0,0,1,0,0,0,0,1);return this},makeRotationAxis:function(a,b){var c=Math.cos(b);b=Math.sin(b);var d=1-c,e=a.x,f=a.y;a=a.z;var g=d*e,h=d*f;this.set(g*e+c,g*f-b*a,g*a+b*f,0,g*f+b*a,h*f+c,h*a-b*e,0,g*a-b*f,h*a+b*e,d*a*a+c,0,0,0,0,1);return this},makeScale:function(a,b,c){this.set(a,0,0,0,0,b,0,0,0,0,c,0,0,0,0,1);return this},makeShear:function(a,
 b,c){this.set(1,b,c,0,a,1,c,0,a,b,1,0,0,0,0,1);return this},compose:function(a,b,c){var d=this.elements,e=b._x,f=b._y,g=b._z,h=b._w,l=e+e,m=f+f,k=g+g;b=e*l;var t=e*m;e*=k;var n=f*m;f*=k;g*=k;l*=h;m*=h;h*=k;k=c.x;var u=c.y;c=c.z;d[0]=(1-(n+g))*k;d[1]=(t+h)*k;d[2]=(e-m)*k;d[3]=0;d[4]=(t-h)*u;d[5]=(1-(b+g))*u;d[6]=(f+l)*u;d[7]=0;d[8]=(e+m)*c;d[9]=(f-l)*c;d[10]=(1-(b+n))*c;d[11]=0;d[12]=a.x;d[13]=a.y;d[14]=a.z;d[15]=1;return this},decompose:function(a,b,c){var d=this.elements,e=Ma.set(d[0],d[1],d[2]).length(),
-f=Ma.set(d[4],d[5],d[6]).length(),g=Ma.set(d[8],d[9],d[10]).length();0>this.determinant()&&(e=-e);a.x=d[12];a.y=d[13];a.z=d[14];ca.copy(this);a=1/e;d=1/f;var h=1/g;ca.elements[0]*=a;ca.elements[1]*=a;ca.elements[2]*=a;ca.elements[4]*=d;ca.elements[5]*=d;ca.elements[6]*=d;ca.elements[8]*=h;ca.elements[9]*=h;ca.elements[10]*=h;b.setFromRotationMatrix(ca);c.x=e;c.y=f;c.z=g;return this},makePerspective:function(a,b,c,d,e,f){void 0===f&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");
+f=Ma.set(d[4],d[5],d[6]).length(),g=Ma.set(d[8],d[9],d[10]).length();0>this.determinant()&&(e=-e);a.x=d[12];a.y=d[13];a.z=d[14];fa.copy(this);a=1/e;d=1/f;var h=1/g;fa.elements[0]*=a;fa.elements[1]*=a;fa.elements[2]*=a;fa.elements[4]*=d;fa.elements[5]*=d;fa.elements[6]*=d;fa.elements[8]*=h;fa.elements[9]*=h;fa.elements[10]*=h;b.setFromRotationMatrix(fa);c.x=e;c.y=f;c.z=g;return this},makePerspective:function(a,b,c,d,e,f){void 0===f&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");
 var g=this.elements;g[0]=2*e/(b-a);g[4]=0;g[8]=(b+a)/(b-a);g[12]=0;g[1]=0;g[5]=2*e/(c-d);g[9]=(c+d)/(c-d);g[13]=0;g[2]=0;g[6]=0;g[10]=-(f+e)/(f-e);g[14]=-2*f*e/(f-e);g[3]=0;g[7]=0;g[11]=-1;g[15]=0;return this},makeOrthographic:function(a,b,c,d,e,f){var g=this.elements,h=1/(b-a),l=1/(c-d),m=1/(f-e);g[0]=2*h;g[4]=0;g[8]=0;g[12]=-((b+a)*h);g[1]=0;g[5]=2*l;g[9]=0;g[13]=-((c+d)*l);g[2]=0;g[6]=0;g[10]=-2*m;g[14]=-((f+e)*m);g[3]=0;g[7]=0;g[11]=0;g[15]=1;return this},equals:function(a){var b=this.elements;
 a=a.elements;for(var c=0;16>c;c++)if(b[c]!==a[c])return!1;return!0},fromArray:function(a,b){void 0===b&&(b=0);for(var c=0;16>c;c++)this.elements[c]=a[c+b];return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);var c=this.elements;a[b]=c[0];a[b+1]=c[1];a[b+2]=c[2];a[b+3]=c[3];a[b+4]=c[4];a[b+5]=c[5];a[b+6]=c[6];a[b+7]=c[7];a[b+8]=c[8];a[b+9]=c[9];a[b+10]=c[10];a[b+11]=c[11];a[b+12]=c[12];a[b+13]=c[13];a[b+14]=c[14];a[b+15]=c[15];return a}});var ri=new M,si=new wa;Pb.RotationOrders=
 "XYZ YZX ZXY XZY YXZ ZYX".split(" ");Pb.DefaultOrder="XYZ";Object.defineProperties(Pb.prototype,{x:{get:function(){return this._x},set:function(a){this._x=a;this._onChangeCallback()}},y:{get:function(){return this._y},set:function(a){this._y=a;this._onChangeCallback()}},z:{get:function(){return this._z},set:function(a){this._z=a;this._onChangeCallback()}},order:{get:function(){return this._order},set:function(a){this._order=a;this._onChangeCallback()}}});Object.assign(Pb.prototype,{isEuler:!0,set:function(a,
@@ -468,7 +469,7 @@ 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(Hf).multiplyScalar(b).add(Wg);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-
 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){Xg.subVectors(b,a);If.subVectors(c,a);Yg.crossVectors(Xg,If);b=this.direction.dot(Yg);if(0<b){if(d)return null;d=1}else if(0>b)d=-1,b=-b;else return null;
-Nb.subVectors(this.origin,a);a=d*this.direction.dot(If.crossVectors(Nb,If));if(0>a)return null;c=d*this.direction.dot(Xg.cross(Nb));if(0>c||a+c>b)return null;a=-d*Nb.dot(Yg);return 0>a?null:this.at(a/b,e)},applyMatrix4:function(a){this.origin.applyMatrix4(a);this.direction.transformDirection(a);return this},equals:function(a){return a.origin.equals(this.origin)&&a.direction.equals(this.direction)}});var Zg=new n,Hk=new n,Ik=new W;Object.assign(Sa.prototype,{isPlane:!0,set:function(a,b){this.normal.copy(a);
+Nb.subVectors(this.origin,a);a=d*this.direction.dot(If.crossVectors(Nb,If));if(0>a)return null;c=d*this.direction.dot(Xg.cross(Nb));if(0>c||a+c>b)return null;a=-d*Nb.dot(Yg);return 0>a?null:this.at(a/b,e)},applyMatrix4:function(a){this.origin.applyMatrix4(a);this.direction.transformDirection(a);return this},equals:function(a){return a.origin.equals(this.origin)&&a.direction.equals(this.direction)}});var Zg=new n,Hk=new n,Ik=new ca;Object.assign(Sa.prototype,{isPlane:!0,set:function(a,b){this.normal.copy(a);
 this.constant=b;return this},setComponents:function(a,b,c,d){this.normal.set(a,b,c);this.constant=d;return this},setFromNormalAndCoplanarPoint:function(a,b){this.normal.copy(a);this.constant=-b.dot(this.normal);return this},setFromCoplanarPoints:function(a,b,c){b=Zg.subVectors(c,b).cross(Hk.subVectors(a,b)).normalize();this.setFromNormalAndCoplanarPoint(b,a);return this},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.normal.copy(a.normal);this.constant=a.constant;
 return this},normalize:function(){var a=1/this.normal.length();this.normal.multiplyScalar(a);this.constant*=a;return this},negate:function(){this.constant*=-1;this.normal.negate();return this},distanceToPoint:function(a){return this.normal.dot(a)+this.constant},distanceToSphere:function(a){return this.distanceToPoint(a.center)-a.radius},projectPoint:function(a,b){void 0===b&&(console.warn("THREE.Plane: .projectPoint() target is now required"),b=new n);return b.copy(this.normal).multiplyScalar(-this.distanceToPoint(a)).add(a)},
 intersectLine:function(a,b){void 0===b&&(console.warn("THREE.Plane: .intersectLine() target is now required"),b=new n);var c=a.delta(Zg),d=this.normal.dot(c);if(0===d){if(0===this.distanceToPoint(a.start))return b.copy(a.start)}else if(d=-(a.start.dot(this.normal)+this.constant)/d,!(0>d||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)},
@@ -523,34 +524,34 @@ l}var k=a.morphNormals,n=k.length;if(0<n){var q=[];for(m=0;m<n;m++)q[m]={name:k[
 3===x.length?this.colors.push(x[0],x[1],x[2]):(x=w.color,this.colors.push(x,x,x));!0===e&&(x=d[0][m],void 0!==x?this.uvs.push(x[0],x[1],x[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv ",m),this.uvs.push(new y,new y,new y)));!0===f&&(x=d[1][m],void 0!==x?this.uvs2.push(x[0],x[1],x[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 ",m),this.uvs2.push(new y,new y,new y)));for(x=0;x<h;x++){var A=g[x].vertices;l[x].data.push(A[w.a],A[w.b],A[w.c])}for(x=
 0;x<n;x++)A=k[x].vertexNormals[m],q[x].data.push(A.a,A.b,A.c);v&&this.skinIndices.push(u[w.a],u[w.b],u[w.c]);B&&this.skinWeights.push(r[w.a],r[w.b],r[w.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 bj=1,jb=new M,dh=new E,qd=new n,Na=new Ra,Ce=new Ra,aa=new n;D.prototype=Object.assign(Object.create(oa.prototype),{constructor:D,isBufferGeometry:!0,getIndex:function(){return this.index},setIndex:function(a){Array.isArray(a)?this.index=new (65535<rh(a)?Tb:Sb)(a,1):this.index=a},getAttribute:function(a){return this.attributes[a]},setAttribute:function(a,b){this.attributes[a]=b;return this},deleteAttribute:function(a){delete this.attributes[a];return this},addGroup:function(a,b,
-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 W).getNormalMatrix(a),b.applyToBufferAttribute(c),c.needsUpdate=!0);c=this.attributes.tangent;void 0!==c&&(b=(new W).getNormalMatrix(a),b.applyToBufferAttribute(c),
-c.needsUpdate=!0);null!==this.boundingBox&&this.computeBoundingBox();null!==this.boundingSphere&&this.computeBoundingSphere();return this},rotateX:function(a){jb.makeRotationX(a);this.applyMatrix(jb);return this},rotateY:function(a){jb.makeRotationY(a);this.applyMatrix(jb);return this},rotateZ:function(a){jb.makeRotationZ(a);this.applyMatrix(jb);return this},translate:function(a,b,c){jb.makeTranslation(a,b,c);this.applyMatrix(jb);return this},scale:function(a,b,c){jb.makeScale(a,b,c);this.applyMatrix(jb);
-return this},lookAt:function(a){dh.lookAt(a);dh.updateMatrix();this.applyMatrix(dh.matrix);return this},center:function(){this.computeBoundingBox();this.boundingBox.getCenter(qd).negate();this.translate(qd.x,qd.y,qd.z);return this},setFromObject:function(a){var b=a.geometry;if(a.isPoints||a.isLine){a=new C(3*b.vertices.length,3);var c=new C(3*b.colors.length,3);this.setAttribute("position",a.copyVector3sArray(b.vertices));this.setAttribute("color",c.copyColorsArray(b.colors));b.lineDistances&&b.lineDistances.length===
-b.vertices.length&&(a=new C(b.lineDistances.length,1),this.setAttribute("lineDistance",a.copyArray(b.lineDistances)));null!==b.boundingSphere&&(this.boundingSphere=b.boundingSphere.clone());null!==b.boundingBox&&(this.boundingBox=b.boundingBox.clone())}else a.isMesh&&b&&b.isGeometry&&this.fromGeometry(b);return this},setFromPoints:function(a){for(var b=[],c=0,d=a.length;c<d;c++){var e=a[c];b.push(e.x,e.y,e.z||0)}this.setAttribute("position",new C(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;c.normalsNeedUpdate=b.normalsNeedUpdate;c.colorsNeedUpdate=b.colorsNeedUpdate;c.uvsNeedUpdate=b.uvsNeedUpdate;c.groupsNeedUpdate=b.groupsNeedUpdate;b.verticesNeedUpdate=!1;b.normalsNeedUpdate=!1;b.colorsNeedUpdate=!1;b.uvsNeedUpdate=!1;b.groupsNeedUpdate=!1;b=c}!0===b.verticesNeedUpdate&&(c=this.attributes.position,
-void 0!==c&&(c.copyVector3sArray(b.vertices),c.needsUpdate=!0),b.verticesNeedUpdate=!1);!0===b.normalsNeedUpdate&&(c=this.attributes.normal,void 0!==c&&(c.copyVector3sArray(b.normals),c.needsUpdate=!0),b.normalsNeedUpdate=!1);!0===b.colorsNeedUpdate&&(c=this.attributes.color,void 0!==c&&(c.copyColorsArray(b.colors),c.needsUpdate=!0),b.colorsNeedUpdate=!1);b.uvsNeedUpdate&&(c=this.attributes.uv,void 0!==c&&(c.copyVector2sArray(b.uvs),c.needsUpdate=!0),b.uvsNeedUpdate=!1);b.lineDistancesNeedUpdate&&
-(c=this.attributes.lineDistance,void 0!==c&&(c.copyArray(b.lineDistances),c.needsUpdate=!0),b.lineDistancesNeedUpdate=!1);b.groupsNeedUpdate&&(b.computeGroups(a.geometry),this.groups=b.groups,b.groupsNeedUpdate=!1);return this},fromGeometry:function(a){a.__directGeometry=(new qh).fromGeometry(a);return this.fromDirectGeometry(a.__directGeometry)},fromDirectGeometry:function(a){var b=new Float32Array(3*a.vertices.length);this.setAttribute("position",(new P(b,3)).copyVector3sArray(a.vertices));0<a.normals.length&&
-(b=new Float32Array(3*a.normals.length),this.setAttribute("normal",(new P(b,3)).copyVector3sArray(a.normals)));0<a.colors.length&&(b=new Float32Array(3*a.colors.length),this.setAttribute("color",(new P(b,3)).copyColorsArray(a.colors)));0<a.uvs.length&&(b=new Float32Array(2*a.uvs.length),this.setAttribute("uv",(new P(b,2)).copyVector2sArray(a.uvs)));0<a.uvs2.length&&(b=new Float32Array(2*a.uvs2.length),this.setAttribute("uv2",(new P(b,2)).copyVector2sArray(a.uvs2)));this.groups=a.groups;for(var c in a.morphTargets){b=
-[];for(var d=a.morphTargets[c],e=0,f=d.length;e<f;e++){var g=d[e],h=new C(3*g.data.length,3);h.name=g.name;b.push(h.copyVector3sArray(g.data))}this.morphAttributes[c]=b}0<a.skinIndices.length&&(c=new C(4*a.skinIndices.length,4),this.setAttribute("skinIndex",c.copyVector4sArray(a.skinIndices)));0<a.skinWeights.length&&(c=new C(4*a.skinWeights.length,4),this.setAttribute("skinWeight",c.copyVector4sArray(a.skinWeights)));null!==a.boundingSphere&&(this.boundingSphere=a.boundingSphere.clone());null!==
-a.boundingBox&&(this.boundingBox=a.boundingBox.clone());return this},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new Ra);var a=this.attributes.position,b=this.morphAttributes.position;if(void 0!==a){if(this.boundingBox.setFromBufferAttribute(a),b){a=0;for(var c=b.length;a<c;a++)Na.setFromBufferAttribute(b[a]),this.morphTargetsRelative?(aa.addVectors(this.boundingBox.min,Na.min),this.boundingBox.expandByPoint(aa),aa.addVectors(this.boundingBox.max,Na.max),this.boundingBox.expandByPoint(aa)):
-(this.boundingBox.expandByPoint(Na.min),this.boundingBox.expandByPoint(Na.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox: Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)},computeBoundingSphere:function(){null===this.boundingSphere&&(this.boundingSphere=new mb);var a=this.attributes.position,b=this.morphAttributes.position;
-if(a){var c=this.boundingSphere.center;Na.setFromBufferAttribute(a);if(b)for(var d=0,e=b.length;d<e;d++){var f=b[d];Ce.setFromBufferAttribute(f);this.morphTargetsRelative?(aa.addVectors(Na.min,Ce.min),Na.expandByPoint(aa),aa.addVectors(Na.max,Ce.max),Na.expandByPoint(aa)):(Na.expandByPoint(Ce.min),Na.expandByPoint(Ce.max))}Na.getCenter(c);var g=0;d=0;for(e=a.count;d<e;d++)aa.fromBufferAttribute(a,d),g=Math.max(g,c.distanceToSquared(aa));if(b)for(d=0,e=b.length;d<e;d++){f=b[d];for(var h=this.morphTargetsRelative,
-l=0,m=f.count;l<m;l++)aa.fromBufferAttribute(f,l),h&&(qd.fromBufferAttribute(a,l),aa.add(qd)),g=Math.max(g,c.distanceToSquared(aa))}this.boundingSphere.radius=Math.sqrt(g);isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}},computeFaceNormals:function(){},computeVertexNormals:function(){var a=this.index,b=this.attributes;if(b.position){var c=b.position.array;if(void 0===
-b.normal)this.setAttribute("normal",new P(new Float32Array(c.length),3));else for(var d=b.normal.array,e=0,f=d.length;e<f;e++)d[e]=0;d=b.normal.array;var g=new n,h=new n,l=new n,m=new n,k=new n;if(a){var t=a.array;e=0;for(f=a.count;e<f;e+=3){a=3*t[e+0];var q=3*t[e+1];var u=3*t[e+2];g.fromArray(c,a);h.fromArray(c,q);l.fromArray(c,u);m.subVectors(l,h);k.subVectors(g,h);m.cross(k);d[a]+=m.x;d[a+1]+=m.y;d[a+2]+=m.z;d[q]+=m.x;d[q+1]+=m.y;d[q+2]+=m.z;d[u]+=m.x;d[u+1]+=m.y;d[u+2]+=m.z}}else for(e=0,f=c.length;e<
-f;e+=9)g.fromArray(c,e),h.fromArray(c,e+3),l.fromArray(c,e+6),m.subVectors(l,h),k.subVectors(g,h),m.cross(k),d[e]=m.x,d[e+1]=m.y,d[e+2]=m.z,d[e+3]=m.x,d[e+4]=m.y,d[e+5]=m.z,d[e+6]=m.x,d[e+7]=m.y,d[e+8]=m.z;this.normalizeNormals();b.normal.needsUpdate=!0}},merge:function(a,b){if(a&&a.isBufferGeometry){void 0===b&&(b=0,console.warn("THREE.BufferGeometry.merge(): Overwriting original geometry, starting at offset=0. Use BufferGeometryUtils.mergeBufferGeometries() for lossless merge."));var c=this.attributes,
-d;for(d in c)if(void 0!==a.attributes[d]){var e=c[d].array,f=a.attributes[d],g=f.array,h=f.itemSize*b;f=Math.min(g.length,e.length-h);for(var l=0;l<f;l++,h++)e[h]=g[l]}return this}console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",a)},normalizeNormals:function(){for(var a=this.attributes.normal,b=0,c=a.count;b<c;b++)aa.x=a.getX(b),aa.y=a.getY(b),aa.z=a.getZ(b),aa.normalize(),a.setXYZ(b,aa.x,aa.y,aa.z)},toNonIndexed:function(){function a(a,b){var c=a.array;
-a=a.itemSize;for(var d=new c.constructor(b.length*a),e,f=0,g=0,h=b.length;g<h;g++){e=b[g]*a;for(var l=0;l<a;l++)d[f++]=c[e++]}return new P(d,a)}if(null===this.index)return console.warn("THREE.BufferGeometry.toNonIndexed(): Geometry is already non-indexed."),this;var b=new D,c=this.index.array,d=this.attributes,e;for(e in d){var f=d[e];f=a(f,c);b.setAttribute(e,f)}var g=this.morphAttributes;for(e in g){var h=[],l=g[e];d=0;for(var m=l.length;d<m;d++)f=l[d],f=a(f,c),h.push(f);b.morphAttributes[e]=h}b.morphTargetsRelative=
-this.morphTargetsRelative;c=this.groups;d=0;for(e=c.length;d<e;d++)f=c[d],b.addGroup(f.start,f.count,f.materialIndex);return b},toJSON:function(){var a={metadata:{version:4.5,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};a.uuid=this.uuid;a.type=this.type;""!==this.name&&(a.name=this.name);0<Object.keys(this.userData).length&&(a.userData=this.userData);if(void 0!==this.parameters){var b=this.parameters;for(m in b)void 0!==b[m]&&(a[m]=b[m]);return a}a.data={attributes:{}};b=this.index;null!==
-b&&(a.data.index={type:b.array.constructor.name,array:Array.prototype.slice.call(b.array)});var c=this.attributes;for(m in c){b=c[m];var d=b.toJSON();""!==b.name&&(d.name=b.name);a.data.attributes[m]=d}c={};var e=!1;for(m in this.morphAttributes){for(var f=this.morphAttributes[m],g=[],h=0,l=f.length;h<l;h++)b=f[h],d=b.toJSON(),""!==b.name&&(d.name=b.name),g.push(d);0<g.length&&(c[m]=g,e=!0)}e&&(a.data.morphAttributes=c,a.data.morphTargetsRelative=this.morphTargetsRelative);var m=this.groups;0<m.length&&
-(a.data.groups=JSON.parse(JSON.stringify(m)));m=this.boundingSphere;null!==m&&(a.data.boundingSphere={center:m.center.toArray(),radius:m.radius});return a},clone:function(){return(new D).copy(this)},copy:function(a){var b;this.index=null;this.attributes={};this.morphAttributes={};this.groups=[];this.boundingSphere=this.boundingBox=null;this.name=a.name;var c=a.index;null!==c&&this.setIndex(c.clone());c=a.attributes;for(g in c)this.setAttribute(g,c[g].clone());var d=a.morphAttributes;for(g in d){var e=
-[],f=d[g];c=0;for(b=f.length;c<b;c++)e.push(f[c].clone());this.morphAttributes[g]=e}this.morphTargetsRelative=a.morphTargetsRelative;var g=a.groups;c=0;for(b=g.length;c<b;c++)d=g[c],this.addGroup(d.start,d.count,d.materialIndex);g=a.boundingBox;null!==g&&(this.boundingBox=g.clone());g=a.boundingSphere;null!==g&&(this.boundingSphere=g.clone());this.drawRange.start=a.drawRange.start;this.drawRange.count=a.drawRange.count;this.userData=a.userData;return this},dispose:function(){this.dispatchEvent({type:"dispose"})}});
-var zi=new M,pc=new Rb,eh=new mb,Ub=new n,Vb=new n,Wb=new n,fg=new n,gg=new n,hg=new n,Ne=new n,Oe=new n,Pe=new n,wc=new y,xc=new y,yc=new y,Cd=new n,Le=new n;fa.prototype=Object.assign(Object.create(E.prototype),{constructor:fa,isMesh:!0,copy:function(a){E.prototype.copy.call(this,a);void 0!==a.morphTargetInfluences&&(this.morphTargetInfluences=a.morphTargetInfluences.slice());void 0!==a.morphTargetDictionary&&(this.morphTargetDictionary=Object.assign({},a.morphTargetDictionary));return this},updateMorphTargets:function(){var a=
-this.geometry;if(a.isBufferGeometry){a=a.morphAttributes;var b=Object.keys(a);if(0<b.length){var c=a[b[0]];if(void 0!==c)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},a=0,b=c.length;a<b;a++){var d=c[a].name||String(a);this.morphTargetInfluences.push(0);this.morphTargetDictionary[d]=a}}}else a=a.morphTargets,void 0!==a&&0<a.length&&console.error("THREE.Mesh.updateMorphTargets() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")},raycast:function(a,b){var c=this.geometry,
-d=this.material,e=this.matrixWorld;if(void 0!==d&&(null===c.boundingSphere&&c.computeBoundingSphere(),eh.copy(c.boundingSphere),eh.applyMatrix4(e),!1!==a.ray.intersectsSphere(eh)&&(zi.getInverse(e),pc.copy(a.ray).applyMatrix4(zi),null===c.boundingBox||!1!==pc.intersectsBox(c.boundingBox))))if(c.isBufferGeometry){var f=c.index;e=c.attributes.position;var g=c.morphAttributes.position,h=c.morphTargetsRelative,l=c.attributes.uv,m=c.attributes.uv2,k=c.groups,n=c.drawRange,q,u;if(null!==f)if(Array.isArray(d)){var r=
-0;for(q=k.length;r<q;r++){var v=k[r];var B=d[v.materialIndex];var w=Math.max(v.start,n.start);for(u=c=Math.min(v.start+v.count,n.start+n.count);w<u;w+=3){c=f.getX(w);var x=f.getX(w+1);var A=f.getX(w+2);if(c=Me(this,B,a,pc,e,g,h,l,m,c,x,A))c.faceIndex=Math.floor(w/3),c.face.materialIndex=v.materialIndex,b.push(c)}}}else for(w=Math.max(0,n.start),c=Math.min(f.count,n.start+n.count),r=w,q=c;r<q;r+=3){if(c=f.getX(r),x=f.getX(r+1),A=f.getX(r+2),c=Me(this,d,a,pc,e,g,h,l,m,c,x,A))c.faceIndex=Math.floor(r/
+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);b=this.attributes.normal;if(void 0!==b){var c=(new ca).getNormalMatrix(a);b.applyNormalMatrix(c);b.needsUpdate=!0}b=this.attributes.tangent;void 0!==b&&(b.transformDirection(a),b.needsUpdate=!0);null!==this.boundingBox&&
+this.computeBoundingBox();null!==this.boundingSphere&&this.computeBoundingSphere();return this},rotateX:function(a){jb.makeRotationX(a);this.applyMatrix(jb);return this},rotateY:function(a){jb.makeRotationY(a);this.applyMatrix(jb);return this},rotateZ:function(a){jb.makeRotationZ(a);this.applyMatrix(jb);return this},translate:function(a,b,c){jb.makeTranslation(a,b,c);this.applyMatrix(jb);return this},scale:function(a,b,c){jb.makeScale(a,b,c);this.applyMatrix(jb);return this},lookAt:function(a){dh.lookAt(a);
+dh.updateMatrix();this.applyMatrix(dh.matrix);return this},center:function(){this.computeBoundingBox();this.boundingBox.getCenter(qd).negate();this.translate(qd.x,qd.y,qd.z);return this},setFromObject:function(a){var b=a.geometry;if(a.isPoints||a.isLine){a=new C(3*b.vertices.length,3);var c=new C(3*b.colors.length,3);this.setAttribute("position",a.copyVector3sArray(b.vertices));this.setAttribute("color",c.copyColorsArray(b.colors));b.lineDistances&&b.lineDistances.length===b.vertices.length&&(a=new C(b.lineDistances.length,
+1),this.setAttribute("lineDistance",a.copyArray(b.lineDistances)));null!==b.boundingSphere&&(this.boundingSphere=b.boundingSphere.clone());null!==b.boundingBox&&(this.boundingBox=b.boundingBox.clone())}else a.isMesh&&b&&b.isGeometry&&this.fromGeometry(b);return this},setFromPoints:function(a){for(var b=[],c=0,d=a.length;c<d;c++){var e=a[c];b.push(e.x,e.y,e.z||0)}this.setAttribute("position",new C(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;c.normalsNeedUpdate=b.normalsNeedUpdate;c.colorsNeedUpdate=b.colorsNeedUpdate;c.uvsNeedUpdate=b.uvsNeedUpdate;c.groupsNeedUpdate=b.groupsNeedUpdate;b.verticesNeedUpdate=!1;b.normalsNeedUpdate=!1;b.colorsNeedUpdate=!1;b.uvsNeedUpdate=!1;b.groupsNeedUpdate=!1;b=c}!0===b.verticesNeedUpdate&&(c=this.attributes.position,void 0!==c&&(c.copyVector3sArray(b.vertices),
+c.needsUpdate=!0),b.verticesNeedUpdate=!1);!0===b.normalsNeedUpdate&&(c=this.attributes.normal,void 0!==c&&(c.copyVector3sArray(b.normals),c.needsUpdate=!0),b.normalsNeedUpdate=!1);!0===b.colorsNeedUpdate&&(c=this.attributes.color,void 0!==c&&(c.copyColorsArray(b.colors),c.needsUpdate=!0),b.colorsNeedUpdate=!1);b.uvsNeedUpdate&&(c=this.attributes.uv,void 0!==c&&(c.copyVector2sArray(b.uvs),c.needsUpdate=!0),b.uvsNeedUpdate=!1);b.lineDistancesNeedUpdate&&(c=this.attributes.lineDistance,void 0!==c&&
+(c.copyArray(b.lineDistances),c.needsUpdate=!0),b.lineDistancesNeedUpdate=!1);b.groupsNeedUpdate&&(b.computeGroups(a.geometry),this.groups=b.groups,b.groupsNeedUpdate=!1);return this},fromGeometry:function(a){a.__directGeometry=(new qh).fromGeometry(a);return this.fromDirectGeometry(a.__directGeometry)},fromDirectGeometry:function(a){var b=new Float32Array(3*a.vertices.length);this.setAttribute("position",(new P(b,3)).copyVector3sArray(a.vertices));0<a.normals.length&&(b=new Float32Array(3*a.normals.length),
+this.setAttribute("normal",(new P(b,3)).copyVector3sArray(a.normals)));0<a.colors.length&&(b=new Float32Array(3*a.colors.length),this.setAttribute("color",(new P(b,3)).copyColorsArray(a.colors)));0<a.uvs.length&&(b=new Float32Array(2*a.uvs.length),this.setAttribute("uv",(new P(b,2)).copyVector2sArray(a.uvs)));0<a.uvs2.length&&(b=new Float32Array(2*a.uvs2.length),this.setAttribute("uv2",(new P(b,2)).copyVector2sArray(a.uvs2)));this.groups=a.groups;for(var c in a.morphTargets){b=[];for(var d=a.morphTargets[c],
+e=0,f=d.length;e<f;e++){var g=d[e],h=new C(3*g.data.length,3);h.name=g.name;b.push(h.copyVector3sArray(g.data))}this.morphAttributes[c]=b}0<a.skinIndices.length&&(c=new C(4*a.skinIndices.length,4),this.setAttribute("skinIndex",c.copyVector4sArray(a.skinIndices)));0<a.skinWeights.length&&(c=new C(4*a.skinWeights.length,4),this.setAttribute("skinWeight",c.copyVector4sArray(a.skinWeights)));null!==a.boundingSphere&&(this.boundingSphere=a.boundingSphere.clone());null!==a.boundingBox&&(this.boundingBox=
+a.boundingBox.clone());return this},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new Ra);var a=this.attributes.position,b=this.morphAttributes.position;if(void 0!==a){if(this.boundingBox.setFromBufferAttribute(a),b){a=0;for(var c=b.length;a<c;a++)Na.setFromBufferAttribute(b[a]),this.morphTargetsRelative?(aa.addVectors(this.boundingBox.min,Na.min),this.boundingBox.expandByPoint(aa),aa.addVectors(this.boundingBox.max,Na.max),this.boundingBox.expandByPoint(aa)):(this.boundingBox.expandByPoint(Na.min),
+this.boundingBox.expandByPoint(Na.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox: Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)},computeBoundingSphere:function(){null===this.boundingSphere&&(this.boundingSphere=new mb);var a=this.attributes.position,b=this.morphAttributes.position;if(a){var c=this.boundingSphere.center;
+Na.setFromBufferAttribute(a);if(b)for(var d=0,e=b.length;d<e;d++){var f=b[d];Ce.setFromBufferAttribute(f);this.morphTargetsRelative?(aa.addVectors(Na.min,Ce.min),Na.expandByPoint(aa),aa.addVectors(Na.max,Ce.max),Na.expandByPoint(aa)):(Na.expandByPoint(Ce.min),Na.expandByPoint(Ce.max))}Na.getCenter(c);var g=0;d=0;for(e=a.count;d<e;d++)aa.fromBufferAttribute(a,d),g=Math.max(g,c.distanceToSquared(aa));if(b)for(d=0,e=b.length;d<e;d++){f=b[d];for(var h=this.morphTargetsRelative,l=0,m=f.count;l<m;l++)aa.fromBufferAttribute(f,
+l),h&&(qd.fromBufferAttribute(a,l),aa.add(qd)),g=Math.max(g,c.distanceToSquared(aa))}this.boundingSphere.radius=Math.sqrt(g);isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}},computeFaceNormals:function(){},computeVertexNormals:function(){var a=this.index,b=this.attributes;if(b.position){var c=b.position.array;if(void 0===b.normal)this.setAttribute("normal",new P(new Float32Array(c.length),
+3));else for(var d=b.normal.array,e=0,f=d.length;e<f;e++)d[e]=0;d=b.normal.array;var g=new n,h=new n,l=new n,m=new n,k=new n;if(a){var t=a.array;e=0;for(f=a.count;e<f;e+=3){a=3*t[e+0];var q=3*t[e+1];var u=3*t[e+2];g.fromArray(c,a);h.fromArray(c,q);l.fromArray(c,u);m.subVectors(l,h);k.subVectors(g,h);m.cross(k);d[a]+=m.x;d[a+1]+=m.y;d[a+2]+=m.z;d[q]+=m.x;d[q+1]+=m.y;d[q+2]+=m.z;d[u]+=m.x;d[u+1]+=m.y;d[u+2]+=m.z}}else for(e=0,f=c.length;e<f;e+=9)g.fromArray(c,e),h.fromArray(c,e+3),l.fromArray(c,e+6),
+m.subVectors(l,h),k.subVectors(g,h),m.cross(k),d[e]=m.x,d[e+1]=m.y,d[e+2]=m.z,d[e+3]=m.x,d[e+4]=m.y,d[e+5]=m.z,d[e+6]=m.x,d[e+7]=m.y,d[e+8]=m.z;this.normalizeNormals();b.normal.needsUpdate=!0}},merge:function(a,b){if(a&&a.isBufferGeometry){void 0===b&&(b=0,console.warn("THREE.BufferGeometry.merge(): Overwriting original geometry, starting at offset=0. Use BufferGeometryUtils.mergeBufferGeometries() for lossless merge."));var c=this.attributes,d;for(d in c)if(void 0!==a.attributes[d]){var e=c[d].array,
+f=a.attributes[d],g=f.array,h=f.itemSize*b;f=Math.min(g.length,e.length-h);for(var l=0;l<f;l++,h++)e[h]=g[l]}return this}console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",a)},normalizeNormals:function(){for(var a=this.attributes.normal,b=0,c=a.count;b<c;b++)aa.x=a.getX(b),aa.y=a.getY(b),aa.z=a.getZ(b),aa.normalize(),a.setXYZ(b,aa.x,aa.y,aa.z)},toNonIndexed:function(){function a(a,b){var c=a.array;a=a.itemSize;for(var d=new c.constructor(b.length*a),e,
+f=0,g=0,h=b.length;g<h;g++){e=b[g]*a;for(var l=0;l<a;l++)d[f++]=c[e++]}return new P(d,a)}if(null===this.index)return console.warn("THREE.BufferGeometry.toNonIndexed(): Geometry is already non-indexed."),this;var b=new D,c=this.index.array,d=this.attributes,e;for(e in d){var f=d[e];f=a(f,c);b.setAttribute(e,f)}var g=this.morphAttributes;for(e in g){var h=[],l=g[e];d=0;for(var m=l.length;d<m;d++)f=l[d],f=a(f,c),h.push(f);b.morphAttributes[e]=h}b.morphTargetsRelative=this.morphTargetsRelative;c=this.groups;
+d=0;for(e=c.length;d<e;d++)f=c[d],b.addGroup(f.start,f.count,f.materialIndex);return b},toJSON:function(){var a={metadata:{version:4.5,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};a.uuid=this.uuid;a.type=this.type;""!==this.name&&(a.name=this.name);0<Object.keys(this.userData).length&&(a.userData=this.userData);if(void 0!==this.parameters){var b=this.parameters;for(m in b)void 0!==b[m]&&(a[m]=b[m]);return a}a.data={attributes:{}};b=this.index;null!==b&&(a.data.index={type:b.array.constructor.name,
+array:Array.prototype.slice.call(b.array)});var c=this.attributes;for(m in c){b=c[m];var d=b.toJSON();""!==b.name&&(d.name=b.name);a.data.attributes[m]=d}c={};var e=!1;for(m in this.morphAttributes){for(var f=this.morphAttributes[m],g=[],h=0,l=f.length;h<l;h++)b=f[h],d=b.toJSON(),""!==b.name&&(d.name=b.name),g.push(d);0<g.length&&(c[m]=g,e=!0)}e&&(a.data.morphAttributes=c,a.data.morphTargetsRelative=this.morphTargetsRelative);var m=this.groups;0<m.length&&(a.data.groups=JSON.parse(JSON.stringify(m)));
+m=this.boundingSphere;null!==m&&(a.data.boundingSphere={center:m.center.toArray(),radius:m.radius});return a},clone:function(){return(new D).copy(this)},copy:function(a){var b;this.index=null;this.attributes={};this.morphAttributes={};this.groups=[];this.boundingSphere=this.boundingBox=null;this.name=a.name;var c=a.index;null!==c&&this.setIndex(c.clone());c=a.attributes;for(g in c)this.setAttribute(g,c[g].clone());var d=a.morphAttributes;for(g in d){var e=[],f=d[g];c=0;for(b=f.length;c<b;c++)e.push(f[c].clone());
+this.morphAttributes[g]=e}this.morphTargetsRelative=a.morphTargetsRelative;var g=a.groups;c=0;for(b=g.length;c<b;c++)d=g[c],this.addGroup(d.start,d.count,d.materialIndex);g=a.boundingBox;null!==g&&(this.boundingBox=g.clone());g=a.boundingSphere;null!==g&&(this.boundingSphere=g.clone());this.drawRange.start=a.drawRange.start;this.drawRange.count=a.drawRange.count;this.userData=a.userData;return this},dispose:function(){this.dispatchEvent({type:"dispose"})}});var zi=new M,pc=new Rb,eh=new mb,Ub=new n,
+Vb=new n,Wb=new n,fg=new n,gg=new n,hg=new n,Ne=new n,Oe=new n,Pe=new n,wc=new y,xc=new y,yc=new y,Cd=new n,Le=new n;W.prototype=Object.assign(Object.create(E.prototype),{constructor:W,isMesh:!0,copy:function(a){E.prototype.copy.call(this,a);void 0!==a.morphTargetInfluences&&(this.morphTargetInfluences=a.morphTargetInfluences.slice());void 0!==a.morphTargetDictionary&&(this.morphTargetDictionary=Object.assign({},a.morphTargetDictionary));return this},updateMorphTargets:function(){var a=this.geometry;
+if(a.isBufferGeometry){a=a.morphAttributes;var b=Object.keys(a);if(0<b.length){var c=a[b[0]];if(void 0!==c)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},a=0,b=c.length;a<b;a++){var d=c[a].name||String(a);this.morphTargetInfluences.push(0);this.morphTargetDictionary[d]=a}}}else a=a.morphTargets,void 0!==a&&0<a.length&&console.error("THREE.Mesh.updateMorphTargets() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")},raycast:function(a,b){var c=this.geometry,d=this.material,
+e=this.matrixWorld;if(void 0!==d&&(null===c.boundingSphere&&c.computeBoundingSphere(),eh.copy(c.boundingSphere),eh.applyMatrix4(e),!1!==a.ray.intersectsSphere(eh)&&(zi.getInverse(e),pc.copy(a.ray).applyMatrix4(zi),null===c.boundingBox||!1!==pc.intersectsBox(c.boundingBox))))if(c.isBufferGeometry){var f=c.index;e=c.attributes.position;var g=c.morphAttributes.position,h=c.morphTargetsRelative,l=c.attributes.uv,m=c.attributes.uv2,k=c.groups,n=c.drawRange,q,u;if(null!==f)if(Array.isArray(d)){var r=0;
+for(q=k.length;r<q;r++){var v=k[r];var B=d[v.materialIndex];var w=Math.max(v.start,n.start);for(u=c=Math.min(v.start+v.count,n.start+n.count);w<u;w+=3){c=f.getX(w);var x=f.getX(w+1);var A=f.getX(w+2);if(c=Me(this,B,a,pc,e,g,h,l,m,c,x,A))c.faceIndex=Math.floor(w/3),c.face.materialIndex=v.materialIndex,b.push(c)}}}else for(w=Math.max(0,n.start),c=Math.min(f.count,n.start+n.count),r=w,q=c;r<q;r+=3){if(c=f.getX(r),x=f.getX(r+1),A=f.getX(r+2),c=Me(this,d,a,pc,e,g,h,l,m,c,x,A))c.faceIndex=Math.floor(r/
 3),b.push(c)}else if(void 0!==e)if(Array.isArray(d))for(r=0,q=k.length;r<q;r++)for(v=k[r],B=d[v.materialIndex],w=Math.max(v.start,n.start),u=c=Math.min(v.start+v.count,n.start+n.count);w<u;w+=3){if(c=w,x=w+1,A=w+2,c=Me(this,B,a,pc,e,g,h,l,m,c,x,A))c.faceIndex=Math.floor(w/3),c.face.materialIndex=v.materialIndex,b.push(c)}else for(w=Math.max(0,n.start),c=Math.min(e.count,n.start+n.count),r=w,q=c;r<q;r+=3)if(c=r,x=r+1,A=r+2,c=Me(this,d,a,pc,e,g,h,l,m,c,x,A))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),n=0,r=h.length;n<r;n++)if(q=h[n],c=e?d[q.materialIndex]:d,void 0!==c&&(l=g[q.a],m=g[q.b],k=g[q.c],c=sh(this,c,a,pc,l,m,k,Cd)))f&&f[n]&&(v=f[n],wc.copy(v[0]),xc.copy(v[1]),yc.copy(v[2]),c.uv=pa.getUV(Cd,l,m,k,wc,xc,yc,new y)),c.face=q,c.faceIndex=n,b.push(c)},clone:function(){return(new this.constructor(this.geometry,this.material)).copy(this)}});var cj=0,kb=new M,fh=new E,Kf=new n;Q.prototype=Object.assign(Object.create(oa.prototype),
-{constructor:Q,isGeometry:!0,applyMatrix:function(a){for(var b=(new W).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},
+{constructor:Q,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){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){fh.lookAt(a);fh.updateMatrix();this.applyMatrix(fh.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()],k=void 0===g?[]:[(new n).fromArray(g,3*a),(new n).fromArray(g,3*b),(new n).fromArray(g,3*d)];e=new vc(a,b,d,k,f,e);c.faces.push(e);void 0!==l&&c.faceVertexUvs[0].push([(new y).fromArray(l,2*a),(new y).fromArray(l,2*b),(new y).fromArray(l,2*d)]);void 0!==m&&c.faceVertexUvs[1].push([(new y).fromArray(m,2*a),(new y).fromArray(m,2*b),(new y).fromArray(m,2*d)])}var c=this,d=null!==a.index?a.index.array:void 0,e=a.attributes;
 if(void 0===e.position)return console.error("THREE.Geometry.fromBufferGeometry(): Position attribute required for conversion."),this;var 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:void 0,m=void 0!==e.uv2?e.uv2.array:void 0;void 0!==m&&(this.faceVertexUvs[1]=[]);for(e=0;e<f.length;e+=3)c.vertices.push((new n).fromArray(f,e)),void 0!==h&&c.colors.push((new A).fromArray(h,e));var k=a.groups;if(0<k.length)for(e=0;e<k.length;e++){f=
@@ -561,7 +562,7 @@ this.vertices.length;d<b;d++)c[d].normalize();a=0;for(d=this.faces.length;a<d;a+
 d[2].copy(c.normal)):(d[0]=c.normal.clone(),d[1]=c.normal.clone(),d[2]=c.normal.clone())}0<this.faces.length&&(this.normalsNeedUpdate=!0)},computeMorphNormals:function(){var a,b;var c=0;for(b=this.faces.length;c<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 Q;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=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 Ra);this.boundingBox.setFromPoints(this.vertices)},computeBoundingSphere:function(){null===
-this.boundingSphere&&(this.boundingSphere=new mb);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,m=this.colors,k=a.colors;void 0===c&&(c=0);void 0!==b&&(d=(new W).getNormalMatrix(b));for(var n=0,q=g.length;n<q;n++){var u=g[n].clone();void 0!==b&&u.applyMatrix4(b);f.push(u)}n=0;for(q=k.length;n<q;n++)m.push(k[n].clone());n=0;for(q=l.length;n<q;n++){g=l[n];var r=g.vertexNormals;
+this.boundingSphere&&(this.boundingSphere=new mb);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,m=this.colors,k=a.colors;void 0===c&&(c=0);void 0!==b&&(d=(new ca).getNormalMatrix(b));for(var n=0,q=g.length;n<q;n++){var u=g[n].clone();void 0!==b&&u.applyMatrix4(b);f.push(u)}n=0;for(q=k.length;n<q;n++)m.push(k[n].clone());n=0;for(q=l.length;n<q;n++){g=l[n];var r=g.vertexNormals;
 k=g.vertexColors;m=new vc(g.a+e,g.b+e,g.c+e);m.normal.copy(g.normal);void 0!==d&&m.normal.applyMatrix3(d).normalize();b=0;for(f=r.length;b<f;b++)u=r[b].clone(),void 0!==d&&u.applyMatrix3(d).normalize(),m.vertexNormals.push(u);m.color.copy(g.color);b=0;for(f=k.length;b<f;b++)u=k[b],m.vertexColors.push(u.clone());m.materialIndex=g.materialIndex+c;h.push(m)}n=0;for(q=a.faceVertexUvs.length;n<q;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=[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=
@@ -585,7 +586,7 @@ Math.atan(a);this.updateProjectionMatrix()},getFocalLength:function(){var a=Math
 offsetX:0,offsetY:0,width:1,height:1});this.view.enabled=!0;this.view.fullWidth=a;this.view.fullHeight=b;this.view.offsetX=c;this.view.offsetY=d;this.view.width=e;this.view.height=f;this.updateProjectionMatrix()},clearViewOffset:function(){null!==this.view&&(this.view.enabled=!1);this.updateProjectionMatrix()},updateProjectionMatrix:function(){var a=this.near,b=a*Math.tan(.5*R.DEG2RAD*this.fov)/this.zoom,c=2*b,d=this.aspect*c,e=-.5*d,f=this.view;if(null!==this.view&&this.view.enabled){var g=f.fullWidth,
 h=f.fullHeight;e+=f.offsetX*d/g;b-=f.offsetY*c/h;d*=f.width/g;c*=f.height/h}f=this.filmOffset;0!==f&&(e+=a*f/this.getFilmWidth());this.projectionMatrix.makePerspective(e,e+d,b,b-c,a,this.far);this.projectionMatrixInverse.getInverse(this.projectionMatrix)},toJSON:function(a){a=E.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}});zc.prototype=Object.create(E.prototype);zc.prototype.constructor=zc;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 vd,d=new za({type:"CubemapFromEquirect",uniforms:Xb({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 fa(new Fd(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 W(new Fd(5,
 5,5),d);c.add(b);d=new zc(1,10,1);d.renderTarget=this;d.renderTarget.texture.name="CubeCameraTexture";d.update(a,c);b.geometry.dispose();b.material.dispose();return this};Yb.prototype=Object.create(T.prototype);Yb.prototype.constructor=Yb;Yb.prototype.isDataTexture=!0;var rd=new mb,Lf=new n;Object.assign(Dd.prototype,{set:function(a,b,c,d,e,f){var g=this.planes;g[0].copy(a);g[1].copy(b);g[2].copy(c);g[3].copy(d);g[4].copy(e);g[5].copy(f);return this},clone:function(){return(new this.constructor).copy(this)},
 copy:function(a){for(var b=this.planes,c=0;6>c;c++)b[c].copy(a.planes[c]);return this},setFromMatrix:function(a){var b=this.planes,c=a.elements;a=c[0];var d=c[1],e=c[2],f=c[3],g=c[4],h=c[5],l=c[6],k=c[7],p=c[8],n=c[9],q=c[10],u=c[11],r=c[12],v=c[13],B=c[14];c=c[15];b[0].setComponents(f-a,k-g,u-p,c-r).normalize();b[1].setComponents(f+a,k+g,u+p,c+r).normalize();b[2].setComponents(f+d,k+h,u+n,c+v).normalize();b[3].setComponents(f-d,k-h,u-n,c-v).normalize();b[4].setComponents(f-e,k-l,u-q,c-B).normalize();
 b[5].setComponents(f+e,k+l,u+q,c+B).normalize();return this},intersectsObject:function(a){var b=a.geometry;null===b.boundingSphere&&b.computeBoundingSphere();rd.copy(b.boundingSphere).applyMatrix4(a.matrixWorld);return this.intersectsSphere(rd)},intersectsSprite:function(a){rd.center.set(0,0,0);rd.radius=.7071067811865476;rd.applyMatrix4(a.matrixWorld);return this.intersectsSphere(rd)},intersectsSphere:function(a){var b=this.planes,c=a.center;a=-a.radius;for(var d=0;6>d;d++)if(b[d].distanceToPoint(c)<
@@ -662,15 +663,15 @@ 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}",
 sprite_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}",
 sprite_vert:"uniform float rotation;\nuniform vec2 center;\n#include <common>\n#include <uv_pars_vertex>\n#include <fog_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n\tvec2 scale;\n\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\t#endif\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}"},
-G={common:{diffuse:{value:new A(15658734)},opacity:{value:1},map:{value:null},uvTransform:{value:new W},alphaMap:{value:null}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},refractionRatio:{value:.98},maxMipLevel:{value:0}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},
+G={common:{diffuse:{value:new A(15658734)},opacity:{value:1},map:{value:null},uvTransform:{value:new 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 y(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:2.5E-4},fogNear:{value:1},fogFar:{value:2E3},fogColor:{value:new A(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{},shadow:{},shadowBias:{},
 shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},
-pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}}},points:{diffuse:{value:new A(15658734)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},uvTransform:{value:new W}},sprite:{diffuse:{value:new A(15658734)},opacity:{value:1},center:{value:new y(.5,.5)},rotation:{value:0},map:{value:null},alphaMap:{value:null},
-uvTransform:{value:new W}}},cb={basic:{uniforms:qa([G.common,G.specularmap,G.envmap,G.aomap,G.lightmap,G.fog]),vertexShader:O.meshbasic_vert,fragmentShader:O.meshbasic_frag},lambert:{uniforms:qa([G.common,G.specularmap,G.envmap,G.aomap,G.lightmap,G.emissivemap,G.fog,G.lights,{emissive:{value:new A(0)}}]),vertexShader:O.meshlambert_vert,fragmentShader:O.meshlambert_frag},phong:{uniforms:qa([G.common,G.specularmap,G.envmap,G.aomap,G.lightmap,G.emissivemap,G.bumpmap,G.normalmap,G.displacementmap,G.fog,
+pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}}},points:{diffuse:{value:new A(15658734)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},uvTransform:{value:new ca}},sprite:{diffuse:{value:new A(15658734)},opacity:{value:1},center:{value:new y(.5,.5)},rotation:{value:0},map:{value:null},alphaMap:{value:null},
+uvTransform:{value:new ca}}},cb={basic:{uniforms:qa([G.common,G.specularmap,G.envmap,G.aomap,G.lightmap,G.fog]),vertexShader:O.meshbasic_vert,fragmentShader:O.meshbasic_frag},lambert:{uniforms:qa([G.common,G.specularmap,G.envmap,G.aomap,G.lightmap,G.emissivemap,G.fog,G.lights,{emissive:{value:new A(0)}}]),vertexShader:O.meshlambert_vert,fragmentShader:O.meshlambert_frag},phong:{uniforms:qa([G.common,G.specularmap,G.envmap,G.aomap,G.lightmap,G.emissivemap,G.bumpmap,G.normalmap,G.displacementmap,G.fog,
 G.lights,{emissive:{value:new A(0)},specular:{value:new A(1118481)},shininess:{value:30}}]),vertexShader:O.meshphong_vert,fragmentShader:O.meshphong_frag},standard:{uniforms:qa([G.common,G.envmap,G.aomap,G.lightmap,G.emissivemap,G.bumpmap,G.normalmap,G.displacementmap,G.roughnessmap,G.metalnessmap,G.fog,G.lights,{emissive:{value:new A(0)},roughness:{value:.5},metalness:{value:.5},envMapIntensity:{value:1}}]),vertexShader:O.meshphysical_vert,fragmentShader:O.meshphysical_frag},toon:{uniforms:qa([G.common,
 G.specularmap,G.aomap,G.lightmap,G.emissivemap,G.bumpmap,G.normalmap,G.displacementmap,G.gradientmap,G.fog,G.lights,{emissive:{value:new A(0)},specular:{value:new A(1118481)},shininess:{value:30}}]),vertexShader:O.meshtoon_vert,fragmentShader:O.meshtoon_frag},matcap:{uniforms:qa([G.common,G.bumpmap,G.normalmap,G.displacementmap,G.fog,{matcap:{value:null}}]),vertexShader:O.meshmatcap_vert,fragmentShader:O.meshmatcap_frag},points:{uniforms:qa([G.points,G.fog]),vertexShader:O.points_vert,fragmentShader:O.points_frag},
 dashed:{uniforms:qa([G.common,G.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:O.linedashed_vert,fragmentShader:O.linedashed_frag},depth:{uniforms:qa([G.common,G.displacementmap]),vertexShader:O.depth_vert,fragmentShader:O.depth_frag},normal:{uniforms:qa([G.common,G.bumpmap,G.normalmap,G.displacementmap,{opacity:{value:1}}]),vertexShader:O.normal_vert,fragmentShader:O.normal_frag},sprite:{uniforms:qa([G.sprite,G.fog]),vertexShader:O.sprite_vert,fragmentShader:O.sprite_frag},
-background:{uniforms:{uvTransform:{value:new W},t2D:{value:null}},vertexShader:O.background_vert,fragmentShader:O.background_frag},cube:{uniforms:qa([G.envmap,{opacity:{value:1}}]),vertexShader:O.cube_vert,fragmentShader:O.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:O.equirect_vert,fragmentShader:O.equirect_frag},distanceRGBA:{uniforms:qa([G.common,G.displacementmap,{referencePosition:{value:new n},nearDistance:{value:1},farDistance:{value:1E3}}]),vertexShader:O.distanceRGBA_vert,
+background:{uniforms:{uvTransform:{value:new ca},t2D:{value:null}},vertexShader:O.background_vert,fragmentShader:O.background_frag},cube:{uniforms:qa([G.envmap,{opacity:{value:1}}]),vertexShader:O.cube_vert,fragmentShader:O.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:O.equirect_vert,fragmentShader:O.equirect_frag},distanceRGBA:{uniforms:qa([G.common,G.displacementmap,{referencePosition:{value:new n},nearDistance:{value:1},farDistance:{value:1E3}}]),vertexShader:O.distanceRGBA_vert,
 fragmentShader:O.distanceRGBA_frag},shadow:{uniforms:qa([G.lights,G.fog,{color:{value:new A(0)},opacity:{value:1}}]),vertexShader:O.shadow_vert,fragmentShader:O.shadow_frag}};cb.physical={uniforms:qa([cb.standard.uniforms,{transparency:{value:0},clearcoat:{value:0},clearcoatRoughness:{value:0},sheen:{value:new A(0)},clearcoatNormalScale:{value:new y(1,1)},clearcoatNormalMap:{value:null}}]),vertexShader:O.meshphysical_vert,fragmentShader:O.meshphysical_frag};Ed.prototype=Object.create(Q.prototype);
 Ed.prototype.constructor=Ed;Zb.prototype=Object.create(D.prototype);Zb.prototype.constructor=Zb;nb.prototype=Object.create(T.prototype);nb.prototype.constructor=nb;nb.prototype.isCubeTexture=!0;Object.defineProperty(nb.prototype,"images",{get:function(){return this.image},set:function(a){this.image=a}});Ac.prototype=Object.create(T.prototype);Ac.prototype.constructor=Ac;Ac.prototype.isDataTexture2DArray=!0;Bc.prototype=Object.create(T.prototype);Bc.prototype.constructor=Bc;Bc.prototype.isDataTexture3D=
 !0;var zh=new T,yj=new Ac,Aj=new Bc,Ah=new nb,th=[],vh=[],yh=new Float32Array(16),xh=new Float32Array(9),wh=new Float32Array(4);Bh.prototype.updateCache=function(a){var b=this.cache;a instanceof Float32Array&&b.length!==a.length&&(this.cache=new Float32Array(a.length));Ja(b,a)};Ch.prototype.setValue=function(a,b,c){for(var d=this.seq,e=0,f=d.length;e!==f;++e){var g=d[e];g.setValue(a,b[g.id],c)}};var jg=/([\w\d_]+)(\])?(\[|\.)?/g;Bb.prototype.setValue=function(a,b,c,d){b=this.map[b];void 0!==b&&b.setValue(a,
@@ -688,11 +689,11 @@ this.matrixWorld);td.setFromMatrixPosition(this.modelViewMatrix);a.camera.isPers
 Nf,Ee,!1,De),null===f))return;e=a.ray.origin.distanceTo(De);e<a.near||e>a.far||b.push({distance:e,point:De.clone(),uv:pa.getUV(De,Mf,Ee,Nf,Ai,hh,Bi,new y),face:null,object:this})},clone:function(){return(new this.constructor(this.material)).copy(this)},copy:function(a){E.prototype.copy.call(this,a);void 0!==a.center&&this.center.copy(a.center);return this}});var Of=new n,Ci=new n;Od.prototype=Object.assign(Object.create(E.prototype),{constructor:Od,isLOD:!0,copy:function(a){E.prototype.copy.call(this,
 a,!1);for(var b=a.levels,c=0,d=b.length;c<d;c++){var e=b[c];this.addLevel(e.object.clone(),e.distance)}this.autoUpdate=a.autoUpdate;return this},addLevel:function(a,b){void 0===b&&(b=0);b=Math.abs(b);for(var c=this.levels,d=0;d<c.length&&!(b<c[d].distance);d++);c.splice(d,0,{distance:b,object:a});this.add(a);return this},getObjectForDistance:function(a){var b=this.levels;if(0<b.length){for(var c=1,d=b.length;c<d&&!(a<b[c].distance);c++);return b[c-1].object}return null},raycast:function(a,b){if(0<
 this.levels.length){Of.setFromMatrixPosition(this.matrixWorld);var c=a.ray.origin.distanceTo(Of);this.getObjectForDistance(c).raycast(a,b)}},update:function(a){var b=this.levels;if(1<b.length){Of.setFromMatrixPosition(a.matrixWorld);Ci.setFromMatrixPosition(this.matrixWorld);a=Of.distanceTo(Ci);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=E.prototype.toJSON.call(this,
-a);!1===this.autoUpdate&&(a.object.autoUpdate=!1);a.object.levels=[];for(var b=this.levels,c=0,d=b.length;c<d;c++){var e=b[c];a.object.levels.push({object:e.object.uuid,distance:e.distance})}return a}});Pd.prototype=Object.assign(Object.create(fa.prototype),{constructor:Pd,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 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){fa.prototype.updateMatrixWorld.call(this,a);"attached"===this.bindMode?this.bindMatrixInverse.getInverse(this.matrixWorld):"detached"===this.bindMode?this.bindMatrixInverse.getInverse(this.bindMatrix):
+a);!1===this.autoUpdate&&(a.object.autoUpdate=!1);a.object.levels=[];for(var b=this.levels,c=0,d=b.length;c<d;c++){var e=b[c];a.object.levels.push({object:e.object.uuid,distance:e.distance})}return a}});Pd.prototype=Object.assign(Object.create(W.prototype),{constructor:Pd,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 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){W.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 Di=new M,Kk=new M;Object.assign(We.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++)Di.multiplyMatrices(a[e]?a[e].matrixWorld:Kk,b[e]),Di.toArray(c,16*e);void 0!==d&&(d.needsUpdate=!0)},clone:function(){return new We(this.bones,
-this.boneInverses)},getBoneByName:function(a){for(var b=0,c=this.bones.length;b<c;b++){var d=this.bones[b];if(d.name===a)return d}}});rg.prototype=Object.assign(Object.create(E.prototype),{constructor:rg,isBone:!0});var Ei=new M,Fi=new M,ud=[],Fe=new fa;Xe.prototype=Object.assign(Object.create(fa.prototype),{constructor:Xe,isInstancedMesh:!0,getMatrixAt:function(a,b){b.fromArray(this.instanceMatrix.array,16*a)},raycast:function(a,b){var c=this.matrixWorld,d=this.count;Fe.geometry=this.geometry;Fe.material=
+this.boneInverses)},getBoneByName:function(a){for(var b=0,c=this.bones.length;b<c;b++){var d=this.bones[b];if(d.name===a)return d}}});rg.prototype=Object.assign(Object.create(E.prototype),{constructor:rg,isBone:!0});var Ei=new M,Fi=new M,ud=[],Fe=new W;Xe.prototype=Object.assign(Object.create(W.prototype),{constructor:Xe,isInstancedMesh:!0,getMatrixAt:function(a,b){b.fromArray(this.instanceMatrix.array,16*a)},raycast:function(a,b){var c=this.matrixWorld,d=this.count;Fe.geometry=this.geometry;Fe.material=
 this.material;if(void 0!==Fe.material)for(var e=0;e<d;e++)this.getMatrixAt(e,Ei),Fi.multiplyMatrices(c,Ei),Fe.matrixWorld=Fi,Fe.raycast(a,ud),0<ud.length&&(ud[0].instanceId=e,ud[0].object=this,b.push(ud[0]),ud.length=0)},setMatrixAt:function(a,b){b.toArray(this.instanceMatrix.array,16*a)},updateMorphTargets:function(){}});X.prototype=Object.create(N.prototype);X.prototype.constructor=X;X.prototype.isLineBasicMaterial=!0;X.prototype.copy=function(a){N.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 Gi=new n,Hi=new n,Ii=new M,Pf=new Rb,Ge=new mb;ya.prototype=Object.assign(Object.create(E.prototype),{constructor:ya,isLine:!0,computeLineDistances:function(){var a=this.geometry;if(a.isBufferGeometry)if(null===a.index){for(var b=a.attributes.position,c=[0],d=1,e=b.count;d<e;d++)Gi.fromBufferAttribute(b,d-1),Hi.fromBufferAttribute(b,d),c[d]=c[d-1],c[d]+=Gi.distanceTo(Hi);a.setAttribute("lineDistance",new C(c,
 1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(a.isGeometry)for(b=a.vertices,c=a.lineDistances,c[0]=0,d=1,e=b.length;d<e;d++)c[d]=c[d-1],c[d]+=b[d-1].distanceTo(b[d]);return this},raycast:function(a,b){var c=a.linePrecision,d=this.geometry,e=this.matrixWorld;null===d.boundingSphere&&d.computeBoundingSphere();Ge.copy(d.boundingSphere);Ge.applyMatrix4(e);Ge.radius+=c;if(!1!==a.ray.intersectsSphere(Ge)){Ii.getInverse(e);
@@ -813,7 +814,7 @@ a.flatShading);void 0!==a.blending&&(d.blending=a.blending);void 0!==a.combine&&
 (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=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 A).setHex(f.value);break;case "v2":d.uniforms[e].value=(new y).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 W).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=
+b(f.value);break;case "c":d.uniforms[e].value=(new A).setHex(f.value);break;case "v2":d.uniforms[e].value=(new y).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=!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 y).fromArray(e));void 0!==a.displacementMap&&(d.displacementMap=b(a.displacementMap));void 0!==a.displacementScale&&(d.displacementScale=a.displacementScale);void 0!==a.displacementBias&&(d.displacementBias=a.displacementBias);void 0!==a.roughnessMap&&(d.roughnessMap=
 b(a.roughnessMap));void 0!==a.metalnessMap&&(d.metalnessMap=b(a.metalnessMap));void 0!==a.emissiveMap&&(d.emissiveMap=b(a.emissiveMap));void 0!==a.emissiveIntensity&&(d.emissiveIntensity=a.emissiveIntensity);void 0!==a.specularMap&&(d.specularMap=b(a.specularMap));void 0!==a.envMap&&(d.envMap=b(a.envMap));void 0!==a.envMapIntensity&&(d.envMapIntensity=a.envMapIntensity);void 0!==a.reflectivity&&(d.reflectivity=a.reflectivity);void 0!==a.refractionRatio&&(d.refractionRatio=a.refractionRatio);void 0!==
@@ -839,7 +840,7 @@ void 0!==g.minFilter&&(h.minFilter=c(g.minFilter,Li));void 0!==g.magFilter&&(h.m
 a){if(Array.isArray(a)){for(var b=[],d=0,e=a.length;d<e;d++){var f=a[d];void 0===c[f]&&console.warn("THREE.ObjectLoader: Undefined material",f);b.push(c[f])}return b}void 0===c[a]&&console.warn("THREE.ObjectLoader: Undefined material",a);return c[a]}}switch(a.type){case "Scene":var f=new vd;void 0!==a.background&&Number.isInteger(a.background)&&(f.background=new A(a.background));void 0!==a.fog&&("Fog"===a.fog.type?f.fog=new Ue(a.fog.color,a.fog.near,a.fog.far):"FogExp2"===a.fog.type&&(f.fog=new Te(a.fog.color,
 a.fog.density)));break;case "PerspectiveCamera":f=new ja(a.fov,a.aspect,a.near,a.far);void 0!==a.focus&&(f.focus=a.focus);void 0!==a.zoom&&(f.zoom=a.zoom);void 0!==a.filmGauge&&(f.filmGauge=a.filmGauge);void 0!==a.filmOffset&&(f.filmOffset=a.filmOffset);void 0!==a.view&&(f.view=Object.assign({},a.view));break;case "OrthographicCamera":f=new pe(a.left,a.right,a.top,a.bottom,a.near,a.far);void 0!==a.zoom&&(f.zoom=a.zoom);void 0!==a.view&&(f.view=Object.assign({},a.view));break;case "AmbientLight":f=
 new of(a.color,a.intensity);break;case "DirectionalLight":f=new nf(a.color,a.intensity);break;case "PointLight":f=new lf(a.color,a.intensity,a.distance,a.decay);break;case "RectAreaLight":f=new pf(a.color,a.intensity,a.width,a.height);break;case "SpotLight":f=new kf(a.color,a.intensity,a.distance,a.angle,a.penumbra,a.decay);break;case "HemisphereLight":f=new hf(a.color,a.groundColor,a.intensity);break;case "SkinnedMesh":console.warn("THREE.ObjectLoader.parseObject() does not support SkinnedMesh yet.");
-case "Mesh":f=d(a.geometry);var g=e(a.material);f=f.bones&&0<f.bones.length?new Pd(f,g):new fa(f,g);break;case "InstancedMesh":f=d(a.geometry);g=e(a.material);var h=a.instanceMatrix;f=new Xe(f,g,a.count);f.instanceMatrix=new P(new Float32Array(h.array),16);break;case "LOD":f=new Od;break;case "Line":f=new ya(d(a.geometry),e(a.material),a.mode);break;case "LineLoop":f=new Ye(d(a.geometry),e(a.material));break;case "LineSegments":f=new Y(d(a.geometry),e(a.material));break;case "PointCloud":case "Points":f=
+case "Mesh":f=d(a.geometry);var g=e(a.material);f=f.bones&&0<f.bones.length?new Pd(f,g):new W(f,g);break;case "InstancedMesh":f=d(a.geometry);g=e(a.material);var h=a.instanceMatrix;f=new Xe(f,g,a.count);f.instanceMatrix=new P(new Float32Array(h.array),16);break;case "LOD":f=new Od;break;case "Line":f=new ya(d(a.geometry),e(a.material),a.mode);break;case "LineLoop":f=new Ye(d(a.geometry),e(a.material));break;case "LineSegments":f=new Y(d(a.geometry),e(a.material));break;case "PointCloud":case "Points":f=
 new Hc(d(a.geometry),e(a.material));break;case "Sprite":f=new Md(e(a.material));break;case "Group":f=new Ec;break;default:f=new E}f.uuid=a.uuid;void 0!==a.name&&(f.name=a.name);void 0!==a.matrix?(f.matrix.fromArray(a.matrix),void 0!==a.matrixAutoUpdate&&(f.matrixAutoUpdate=a.matrixAutoUpdate),f.matrixAutoUpdate&&f.matrix.decompose(f.position,f.quaternion,f.scale)):(void 0!==a.position&&f.position.fromArray(a.position),void 0!==a.rotation&&f.rotation.fromArray(a.rotation),void 0!==a.quaternion&&f.quaternion.fromArray(a.quaternion),
 void 0!==a.scale&&f.scale.fromArray(a.scale));void 0!==a.castShadow&&(f.castShadow=a.castShadow);void 0!==a.receiveShadow&&(f.receiveShadow=a.receiveShadow);a.shadow&&(void 0!==a.shadow.bias&&(f.shadow.bias=a.shadow.bias),void 0!==a.shadow.radius&&(f.shadow.radius=a.shadow.radius),void 0!==a.shadow.mapSize&&f.shadow.mapSize.fromArray(a.shadow.mapSize),void 0!==a.shadow.camera&&(f.shadow.camera=this.parseObject(a.shadow.camera)));void 0!==a.visible&&(f.visible=a.visible);void 0!==a.frustumCulled&&
 (f.frustumCulled=a.frustumCulled);void 0!==a.renderOrder&&(f.renderOrder=a.renderOrder);void 0!==a.userData&&(f.userData=a.userData);void 0!==a.layers&&(f.layers.mask=a.layers);if(void 0!==a.children)for(h=a.children,g=0;g<h.length;g++)f.add(this.parseObject(h[g],b,c));if("LOD"===a.type)for(void 0!==a.autoUpdate&&(f.autoUpdate=a.autoUpdate),a=a.levels,h=0;h<a.length;h++){g=a[h];var l=f.getObjectByProperty("uuid",g.object);void 0!==l&&f.addLevel(l,g.distance)}return f}});var Nk={UVMapping:300,CubeReflectionMapping:301,
@@ -925,18 +926,18 @@ this.max.add(a);return this},expandByScalar:function(a){this.min.addScalar(-a);t
 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 Ri=new n,Vf=new n;Object.assign(Sg.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){Ri.subVectors(a,this.start);Vf.subVectors(this.end,this.start);a=Vf.dot(Vf);a=Vf.dot(Ri)/a;b&&(a=R.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)}});
-qe.prototype=Object.create(E.prototype);qe.prototype.constructor=qe;qe.prototype.isImmediateRenderObject=!0;var lb=new n,zb=new n,oh=new W,Yk=["a","b","c"];re.prototype=Object.create(Y.prototype);re.prototype.constructor=re;re.prototype.update=function(){this.object.updateMatrixWorld(!0);oh.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=
+qe.prototype=Object.create(E.prototype);qe.prototype.constructor=qe;qe.prototype.isImmediateRenderObject=!0;var lb=new n,zb=new n,oh=new ca,Yk=["a","b","c"];re.prototype=Object.create(Y.prototype);re.prototype.constructor=re;re.prototype.update=function(){this.object.updateMatrixWorld(!0);oh.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];lb.copy(d[h[Yk[k]]]).applyMatrix4(a);zb.copy(n).applyMatrix3(oh).normalize().multiplyScalar(this.size).add(lb);b.setXYZ(c,lb.x,lb.y,lb.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++)lb.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(oh).normalize().multiplyScalar(this.size).add(lb),
 b.setXYZ(c,lb.x,lb.y,lb.z),c+=1,b.setXYZ(c,zb.x,zb.y,zb.z),c+=1;b.needsUpdate=!0};var Ie=new n,Je=new n;se.prototype=Object.create(Y.prototype);se.prototype.constructor=se;se.prototype.update=function(){this.object.updateMatrixWorld(!0);var a=this.object.matrixWorld,b=this.geometry.attributes.position,c=this.object.geometry,d=c.attributes.position;c=c.attributes.tangent;for(var e=0,f=0,g=d.count;f<g;f++)Ie.set(d.getX(f),d.getY(f),d.getZ(f)).applyMatrix4(a),Je.set(c.getX(f),c.getY(f),c.getZ(f)),Je.transformDirection(a).multiplyScalar(this.size).add(Ie),
 b.setXYZ(e,Ie.x,Ie.y,Ie.z),e+=1,b.setXYZ(e,Je.x,Je.y,Je.z),e+=1;b.needsUpdate=!0};var Si=new n;bd.prototype=Object.create(E.prototype);bd.prototype.constructor=bd;bd.prototype.dispose=function(){this.cone.geometry.dispose();this.cone.material.dispose()};bd.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);Si.setFromMatrixPosition(this.light.target.matrixWorld);this.cone.lookAt(Si);
 void 0!==this.color?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)};var Ob=new n,Wf=new M,ph=new M;cd.prototype=Object.create(Y.prototype);cd.prototype.constructor=cd;cd.prototype.updateMatrixWorld=function(a){var b=this.bones,c=this.geometry,d=c.getAttribute("position");ph.getInverse(this.root.matrixWorld);for(var e=0,f=0;e<b.length;e++){var g=b[e];g.parent&&g.parent.isBone&&(Wf.multiplyMatrices(ph,g.matrixWorld),Ob.setFromMatrixPosition(Wf),d.setXYZ(f,Ob.x,
-Ob.y,Ob.z),Wf.multiplyMatrices(ph,g.parent.matrixWorld),Ob.setFromMatrixPosition(Wf),d.setXYZ(f+1,Ob.x,Ob.y,Ob.z),f+=2)}c.getAttribute("position").needsUpdate=!0;E.prototype.updateMatrixWorld.call(this,a)};dd.prototype=Object.create(fa.prototype);dd.prototype.constructor=dd;dd.prototype.dispose=function(){this.geometry.dispose();this.material.dispose()};dd.prototype.update=function(){void 0!==this.color?this.material.color.set(this.color):this.material.color.copy(this.light.color)};ed.prototype=Object.create(ya.prototype);
+Ob.y,Ob.z),Wf.multiplyMatrices(ph,g.parent.matrixWorld),Ob.setFromMatrixPosition(Wf),d.setXYZ(f+1,Ob.x,Ob.y,Ob.z),f+=2)}c.getAttribute("position").needsUpdate=!0;E.prototype.updateMatrixWorld.call(this,a)};dd.prototype=Object.create(W.prototype);dd.prototype.constructor=dd;dd.prototype.dispose=function(){this.geometry.dispose();this.material.dispose()};dd.prototype.update=function(){void 0!==this.color?this.material.color.set(this.color):this.material.color.copy(this.light.color)};ed.prototype=Object.create(ya.prototype);
 ed.prototype.constructor=ed;ed.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)}};ed.prototype.dispose=function(){this.geometry.dispose();
 this.material.dispose();this.children[0].geometry.dispose();this.children[0].material.dispose()};var Zk=new n,Ti=new A,Ui=new A;fd.prototype=Object.create(E.prototype);fd.prototype.constructor=fd;fd.prototype.dispose=function(){this.children[0].geometry.dispose();this.children[0].material.dispose()};fd.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");Ti.copy(this.light.color);Ui.copy(this.light.groundColor);
-for(var c=0,d=b.count;c<d;c++){var e=c<d/2?Ti:Ui;b.setXYZ(c,e.r,e.g,e.b)}b.needsUpdate=!0}a.lookAt(Zk.setFromMatrixPosition(this.light.matrixWorld).negate())};gd.prototype=Object.create(fa.prototype);gd.prototype.constructor=gd;gd.prototype.dispose=function(){this.geometry.dispose();this.material.dispose()};gd.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};
+for(var c=0,d=b.count;c<d;c++){var e=c<d/2?Ti:Ui;b.setXYZ(c,e.r,e.g,e.b)}b.needsUpdate=!0}a.lookAt(Zk.setFromMatrixPosition(this.light.matrixWorld).negate())};gd.prototype=Object.create(W.prototype);gd.prototype.constructor=gd;gd.prototype.dispose=function(){this.geometry.dispose();this.material.dispose()};gd.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};
 yf.prototype=Object.assign(Object.create(Y.prototype),{constructor:yf,copy:function(a){Y.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)}});zf.prototype=Object.create(Y.prototype);zf.prototype.constructor=zf;hd.prototype=Object.create(ya.prototype);hd.prototype.constructor=hd;hd.prototype.update=function(){function a(a,b,d,e){d=(b-a)/d;u.setXYZ(k,0,0,0);m++;for(n=a;n<b;n+=d)t=k+m,u.setXYZ(t,
 Math.sin(n)*c,0,Math.cos(n)*c),u.setXYZ(t+1,Math.sin(Math.min(n+d,b))*c,0,Math.cos(Math.min(n+d,b))*c),u.setXYZ(t+2,0,0,0),m+=3;q.addGroup(k,m,e);k+=m;m=0}var b=this.audio,c=this.range,d=this.divisionsInnerAngle,e=this.divisionsOuterAngle,f=R.degToRad(b.panner.coneInnerAngle);b=R.degToRad(b.panner.coneOuterAngle);var g=f/2,h=b/2,k=0,m=0,n,t,q=this.geometry,u=q.attributes.position;q.clearGroups();a(-h,-g,e,0);a(-g,g,d,1);a(g,h,e,0);u.needsUpdate=!0;f===b&&(this.material[0].visible=!1)};hd.prototype.dispose=
-function(){this.geometry.dispose();this.material[0].dispose();this.material[1].dispose()};var Ke=new n,Xf=new n,Vi=new W;te.prototype=Object.create(Y.prototype);te.prototype.constructor=te;te.prototype.update=function(){this.object.updateMatrixWorld(!0);Vi.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;Ke.copy(d[h.a]).add(d[h.b]).add(d[h.c]).divideScalar(3).applyMatrix4(a);
+function(){this.geometry.dispose();this.material[0].dispose();this.material[1].dispose()};var Ke=new n,Xf=new n,Vi=new ca;te.prototype=Object.create(Y.prototype);te.prototype.constructor=te;te.prototype.update=function(){this.object.updateMatrixWorld(!0);Vi.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;Ke.copy(d[h.a]).add(d[h.b]).add(d[h.c]).divideScalar(3).applyMatrix4(a);
 Xf.copy(k).applyMatrix3(Vi).normalize().multiplyScalar(this.size).add(Ke);b.setXYZ(e,Ke.x,Ke.y,Ke.z);e+=1;b.setXYZ(e,Xf.x,Xf.y,Xf.z);e+=1}b.needsUpdate=!0};var Wi=new n,Yf=new n,Xi=new n;id.prototype=Object.create(E.prototype);id.prototype.constructor=id;id.prototype.dispose=function(){this.lightPlane.geometry.dispose();this.lightPlane.material.dispose();this.targetLine.geometry.dispose();this.targetLine.material.dispose()};id.prototype.update=function(){Wi.setFromMatrixPosition(this.light.matrixWorld);
 Yf.setFromMatrixPosition(this.light.target.matrixWorld);Xi.subVectors(Yf,Wi);this.lightPlane.lookAt(Yf);void 0!==this.color?(this.lightPlane.material.color.set(this.color),this.targetLine.material.color.set(this.color)):(this.lightPlane.material.color.copy(this.light.color),this.targetLine.material.color.copy(this.light.color));this.targetLine.lookAt(Yf);this.targetLine.scale.z=Xi.length()};var Af=new n,na=new bb;ue.prototype=Object.create(Y.prototype);ue.prototype.constructor=ue;ue.prototype.update=
 function(){var a=this.geometry,b=this.pointMap;na.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse);sa("c",b,a,na,0,0,-1);sa("t",b,a,na,0,0,1);sa("n1",b,a,na,-1,-1,-1);sa("n2",b,a,na,1,-1,-1);sa("n3",b,a,na,-1,1,-1);sa("n4",b,a,na,1,1,-1);sa("f1",b,a,na,-1,-1,1);sa("f2",b,a,na,1,-1,1);sa("f3",b,a,na,-1,1,1);sa("f4",b,a,na,1,1,1);sa("u1",b,a,na,.7,1.1,-1);sa("u2",b,a,na,-.7,1.1,-1);sa("u3",b,a,na,0,2,-1);sa("cf1",b,a,na,-1,0,1);sa("cf2",b,a,na,1,0,1);sa("cf3",b,a,na,0,-1,1);sa("cf4",
@@ -952,24 +953,24 @@ cd.prototype.update=function(){console.error("THREE.SkeletonHelper: update() no
 Object.assign(uf.prototype,{setTexturePath:function(a){console.warn("THREE.ObjectLoader: .setTexturePath() has been renamed to .setResourcePath().");return this.setResourcePath(a)}});Object.assign(Rg.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(Ra.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)}});Sg.prototype.center=function(a){console.warn("THREE.Line3: .center() has been renamed to .getCenter().");return this.getCenter(a)};Object.assign(R,{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 R.floorPowerOfTwo(a)},nextPowerOfTwo:function(a){console.warn("THREE.Math: .nextPowerOfTwo() has been renamed to .ceilPowerOfTwo().");return R.ceilPowerOfTwo(a)}});Object.assign(W.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.")},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)}});Sa.prototype.isIntersectionLine=function(a){console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine().");return this.intersectsLine(a)};wa.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(Rb.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(pa.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(pa,
-{barycoordFromPoint:function(a,b,c,d,e){console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord().");return pa.getBarycoord(a,b,c,d,e)},normal:function(a,b,c,d){console.warn("THREE.Triangle: .normal() has been renamed to .getNormal().");return pa.getNormal(a,b,c,d)}});Object.assign(Ib.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 cc(this,a)},makeGeometry:function(a){console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead.");return new dc(this,a)}});Object.assign(y.prototype,{fromAttribute:function(a,b,c){console.warn("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute().");return this.fromBufferAttribute(a,b,c)},distanceToManhattan:function(a){console.warn("THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo().");return this.manhattanDistanceTo(a)},
-lengthManhattan:function(){console.warn("THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength().");return this.manhattanLength()}});Object.assign(n.prototype,{setEulerFromRotationMatrix:function(){console.error("THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.")},setEulerFromQuaternion:function(){console.error("THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.")},getPositionFromMatrix:function(a){console.warn("THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition().");
-return this.setFromMatrixPosition(a)},getScaleFromMatrix:function(a){console.warn("THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale().");return this.setFromMatrixScale(a)},getColumnFromMatrix:function(a,b){console.warn("THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn().");return this.setFromMatrixColumn(b,a)},applyProjection:function(a){console.warn("THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead.");return this.applyMatrix4(a)},
-fromAttribute:function(a,b,c){console.warn("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute().");return this.fromBufferAttribute(a,b,c)},distanceToManhattan:function(a){console.warn("THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo().");return this.manhattanDistanceTo(a)},lengthManhattan:function(){console.warn("THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength().");return this.manhattanLength()}});Object.assign(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(Q.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 Math.random()},nearestPowerOfTwo:function(a){console.warn("THREE.Math: .nearestPowerOfTwo() has been renamed to .floorPowerOfTwo().");return R.floorPowerOfTwo(a)},nextPowerOfTwo:function(a){console.warn("THREE.Math: .nextPowerOfTwo() has been renamed to .ceilPowerOfTwo().");return R.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.")},
+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)}});Sa.prototype.isIntersectionLine=function(a){console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine().");return this.intersectsLine(a)};wa.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(Rb.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(pa.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(pa,{barycoordFromPoint:function(a,b,c,d,e){console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord().");return pa.getBarycoord(a,b,c,d,e)},normal:function(a,b,c,d){console.warn("THREE.Triangle: .normal() has been renamed to .getNormal().");return pa.getNormal(a,b,c,d)}});Object.assign(Ib.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 cc(this,a)},makeGeometry:function(a){console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead.");return new dc(this,a)}});Object.assign(y.prototype,{fromAttribute:function(a,b,c){console.warn("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute().");return this.fromBufferAttribute(a,b,c)},distanceToManhattan:function(a){console.warn("THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo().");
+return this.manhattanDistanceTo(a)},lengthManhattan:function(){console.warn("THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength().");return this.manhattanLength()}});Object.assign(n.prototype,{setEulerFromRotationMatrix:function(){console.error("THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.")},setEulerFromQuaternion:function(){console.error("THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.")},
+getPositionFromMatrix:function(a){console.warn("THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition().");return this.setFromMatrixPosition(a)},getScaleFromMatrix:function(a){console.warn("THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale().");return this.setFromMatrixScale(a)},getColumnFromMatrix:function(a,b){console.warn("THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn().");return this.setFromMatrixColumn(b,
+a)},applyProjection:function(a){console.warn("THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead.");return this.applyMatrix4(a)},fromAttribute:function(a,b,c){console.warn("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute().");return this.fromBufferAttribute(a,b,c)},distanceToManhattan:function(a){console.warn("THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo().");return this.manhattanDistanceTo(a)},lengthManhattan:function(){console.warn("THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength().");
+return this.manhattanLength()}});Object.assign(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(Q.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(E.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(E.prototype,{eulerOrder:{get:function(){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order.");return this.rotation.order},set:function(a){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order.");this.rotation.order=a}},useQuaternion:{get:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")},set:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")}}});
-Object.assign(fa.prototype,{setDrawMode:function(){console.error("THREE.Mesh: .setDrawMode() has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.")}});Object.defineProperties(fa.prototype,{drawMode:{get:function(){console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode.");return 0},set:function(){console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.")}}});
+Object.assign(W.prototype,{setDrawMode:function(){console.error("THREE.Mesh: .setDrawMode() has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.")}});Object.defineProperties(W.prototype,{drawMode:{get:function(){console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode.");return 0},set:function(){console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.")}}});
 Object.defineProperties(Od.prototype,{objects:{get:function(){console.warn("THREE.LOD: .objects has been renamed to .levels.");return this.levels}}});Object.defineProperty(We.prototype,"useVertexTexture",{get:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")},set:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")}});Pd.prototype.initBones=function(){console.error("THREE.SkinnedMesh: initBones() has been removed.")};Object.defineProperty(K.prototype,
 "__arcLengthDivisions",{get:function(){console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions.");return this.arcLengthDivisions},set:function(a){console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions.");this.arcLengthDivisions=a}});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(V.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.");
@@ -1015,8 +1016,8 @@ if(b.isMesh){b.matrixAutoUpdate&&b.updateMatrix();var d=b.matrix;b=b.geometry}a.
 Wd;k.ImageBitmapLoader=Cg;k.ImageLoader=Zc;k.ImageUtils=Jb;k.ImmediateRenderObject=qe;k.IncrementStencilOp=7682;k.IncrementWrapStencilOp=34055;k.InstancedBufferAttribute=sf;k.InstancedBufferGeometry=rf;k.InstancedInterleavedBuffer=Pg;k.InstancedMesh=Xe;k.Int16Attribute=function(a,b){console.warn("THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead.");return new zd(a,b)};k.Int16BufferAttribute=zd;k.Int32Attribute=function(a,b){console.warn("THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead.");
 return new Ad(a,b)};k.Int32BufferAttribute=Ad;k.Int8Attribute=function(a,b){console.warn("THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead.");return new wd(a,b)};k.Int8BufferAttribute=wd;k.IntType=1013;k.InterleavedBuffer=ob;k.InterleavedBufferAttribute=Ld;k.Interpolant=Ka;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=ra;k.LOD=Od;k.LatheBufferGeometry=Tc;k.LatheGeometry=he;k.Layers=ag;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=V;k.LightProbe=Za;k.LightProbeHelper=gd;k.LightShadow=ib;k.Line=ya;k.Line3=Sg;k.LineBasicMaterial=X;k.LineCurve=Ba;k.LineCurve3=Va;k.LineDashedMaterial=mc;k.LineLoop=Ye;k.LinePieces=1;k.LineSegments=Y;k.LineStrip=0;k.LinearEncoding=
-3E3;k.LinearFilter=1006;k.LinearInterpolant=le;k.LinearMipMapLinearFilter=1008;k.LinearMipMapNearestFilter=1007;k.LinearMipmapLinearFilter=1008;k.LinearMipmapNearestFilter=1007;k.LinearToneMapping=1;k.Loader=S;k.LoaderUtils=mh;k.LoadingManager=xg;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=N;k.MaterialLoader=qf;k.Math=R;k.Matrix3=W;k.Matrix4=M;k.MaxEquation=
-104;k.Mesh=fa;k.MeshBasicMaterial=Ia;k.MeshDepthMaterial=Cb;k.MeshDistanceMaterial=Db;k.MeshFaceMaterial=function(a){console.warn("THREE.MeshFaceMaterial has been removed. Use an Array instead.");return a};k.MeshLambertMaterial=kc;k.MeshMatcapMaterial=lc;k.MeshNormalMaterial=jc;k.MeshPhongMaterial=Hb;k.MeshPhysicalMaterial=hc;k.MeshStandardMaterial=fb;k.MeshToonMaterial=ic;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.");
+3E3;k.LinearFilter=1006;k.LinearInterpolant=le;k.LinearMipMapLinearFilter=1008;k.LinearMipMapNearestFilter=1007;k.LinearMipmapLinearFilter=1008;k.LinearMipmapNearestFilter=1007;k.LinearToneMapping=1;k.Loader=S;k.LoaderUtils=mh;k.LoadingManager=xg;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=N;k.MaterialLoader=qf;k.Math=R;k.Matrix3=ca;k.Matrix4=M;k.MaxEquation=
+104;k.Mesh=W;k.MeshBasicMaterial=Ia;k.MeshDepthMaterial=Cb;k.MeshDistanceMaterial=Db;k.MeshFaceMaterial=function(a){console.warn("THREE.MeshFaceMaterial has been removed. Use an Array instead.");return a};k.MeshLambertMaterial=kc;k.MeshMatcapMaterial=lc;k.MeshNormalMaterial=jc;k.MeshPhongMaterial=Hb;k.MeshPhysicalMaterial=hc;k.MeshStandardMaterial=fb;k.MeshToonMaterial=ic;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=Xc;k.Object3D=E;k.ObjectLoader=uf;k.ObjectSpaceNormalMap=
 1;k.OctahedronBufferGeometry=$b;k.OctahedronGeometry=Vd;k.OneFactor=201;k.OneMinusDstAlphaFactor=207;k.OneMinusDstColorFactor=209;k.OneMinusSrcAlphaFactor=205;k.OneMinusSrcColorFactor=203;k.OrthographicCamera=pe;k.PCFShadowMap=1;k.PCFSoftShadowMap=2;k.ParametricBufferGeometry=Kc;k.ParametricGeometry=Sd;k.Particle=function(a){console.warn("THREE.Particle has been renamed to THREE.Sprite.");return new Md(a)};k.ParticleBasicMaterial=function(a){console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial.");
 return new Ta(a)};k.ParticleSystem=function(a,b){console.warn("THREE.ParticleSystem has been renamed to THREE.Points.");return new Hc(a,b)};k.ParticleSystemMaterial=function(a){console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial.");return new Ta(a)};k.Path=Ya;k.PerspectiveCamera=ja;k.Plane=Sa;k.PlaneBufferGeometry=Zb;k.PlaneGeometry=Ed;k.PlaneHelper=we;k.PointCloud=function(a,b){console.warn("THREE.PointCloud has been renamed to THREE.Points.");return new Hc(a,b)};

+ 3 - 4
build/three.module.js

@@ -9985,7 +9985,8 @@ BufferGeometry.prototype = Object.assign( Object.create( EventDispatcher.prototy
 
 			var normalMatrix = new Matrix3().getNormalMatrix( matrix );
 
-			normalMatrix.applyToBufferAttribute( normal );
+			normal.applyNormalMatrix( normalMatrix );
+
 			normal.needsUpdate = true;
 
 		}
@@ -9994,10 +9995,8 @@ BufferGeometry.prototype = Object.assign( Object.create( EventDispatcher.prototy
 
 		if ( tangent !== undefined ) {
 
-			var normalMatrix = new Matrix3().getNormalMatrix( matrix );
+			tangent.transformDirection( matrix );
 
-			// Tangent is vec4, but the '.w' component is a sign value (+1/-1).
-			normalMatrix.applyToBufferAttribute( tangent );
 			tangent.needsUpdate = true;
 
 		}