Browse Source

Updated builds.

Mr.doob 9 years ago
parent
commit
9a68d2971e
2 changed files with 172 additions and 185 deletions
  1. 5 18
      build/three.js
  2. 167 167
      build/three.min.js

+ 5 - 18
build/three.js

@@ -14919,16 +14919,17 @@
 
     	updateMorphTargets: function () {
 
-    		if ( this.geometry.morphTargets !== undefined && this.geometry.morphTargets.length > 0 ) {
+    		var morphTargets = this.geometry.morphTargets;
+
+    		if ( morphTargets !== undefined && morphTargets.length > 0 ) {
 
-    			this.morphTargetBase = - 1;
     			this.morphTargetInfluences = [];
     			this.morphTargetDictionary = {};
 
-    			for ( var m = 0, ml = this.geometry.morphTargets.length; m < ml; m ++ ) {
+    			for ( var m = 0, ml = morphTargets.length; m < ml; m ++ ) {
 
     				this.morphTargetInfluences.push( 0 );
-    				this.morphTargetDictionary[ this.geometry.morphTargets[ m ].name ] = m;
+    				this.morphTargetDictionary[ morphTargets[ m ].name ] = m;
 
     			}
 
@@ -14936,20 +14937,6 @@
 
     	},
 
-    	getMorphTargetIndexByName: function ( name ) {
-
-    		if ( this.morphTargetDictionary[ name ] !== undefined ) {
-
-    			return this.morphTargetDictionary[ name ];
-
-    		}
-
-    		console.warn( 'THREE.Mesh.getMorphTargetIndexByName: morph target ' + name + ' does not exist. Returning 0.' );
-
-    		return 0;
-
-    	},
-
     	raycast: ( function () {
 
     		var inverseMatrix = new Matrix4();

+ 167 - 167
build/three.min.js

@@ -533,173 +533,173 @@ copy:function(a){this.a.copy(a.a);this.b.copy(a.b);this.c.copy(a.c);return this}
 this.a,this.b,this.c,b)},containsPoint:function(a){return Ga.containsPoint(a,this.a,this.b,this.c)},closestPointToPoint:function(){var a,b,c,d;return function(e,f){void 0===a&&(a=new fa,b=[new Cb,new Cb,new Cb],c=new q,d=new q);var g=f||new q,k=Infinity;a.setFromCoplanarPoints(this.a,this.b,this.c);a.projectPoint(e,c);if(!0===this.containsPoint(c))g.copy(c);else{b[0].set(this.a,this.b);b[1].set(this.b,this.c);b[2].set(this.c,this.a);for(var h=0;h<b.length;h++){b[h].closestPointToPoint(c,!0,d);var n=
 c.distanceToSquared(d);n<k&&(k=n,g.copy(d))}}return g}}(),equals:function(a){return a.a.equals(this.a)&&a.b.equals(this.b)&&a.c.equals(this.c)}};Ja.prototype=Object.create(T.prototype);Ja.prototype.constructor=Ja;Ja.prototype.isMeshBasicMaterial=!0;Ja.prototype.copy=function(a){T.prototype.copy.call(this,a);this.color.copy(a.color);this.map=a.map;this.aoMap=a.aoMap;this.aoMapIntensity=a.aoMapIntensity;this.specularMap=a.specularMap;this.alphaMap=a.alphaMap;this.envMap=a.envMap;this.combine=a.combine;
 this.reflectivity=a.reflectivity;this.refractionRatio=a.refractionRatio;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.wireframeLinecap=a.wireframeLinecap;this.wireframeLinejoin=a.wireframeLinejoin;this.skinning=a.skinning;this.morphTargets=a.morphTargets;return this};va.prototype=Object.assign(Object.create(D.prototype),{constructor:va,isMesh:!0,setDrawMode:function(a){this.drawMode=a},copy:function(a){D.prototype.copy.call(this,a);this.drawMode=a.drawMode;return this},
-updateMorphTargets:function(){if(void 0!==this.geometry.morphTargets&&0<this.geometry.morphTargets.length){this.morphTargetBase=-1;this.morphTargetInfluences=[];this.morphTargetDictionary={};for(var a=0,b=this.geometry.morphTargets.length;a<b;a++)this.morphTargetInfluences.push(0),this.morphTargetDictionary[this.geometry.morphTargets[a].name]=a}},getMorphTargetIndexByName:function(a){if(void 0!==this.morphTargetDictionary[a])return this.morphTargetDictionary[a];console.warn("THREE.Mesh.getMorphTargetIndexByName: morph target "+
-a+" does not exist. Returning 0.");return 0},raycast:function(){function a(a,b,c,d,e,f,g){Ga.barycoordFromPoint(a,b,c,d,v);e.multiplyScalar(v.x);f.multiplyScalar(v.y);g.multiplyScalar(v.z);e.add(f).add(g);return e.clone()}function b(a,b,c,d,e,f,g){var k=a.material;if(null===(1===k.side?c.intersectTriangle(f,e,d,!0,g):c.intersectTriangle(d,e,f,2!==k.side,g)))return null;w.copy(g);w.applyMatrix4(a.matrixWorld);c=b.ray.origin.distanceTo(w);return c<b.near||c>b.far?null:{distance:c,point:w.clone(),object:a}}
-function c(c,d,e,f,n,p,r,q){g.fromArray(f,3*p);k.fromArray(f,3*r);h.fromArray(f,3*q);if(c=b(c,d,e,g,k,h,z))n&&(m.fromArray(n,2*p),t.fromArray(n,2*r),u.fromArray(n,2*q),c.uv=a(z,g,k,h,m,t,u)),c.face=new la(p,r,q,Ga.normal(g,k,h)),c.faceIndex=p;return c}var d=new Q,e=new Ya,f=new Aa,g=new q,k=new q,h=new q,n=new q,r=new q,p=new q,m=new B,t=new B,u=new B,v=new q,z=new q,w=new q;return function(q,v){var w=this.geometry,F=this.material,G=this.matrixWorld;if(void 0!==F&&(null===w.boundingSphere&&w.computeBoundingSphere(),
-f.copy(w.boundingSphere),f.applyMatrix4(G),!1!==q.ray.intersectsSphere(f)&&(d.getInverse(G),e.copy(q.ray).applyMatrix4(d),null===w.boundingBox||!1!==e.intersectsBox(w.boundingBox)))){var E,K;if(w&&w.isBufferGeometry){var B,C,F=w.index,G=w.attributes,w=G.position.array;void 0!==G.uv&&(E=G.uv.array);if(null!==F)for(var G=F.array,D=0,H=G.length;D<H;D+=3){if(F=G[D],B=G[D+1],C=G[D+2],K=c(this,q,e,w,E,F,B,C))K.faceIndex=Math.floor(D/3),v.push(K)}else for(D=0,H=w.length;D<H;D+=9)if(F=D/3,B=F+1,C=F+2,K=c(this,
-q,e,w,E,F,B,C))K.index=F,v.push(K)}else if(w&&w.isGeometry){var I,Q,G=F&&F.isMultiMaterial,D=!0===G?F.materials:null,H=w.vertices;B=w.faces;C=w.faceVertexUvs[0];0<C.length&&(E=C);for(var L=0,O=B.length;L<O;L++){var P=B[L];K=!0===G?D[P.materialIndex]:F;if(void 0!==K){C=H[P.a];I=H[P.b];Q=H[P.c];if(!0===K.morphTargets){K=w.morphTargets;var R=this.morphTargetInfluences;g.set(0,0,0);k.set(0,0,0);h.set(0,0,0);for(var T=0,V=K.length;T<V;T++){var W=R[T];if(0!==W){var J=K[T].vertices;g.addScaledVector(n.subVectors(J[P.a],
-C),W);k.addScaledVector(r.subVectors(J[P.b],I),W);h.addScaledVector(p.subVectors(J[P.c],Q),W)}}g.add(C);k.add(I);h.add(Q);C=g;I=k;Q=h}if(K=b(this,q,e,C,I,Q,z))E&&(R=E[L],m.copy(R[0]),t.copy(R[1]),u.copy(R[2]),K.uv=a(z,C,I,Q,m,t,u)),K.face=P,K.faceIndex=L,v.push(K)}}}}}}(),clone:function(){return(new this.constructor(this.geometry,this.material)).copy(this)}});eb.prototype=Object.create(H.prototype);eb.prototype.constructor=eb;ma.prototype=Object.create(D.prototype);ma.prototype.constructor=ma;ma.prototype.isCamera=
-!0;ma.prototype.getWorldDirection=function(){var a=new oa;return function(b){b=b||new q;this.getWorldQuaternion(a);return b.set(0,0,-1).applyQuaternion(a)}}();ma.prototype.lookAt=function(){var a=new Q;return function(b){a.lookAt(this.position,b,this.up);this.quaternion.setFromRotationMatrix(a)}}();ma.prototype.clone=function(){return(new this.constructor).copy(this)};ma.prototype.copy=function(a){D.prototype.copy.call(this,a);this.matrixWorldInverse.copy(a.matrixWorldInverse);this.projectionMatrix.copy(a.projectionMatrix);
-return this};Ca.prototype=Object.assign(Object.create(ma.prototype),{constructor:Ca,isPerspectiveCamera:!0,copy:function(a){ma.prototype.copy.call(this,a);this.fov=a.fov;this.zoom=a.zoom;this.near=a.near;this.far=a.far;this.focus=a.focus;this.aspect=a.aspect;this.view=null===a.view?null:Object.assign({},a.view);this.filmGauge=a.filmGauge;this.filmOffset=a.filmOffset;return this},setFocalLength:function(a){a=.5*this.getFilmHeight()/a;this.fov=2*h.Math.RAD2DEG*Math.atan(a);this.updateProjectionMatrix()},
-getFocalLength:function(){var a=Math.tan(.5*h.Math.DEG2RAD*this.fov);return.5*this.getFilmHeight()/a},getEffectiveFOV:function(){return 2*h.Math.RAD2DEG*Math.atan(Math.tan(.5*h.Math.DEG2RAD*this.fov)/this.zoom)},getFilmWidth:function(){return this.filmGauge*Math.min(this.aspect,1)},getFilmHeight:function(){return this.filmGauge/Math.max(this.aspect,1)},setViewOffset:function(a,b,c,d,e,f){this.aspect=a/b;this.view={fullWidth:a,fullHeight:b,offsetX:c,offsetY:d,width:e,height:f};this.updateProjectionMatrix()},
-clearViewOffset:function(){this.view=null;this.updateProjectionMatrix()},updateProjectionMatrix:function(){var a=this.near,b=a*Math.tan(.5*h.Math.DEG2RAD*this.fov)/this.zoom,c=2*b,d=this.aspect*c,e=-.5*d,f=this.view;if(null!==f)var g=f.fullWidth,k=f.fullHeight,e=e+f.offsetX*d/g,b=b-f.offsetY*c/k,d=f.width/g*d,c=f.height/k*c;f=this.filmOffset;0!==f&&(e+=a*f/this.getFilmWidth());this.projectionMatrix.makeFrustum(e,e+d,b-c,b,a,this.far)},toJSON:function(a){a=D.prototype.toJSON.call(this,a);a.object.fov=
-this.fov;a.object.zoom=this.zoom;a.object.near=this.near;a.object.far=this.far;a.object.focus=this.focus;a.object.aspect=this.aspect;null!==this.view&&(a.object.view=Object.assign({},this.view));a.object.filmGauge=this.filmGauge;a.object.filmOffset=this.filmOffset;return a}});Db.prototype=Object.assign(Object.create(ma.prototype),{constructor:Db,isOrthographicCamera:!0,copy:function(a){ma.prototype.copy.call(this,a);this.left=a.left;this.right=a.right;this.top=a.top;this.bottom=a.bottom;this.near=
-a.near;this.far=a.far;this.zoom=a.zoom;this.view=null===a.view?null:Object.assign({},a.view);return this},setViewOffset:function(a,b,c,d,e,f){this.view={fullWidth:a,fullHeight:b,offsetX:c,offsetY:d,width:e,height:f};this.updateProjectionMatrix()},clearViewOffset:function(){this.view=null;this.updateProjectionMatrix()},updateProjectionMatrix:function(){var a=(this.right-this.left)/(2*this.zoom),b=(this.top-this.bottom)/(2*this.zoom),c=(this.right+this.left)/2,d=(this.top+this.bottom)/2,e=c-a,c=c+a,
-a=d+b,b=d-b;if(null!==this.view)var c=this.zoom/(this.view.width/this.view.fullWidth),b=this.zoom/(this.view.height/this.view.fullHeight),f=(this.right-this.left)/this.view.width,d=(this.top-this.bottom)/this.view.height,e=e+this.view.offsetX/c*f,c=e+this.view.width/c*f,a=a-this.view.offsetY/b*d,b=a-this.view.height/b*d;this.projectionMatrix.makeOrthographic(e,c,a,b,this.near,this.far)},toJSON:function(a){a=D.prototype.toJSON.call(this,a);a.object.zoom=this.zoom;a.object.left=this.left;a.object.right=
-this.right;a.object.top=this.top;a.object.bottom=this.bottom;a.object.near=this.near;a.object.far=this.far;null!==this.view&&(a.object.view=Object.assign({},this.view));return a}});var df=0;Eb.prototype.isFogExp2=!0;Eb.prototype.clone=function(){return new Eb(this.color.getHex(),this.density)};Eb.prototype.toJSON=function(a){return{type:"FogExp2",color:this.color.getHex(),density:this.density}};Fb.prototype.isFog=!0;Fb.prototype.clone=function(){return new Fb(this.color.getHex(),this.near,this.far)};
-Fb.prototype.toJSON=function(a){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}};fb.prototype=Object.create(D.prototype);fb.prototype.constructor=fb;fb.prototype.copy=function(a,b){D.prototype.copy.call(this,a,b);null!==a.background&&(this.background=a.background.clone());null!==a.fog&&(this.fog=a.fog.clone());null!==a.overrideMaterial&&(this.overrideMaterial=a.overrideMaterial.clone());this.autoUpdate=a.autoUpdate;this.matrixAutoUpdate=a.matrixAutoUpdate;return this};fb.prototype.toJSON=
-function(a){var b=D.prototype.toJSON.call(this,a);null!==this.background&&(b.object.background=this.background.toJSON(a));null!==this.fog&&(b.object.fog=this.fog.toJSON());return b};sd.prototype=Object.assign(Object.create(D.prototype),{constructor:sd,isLensFlare:!0,copy:function(a){D.prototype.copy.call(this,a);this.positionScreen.copy(a.positionScreen);this.customUpdateCallback=a.customUpdateCallback;for(var b=0,c=a.lensFlares.length;b<c;b++)this.lensFlares.push(a.lensFlares[b]);return this},add:function(a,
-b,c,d,e,f){void 0===b&&(b=-1);void 0===c&&(c=0);void 0===f&&(f=1);void 0===e&&(e=new I(16777215));void 0===d&&(d=1);c=Math.min(c,Math.max(0,c));this.lensFlares.push({texture:a,size:b,distance:c,x:0,y:0,z:0,scale:1,rotation:0,opacity:f,color:e,blending:d})},updateLensFlares:function(){var a,b=this.lensFlares.length,c,d=2*-this.positionScreen.x,e=2*-this.positionScreen.y;for(a=0;a<b;a++)c=this.lensFlares[a],c.x=this.positionScreen.x+d*c.distance,c.y=this.positionScreen.y+e*c.distance,c.wantedRotation=
-c.x*Math.PI*.25,c.rotation+=.25*(c.wantedRotation-c.rotation)}});gb.prototype=Object.create(T.prototype);gb.prototype.constructor=gb;gb.prototype.copy=function(a){T.prototype.copy.call(this,a);this.color.copy(a.color);this.map=a.map;this.rotation=a.rotation;return this};gc.prototype=Object.assign(Object.create(D.prototype),{constructor:gc,isSprite:!0,raycast:function(){var a=new q;return function(b,c){a.setFromMatrixPosition(this.matrixWorld);var d=b.ray.distanceSqToPoint(a);d>this.scale.x*this.scale.y/
-4||c.push({distance:Math.sqrt(d),point:this.position,face:null,object:this})}}(),clone:function(){return(new this.constructor(this.material)).copy(this)}});hc.prototype=Object.assign(Object.create(D.prototype),{constructor:hc,copy:function(a){D.prototype.copy.call(this,a,!1);a=a.levels;for(var b=0,c=a.length;b<c;b++){var d=a[b];this.addLevel(d.object.clone(),d.distance)}return this},addLevel:function(a,b){void 0===b&&(b=0);b=Math.abs(b);for(var c=this.levels,d=0;d<c.length&&!(b<c[d].distance);d++);
-c.splice(d,0,{distance:b,object:a});this.add(a)},getObjectForDistance:function(a){for(var b=this.levels,c=1,d=b.length;c<d&&!(a<b[c].distance);c++);return b[c-1].object},raycast:function(){var a=new q;return function(b,c){a.setFromMatrixPosition(this.matrixWorld);var d=b.ray.origin.distanceTo(a);this.getObjectForDistance(d).raycast(b,c)}}(),update:function(){var a=new q,b=new q;return function(c){var d=this.levels;if(1<d.length){a.setFromMatrixPosition(c.matrixWorld);b.setFromMatrixPosition(this.matrixWorld);
-c=a.distanceTo(b);d[0].object.visible=!0;for(var e=1,f=d.length;e<f;e++)if(c>=d[e].distance)d[e-1].object.visible=!1,d[e].object.visible=!0;else break;for(;e<f;e++)d[e].object.visible=!1}}}(),toJSON:function(a){a=D.prototype.toJSON.call(this,a);a.object.levels=[];for(var b=this.levels,c=0,d=b.length;c<d;c++){var e=b[c];a.object.levels.push({object:e.object.uuid,distance:e.distance})}return a}});hb.prototype=Object.create(Z.prototype);hb.prototype.constructor=hb;hb.prototype.isDataTexture=!0;Object.assign(Nc.prototype,
-{calculateInverses:function(){this.boneInverses=[];for(var a=0,b=this.bones.length;a<b;a++){var c=new Q;this.bones[a]&&c.getInverse(this.bones[a].matrixWorld);this.boneInverses.push(c)}},pose:function(){for(var a,b=0,c=this.bones.length;b<c;b++)(a=this.bones[b])&&a.matrixWorld.getInverse(this.boneInverses[b]);b=0;for(c=this.bones.length;b<c;b++)if(a=this.bones[b])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(){var a=new Q;return function(){for(var b=0,c=this.bones.length;b<c;b++)a.multiplyMatrices(this.bones[b]?this.bones[b].matrixWorld:this.identityMatrix,this.boneInverses[b]),a.toArray(this.boneMatrices,16*b);this.useVertexTexture&&(this.boneTexture.needsUpdate=!0)}}(),clone:function(){return new Nc(this.bones,this.boneInverses,this.useVertexTexture)}});Oc.prototype=Object.assign(Object.create(D.prototype),{constructor:Oc,isBone:!0,copy:function(a){D.prototype.copy.call(this,
-a);this.skin=a.skin;return this}});Pc.prototype=Object.assign(Object.create(va.prototype),{constructor:Pc,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(){if(this.geometry&&this.geometry.isGeometry)for(var a=0;a<this.geometry.skinWeights.length;a++){var b=this.geometry.skinWeights[a],
-c=1/b.lengthManhattan();Infinity!==c?b.multiplyScalar(c):b.set(1,0,0,0)}else if(this.geometry&&this.geometry.isBufferGeometry)for(var b=new da,d=this.geometry.attributes.skinWeight,a=0;a<d.count;a++)b.x=d.getX(a),b.y=d.getY(a),b.z=d.getZ(a),b.w=d.getW(a),c=1/b.lengthManhattan(),Infinity!==c?b.multiplyScalar(c):b.set(1,0,0,0),d.setXYZW(a,b.x,b.y,b.z,b.w)},updateMatrixWorld:function(a){va.prototype.updateMatrixWorld.call(this,!0);"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,this.skeleton.useVertexTexture)).copy(this)}});ga.prototype=Object.create(T.prototype);ga.prototype.constructor=ga;ga.prototype.isLineBasicMaterial=!0;ga.prototype.copy=function(a){T.prototype.copy.call(this,a);this.color.copy(a.color);this.linewidth=a.linewidth;this.linecap=a.linecap;
-this.linejoin=a.linejoin;return this};Qa.prototype=Object.assign(Object.create(D.prototype),{constructor:Qa,isLine:!0,raycast:function(){var a=new Q,b=new Ya,c=new Aa;return function(d,e){var f=d.linePrecision,f=f*f,g=this.geometry,k=this.matrixWorld;null===g.boundingSphere&&g.computeBoundingSphere();c.copy(g.boundingSphere);c.applyMatrix4(k);if(!1!==d.ray.intersectsSphere(c)){a.getInverse(k);b.copy(d.ray).applyMatrix4(a);var h=new q,n=new q,k=new q,r=new q,p=this&&this.isLineSegments?2:1;if(g&&g.isBufferGeometry){var m=
-g.index,t=g.attributes.position.array;if(null!==m)for(var m=m.array,g=0,u=m.length-1;g<u;g+=p){var v=m[g+1];h.fromArray(t,3*m[g]);n.fromArray(t,3*v);v=b.distanceSqToSegment(h,n,r,k);v>f||(r.applyMatrix4(this.matrixWorld),v=d.ray.origin.distanceTo(r),v<d.near||v>d.far||e.push({distance:v,point:k.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this}))}else for(g=0,u=t.length/3-1;g<u;g+=p)h.fromArray(t,3*g),n.fromArray(t,3*g+3),v=b.distanceSqToSegment(h,n,r,k),v>f||(r.applyMatrix4(this.matrixWorld),
-v=d.ray.origin.distanceTo(r),v<d.near||v>d.far||e.push({distance:v,point:k.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this}))}else if(g&&g.isGeometry)for(h=g.vertices,n=h.length,g=0;g<n-1;g+=p)v=b.distanceSqToSegment(h[g],h[g+1],r,k),v>f||(r.applyMatrix4(this.matrixWorld),v=d.ray.origin.distanceTo(r),v<d.near||v>d.far||e.push({distance:v,point:k.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this}))}}}(),clone:function(){return(new this.constructor(this.geometry,
-this.material)).copy(this)}});ba.prototype=Object.assign(Object.create(Qa.prototype),{constructor:ba,isLineSegments:!0});Ka.prototype=Object.create(T.prototype);Ka.prototype.constructor=Ka;Ka.prototype.isPointsMaterial=!0;Ka.prototype.copy=function(a){T.prototype.copy.call(this,a);this.color.copy(a.color);this.map=a.map;this.size=a.size;this.sizeAttenuation=a.sizeAttenuation;return this};Gb.prototype=Object.assign(Object.create(D.prototype),{constructor:Gb,isPoints:!0,raycast:function(){var a=new Q,
-b=new Ya,c=new Aa;return function(d,e){function f(a,c){var f=b.distanceSqToPoint(a);if(f<r){var k=b.closestPointToPoint(a);k.applyMatrix4(h);var m=d.ray.origin.distanceTo(k);m<d.near||m>d.far||e.push({distance:m,distanceToRay:Math.sqrt(f),point:k.clone(),index:c,face:null,object:g})}}var g=this,k=this.geometry,h=this.matrixWorld,n=d.params.Points.threshold;null===k.boundingSphere&&k.computeBoundingSphere();c.copy(k.boundingSphere);c.applyMatrix4(h);if(!1!==d.ray.intersectsSphere(c)){a.getInverse(h);
-b.copy(d.ray).applyMatrix4(a);var n=n/((this.scale.x+this.scale.y+this.scale.z)/3),r=n*n,n=new q;if(k&&k.isBufferGeometry){var p=k.index,k=k.attributes.position.array;if(null!==p)for(var m=p.array,p=0,t=m.length;p<t;p++){var u=m[p];n.fromArray(k,3*u);f(n,u)}else for(p=0,m=k.length/3;p<m;p++)n.fromArray(k,3*p),f(n,p)}else for(n=k.vertices,p=0,m=n.length;p<m;p++)f(n[p],p)}}}(),clone:function(){return(new this.constructor(this.geometry,this.material)).copy(this)}});ic.prototype=Object.assign(Object.create(D.prototype),
-{constructor:ic});Qc.prototype=Object.create(Z.prototype);Qc.prototype.constructor=Qc;Hb.prototype=Object.create(Z.prototype);Hb.prototype.constructor=Hb;Hb.prototype.isCompressedTexture=!0;Rc.prototype=Object.create(Z.prototype);Rc.prototype.constructor=Rc;jc.prototype=Object.create(Z.prototype);jc.prototype.constructor=jc;jc.prototype.isDepthTexture=!0;Ib.prototype=Object.create(Ea.prototype);Ib.prototype.constructor=Ib;Ib.prototype.isShadowMaterial=!0;Jb.prototype=Object.create(Ea.prototype);Jb.prototype.constructor=
-Jb;Jb.prototype.isRawShaderMaterial=!0;kc.prototype={constructor:kc,isMultiMaterial:!0,toJSON:function(a){for(var b={metadata:{version:4.2,type:"material",generator:"MaterialExporter"},uuid:this.uuid,type:this.type,materials:[]},c=this.materials,d=0,e=c.length;d<e;d++){var f=c[d].toJSON(a);delete f.metadata;b.materials.push(f)}b.visible=this.visible;return b},clone:function(){for(var a=new this.constructor,b=0;b<this.materials.length;b++)a.materials.push(this.materials[b].clone());a.visible=this.visible;
-return a}};La.prototype=Object.create(T.prototype);La.prototype.constructor=La;La.prototype.isMeshStandardMaterial=!0;La.prototype.copy=function(a){T.prototype.copy.call(this,a);this.defines={STANDARD:""};this.color.copy(a.color);this.roughness=a.roughness;this.metalness=a.metalness;this.map=a.map;this.lightMap=a.lightMap;this.lightMapIntensity=a.lightMapIntensity;this.aoMap=a.aoMap;this.aoMapIntensity=a.aoMapIntensity;this.emissive.copy(a.emissive);this.emissiveMap=a.emissiveMap;this.emissiveIntensity=
-a.emissiveIntensity;this.bumpMap=a.bumpMap;this.bumpScale=a.bumpScale;this.normalMap=a.normalMap;this.normalScale.copy(a.normalScale);this.displacementMap=a.displacementMap;this.displacementScale=a.displacementScale;this.displacementBias=a.displacementBias;this.roughnessMap=a.roughnessMap;this.metalnessMap=a.metalnessMap;this.alphaMap=a.alphaMap;this.envMap=a.envMap;this.envMapIntensity=a.envMapIntensity;this.refractionRatio=a.refractionRatio;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;
-this.wireframeLinecap=a.wireframeLinecap;this.wireframeLinejoin=a.wireframeLinejoin;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;return this};ib.prototype=Object.create(La.prototype);ib.prototype.constructor=ib;ib.prototype.isMeshPhysicalMaterial=!0;ib.prototype.copy=function(a){La.prototype.copy.call(this,a);this.defines={PHYSICAL:""};this.reflectivity=a.reflectivity;this.clearCoat=a.clearCoat;this.clearCoatRoughness=a.clearCoatRoughness;return this};
-Za.prototype=Object.create(T.prototype);Za.prototype.constructor=Za;Za.prototype.isMeshPhongMaterial=!0;Za.prototype.copy=function(a){T.prototype.copy.call(this,a);this.color.copy(a.color);this.specular.copy(a.specular);this.shininess=a.shininess;this.map=a.map;this.lightMap=a.lightMap;this.lightMapIntensity=a.lightMapIntensity;this.aoMap=a.aoMap;this.aoMapIntensity=a.aoMapIntensity;this.emissive.copy(a.emissive);this.emissiveMap=a.emissiveMap;this.emissiveIntensity=a.emissiveIntensity;this.bumpMap=
-a.bumpMap;this.bumpScale=a.bumpScale;this.normalMap=a.normalMap;this.normalScale.copy(a.normalScale);this.displacementMap=a.displacementMap;this.displacementScale=a.displacementScale;this.displacementBias=a.displacementBias;this.specularMap=a.specularMap;this.alphaMap=a.alphaMap;this.envMap=a.envMap;this.combine=a.combine;this.reflectivity=a.reflectivity;this.refractionRatio=a.refractionRatio;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.wireframeLinecap=a.wireframeLinecap;
-this.wireframeLinejoin=a.wireframeLinejoin;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;return this};jb.prototype=Object.create(T.prototype);jb.prototype.constructor=jb;jb.prototype.isMeshNormalMaterial=!0;jb.prototype.copy=function(a){T.prototype.copy.call(this,a);this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;return this};kb.prototype=Object.create(T.prototype);kb.prototype.constructor=kb;kb.prototype.isMeshLambertMaterial=!0;
-kb.prototype.copy=function(a){T.prototype.copy.call(this,a);this.color.copy(a.color);this.map=a.map;this.lightMap=a.lightMap;this.lightMapIntensity=a.lightMapIntensity;this.aoMap=a.aoMap;this.aoMapIntensity=a.aoMapIntensity;this.emissive.copy(a.emissive);this.emissiveMap=a.emissiveMap;this.emissiveIntensity=a.emissiveIntensity;this.specularMap=a.specularMap;this.alphaMap=a.alphaMap;this.envMap=a.envMap;this.combine=a.combine;this.reflectivity=a.reflectivity;this.refractionRatio=a.refractionRatio;
-this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.wireframeLinecap=a.wireframeLinecap;this.wireframeLinejoin=a.wireframeLinejoin;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;return this};lb.prototype=Object.create(T.prototype);lb.prototype.constructor=lb;lb.prototype.isLineDashedMaterial=!0;lb.prototype.copy=function(a){T.prototype.copy.call(this,a);this.color.copy(a.color);this.linewidth=a.linewidth;this.scale=a.scale;this.dashSize=
-a.dashSize;this.gapSize=a.gapSize;return this};var pf=Object.freeze({ShadowMaterial:Ib,SpriteMaterial:gb,RawShaderMaterial:Jb,ShaderMaterial:Ea,PointsMaterial:Ka,MultiMaterial:kc,MeshPhysicalMaterial:ib,MeshStandardMaterial:La,MeshPhongMaterial:Za,MeshNormalMaterial:jb,MeshLambertMaterial:kb,MeshDepthMaterial:Va,MeshBasicMaterial:Ja,LineDashedMaterial:lb,LineBasicMaterial:ga,Material:T});h.Cache={enabled:!1,files:{},add:function(a,b){!1!==this.enabled&&(this.files[a]=b)},get:function(a){if(!1!==this.enabled)return this.files[a]},
-remove:function(a){delete this.files[a]},clear:function(){this.files={}}};h.DefaultLoadingManager=new td;Object.assign(wa.prototype,{load:function(a,b,c,d){void 0!==this.path&&(a=this.path+a);var e=this,f=h.Cache.get(a);if(void 0!==f)return e.manager.itemStart(a),setTimeout(function(){b&&b(f);e.manager.itemEnd(a)},0),f;var g=new XMLHttpRequest;g.open("GET",a,!0);g.addEventListener("load",function(c){var f=c.target.response;h.Cache.add(a,f);200===this.status?(b&&b(f),e.manager.itemEnd(a)):0===this.status?
-(console.warn("THREE.XHRLoader: HTTP Status 0 received."),b&&b(f),e.manager.itemEnd(a)):(d&&d(c),e.manager.itemError(a))},!1);void 0!==c&&g.addEventListener("progress",function(a){c(a)},!1);g.addEventListener("error",function(b){d&&d(b);e.manager.itemError(a)},!1);void 0!==this.responseType&&(g.responseType=this.responseType);void 0!==this.withCredentials&&(g.withCredentials=this.withCredentials);g.overrideMimeType&&g.overrideMimeType("text/plain");g.send(null);e.manager.itemStart(a);return g},setPath:function(a){this.path=
-a;return this},setResponseType:function(a){this.responseType=a;return this},setWithCredentials:function(a){this.withCredentials=a;return this}});Object.assign(ke.prototype,{load:function(a,b,c,d){function e(e){h.load(a[e],function(a){a=f._parser(a,!0);g[e]={width:a.width,height:a.height,format:a.format,mipmaps:a.mipmaps};n+=1;6===n&&(1===a.mipmapCount&&(k.minFilter=1006),k.format=a.format,k.needsUpdate=!0,b&&b(k))},c,d)}var f=this,g=[],k=new Hb;k.image=g;var h=new wa(this.manager);h.setPath(this.path);
-h.setResponseType("arraybuffer");if(Array.isArray(a))for(var n=0,r=0,p=a.length;r<p;++r)e(r);else h.load(a,function(a){a=f._parser(a,!0);if(a.isCubemap)for(var c=a.mipmaps.length/a.mipmapCount,d=0;d<c;d++){g[d]={mipmaps:[]};for(var e=0;e<a.mipmapCount;e++)g[d].mipmaps.push(a.mipmaps[d*a.mipmapCount+e]),g[d].format=a.format,g[d].width=a.width,g[d].height=a.height}else k.image.width=a.width,k.image.height=a.height,k.mipmaps=a.mipmaps;1===a.mipmapCount&&(k.minFilter=1006);k.format=a.format;k.needsUpdate=
-!0;b&&b(k)},c,d);return k},setPath:function(a){this.path=a;return this}});Object.assign(ud.prototype,{load:function(a,b,c,d){var e=this,f=new hb,g=new wa(this.manager);g.setResponseType("arraybuffer");g.load(a,function(a){if(a=e._parser(a))void 0!==a.image?f.image=a.image:void 0!==a.data&&(f.image.width=a.width,f.image.height=a.height,f.image.data=a.data),f.wrapS=void 0!==a.wrapS?a.wrapS:1001,f.wrapT=void 0!==a.wrapT?a.wrapT:1001,f.magFilter=void 0!==a.magFilter?a.magFilter:1006,f.minFilter=void 0!==
-a.minFilter?a.minFilter:1008,f.anisotropy=void 0!==a.anisotropy?a.anisotropy:1,void 0!==a.format&&(f.format=a.format),void 0!==a.type&&(f.type=a.type),void 0!==a.mipmaps&&(f.mipmaps=a.mipmaps),1===a.mipmapCount&&(f.minFilter=1006),f.needsUpdate=!0,b&&b(f,a)},c,d);return f}});Object.assign(lc.prototype,{load:function(a,b,c,d){var e=this,f=document.createElementNS("http://www.w3.org/1999/xhtml","img");f.onload=function(){URL.revokeObjectURL(f.src);b&&b(f);e.manager.itemEnd(a)};if(0===a.indexOf("data:"))f.src=
-a;else{var g=new wa;g.setPath(this.path);g.setResponseType("blob");g.setWithCredentials(this.withCredentials);g.load(a,function(a){f.src=URL.createObjectURL(a)},c,d)}e.manager.itemStart(a);return f},setCrossOrigin:function(a){this.crossOrigin=a;return this},setWithCredentials:function(a){this.withCredentials=a;return this},setPath:function(a){this.path=a;return this}});Object.assign(vd.prototype,{load:function(a,b,c,d){function e(c){g.load(a[c],function(a){f.images[c]=a;k++;6===k&&(f.needsUpdate=
-!0,b&&b(f))},void 0,d)}var f=new Ua,g=new lc(this.manager);g.setCrossOrigin(this.crossOrigin);g.setPath(this.path);var k=0;for(c=0;c<a.length;++c)e(c);return f},setCrossOrigin:function(a){this.crossOrigin=a;return this},setPath:function(a){this.path=a;return this}});Object.assign(Sc.prototype,{load:function(a,b,c,d){var e=new Z,f=new lc(this.manager);f.setCrossOrigin(this.crossOrigin);f.setWithCredentials(this.withCredentials);f.setPath(this.path);f.load(a,function(c){var d=0<a.search(/\.(jpg|jpeg)$/)||
-0===a.search(/^data\:image\/jpeg/);e.format=d?1022:1023;e.image=c;e.needsUpdate=!0;void 0!==b&&b(e)},c,d);return e},setCrossOrigin:function(a){this.crossOrigin=a;return this},setWithCredentials:function(a){this.withCredentials=a;return this},setPath:function(a){this.path=a;return this}});ca.prototype=Object.assign(Object.create(D.prototype),{constructor:ca,isLight:!0,copy:function(a){D.prototype.copy.call(this,a);this.color.copy(a.color);this.intensity=a.intensity;return this},toJSON:function(a){a=
-D.prototype.toJSON.call(this,a);a.object.color=this.color.getHex();a.object.intensity=this.intensity;void 0!==this.groundColor&&(a.object.groundColor=this.groundColor.getHex());void 0!==this.distance&&(a.object.distance=this.distance);void 0!==this.angle&&(a.object.angle=this.angle);void 0!==this.decay&&(a.object.decay=this.decay);void 0!==this.penumbra&&(a.object.penumbra=this.penumbra);void 0!==this.shadow&&(a.object.shadow=this.shadow.toJSON());return a}});Tc.prototype=Object.assign(Object.create(ca.prototype),
-{constructor:Tc,isHemisphereLight:!0,copy:function(a){ca.prototype.copy.call(this,a);this.groundColor.copy(a.groundColor);return this}});Object.assign(mb.prototype,{copy:function(a){this.camera=a.camera.clone();this.bias=a.bias;this.radius=a.radius;this.mapSize.copy(a.mapSize);return this},clone:function(){return(new this.constructor).copy(this)},toJSON:function(){var a={};0!==this.bias&&(a.bias=this.bias);1!==this.radius&&(a.radius=this.radius);if(512!==this.mapSize.x||512!==this.mapSize.y)a.mapSize=
-this.mapSize.toArray();a.camera=this.camera.toJSON(!1).object;delete a.camera.matrix;return a}});Uc.prototype=Object.assign(Object.create(mb.prototype),{constructor:Uc,isSpotLightShadow:!0,update:function(a){var b=2*h.Math.RAD2DEG*a.angle,c=this.mapSize.width/this.mapSize.height;a=a.distance||500;var d=this.camera;if(b!==d.fov||c!==d.aspect||a!==d.far)d.fov=b,d.aspect=c,d.far=a,d.updateProjectionMatrix()}});Vc.prototype=Object.assign(Object.create(ca.prototype),{constructor:Vc,isSpotLight:!0,copy:function(a){ca.prototype.copy.call(this,
-a);this.distance=a.distance;this.angle=a.angle;this.penumbra=a.penumbra;this.decay=a.decay;this.target=a.target.clone();this.shadow=a.shadow.clone();return this}});Wc.prototype=Object.assign(Object.create(ca.prototype),{constructor:Wc,isPointLight:!0,copy:function(a){ca.prototype.copy.call(this,a);this.distance=a.distance;this.decay=a.decay;this.shadow=a.shadow.clone();return this}});Xc.prototype=Object.assign(Object.create(mb.prototype),{constructor:Xc});Yc.prototype=Object.assign(Object.create(ca.prototype),
-{constructor:Yc,isDirectionalLight:!0,copy:function(a){ca.prototype.copy.call(this,a);this.target=a.target.clone();this.shadow=a.shadow.clone();return this}});Zc.prototype=Object.assign(Object.create(ca.prototype),{constructor:Zc,isAmbientLight:!0});h.AnimationUtils={arraySlice:function(a,b,c){return h.AnimationUtils.isTypedArray(a)?new a.constructor(a.subarray(b,c)):a.slice(b,c)},convertArray:function(a,b,c){return!a||!c&&a.constructor===b?a:"number"===typeof b.BYTES_PER_ELEMENT?new b(a):Array.prototype.slice.call(a)},
-isTypedArray:function(a){return ArrayBuffer.isView(a)&&!(a instanceof DataView)},getKeyframeOrder:function(a){for(var b=a.length,c=Array(b),d=0;d!==b;++d)c[d]=d;c.sort(function(b,c){return a[b]-a[c]});return c},sortedArray:function(a,b,c){for(var d=a.length,e=new a.constructor(d),f=0,g=0;g!==d;++f)for(var k=c[f]*b,h=0;h!==b;++h)e[g++]=a[k+h];return e},flattenJSON:function(a,b,c,d){for(var e=1,f=a[0];void 0!==f&&void 0===f[d];)f=a[e++];if(void 0!==f){var g=f[d];if(void 0!==g)if(Array.isArray(g)){do g=
-f[d],void 0!==g&&(b.push(f.time),c.push.apply(c,g)),f=a[e++];while(void 0!==f)}else if(void 0!==g.toArray){do g=f[d],void 0!==g&&(b.push(f.time),g.toArray(c,c.length)),f=a[e++];while(void 0!==f)}else{do g=f[d],void 0!==g&&(b.push(f.time),c.push(g)),f=a[e++];while(void 0!==f)}}}};ja.prototype={constructor:ja,evaluate:function(a){var b=this.parameterPositions,c=this._cachedIndex,d=b[c],e=b[c-1];a:{b:{c:{d:if(!(a<d)){for(var f=c+2;;){if(void 0===d){if(a<e)break d;this._cachedIndex=c=b.length;return this.afterEnd_(c-
-1,a,e)}if(c===f)break;e=d;d=b[++c];if(a<d)break b}d=b.length;break c}if(a>=e)break a;else{f=b[1];a<f&&(c=2,e=f);for(f=c-2;;){if(void 0===e)return this._cachedIndex=0,this.beforeStart_(0,a,d);if(c===f)break;d=e;e=b[--c-1];if(a>=e)break b}d=c;c=0}}for(;c<d;)e=c+d>>>1,a<b[e]?d=e:c=e+1;d=b[c];e=b[c-1];if(void 0===e)return this._cachedIndex=0,this.beforeStart_(0,a,d);if(void 0===d)return this._cachedIndex=c=b.length,this.afterEnd_(c-1,e,a)}this._cachedIndex=c;this.intervalChanged_(c,e,d)}return this.interpolate_(c,
-e,a,d)},settings:null,DefaultSettings_:{},getSettings_:function(){return this.settings||this.DefaultSettings_},copySampleValue_:function(a){var b=this.resultBuffer,c=this.sampleValues,d=this.valueSize;a*=d;for(var e=0;e!==d;++e)b[e]=c[a+e];return b},interpolate_:function(a,b,c,d){throw Error("call to abstract method");},intervalChanged_:function(a,b,c){}};Object.assign(ja.prototype,{beforeStart_:ja.prototype.copySampleValue_,afterEnd_:ja.prototype.copySampleValue_});$c.prototype=Object.assign(Object.create(ja.prototype),
-{constructor:$c,DefaultSettings_:{endingStart:2400,endingEnd:2400},intervalChanged_:function(a,b,c){var d=this.parameterPositions,e=a-2,f=a+1,g=d[e],k=d[f];if(void 0===g)switch(this.getSettings_().endingStart){case 2401:e=a;g=2*b-c;break;case 2402:e=d.length-2;g=b+d[e]-d[e+1];break;default:e=a,g=c}if(void 0===k)switch(this.getSettings_().endingEnd){case 2401:f=a;k=2*c-b;break;case 2402:f=1;k=c+d[1]-d[0];break;default:f=a-1,k=b}a=.5*(c-b);d=this.valueSize;this._weightPrev=a/(b-g);this._weightNext=
-a/(k-c);this._offsetPrev=e*d;this._offsetNext=f*d},interpolate_:function(a,b,c,d){var e=this.resultBuffer,f=this.sampleValues,g=this.valueSize;a*=g;var k=a-g,h=this._offsetPrev,n=this._offsetNext,r=this._weightPrev,p=this._weightNext,m=(c-b)/(d-b);c=m*m;d=c*m;b=-r*d+2*r*c-r*m;r=(1+r)*d+(-1.5-2*r)*c+(-.5+r)*m+1;m=(-1-p)*d+(1.5+p)*c+.5*m;p=p*d-p*c;for(c=0;c!==g;++c)e[c]=b*f[h+c]+r*f[k+c]+m*f[a+c]+p*f[n+c];return e}});mc.prototype=Object.assign(Object.create(ja.prototype),{constructor:mc,interpolate_:function(a,
-b,c,d){var e=this.resultBuffer,f=this.sampleValues,g=this.valueSize;a*=g;var k=a-g;b=(c-b)/(d-b);c=1-b;for(d=0;d!==g;++d)e[d]=f[k+d]*c+f[a+d]*b;return e}});ad.prototype=Object.assign(Object.create(ja.prototype),{constructor:ad,interpolate_:function(a,b,c,d){return this.copySampleValue_(a-1)}});var Ta;Ta={TimeBufferType:Float32Array,ValueBufferType:Float32Array,DefaultInterpolation:2301,InterpolantFactoryMethodDiscrete:function(a){return new ad(this.times,this.values,this.getValueSize(),a)},InterpolantFactoryMethodLinear:function(a){return new mc(this.times,
-this.values,this.getValueSize(),a)},InterpolantFactoryMethodSmooth:function(a){return new $c(this.times,this.values,this.getValueSize(),a)},setInterpolation:function(a){var b;switch(a){case 2300:b=this.InterpolantFactoryMethodDiscrete;break;case 2301:b=this.InterpolantFactoryMethodLinear;break;case 2302:b=this.InterpolantFactoryMethodSmooth}if(void 0===b){b="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(void 0===this.createInterpolant)if(a!==this.DefaultInterpolation)this.setInterpolation(this.DefaultInterpolation);
-else throw Error(b);console.warn(b)}else this.createInterpolant=b},getInterpolation:function(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return 2300;case this.InterpolantFactoryMethodLinear:return 2301;case this.InterpolantFactoryMethodSmooth:return 2302}},getValueSize:function(){return this.values.length/this.times.length},shift:function(a){if(0!==a)for(var b=this.times,c=0,d=b.length;c!==d;++c)b[c]+=a;return this},scale:function(a){if(1!==a)for(var b=this.times,c=
-0,d=b.length;c!==d;++c)b[c]*=a;return this},trim:function(a,b){for(var c=this.times,d=c.length,e=0,f=d-1;e!==d&&c[e]<a;)++e;for(;-1!==f&&c[f]>b;)--f;++f;if(0!==e||f!==d)e>=f&&(f=Math.max(f,1),e=f-1),d=this.getValueSize(),this.times=h.AnimationUtils.arraySlice(c,e,f),this.values=h.AnimationUtils.arraySlice(this.values,e*d,f*d);return this},validate:function(){var a=!0,b=this.getValueSize();0!==b-Math.floor(b)&&(console.error("invalid value size in track",this),a=!1);var c=this.times,b=this.values,
-d=c.length;0===d&&(console.error("track is empty",this),a=!1);for(var e=null,f=0;f!==d;f++){var g=c[f];if("number"===typeof g&&isNaN(g)){console.error("time is not a valid number",this,f,g);a=!1;break}if(null!==e&&e>g){console.error("out of order keys",this,f,g,e);a=!1;break}e=g}if(void 0!==b&&h.AnimationUtils.isTypedArray(b))for(f=0,c=b.length;f!==c;++f)if(d=b[f],isNaN(d)){console.error("value is not a valid number",this,f,d);a=!1;break}return a},optimize:function(){for(var a=this.times,b=this.values,
-c=this.getValueSize(),d=2302===this.getInterpolation(),e=1,f=a.length-1,g=1;g<f;++g){var k=!1,l=a[g];if(l!==a[g+1]&&(1!==g||l!==l[0]))if(d)k=!0;else for(var n=g*c,r=n-c,p=n+c,l=0;l!==c;++l){var m=b[n+l];if(m!==b[r+l]||m!==b[p+l]){k=!0;break}}if(k){if(g!==e){a[e]=a[g];for(var k=g*c,t=e*c,l=0;l!==c;++l)b[t+l]=b[k+l]}++e}}a[e++]=a[f];k=f*c;for(l=0;l!==c;++l)b[t+l]=b[k+l];e!==a.length&&(this.times=h.AnimationUtils.arraySlice(a,0,e),this.values=h.AnimationUtils.arraySlice(b,0,e*c));return this}};Kb.prototype=
-Object.assign(Object.create(Ta),{constructor:Kb,ValueTypeName:"vector"});bd.prototype=Object.assign(Object.create(ja.prototype),{constructor:bd,interpolate_:function(a,b,c,d){var e=this.resultBuffer,f=this.sampleValues,g=this.valueSize;a*=g;b=(c-b)/(d-b);for(c=a+g;a!==c;a+=4)oa.slerpFlat(e,0,f,a-g,f,a,b);return e}});nc.prototype=Object.assign(Object.create(Ta),{constructor:nc,ValueTypeName:"quaternion",DefaultInterpolation:2301,InterpolantFactoryMethodLinear:function(a){return new bd(this.times,this.values,
-this.getValueSize(),a)},InterpolantFactoryMethodSmooth:void 0});Lb.prototype=Object.assign(Object.create(Ta),{constructor:Lb,ValueTypeName:"number"});cd.prototype=Object.assign(Object.create(Ta),{constructor:cd,ValueTypeName:"string",ValueBufferType:Array,DefaultInterpolation:2300,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0});dd.prototype=Object.assign(Object.create(Ta),{constructor:dd,ValueTypeName:"bool",ValueBufferType:Array,DefaultInterpolation:2300,InterpolantFactoryMethodLinear:void 0,
-InterpolantFactoryMethodSmooth:void 0});ed.prototype=Object.assign(Object.create(Ta),{constructor:ed,ValueTypeName:"color"});ob.prototype=Ta;Ta.constructor=ob;Object.assign(ob,{parse:function(a){if(void 0===a.type)throw Error("track type undefined, can not parse");var b=ob._getTrackTypeForValueTypeName(a.type);if(void 0===a.times){var c=[],d=[];h.AnimationUtils.flattenJSON(a.keys,c,d,"value");a.times=c;a.values=d}return void 0!==b.parse?b.parse(a):new b(a.name,a.times,a.values,a.interpolation)},toJSON:function(a){var b=
-a.constructor;if(void 0!==b.toJSON)b=b.toJSON(a);else{var b={name:a.name,times:h.AnimationUtils.convertArray(a.times,Array),values:h.AnimationUtils.convertArray(a.values,Array)},c=a.getInterpolation();c!==a.DefaultInterpolation&&(b.interpolation=c)}b.type=a.ValueTypeName;return b},_getTrackTypeForValueTypeName:function(a){switch(a.toLowerCase()){case "scalar":case "double":case "float":case "number":case "integer":return Lb;case "vector":case "vector2":case "vector3":case "vector4":return Kb;case "color":return ed;
-case "quaternion":return nc;case "bool":case "boolean":return dd;case "string":return cd}throw Error("Unsupported typeName: "+a);}});sa.prototype={constructor:sa,resetDuration:function(){for(var a=0,b=0,c=this.tracks.length;b!==c;++b)var d=this.tracks[b],a=Math.max(a,d.times[d.times.length-1]);this.duration=a},trim:function(){for(var a=0;a<this.tracks.length;a++)this.tracks[a].trim(0,this.duration);return this},optimize:function(){for(var a=0;a<this.tracks.length;a++)this.tracks[a].optimize();return this}};
-Object.assign(sa,{parse:function(a){for(var b=[],c=a.tracks,d=1/(a.fps||1),e=0,f=c.length;e!==f;++e)b.push(ob.parse(c[e]).scale(d));return new sa(a.name,a.duration,b)},toJSON:function(a){var b=[],c=a.tracks;a={name:a.name,duration:a.duration,tracks:b};for(var d=0,e=c.length;d!==e;++d)b.push(ob.toJSON(c[d]));return a},CreateFromMorphTargetSequence:function(a,b,c,d){for(var e=b.length,f=[],g=0;g<e;g++){var k=[],l=[];k.push((g+e-1)%e,g,(g+1)%e);l.push(0,1,0);var n=h.AnimationUtils.getKeyframeOrder(k),
-k=h.AnimationUtils.sortedArray(k,1,n),l=h.AnimationUtils.sortedArray(l,1,n);d||0!==k[0]||(k.push(e),l.push(l[0]));f.push((new Lb(".morphTargetInfluences["+b[g].name+"]",k,l)).scale(1/c))}return new sa(a,-1,f)},findByName:function(a,b){var c=a;Array.isArray(a)||(c=a.geometry&&a.geometry.animations||a.animations);for(var d=0;d<c.length;d++)if(c[d].name===b)return c[d];return null},CreateClipsFromMorphTargetSequences:function(a,b,c){for(var d={},e=/^([\w-]*?)([\d]+)$/,f=0,g=a.length;f<g;f++){var k=a[f],
-h=k.name.match(e);if(h&&1<h.length){var n=h[1];(h=d[n])||(d[n]=h=[]);h.push(k)}}a=[];for(n in d)a.push(sa.CreateFromMorphTargetSequence(n,d[n],b,c));return a},parseAnimation:function(a,b,c){if(!a)return console.error("  no animation in JSONLoader data"),null;c=function(a,b,c,d,e){if(0!==c.length){var f=[],g=[];h.AnimationUtils.flattenJSON(c,f,g,d);0!==f.length&&e.push(new a(b,f,g))}};var d=[],e=a.name||"default",f=a.length||-1,g=a.fps||30;a=a.hierarchy||[];for(var k=0;k<a.length;k++){var l=a[k].keys;
-if(l&&0!==l.length)if(l[0].morphTargets){for(var f={},n=0;n<l.length;n++)if(l[n].morphTargets)for(var r=0;r<l[n].morphTargets.length;r++)f[l[n].morphTargets[r]]=-1;for(var p in f){for(var m=[],t=[],r=0;r!==l[n].morphTargets.length;++r){var u=l[n];m.push(u.time);t.push(u.morphTarget===p?1:0)}d.push(new Lb(".morphTargetInfluence["+p+"]",m,t))}f=f.length*(g||1)}else n=".bones["+b[k].name+"]",c(Kb,n+".position",l,"pos",d),c(nc,n+".quaternion",l,"rot",d),c(Kb,n+".scale",l,"scl",d)}return 0===d.length?
-null:new sa(e,f,d)}});Object.assign(fd.prototype,{load:function(a,b,c,d){var e=this;(new wa(e.manager)).load(a,function(a){b(e.parse(JSON.parse(a)))},c,d)},setTextures:function(a){this.textures=a},parse:function(a){function b(a){void 0===c[a]&&console.warn("THREE.MaterialLoader: Undefined texture",a);return c[a]}var c=this.textures,d=new pf[a.type];void 0!==a.uuid&&(d.uuid=a.uuid);void 0!==a.name&&(d.name=a.name);void 0!==a.color&&d.color.setHex(a.color);void 0!==a.roughness&&(d.roughness=a.roughness);
-void 0!==a.metalness&&(d.metalness=a.metalness);void 0!==a.emissive&&d.emissive.setHex(a.emissive);void 0!==a.specular&&d.specular.setHex(a.specular);void 0!==a.shininess&&(d.shininess=a.shininess);void 0!==a.uniforms&&(d.uniforms=a.uniforms);void 0!==a.vertexShader&&(d.vertexShader=a.vertexShader);void 0!==a.fragmentShader&&(d.fragmentShader=a.fragmentShader);void 0!==a.vertexColors&&(d.vertexColors=a.vertexColors);void 0!==a.fog&&(d.fog=a.fog);void 0!==a.shading&&(d.shading=a.shading);void 0!==
-a.blending&&(d.blending=a.blending);void 0!==a.side&&(d.side=a.side);void 0!==a.opacity&&(d.opacity=a.opacity);void 0!==a.transparent&&(d.transparent=a.transparent);void 0!==a.alphaTest&&(d.alphaTest=a.alphaTest);void 0!==a.depthTest&&(d.depthTest=a.depthTest);void 0!==a.depthWrite&&(d.depthWrite=a.depthWrite);void 0!==a.colorWrite&&(d.colorWrite=a.colorWrite);void 0!==a.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.skinning&&(d.skinning=a.skinning);void 0!==a.morphTargets&&(d.morphTargets=a.morphTargets);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.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));if(void 0!==a.normalScale){var e=a.normalScale;!1===Array.isArray(e)&&(e=[e,e]);d.normalScale=(new B).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.reflectivity&&(d.reflectivity=a.reflectivity);void 0!==a.lightMap&&(d.lightMap=b(a.lightMap));void 0!==a.lightMapIntensity&&(d.lightMapIntensity=a.lightMapIntensity);void 0!==a.aoMap&&(d.aoMap=b(a.aoMap));void 0!==a.aoMapIntensity&&(d.aoMapIntensity=a.aoMapIntensity);if(void 0!==
-a.materials)for(var e=0,f=a.materials.length;e<f;e++)d.materials.push(this.parse(a.materials[e]));return d}});Object.assign(wd.prototype,{load:function(a,b,c,d){var e=this;(new wa(e.manager)).load(a,function(a){b(e.parse(JSON.parse(a)))},c,d)},parse:function(a){var b=new H,c=a.data.index,d={Int8Array:Int8Array,Uint8Array:Uint8Array,Uint8ClampedArray:Uint8ClampedArray,Int16Array:Int16Array,Uint16Array:Uint16Array,Int32Array:Int32Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array};
-void 0!==c&&(c=new d[c.type](c.array),b.setIndex(new C(c,1)));var e=a.data.attributes,f;for(f in e){var g=e[f],c=new d[g.type](g.array);b.addAttribute(f,new C(c,g.itemSize,g.normalized))}d=a.data.groups||a.data.drawcalls||a.data.offsets;if(void 0!==d)for(f=0,c=d.length;f!==c;++f)e=d[f],b.addGroup(e.start,e.count,e.materialIndex);a=a.data.boundingSphere;void 0!==a&&(d=new q,void 0!==a.center&&d.fromArray(a.center),b.boundingSphere=new Aa(d,a.radius));return b}});pb.prototype={constructor:pb,crossOrigin:void 0,
-extractUrlBase:function(a){a=a.split("/");if(1===a.length)return"./";a.pop();return a.join("/")+"/"},initMaterials:function(a,b,c){for(var d=[],e=0;e<a.length;++e)d[e]=this.createMaterial(a[e],b,c);return d},createMaterial:function(){var a,b,c;return function(d,e,f){function g(a,c,d,g,l){a=e+a;var n=pb.Handlers.get(a);null!==n?a=n.load(a):(b.setCrossOrigin(f),a=b.load(a));void 0!==c&&(a.repeat.fromArray(c),1!==c[0]&&(a.wrapS=1E3),1!==c[1]&&(a.wrapT=1E3));void 0!==d&&a.offset.fromArray(d);void 0!==
-g&&("repeat"===g[0]&&(a.wrapS=1E3),"mirror"===g[0]&&(a.wrapS=1002),"repeat"===g[1]&&(a.wrapT=1E3),"mirror"===g[1]&&(a.wrapT=1002));void 0!==l&&(a.anisotropy=l);c=h.Math.generateUUID();k[c]=a;return c}void 0===a&&(a=new I);void 0===b&&(b=new Sc);void 0===c&&(c=new fd);var k={},l={uuid:h.Math.generateUUID(),type:"MeshLambertMaterial"},n;for(n in d){var r=d[n];switch(n){case "DbgColor":case "DbgIndex":case "opticalDensity":case "illumination":break;case "DbgName":l.name=r;break;case "blending":l.blending=
-se[r];break;case "colorAmbient":case "mapAmbient":console.warn("THREE.Loader.createMaterial:",n,"is no longer supported.");break;case "colorDiffuse":l.color=a.fromArray(r).getHex();break;case "colorSpecular":l.specular=a.fromArray(r).getHex();break;case "colorEmissive":l.emissive=a.fromArray(r).getHex();break;case "specularCoef":l.shininess=r;break;case "shading":"basic"===r.toLowerCase()&&(l.type="MeshBasicMaterial");"phong"===r.toLowerCase()&&(l.type="MeshPhongMaterial");"standard"===r.toLowerCase()&&
-(l.type="MeshStandardMaterial");break;case "mapDiffuse":l.map=g(r,d.mapDiffuseRepeat,d.mapDiffuseOffset,d.mapDiffuseWrap,d.mapDiffuseAnisotropy);break;case "mapDiffuseRepeat":case "mapDiffuseOffset":case "mapDiffuseWrap":case "mapDiffuseAnisotropy":break;case "mapEmissive":l.emissiveMap=g(r,d.mapEmissiveRepeat,d.mapEmissiveOffset,d.mapEmissiveWrap,d.mapEmissiveAnisotropy);break;case "mapEmissiveRepeat":case "mapEmissiveOffset":case "mapEmissiveWrap":case "mapEmissiveAnisotropy":break;case "mapLight":l.lightMap=
-g(r,d.mapLightRepeat,d.mapLightOffset,d.mapLightWrap,d.mapLightAnisotropy);break;case "mapLightRepeat":case "mapLightOffset":case "mapLightWrap":case "mapLightAnisotropy":break;case "mapAO":l.aoMap=g(r,d.mapAORepeat,d.mapAOOffset,d.mapAOWrap,d.mapAOAnisotropy);break;case "mapAORepeat":case "mapAOOffset":case "mapAOWrap":case "mapAOAnisotropy":break;case "mapBump":l.bumpMap=g(r,d.mapBumpRepeat,d.mapBumpOffset,d.mapBumpWrap,d.mapBumpAnisotropy);break;case "mapBumpScale":l.bumpScale=r;break;case "mapBumpRepeat":case "mapBumpOffset":case "mapBumpWrap":case "mapBumpAnisotropy":break;
-case "mapNormal":l.normalMap=g(r,d.mapNormalRepeat,d.mapNormalOffset,d.mapNormalWrap,d.mapNormalAnisotropy);break;case "mapNormalFactor":l.normalScale=[r,r];break;case "mapNormalRepeat":case "mapNormalOffset":case "mapNormalWrap":case "mapNormalAnisotropy":break;case "mapSpecular":l.specularMap=g(r,d.mapSpecularRepeat,d.mapSpecularOffset,d.mapSpecularWrap,d.mapSpecularAnisotropy);break;case "mapSpecularRepeat":case "mapSpecularOffset":case "mapSpecularWrap":case "mapSpecularAnisotropy":break;case "mapMetalness":l.metalnessMap=
-g(r,d.mapMetalnessRepeat,d.mapMetalnessOffset,d.mapMetalnessWrap,d.mapMetalnessAnisotropy);break;case "mapMetalnessRepeat":case "mapMetalnessOffset":case "mapMetalnessWrap":case "mapMetalnessAnisotropy":break;case "mapRoughness":l.roughnessMap=g(r,d.mapRoughnessRepeat,d.mapRoughnessOffset,d.mapRoughnessWrap,d.mapRoughnessAnisotropy);break;case "mapRoughnessRepeat":case "mapRoughnessOffset":case "mapRoughnessWrap":case "mapRoughnessAnisotropy":break;case "mapAlpha":l.alphaMap=g(r,d.mapAlphaRepeat,
-d.mapAlphaOffset,d.mapAlphaWrap,d.mapAlphaAnisotropy);break;case "mapAlphaRepeat":case "mapAlphaOffset":case "mapAlphaWrap":case "mapAlphaAnisotropy":break;case "flipSided":l.side=1;break;case "doubleSided":l.side=2;break;case "transparency":console.warn("THREE.Loader.createMaterial: transparency has been renamed to opacity");l.opacity=r;break;case "depthTest":case "depthWrite":case "colorWrite":case "opacity":case "reflectivity":case "transparent":case "visible":case "wireframe":l[n]=r;break;case "vertexColors":!0===
-r&&(l.vertexColors=2);"face"===r&&(l.vertexColors=1);break;default:console.error("THREE.Loader.createMaterial: Unsupported",n,r)}}"MeshBasicMaterial"===l.type&&delete l.emissive;"MeshPhongMaterial"!==l.type&&delete l.specular;1>l.opacity&&(l.transparent=!0);c.setTextures(k);return c.parse(l)}}()};pb.Handlers={handlers:[],add:function(a,b){this.handlers.push(a,b)},get:function(a){for(var b=this.handlers,c=0,d=b.length;c<d;c+=2){var e=b[c+1];if(b[c].test(a))return e}return null}};Object.assign(xd.prototype,
-{load:function(a,b,c,d){var e=this,f=this.texturePath&&"string"===typeof this.texturePath?this.texturePath:pb.prototype.extractUrlBase(a),g=new wa(this.manager);g.setWithCredentials(this.withCredentials);g.load(a,function(c){c=JSON.parse(c);var d=c.metadata;if(void 0!==d&&(d=d.type,void 0!==d)){if("object"===d.toLowerCase()){console.error("THREE.JSONLoader: "+a+" should be loaded with THREE.ObjectLoader instead.");return}if("scene"===d.toLowerCase()){console.error("THREE.JSONLoader: "+a+" should be loaded with THREE.SceneLoader instead.");
-return}}c=e.parse(c,f);b(c.geometry,c.materials)},c,d)},setTexturePath:function(a){this.texturePath=a},parse:function(a,b){var c=new S,d=void 0!==a.scale?1/a.scale:1;(function(b){var d,g,k,h,n,r,p,m,t,u,v,z,w,x=a.faces;r=a.vertices;var N=a.normals,y=a.colors,F=0;if(void 0!==a.uvs){for(d=0;d<a.uvs.length;d++)a.uvs[d].length&&F++;for(d=0;d<F;d++)c.faceVertexUvs[d]=[]}h=0;for(n=r.length;h<n;)d=new q,d.x=r[h++]*b,d.y=r[h++]*b,d.z=r[h++]*b,c.vertices.push(d);h=0;for(n=x.length;h<n;)if(b=x[h++],t=b&1,k=
-b&2,d=b&8,p=b&16,u=b&32,r=b&64,b&=128,t){t=new la;t.a=x[h];t.b=x[h+1];t.c=x[h+3];v=new la;v.a=x[h+1];v.b=x[h+2];v.c=x[h+3];h+=4;k&&(k=x[h++],t.materialIndex=k,v.materialIndex=k);k=c.faces.length;if(d)for(d=0;d<F;d++)for(z=a.uvs[d],c.faceVertexUvs[d][k]=[],c.faceVertexUvs[d][k+1]=[],g=0;4>g;g++)m=x[h++],w=z[2*m],m=z[2*m+1],w=new B(w,m),2!==g&&c.faceVertexUvs[d][k].push(w),0!==g&&c.faceVertexUvs[d][k+1].push(w);p&&(p=3*x[h++],t.normal.set(N[p++],N[p++],N[p]),v.normal.copy(t.normal));if(u)for(d=0;4>
-d;d++)p=3*x[h++],u=new q(N[p++],N[p++],N[p]),2!==d&&t.vertexNormals.push(u),0!==d&&v.vertexNormals.push(u);r&&(r=x[h++],r=y[r],t.color.setHex(r),v.color.setHex(r));if(b)for(d=0;4>d;d++)r=x[h++],r=y[r],2!==d&&t.vertexColors.push(new I(r)),0!==d&&v.vertexColors.push(new I(r));c.faces.push(t);c.faces.push(v)}else{t=new la;t.a=x[h++];t.b=x[h++];t.c=x[h++];k&&(k=x[h++],t.materialIndex=k);k=c.faces.length;if(d)for(d=0;d<F;d++)for(z=a.uvs[d],c.faceVertexUvs[d][k]=[],g=0;3>g;g++)m=x[h++],w=z[2*m],m=z[2*m+
-1],w=new B(w,m),c.faceVertexUvs[d][k].push(w);p&&(p=3*x[h++],t.normal.set(N[p++],N[p++],N[p]));if(u)for(d=0;3>d;d++)p=3*x[h++],u=new q(N[p++],N[p++],N[p]),t.vertexNormals.push(u);r&&(r=x[h++],t.color.setHex(y[r]));if(b)for(d=0;3>d;d++)r=x[h++],t.vertexColors.push(new I(y[r]));c.faces.push(t)}})(d);(function(){var b=void 0!==a.influencesPerVertex?a.influencesPerVertex:2;if(a.skinWeights)for(var d=0,g=a.skinWeights.length;d<g;d+=b)c.skinWeights.push(new da(a.skinWeights[d],1<b?a.skinWeights[d+1]:0,
-2<b?a.skinWeights[d+2]:0,3<b?a.skinWeights[d+3]:0));if(a.skinIndices)for(d=0,g=a.skinIndices.length;d<g;d+=b)c.skinIndices.push(new da(a.skinIndices[d],1<b?a.skinIndices[d+1]:0,2<b?a.skinIndices[d+2]:0,3<b?a.skinIndices[d+3]:0));c.bones=a.bones;c.bones&&0<c.bones.length&&(c.skinWeights.length!==c.skinIndices.length||c.skinIndices.length!==c.vertices.length)&&console.warn("When skinning, number of vertices ("+c.vertices.length+"), skinIndices ("+c.skinIndices.length+"), and skinWeights ("+c.skinWeights.length+
-") should match.")})();(function(b){if(void 0!==a.morphTargets)for(var d=0,g=a.morphTargets.length;d<g;d++){c.morphTargets[d]={};c.morphTargets[d].name=a.morphTargets[d].name;c.morphTargets[d].vertices=[];for(var k=c.morphTargets[d].vertices,h=a.morphTargets[d].vertices,n=0,r=h.length;n<r;n+=3){var p=new q;p.x=h[n]*b;p.y=h[n+1]*b;p.z=h[n+2]*b;k.push(p)}}if(void 0!==a.morphColors&&0<a.morphColors.length)for(console.warn('THREE.JSONLoader: "morphColors" no longer supported. Using them as face colors.'),
-b=c.faces,k=a.morphColors[0].colors,d=0,g=b.length;d<g;d++)b[d].color.fromArray(k,3*d)})(d);(function(){var b=[],d=[];void 0!==a.animation&&d.push(a.animation);void 0!==a.animations&&(a.animations.length?d=d.concat(a.animations):d.push(a.animations));for(var g=0;g<d.length;g++){var k=sa.parseAnimation(d[g],c.bones);k&&b.push(k)}c.morphTargets&&(d=sa.CreateClipsFromMorphTargetSequences(c.morphTargets,10),b=b.concat(d));0<b.length&&(c.animations=b)})();c.computeFaceNormals();c.computeBoundingSphere();
-if(void 0===a.materials||0===a.materials.length)return{geometry:c};d=pb.prototype.initMaterials(a.materials,b,this.crossOrigin);return{geometry:c,materials:d}}});Mb.prototype=Object.create(H.prototype);Mb.prototype.constructor=Mb;oc.prototype=Object.create(S.prototype);oc.prototype.constructor=oc;pa.prototype=Object.create(S.prototype);pa.prototype.constructor=pa;pc.prototype=Object.create(pa.prototype);pc.prototype.constructor=pc;qc.prototype=Object.create(pa.prototype);qc.prototype.constructor=
-qc;rc.prototype=Object.create(pa.prototype);rc.prototype.constructor=rc;sc.prototype=Object.create(pa.prototype);sc.prototype.constructor=sc;za.prototype=Object.create(S.prototype);za.prototype.constructor=za;za.NoTaper=function(a){return 1};za.SinusoidalTaper=function(a){return Math.sin(Math.PI*a)};za.FrenetFrames=function(a,b,c){var d=new q,e=[],f=[],g=[],k=new q,l=new Q;b+=1;var n,r,p;this.tangents=e;this.normals=f;this.binormals=g;for(n=0;n<b;n++)r=n/(b-1),e[n]=a.getTangentAt(r),e[n].normalize();
-f[0]=new q;g[0]=new q;a=Number.MAX_VALUE;n=Math.abs(e[0].x);r=Math.abs(e[0].y);p=Math.abs(e[0].z);n<=a&&(a=n,d.set(1,0,0));r<=a&&(a=r,d.set(0,1,0));p<=a&&d.set(0,0,1);k.crossVectors(e[0],d).normalize();f[0].crossVectors(e[0],k);g[0].crossVectors(e[0],f[0]);for(n=1;n<b;n++)f[n]=f[n-1].clone(),g[n]=g[n-1].clone(),k.crossVectors(e[n-1],e[n]),k.length()>Number.EPSILON&&(k.normalize(),d=Math.acos(h.Math.clamp(e[n-1].dot(e[n]),-1,1)),f[n].applyMatrix4(l.makeRotationAxis(k,d))),g[n].crossVectors(e[n],f[n]);
-if(c)for(d=Math.acos(h.Math.clamp(f[0].dot(f[b-1]),-1,1)),d/=b-1,0<e[0].dot(k.crossVectors(f[0],f[b-1]))&&(d=-d),n=1;n<b;n++)f[n].applyMatrix4(l.makeRotationAxis(e[n],d*n)),g[n].crossVectors(e[n],f[n])};Nb.prototype=Object.create(H.prototype);Nb.prototype.constructor=Nb;tc.prototype=Object.create(S.prototype);tc.prototype.constructor=tc;Ob.prototype=Object.create(H.prototype);Ob.prototype.constructor=Ob;uc.prototype=Object.create(S.prototype);uc.prototype.constructor=uc;h.ShapeUtils={area:function(a){for(var b=
-a.length,c=0,d=b-1,e=0;e<b;d=e++)c+=a[d].x*a[e].y-a[e].x*a[d].y;return.5*c},triangulate:function(){return function(a,b){var c=a.length;if(3>c)return null;var d=[],e=[],f=[],g,k,l;if(0<h.ShapeUtils.area(a))for(k=0;k<c;k++)e[k]=k;else for(k=0;k<c;k++)e[k]=c-1-k;var n=2*c;for(k=c-1;2<c;){if(0>=n--){console.warn("THREE.ShapeUtils: Unable to triangulate polygon! in triangulate()");break}g=k;c<=g&&(g=0);k=g+1;c<=k&&(k=0);l=k+1;c<=l&&(l=0);var r;a:{var p,m,t,q,v,z,w,x;p=a[e[g]].x;m=a[e[g]].y;t=a[e[k]].x;
-q=a[e[k]].y;v=a[e[l]].x;z=a[e[l]].y;if(Number.EPSILON>(t-p)*(z-m)-(q-m)*(v-p))r=!1;else{var B,y,F,G,E,K,C,D,H,I;B=v-t;y=z-q;F=p-v;G=m-z;E=t-p;K=q-m;for(r=0;r<c;r++)if(w=a[e[r]].x,x=a[e[r]].y,!(w===p&&x===m||w===t&&x===q||w===v&&x===z)&&(C=w-p,D=x-m,H=w-t,I=x-q,w-=v,x-=z,H=B*I-y*H,C=E*D-K*C,D=F*x-G*w,H>=-Number.EPSILON&&D>=-Number.EPSILON&&C>=-Number.EPSILON)){r=!1;break a}r=!0}}if(r){d.push([a[e[g]],a[e[k]],a[e[l]]]);f.push([e[g],e[k],e[l]]);g=k;for(l=k+1;l<c;g++,l++)e[g]=e[l];c--;n=2*c}}return b?
-f:d}}(),triangulateShape:function(a,b){function c(a){var b=a.length;2<b&&a[b-1].equals(a[0])&&a.pop()}function d(a,b,c){return a.x!==b.x?a.x<b.x?a.x<=c.x&&c.x<=b.x:b.x<=c.x&&c.x<=a.x:a.y<b.y?a.y<=c.y&&c.y<=b.y:b.y<=c.y&&c.y<=a.y}function e(a,b,c,e,f){var g=b.x-a.x,k=b.y-a.y,h=e.x-c.x,l=e.y-c.y,m=a.x-c.x,n=a.y-c.y,p=k*h-g*l,r=k*m-g*n;if(Math.abs(p)>Number.EPSILON){if(0<p){if(0>r||r>p)return[];h=l*m-h*n;if(0>h||h>p)return[]}else{if(0<r||r<p)return[];h=l*m-h*n;if(0<h||h<p)return[]}if(0===h)return!f||
-0!==r&&r!==p?[a]:[];if(h===p)return!f||0!==r&&r!==p?[b]:[];if(0===r)return[c];if(r===p)return[e];f=h/p;return[{x:a.x+f*g,y:a.y+f*k}]}if(0!==r||l*m!==h*n)return[];k=0===g&&0===k;h=0===h&&0===l;if(k&&h)return a.x!==c.x||a.y!==c.y?[]:[a];if(k)return d(c,e,a)?[a]:[];if(h)return d(a,b,c)?[c]:[];0!==g?(a.x<b.x?(g=a,h=a.x,k=b,a=b.x):(g=b,h=b.x,k=a,a=a.x),c.x<e.x?(b=c,p=c.x,l=e,c=e.x):(b=e,p=e.x,l=c,c=c.x)):(a.y<b.y?(g=a,h=a.y,k=b,a=b.y):(g=b,h=b.y,k=a,a=a.y),c.y<e.y?(b=c,p=c.y,l=e,c=e.y):(b=e,p=e.y,l=c,
-c=c.y));return h<=p?a<p?[]:a===p?f?[]:[b]:a<=c?[b,k]:[b,l]:h>c?[]:h===c?f?[]:[g]:a<=c?[g,k]:[g,l]}function f(a,b,c,d){var e=b.x-a.x,f=b.y-a.y;b=c.x-a.x;c=c.y-a.y;var g=d.x-a.x;d=d.y-a.y;a=e*c-f*b;e=e*d-f*g;return Math.abs(a)>Number.EPSILON?(b=g*c-d*b,0<a?0<=e&&0<=b:0<=e||0<=b):0<e}c(a);b.forEach(c);var g,k,l,n,r,p={};l=a.concat();g=0;for(k=b.length;g<k;g++)Array.prototype.push.apply(l,b[g]);g=0;for(k=l.length;g<k;g++)r=l[g].x+":"+l[g].y,void 0!==p[r]&&console.warn("THREE.ShapeUtils: Duplicate point",
-r,g),p[r]=g;g=function(a,b){function c(a,b){var d=k.length-1,e=a-1;0>e&&(e=d);var g=a+1;g>d&&(g=0);d=f(k[a],k[e],k[g],h[b]);if(!d)return!1;d=h.length-1;e=b-1;0>e&&(e=d);g=b+1;g>d&&(g=0);return(d=f(h[b],h[e],h[g],k[a]))?!0:!1}function d(a,b){var c,f;for(c=0;c<k.length;c++)if(f=c+1,f%=k.length,f=e(a,b,k[c],k[f],!0),0<f.length)return!0;return!1}function g(a,c){var d,f,k,h;for(d=0;d<l.length;d++)for(f=b[l[d]],k=0;k<f.length;k++)if(h=k+1,h%=f.length,h=e(a,c,f[k],f[h],!0),0<h.length)return!0;return!1}var k=
-a.concat(),h,l=[],m,n,p,r,q,B=[],C,D,H,I=0;for(m=b.length;I<m;I++)l.push(I);C=0;for(var L=2*l.length;0<l.length;){L--;if(0>L){console.log("Infinite Loop! Holes left:"+l.length+", Probably Hole outside Shape!");break}for(n=C;n<k.length;n++){p=k[n];m=-1;for(I=0;I<l.length;I++)if(r=l[I],q=p.x+":"+p.y+":"+r,void 0===B[q]){h=b[r];for(D=0;D<h.length;D++)if(r=h[D],c(n,D)&&!d(p,r)&&!g(p,r)){m=D;l.splice(I,1);C=k.slice(0,n+1);r=k.slice(n);D=h.slice(m);H=h.slice(0,m+1);k=C.concat(D).concat(H).concat(r);C=n;
-break}if(0<=m)break;B[q]=!0}if(0<=m)break}}return k}(a,b);var m=h.ShapeUtils.triangulate(g,!1);g=0;for(k=m.length;g<k;g++)for(n=m[g],l=0;3>l;l++)r=n[l].x+":"+n[l].y,r=p[r],void 0!==r&&(n[l]=r);return m.concat()},isClockWise:function(a){return 0>h.ShapeUtils.area(a)},b2:function(){return function(a,b,c,d){var e=1-a;return e*e*b+2*(1-a)*a*c+a*a*d}}(),b3:function(){return function(a,b,c,d,e){var f=1-a,g=1-a;return f*f*f*b+3*g*g*a*c+3*(1-a)*a*a*d+a*a*a*e}}()};ta.prototype=Object.create(S.prototype);ta.prototype.constructor=
-ta;ta.prototype.addShapeList=function(a,b){for(var c=a.length,d=0;d<c;d++)this.addShape(a[d],b)};ta.prototype.addShape=function(a,b){function c(a,b,c){b||console.error("THREE.ExtrudeGeometry: vec does not exist");return b.clone().multiplyScalar(c).add(a)}function d(a,b,c){var d,e,f;e=a.x-b.x;f=a.y-b.y;d=c.x-a.x;var g=c.y-a.y,k=e*e+f*f;if(Math.abs(e*g-f*d)>Number.EPSILON){var h=Math.sqrt(k),l=Math.sqrt(d*d+g*g),k=b.x-f/h;b=b.y+e/h;g=((c.x-g/l-k)*g-(c.y+d/l-b)*d)/(e*g-f*d);d=k+e*g-a.x;e=b+f*g-a.y;f=
-d*d+e*e;if(2>=f)return new B(d,e);f=Math.sqrt(f/2)}else a=!1,e>Number.EPSILON?d>Number.EPSILON&&(a=!0):e<-Number.EPSILON?d<-Number.EPSILON&&(a=!0):Math.sign(f)===Math.sign(g)&&(a=!0),a?(d=-f,f=Math.sqrt(k)):(d=e,e=f,f=Math.sqrt(k/2));return new B(d/f,e/f)}function e(a,b){var c,d;for(J=a.length;0<=--J;){c=J;d=J-1;0>d&&(d=a.length-1);var e,f=t+2*r;for(e=0;e<f;e++){var g=U*e,k=U*(e+1),h=b+c+g,g=b+d+g,l=b+d+k,k=b+c+k,h=h+M,g=g+M,l=l+M,k=k+M;H.faces.push(new la(h,g,k,null,null,1));H.faces.push(new la(g,
-l,k,null,null,1));h=w.generateSideWallUV(H,h,g,l,k);H.faceVertexUvs[0].push([h[0],h[1],h[3]]);H.faceVertexUvs[0].push([h[1],h[2],h[3]])}}}function f(a,b,c){H.vertices.push(new q(a,b,c))}function g(a,b,c){a+=M;b+=M;c+=M;H.faces.push(new la(a,b,c,null,null,0));a=w.generateTopUV(H,a,b,c);H.faceVertexUvs[0].push(a)}var k=void 0!==b.amount?b.amount:100,l=void 0!==b.bevelThickness?b.bevelThickness:6,n=void 0!==b.bevelSize?b.bevelSize:l-2,r=void 0!==b.bevelSegments?b.bevelSegments:3,p=void 0!==b.bevelEnabled?
-b.bevelEnabled:!0,m=void 0!==b.curveSegments?b.curveSegments:12,t=void 0!==b.steps?b.steps:1,u=b.extrudePath,v,z=!1,w=void 0!==b.UVGenerator?b.UVGenerator:ta.WorldUVGenerator,x,C,y,F;u&&(v=u.getSpacedPoints(t),z=!0,p=!1,x=void 0!==b.frames?b.frames:new za.FrenetFrames(u,t,!1),C=new q,y=new q,F=new q);p||(n=l=r=0);var G,E,D,H=this,M=this.vertices.length,u=a.extractPoints(m),m=u.shape,I=u.holes;if(u=!h.ShapeUtils.isClockWise(m)){m=m.reverse();E=0;for(D=I.length;E<D;E++)G=I[E],h.ShapeUtils.isClockWise(G)&&
-(I[E]=G.reverse());u=!1}var Q=h.ShapeUtils.triangulateShape(m,I),T=m;E=0;for(D=I.length;E<D;E++)G=I[E],m=m.concat(G);var S,L,O,P,R,U=m.length,V,W=Q.length,u=[],J=0;O=T.length;S=O-1;for(L=J+1;J<O;J++,S++,L++)S===O&&(S=0),L===O&&(L=0),u[J]=d(T[J],T[S],T[L]);var Y=[],Z,ba=u.concat();E=0;for(D=I.length;E<D;E++){G=I[E];Z=[];J=0;O=G.length;S=O-1;for(L=J+1;J<O;J++,S++,L++)S===O&&(S=0),L===O&&(L=0),Z[J]=d(G[J],G[S],G[L]);Y.push(Z);ba=ba.concat(Z)}for(S=0;S<r;S++){O=S/r;P=l*Math.cos(O*Math.PI/2);L=n*Math.sin(O*
-Math.PI/2);J=0;for(O=T.length;J<O;J++)R=c(T[J],u[J],L),f(R.x,R.y,-P);E=0;for(D=I.length;E<D;E++)for(G=I[E],Z=Y[E],J=0,O=G.length;J<O;J++)R=c(G[J],Z[J],L),f(R.x,R.y,-P)}L=n;for(J=0;J<U;J++)R=p?c(m[J],ba[J],L):m[J],z?(y.copy(x.normals[0]).multiplyScalar(R.x),C.copy(x.binormals[0]).multiplyScalar(R.y),F.copy(v[0]).add(y).add(C),f(F.x,F.y,F.z)):f(R.x,R.y,0);for(O=1;O<=t;O++)for(J=0;J<U;J++)R=p?c(m[J],ba[J],L):m[J],z?(y.copy(x.normals[O]).multiplyScalar(R.x),C.copy(x.binormals[O]).multiplyScalar(R.y),
-F.copy(v[O]).add(y).add(C),f(F.x,F.y,F.z)):f(R.x,R.y,k/t*O);for(S=r-1;0<=S;S--){O=S/r;P=l*Math.cos(O*Math.PI/2);L=n*Math.sin(O*Math.PI/2);J=0;for(O=T.length;J<O;J++)R=c(T[J],u[J],L),f(R.x,R.y,k+P);E=0;for(D=I.length;E<D;E++)for(G=I[E],Z=Y[E],J=0,O=G.length;J<O;J++)R=c(G[J],Z[J],L),z?f(R.x,R.y+v[t-1].y,v[t-1].x+P):f(R.x,R.y,k+P)}(function(){if(p){var a=0*U;for(J=0;J<W;J++)V=Q[J],g(V[2]+a,V[1]+a,V[0]+a);a=U*(t+2*r);for(J=0;J<W;J++)V=Q[J],g(V[0]+a,V[1]+a,V[2]+a)}else{for(J=0;J<W;J++)V=Q[J],g(V[2],V[1],
-V[0]);for(J=0;J<W;J++)V=Q[J],g(V[0]+U*t,V[1]+U*t,V[2]+U*t)}})();(function(){var a=0;e(T,a);a+=T.length;E=0;for(D=I.length;E<D;E++)G=I[E],e(G,a),a+=G.length})()};ta.WorldUVGenerator={generateTopUV:function(a,b,c,d){a=a.vertices;b=a[b];c=a[c];d=a[d];return[new B(b.x,b.y),new B(c.x,c.y),new B(d.x,d.y)]},generateSideWallUV:function(a,b,c,d,e){a=a.vertices;b=a[b];c=a[c];d=a[d];e=a[e];return.01>Math.abs(b.y-c.y)?[new B(b.x,1-b.z),new B(c.x,1-c.z),new B(d.x,1-d.z),new B(e.x,1-e.z)]:[new B(b.y,1-b.z),new B(c.y,
-1-c.z),new B(d.y,1-d.z),new B(e.y,1-e.z)]}};vc.prototype=Object.create(ta.prototype);vc.prototype.constructor=vc;qb.prototype=Object.create(H.prototype);qb.prototype.constructor=qb;Pb.prototype=Object.create(S.prototype);Pb.prototype.constructor=Pb;Qb.prototype=Object.create(H.prototype);Qb.prototype.constructor=Qb;wc.prototype=Object.create(S.prototype);wc.prototype.constructor=wc;xc.prototype=Object.create(S.prototype);xc.prototype.constructor=xc;Rb.prototype=Object.create(H.prototype);Rb.prototype.constructor=
-Rb;yc.prototype=Object.create(S.prototype);yc.prototype.constructor=yc;$a.prototype=Object.create(S.prototype);$a.prototype.constructor=$a;$a.prototype.addShapeList=function(a,b){for(var c=0,d=a.length;c<d;c++)this.addShape(a[c],b);return this};$a.prototype.addShape=function(a,b){void 0===b&&(b={});var c=b.material,d=void 0===b.UVGenerator?ta.WorldUVGenerator:b.UVGenerator,e,f,g,k=this.vertices.length;e=a.extractPoints(void 0!==b.curveSegments?b.curveSegments:12);var l=e.shape,n=e.holes;if(!h.ShapeUtils.isClockWise(l))for(l=
-l.reverse(),e=0,f=n.length;e<f;e++)g=n[e],h.ShapeUtils.isClockWise(g)&&(n[e]=g.reverse());var r=h.ShapeUtils.triangulateShape(l,n);e=0;for(f=n.length;e<f;e++)g=n[e],l=l.concat(g);n=l.length;f=r.length;for(e=0;e<n;e++)g=l[e],this.vertices.push(new q(g.x,g.y,0));for(e=0;e<f;e++)n=r[e],l=n[0]+k,g=n[1]+k,n=n[2]+k,this.faces.push(new la(l,g,n,null,null,c)),this.faceVertexUvs[0].push(d.generateTopUV(this,l,g,n))};Sb.prototype=Object.create(H.prototype);Sb.prototype.constructor=Sb;ab.prototype=Object.create(H.prototype);
-ab.prototype.constructor=ab;rb.prototype=Object.create(S.prototype);rb.prototype.constructor=rb;zc.prototype=Object.create(rb.prototype);zc.prototype.constructor=zc;Ac.prototype=Object.create(H.prototype);Ac.prototype.constructor=Ac;Tb.prototype=Object.create(H.prototype);Tb.prototype.constructor=Tb;Bc.prototype=Object.create(S.prototype);Bc.prototype.constructor=Bc;sb.prototype=Object.create(S.prototype);sb.prototype.constructor=sb;var ua=Object.freeze({WireframeGeometry:Mb,ParametricGeometry:oc,
-TetrahedronGeometry:pc,OctahedronGeometry:qc,IcosahedronGeometry:rc,DodecahedronGeometry:sc,PolyhedronGeometry:pa,TubeGeometry:za,TorusKnotGeometry:tc,TorusKnotBufferGeometry:Nb,TorusGeometry:uc,TorusBufferGeometry:Ob,TextGeometry:vc,SphereBufferGeometry:qb,SphereGeometry:Pb,RingGeometry:wc,RingBufferGeometry:Qb,PlaneBufferGeometry:eb,PlaneGeometry:xc,LatheGeometry:yc,LatheBufferGeometry:Rb,ShapeGeometry:$a,ExtrudeGeometry:ta,EdgesGeometry:Sb,ConeGeometry:zc,ConeBufferGeometry:Ac,CylinderGeometry:rb,
-CylinderBufferGeometry:ab,CircleBufferGeometry:Tb,CircleGeometry:Bc,BoxBufferGeometry:db,BoxGeometry:sb});Object.assign(le.prototype,{load:function(a,b,c,d){""===this.texturePath&&(this.texturePath=a.substring(0,a.lastIndexOf("/")+1));var e=this;(new wa(e.manager)).load(a,function(a){e.parse(JSON.parse(a),b)},c,d)},setTexturePath:function(a){this.texturePath=a},setCrossOrigin:function(a){this.crossOrigin=a},parse:function(a,b){var c=this.parseGeometries(a.geometries),d=this.parseImages(a.images,function(){void 0!==
-b&&b(e)}),d=this.parseTextures(a.textures,d),d=this.parseMaterials(a.materials,d),e=this.parseObject(a.object,c,d);a.animations&&(e.animations=this.parseAnimations(a.animations));void 0!==a.images&&0!==a.images.length||void 0===b||b(e);return e},parseGeometries:function(a){var b={};if(void 0!==a)for(var c=new xd,d=new wd,e=0,f=a.length;e<f;e++){var g,k=a[e];switch(k.type){case "PlaneGeometry":case "PlaneBufferGeometry":g=new ua[k.type](k.width,k.height,k.widthSegments,k.heightSegments);break;case "BoxGeometry":case "BoxBufferGeometry":case "CubeGeometry":g=
-new ua[k.type](k.width,k.height,k.depth,k.widthSegments,k.heightSegments,k.depthSegments);break;case "CircleGeometry":case "CircleBufferGeometry":g=new ua[k.type](k.radius,k.segments,k.thetaStart,k.thetaLength);break;case "CylinderGeometry":case "CylinderBufferGeometry":g=new ua[k.type](k.radiusTop,k.radiusBottom,k.height,k.radialSegments,k.heightSegments,k.openEnded,k.thetaStart,k.thetaLength);break;case "ConeGeometry":case "ConeBufferGeometry":g=new ua[k.type](k.radius,k.height,k.radialSegments,
-k.heightSegments,k.openEnded,k.thetaStart,k.thetaLength);break;case "SphereGeometry":case "SphereBufferGeometry":g=new ua[k.type](k.radius,k.widthSegments,k.heightSegments,k.phiStart,k.phiLength,k.thetaStart,k.thetaLength);break;case "DodecahedronGeometry":case "IcosahedronGeometry":case "OctahedronGeometry":case "TetrahedronGeometry":g=new ua[k.type](k.radius,k.detail);break;case "RingGeometry":case "RingBufferGeometry":g=new ua[k.type](k.innerRadius,k.outerRadius,k.thetaSegments,k.phiSegments,k.thetaStart,
-k.thetaLength);break;case "TorusGeometry":case "TorusBufferGeometry":g=new ua[k.type](k.radius,k.tube,k.radialSegments,k.tubularSegments,k.arc);break;case "TorusKnotGeometry":case "TorusKnotBufferGeometry":g=new ua[k.type](k.radius,k.tube,k.tubularSegments,k.radialSegments,k.p,k.q);break;case "LatheGeometry":case "LatheBufferGeometry":g=new ua[k.type](k.points,k.segments,k.phiStart,k.phiLength);break;case "BufferGeometry":g=d.parse(k);break;case "Geometry":g=c.parse(k.data,this.texturePath).geometry;
-break;default:console.warn('THREE.ObjectLoader: Unsupported geometry type "'+k.type+'"');continue}g.uuid=k.uuid;void 0!==k.name&&(g.name=k.name);b[k.uuid]=g}return b},parseMaterials:function(a,b){var c={};if(void 0!==a){var d=new fd;d.setTextures(b);for(var e=0,f=a.length;e<f;e++){var g=d.parse(a[e]);c[g.uuid]=g}}return c},parseAnimations:function(a){for(var b=[],c=0;c<a.length;c++){var d=sa.parse(a[c]);b.push(d)}return b},parseImages:function(a,b){function c(a){d.manager.itemStart(a);return g.load(a,
-function(){d.manager.itemEnd(a)},void 0,function(){d.manager.itemError(a)})}var d=this,e={};if(void 0!==a&&0<a.length){var f=new td(b),g=new lc(f);g.setCrossOrigin(this.crossOrigin);for(var f=0,k=a.length;f<k;f++){var h=a[f],n=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(h.url)?h.url:d.texturePath+h.url;e[h.uuid]=c(n)}}return e},parseTextures:function(a,b){function c(a,b){if("number"===typeof a)return a;console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",a);return b[a]}var d={};
-if(void 0!==a)for(var e=0,f=a.length;e<f;e++){var g=a[e];void 0===g.image&&console.warn('THREE.ObjectLoader: No "image" specified for',g.uuid);void 0===b[g.image]&&console.warn("THREE.ObjectLoader: Undefined image",g.image);var k=new Z(b[g.image]);k.needsUpdate=!0;k.uuid=g.uuid;void 0!==g.name&&(k.name=g.name);void 0!==g.mapping&&(k.mapping=c(g.mapping,te));void 0!==g.offset&&k.offset.fromArray(g.offset);void 0!==g.repeat&&k.repeat.fromArray(g.repeat);void 0!==g.wrap&&(k.wrapS=c(g.wrap[0],Pd),k.wrapT=
-c(g.wrap[1],Pd));void 0!==g.minFilter&&(k.minFilter=c(g.minFilter,Qd));void 0!==g.magFilter&&(k.magFilter=c(g.magFilter,Qd));void 0!==g.anisotropy&&(k.anisotropy=g.anisotropy);void 0!==g.flipY&&(k.flipY=g.flipY);d[g.uuid]=k}return d},parseObject:function(){var a=new Q;return function(b,c,d){function e(a){void 0===c[a]&&console.warn("THREE.ObjectLoader: Undefined geometry",a);return c[a]}function f(a){if(void 0!==a)return void 0===d[a]&&console.warn("THREE.ObjectLoader: Undefined material",a),d[a]}
-var g;switch(b.type){case "Scene":g=new fb;void 0!==b.background&&Number.isInteger(b.background)&&(g.background=new I(b.background));void 0!==b.fog&&("Fog"===b.fog.type?g.fog=new Fb(b.fog.color,b.fog.near,b.fog.far):"FogExp2"===b.fog.type&&(g.fog=new Eb(b.fog.color,b.fog.density)));break;case "PerspectiveCamera":g=new Ca(b.fov,b.aspect,b.near,b.far);void 0!==b.focus&&(g.focus=b.focus);void 0!==b.zoom&&(g.zoom=b.zoom);void 0!==b.filmGauge&&(g.filmGauge=b.filmGauge);void 0!==b.filmOffset&&(g.filmOffset=
-b.filmOffset);void 0!==b.view&&(g.view=Object.assign({},b.view));break;case "OrthographicCamera":g=new Db(b.left,b.right,b.top,b.bottom,b.near,b.far);break;case "AmbientLight":g=new Zc(b.color,b.intensity);break;case "DirectionalLight":g=new Yc(b.color,b.intensity);break;case "PointLight":g=new Wc(b.color,b.intensity,b.distance,b.decay);break;case "SpotLight":g=new Vc(b.color,b.intensity,b.distance,b.angle,b.penumbra,b.decay);break;case "HemisphereLight":g=new Tc(b.color,b.groundColor,b.intensity);
-break;case "Mesh":g=e(b.geometry);var k=f(b.material);g=g.bones&&0<g.bones.length?new Pc(g,k):new va(g,k);break;case "LOD":g=new hc;break;case "Line":g=new Qa(e(b.geometry),f(b.material),b.mode);break;case "LineSegments":g=new ba(e(b.geometry),f(b.material));break;case "PointCloud":case "Points":g=new Gb(e(b.geometry),f(b.material));break;case "Sprite":g=new gc(f(b.material));break;case "Group":g=new ic;break;default:g=new D}g.uuid=b.uuid;void 0!==b.name&&(g.name=b.name);void 0!==b.matrix?(a.fromArray(b.matrix),
-a.decompose(g.position,g.quaternion,g.scale)):(void 0!==b.position&&g.position.fromArray(b.position),void 0!==b.rotation&&g.rotation.fromArray(b.rotation),void 0!==b.quaternion&&g.quaternion.fromArray(b.quaternion),void 0!==b.scale&&g.scale.fromArray(b.scale));void 0!==b.castShadow&&(g.castShadow=b.castShadow);void 0!==b.receiveShadow&&(g.receiveShadow=b.receiveShadow);b.shadow&&(void 0!==b.shadow.bias&&(g.shadow.bias=b.shadow.bias),void 0!==b.shadow.radius&&(g.shadow.radius=b.shadow.radius),void 0!==
-b.shadow.mapSize&&g.shadow.mapSize.fromArray(b.shadow.mapSize),void 0!==b.shadow.camera&&(g.shadow.camera=this.parseObject(b.shadow.camera)));void 0!==b.visible&&(g.visible=b.visible);void 0!==b.userData&&(g.userData=b.userData);if(void 0!==b.children)for(var h in b.children)g.add(this.parseObject(b.children[h],c,d));if("LOD"===b.type)for(b=b.levels,k=0;k<b.length;k++){var n=b[k];h=g.getObjectByProperty("uuid",n.object);void 0!==h&&g.addLevel(h,n.distance)}return g}}()});qa.prototype={constructor:qa,
-getPoint:function(a){console.warn("THREE.Curve: Warning, getPoint() not implemented!");return null},getPointAt:function(a){a=this.getUtoTmapping(a);return this.getPoint(a)},getPoints:function(a){a||(a=5);for(var b=[],c=0;c<=a;c++)b.push(this.getPoint(c/a));return b},getSpacedPoints:function(a){a||(a=5);for(var b=[],c=0;c<=a;c++)b.push(this.getPointAt(c/a));return b},getLength:function(){var a=this.getLengths();return a[a.length-1]},getLengths:function(a){a||(a=this.__arcLengthDivisions?this.__arcLengthDivisions:
-200);if(this.cacheArcLengths&&this.cacheArcLengths.length===a+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var b=[],c,d=this.getPoint(0),e,f=0;b.push(0);for(e=1;e<=a;e++)c=this.getPoint(e/a),f+=c.distanceTo(d),b.push(f),d=c;return this.cacheArcLengths=b},updateArcLengths:function(){this.needsUpdate=!0;this.getLengths()},getUtoTmapping:function(a,b){var c=this.getLengths(),d,e=c.length,f;f=b?b:a*c[e-1];for(var g=0,k=e-1,h;g<=k;)if(d=Math.floor(g+(k-g)/2),h=c[d]-f,0>h)g=d+1;
-else if(0<h)k=d-1;else{k=d;break}d=k;if(c[d]===f)return d/(e-1);g=c[d];return(d+(f-g)/(c[d+1]-g))/(e-1)},getTangent:function(a){var b=a-1E-4;a+=1E-4;0>b&&(b=0);1<a&&(a=1);b=this.getPoint(b);return this.getPoint(a).clone().sub(b).normalize()},getTangentAt:function(a){a=this.getUtoTmapping(a);return this.getTangent(a)}};qa.create=function(a,b){a.prototype=Object.create(qa.prototype);a.prototype.constructor=a;a.prototype.getPoint=b;return a};Ma.prototype=Object.create(qa.prototype);Ma.prototype.constructor=
-Ma;Ma.prototype.isLineCurve=!0;Ma.prototype.getPoint=function(a){if(1===a)return this.v2.clone();var b=this.v2.clone().sub(this.v1);b.multiplyScalar(a).add(this.v1);return b};Ma.prototype.getPointAt=function(a){return this.getPoint(a)};Ma.prototype.getTangent=function(a){return this.v2.clone().sub(this.v1).normalize()};Cc.prototype=Object.assign(Object.create(qa.prototype),{constructor:Cc,add:function(a){this.curves.push(a)},closePath:function(){var a=this.curves[0].getPoint(0),b=this.curves[this.curves.length-
-1].getPoint(1);a.equals(b)||this.curves.push(new Ma(b,a))},getPoint:function(a){var b=a*this.getLength(),c=this.getCurveLengths();for(a=0;a<c.length;){if(c[a]>=b)return b=c[a]-b,a=this.curves[a],c=a.getLength(),a.getPointAt(0===c?0:1-b/c);a++}return null},getLength:function(){var a=this.getCurveLengths();return a[a.length-1]},updateArcLengths:function(){this.needsUpdate=!0;this.cacheLengths=null;this.getLengths()},getCurveLengths:function(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;
-for(var a=[],b=0,c=0,d=this.curves.length;c<d;c++)b+=this.curves[c].getLength(),a.push(b);return this.cacheLengths=a},getSpacedPoints:function(a){a||(a=40);for(var b=[],c=0;c<=a;c++)b.push(this.getPoint(c/a));this.autoClose&&b.push(b[0]);return b},getPoints:function(a){a=a||12;for(var b=[],c,d=0,e=this.curves;d<e.length;d++)for(var f=e[d],f=f.getPoints(f&&f.isEllipseCurve?2*a:f&&f.isLineCurve?1:f&&f.isSplineCurve?a*f.points.length:a),g=0;g<f.length;g++){var k=f[g];c&&c.equals(k)||(b.push(k),c=k)}this.autoClose&&
-1<b.length&&!b[b.length-1].equals(b[0])&&b.push(b[0]);return b},createPointsGeometry:function(a){a=this.getPoints(a);return this.createGeometry(a)},createSpacedPointsGeometry:function(a){a=this.getSpacedPoints(a);return this.createGeometry(a)},createGeometry:function(a){for(var b=new S,c=0,d=a.length;c<d;c++){var e=a[c];b.vertices.push(new q(e.x,e.y,e.z||0))}return b}});Sa.prototype=Object.create(qa.prototype);Sa.prototype.constructor=Sa;Sa.prototype.isEllipseCurve=!0;Sa.prototype.getPoint=function(a){for(var b=
-2*Math.PI,c=this.aEndAngle-this.aStartAngle,d=Math.abs(c)<Number.EPSILON;0>c;)c+=b;for(;c>b;)c-=b;c<Number.EPSILON&&(c=d?0:b);!0!==this.aClockwise||d||(c=c===b?-b:c-b);b=this.aStartAngle+a*c;a=this.aX+this.xRadius*Math.cos(b);var e=this.aY+this.yRadius*Math.sin(b);0!==this.aRotation&&(b=Math.cos(this.aRotation),c=Math.sin(this.aRotation),d=a-this.aX,e-=this.aY,a=d*b-e*c+this.aX,e=d*c+e*b+this.aY);return new B(a,e)};h.CurveUtils={tangentQuadraticBezier:function(a,b,c,d){return 2*(1-a)*(c-b)+2*a*(d-
-c)},tangentCubicBezier:function(a,b,c,d,e){return-3*b*(1-a)*(1-a)+3*c*(1-a)*(1-a)-6*a*c*(1-a)+6*a*d*(1-a)-3*a*a*d+3*a*a*e},tangentSpline:function(a,b,c,d,e){return 6*a*a-6*a+(3*a*a-4*a+1)+(-6*a*a+6*a)+(3*a*a-2*a)},interpolate:function(a,b,c,d,e){a=.5*(c-a);d=.5*(d-b);var f=e*e;return(2*b-2*c+a+d)*e*f+(-3*b+3*c-2*a-d)*f+a*e+b}};tb.prototype=Object.create(qa.prototype);tb.prototype.constructor=tb;tb.prototype.isSplineCurve=!0;tb.prototype.getPoint=function(a){var b=this.points;a*=b.length-1;var c=Math.floor(a);
-a-=c;var d=b[0===c?c:c-1],e=b[c],f=b[c>b.length-2?b.length-1:c+1],b=b[c>b.length-3?b.length-1:c+2],c=h.CurveUtils.interpolate;return new B(c(d.x,e.x,f.x,b.x,a),c(d.y,e.y,f.y,b.y,a))};ub.prototype=Object.create(qa.prototype);ub.prototype.constructor=ub;ub.prototype.getPoint=function(a){var b=h.ShapeUtils.b3;return new B(b(a,this.v0.x,this.v1.x,this.v2.x,this.v3.x),b(a,this.v0.y,this.v1.y,this.v2.y,this.v3.y))};ub.prototype.getTangent=function(a){var b=h.CurveUtils.tangentCubicBezier;return(new B(b(a,
-this.v0.x,this.v1.x,this.v2.x,this.v3.x),b(a,this.v0.y,this.v1.y,this.v2.y,this.v3.y))).normalize()};vb.prototype=Object.create(qa.prototype);vb.prototype.constructor=vb;vb.prototype.getPoint=function(a){var b=h.ShapeUtils.b2;return new B(b(a,this.v0.x,this.v1.x,this.v2.x),b(a,this.v0.y,this.v1.y,this.v2.y))};vb.prototype.getTangent=function(a){var b=h.CurveUtils.tangentQuadraticBezier;return(new B(b(a,this.v0.x,this.v1.x,this.v2.x),b(a,this.v0.y,this.v1.y,this.v2.y))).normalize()};var Rd=Object.assign(Object.create(Cc.prototype),
-{fromPoints:function(a){this.moveTo(a[0].x,a[0].y);for(var b=1,c=a.length;b<c;b++)this.lineTo(a[b].x,a[b].y)},moveTo:function(a,b){this.currentPoint.set(a,b)},lineTo:function(a,b){var c=new Ma(this.currentPoint.clone(),new B(a,b));this.curves.push(c);this.currentPoint.set(a,b)},quadraticCurveTo:function(a,b,c,d){a=new vb(this.currentPoint.clone(),new B(a,b),new B(c,d));this.curves.push(a);this.currentPoint.set(c,d)},bezierCurveTo:function(a,b,c,d,e,f){a=new ub(this.currentPoint.clone(),new B(a,b),
-new B(c,d),new B(e,f));this.curves.push(a);this.currentPoint.set(e,f)},splineThru:function(a){var b=[this.currentPoint.clone()].concat(a),b=new tb(b);this.curves.push(b);this.currentPoint.copy(a[a.length-1])},arc:function(a,b,c,d,e,f){this.absarc(a+this.currentPoint.x,b+this.currentPoint.y,c,d,e,f)},absarc:function(a,b,c,d,e,f){this.absellipse(a,b,c,c,d,e,f)},ellipse:function(a,b,c,d,e,f,g,k){this.absellipse(a+this.currentPoint.x,b+this.currentPoint.y,c,d,e,f,g,k)},absellipse:function(a,b,c,d,e,f,
-g,k){a=new Sa(a,b,c,d,e,f,g,k);0<this.curves.length&&(b=a.getPoint(0),b.equals(this.currentPoint)||this.lineTo(b.x,b.y));this.curves.push(a);a=a.getPoint(1);this.currentPoint.copy(a)}});Ub.prototype=Object.assign(Object.create(Rd),{constructor:Ub,extrude:function(a){return new ta(this,a)},makeGeometry:function(a){return new $a(this,a)},getPointsHoles:function(a){for(var b=[],c=0,d=this.holes.length;c<d;c++)b[c]=this.holes[c].getPoints(a);return b},extractAllPoints:function(a){return{shape:this.getPoints(a),
-holes:this.getPointsHoles(a)}},extractPoints:function(a){return this.extractAllPoints(a)}});Dc.prototype=Rd;Rd.constructor=Dc;yd.prototype={moveTo:function(a,b){this.currentPath=new Dc;this.subPaths.push(this.currentPath);this.currentPath.moveTo(a,b)},lineTo:function(a,b){this.currentPath.lineTo(a,b)},quadraticCurveTo:function(a,b,c,d){this.currentPath.quadraticCurveTo(a,b,c,d)},bezierCurveTo:function(a,b,c,d,e,f){this.currentPath.bezierCurveTo(a,b,c,d,e,f)},splineThru:function(a){this.currentPath.splineThru(a)},
-toShapes:function(a,b){function c(a){for(var b=[],c=0,d=a.length;c<d;c++){var e=a[c],f=new Ub;f.curves=e.curves;b.push(f)}return b}function d(a,b){for(var c=b.length,d=!1,e=c-1,f=0;f<c;e=f++){var g=b[e],k=b[f],h=k.x-g.x,l=k.y-g.y;if(Math.abs(l)>Number.EPSILON){if(0>l&&(g=b[f],h=-h,k=b[e],l=-l),!(a.y<g.y||a.y>k.y))if(a.y===g.y){if(a.x===g.x)return!0}else{e=l*(a.x-g.x)-h*(a.y-g.y);if(0===e)return!0;0>e||(d=!d)}}else if(a.y===g.y&&(k.x<=a.x&&a.x<=g.x||g.x<=a.x&&a.x<=k.x))return!0}return d}var e=h.ShapeUtils.isClockWise,
-f=this.subPaths;if(0===f.length)return[];if(!0===b)return c(f);var g,k,l,n=[];if(1===f.length)return k=f[0],l=new Ub,l.curves=k.curves,n.push(l),n;var r=!e(f[0].getPoints()),r=a?!r:r;l=[];var p=[],m=[],q=0,u;p[q]=void 0;m[q]=[];for(var v=0,z=f.length;v<z;v++)k=f[v],u=k.getPoints(),g=e(u),(g=a?!g:g)?(!r&&p[q]&&q++,p[q]={s:new Ub,p:u},p[q].s.curves=k.curves,r&&q++,m[q]=[]):m[q].push({h:k,p:u[0]});if(!p[0])return c(f);if(1<p.length){v=!1;k=[];e=0;for(f=p.length;e<f;e++)l[e]=[];e=0;for(f=p.length;e<f;e++)for(g=
-m[e],r=0;r<g.length;r++){q=g[r];u=!0;for(z=0;z<p.length;z++)d(q.p,p[z].p)&&(e!==z&&k.push({froms:e,tos:z,hole:r}),u?(u=!1,l[z].push(q)):v=!0);u&&l[e].push(q)}0<k.length&&(v||(m=l))}v=0;for(e=p.length;v<e;v++)for(l=p[v].s,n.push(l),k=m[v],f=0,g=k.length;f<g;f++)l.holes.push(k[f].h);return n}};Object.assign(zd.prototype,{isFont:!0,generateShapes:function(a,b,c){void 0===b&&(b=100);void 0===c&&(c=4);var d=this.data;a=String(a).split("");var e=b/d.resolution,f=0;b=[];for(var g=0;g<a.length;g++){var k;
-k=e;var l=f,n=d.glyphs[a[g]]||d.glyphs["?"];if(n){var r=new yd,p=[],m=h.ShapeUtils.b2,q=h.ShapeUtils.b3,u,v,z,w,x,B,y,D;if(n.o)for(var C=n._cachedOutline||(n._cachedOutline=n.o.split(" ")),E=0,I=C.length;E<I;)switch(C[E++]){case "m":u=C[E++]*k+l;v=C[E++]*k;r.moveTo(u,v);break;case "l":u=C[E++]*k+l;v=C[E++]*k;r.lineTo(u,v);break;case "q":u=C[E++]*k+l;v=C[E++]*k;x=C[E++]*k+l;B=C[E++]*k;r.quadraticCurveTo(x,B,u,v);if(w=p[p.length-1]){z=w.x;w=w.y;for(var H=1;H<=c;H++){var M=H/c;m(M,z,x,u);m(M,w,B,v)}}break;
-case "b":if(u=C[E++]*k+l,v=C[E++]*k,x=C[E++]*k+l,B=C[E++]*k,y=C[E++]*k+l,D=C[E++]*k,r.bezierCurveTo(x,B,y,D,u,v),w=p[p.length-1])for(z=w.x,w=w.y,H=1;H<=c;H++)M=H/c,q(M,z,x,y,u),q(M,w,B,D,v)}k={offset:n.ha*k,path:r}}else k=void 0;f+=k.offset;b.push(k.path)}c=[];d=0;for(a=b.length;d<a;d++)Array.prototype.push.apply(c,b[d].toShapes());return c}});Object.assign(me.prototype,{load:function(a,b,c,d){var e=this;(new wa(this.manager)).load(a,function(a){var c;try{c=JSON.parse(a)}catch(d){console.warn("THREE.FontLoader: typeface.js support is being deprecated. Use typeface.json instead."),
-c=JSON.parse(a.substring(65,a.length-2))}a=e.parse(c);b&&b(a)},c,d)},parse:function(a){return new zd(a)}});var Bd;Object.assign(Cd.prototype,{load:function(a,b,c,d){var e=new wa(this.manager);e.setResponseType("arraybuffer");e.load(a,function(a){Ad().decodeAudioData(a,function(a){b(a)})},c,d)}});Object.assign(ne.prototype,{update:function(){var a,b,c,d,e,f=new Q,g=new Q;return function(k){if(a!==k.focus||b!==k.fov||c!==k.aspect*this.aspect||d!==k.near||e!==k.far){a=k.focus;b=k.fov;c=k.aspect*this.aspect;
-d=k.near;e=k.far;var l=k.projectionMatrix.clone(),n=this.eyeSep/2,r=n*d/a,p=d*Math.tan(h.Math.DEG2RAD*b*.5),m;g.elements[12]=-n;f.elements[12]=n;n=-p*c+r;m=p*c+r;l.elements[0]=2*d/(m-n);l.elements[8]=(m+n)/(m-n);this.cameraL.projectionMatrix.copy(l);n=-p*c-r;m=p*c-r;l.elements[0]=2*d/(m-n);l.elements[8]=(m+n)/(m-n);this.cameraR.projectionMatrix.copy(l)}this.cameraL.matrixWorld.copy(k.matrixWorld).multiply(g);this.cameraR.matrixWorld.copy(k.matrixWorld).multiply(f)}}()});gd.prototype=Object.create(D.prototype);
-gd.prototype.constructor=gd;Dd.prototype=Object.assign(Object.create(D.prototype),{constructor:Dd,getInput:function(){return this.gain},removeFilter:function(){null!==this.filter&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null)},getFilter:function(){return this.filter},setFilter:function(a){null!==this.filter?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination);
-this.filter=a;this.gain.connect(this.filter);this.filter.connect(this.context.destination)},getMasterVolume:function(){return this.gain.gain.value},setMasterVolume:function(a){this.gain.gain.value=a},updateMatrixWorld:function(){var a=new q,b=new oa,c=new q,d=new q;return function(e){D.prototype.updateMatrixWorld.call(this,e);e=this.context.listener;var f=this.up;this.matrixWorld.decompose(a,b,c);d.set(0,0,-1).applyQuaternion(b);e.setPosition(a.x,a.y,a.z);e.setOrientation(d.x,d.y,d.z,f.x,f.y,f.z)}}()});
-Vb.prototype=Object.assign(Object.create(D.prototype),{constructor:Vb,getOutput:function(){return this.gain},setNodeSource:function(a){this.hasPlaybackControl=!1;this.sourceType="audioNode";this.source=a;this.connect();return this},setBuffer:function(a){this.source.buffer=a;this.sourceType="buffer";this.autoplay&&this.play();return this},play:function(){if(!0===this.isPlaying)console.warn("THREE.Audio: Audio is already playing.");else if(!1===this.hasPlaybackControl)console.warn("THREE.Audio: this Audio has no playback control.");
+updateMorphTargets:function(){var a=this.geometry.morphTargets;if(void 0!==a&&0<a.length){this.morphTargetInfluences=[];this.morphTargetDictionary={};for(var b=0,c=a.length;b<c;b++)this.morphTargetInfluences.push(0),this.morphTargetDictionary[a[b].name]=b}},raycast:function(){function a(a,b,c,d,e,f,g){Ga.barycoordFromPoint(a,b,c,d,v);e.multiplyScalar(v.x);f.multiplyScalar(v.y);g.multiplyScalar(v.z);e.add(f).add(g);return e.clone()}function b(a,b,c,d,e,f,g){var k=a.material;if(null===(1===k.side?c.intersectTriangle(f,
+e,d,!0,g):c.intersectTriangle(d,e,f,2!==k.side,g)))return null;w.copy(g);w.applyMatrix4(a.matrixWorld);c=b.ray.origin.distanceTo(w);return c<b.near||c>b.far?null:{distance:c,point:w.clone(),object:a}}function c(c,d,e,f,n,p,r,q){g.fromArray(f,3*p);k.fromArray(f,3*r);h.fromArray(f,3*q);if(c=b(c,d,e,g,k,h,z))n&&(m.fromArray(n,2*p),t.fromArray(n,2*r),u.fromArray(n,2*q),c.uv=a(z,g,k,h,m,t,u)),c.face=new la(p,r,q,Ga.normal(g,k,h)),c.faceIndex=p;return c}var d=new Q,e=new Ya,f=new Aa,g=new q,k=new q,h=new q,
+n=new q,r=new q,p=new q,m=new B,t=new B,u=new B,v=new q,z=new q,w=new q;return function(q,v){var w=this.geometry,F=this.material,G=this.matrixWorld;if(void 0!==F&&(null===w.boundingSphere&&w.computeBoundingSphere(),f.copy(w.boundingSphere),f.applyMatrix4(G),!1!==q.ray.intersectsSphere(f)&&(d.getInverse(G),e.copy(q.ray).applyMatrix4(d),null===w.boundingBox||!1!==e.intersectsBox(w.boundingBox)))){var E,K;if(w&&w.isBufferGeometry){var B,C,F=w.index,G=w.attributes,w=G.position.array;void 0!==G.uv&&(E=
+G.uv.array);if(null!==F)for(var G=F.array,D=0,H=G.length;D<H;D+=3){if(F=G[D],B=G[D+1],C=G[D+2],K=c(this,q,e,w,E,F,B,C))K.faceIndex=Math.floor(D/3),v.push(K)}else for(D=0,H=w.length;D<H;D+=9)if(F=D/3,B=F+1,C=F+2,K=c(this,q,e,w,E,F,B,C))K.index=F,v.push(K)}else if(w&&w.isGeometry){var I,Q,G=F&&F.isMultiMaterial,D=!0===G?F.materials:null,H=w.vertices;B=w.faces;C=w.faceVertexUvs[0];0<C.length&&(E=C);for(var L=0,O=B.length;L<O;L++){var P=B[L];K=!0===G?D[P.materialIndex]:F;if(void 0!==K){C=H[P.a];I=H[P.b];
+Q=H[P.c];if(!0===K.morphTargets){K=w.morphTargets;var R=this.morphTargetInfluences;g.set(0,0,0);k.set(0,0,0);h.set(0,0,0);for(var T=0,V=K.length;T<V;T++){var W=R[T];if(0!==W){var J=K[T].vertices;g.addScaledVector(n.subVectors(J[P.a],C),W);k.addScaledVector(r.subVectors(J[P.b],I),W);h.addScaledVector(p.subVectors(J[P.c],Q),W)}}g.add(C);k.add(I);h.add(Q);C=g;I=k;Q=h}if(K=b(this,q,e,C,I,Q,z))E&&(R=E[L],m.copy(R[0]),t.copy(R[1]),u.copy(R[2]),K.uv=a(z,C,I,Q,m,t,u)),K.face=P,K.faceIndex=L,v.push(K)}}}}}}(),
+clone:function(){return(new this.constructor(this.geometry,this.material)).copy(this)}});eb.prototype=Object.create(H.prototype);eb.prototype.constructor=eb;ma.prototype=Object.create(D.prototype);ma.prototype.constructor=ma;ma.prototype.isCamera=!0;ma.prototype.getWorldDirection=function(){var a=new oa;return function(b){b=b||new q;this.getWorldQuaternion(a);return b.set(0,0,-1).applyQuaternion(a)}}();ma.prototype.lookAt=function(){var a=new Q;return function(b){a.lookAt(this.position,b,this.up);
+this.quaternion.setFromRotationMatrix(a)}}();ma.prototype.clone=function(){return(new this.constructor).copy(this)};ma.prototype.copy=function(a){D.prototype.copy.call(this,a);this.matrixWorldInverse.copy(a.matrixWorldInverse);this.projectionMatrix.copy(a.projectionMatrix);return this};Ca.prototype=Object.assign(Object.create(ma.prototype),{constructor:Ca,isPerspectiveCamera:!0,copy:function(a){ma.prototype.copy.call(this,a);this.fov=a.fov;this.zoom=a.zoom;this.near=a.near;this.far=a.far;this.focus=
+a.focus;this.aspect=a.aspect;this.view=null===a.view?null:Object.assign({},a.view);this.filmGauge=a.filmGauge;this.filmOffset=a.filmOffset;return this},setFocalLength:function(a){a=.5*this.getFilmHeight()/a;this.fov=2*h.Math.RAD2DEG*Math.atan(a);this.updateProjectionMatrix()},getFocalLength:function(){var a=Math.tan(.5*h.Math.DEG2RAD*this.fov);return.5*this.getFilmHeight()/a},getEffectiveFOV:function(){return 2*h.Math.RAD2DEG*Math.atan(Math.tan(.5*h.Math.DEG2RAD*this.fov)/this.zoom)},getFilmWidth:function(){return this.filmGauge*
+Math.min(this.aspect,1)},getFilmHeight:function(){return this.filmGauge/Math.max(this.aspect,1)},setViewOffset:function(a,b,c,d,e,f){this.aspect=a/b;this.view={fullWidth:a,fullHeight:b,offsetX:c,offsetY:d,width:e,height:f};this.updateProjectionMatrix()},clearViewOffset:function(){this.view=null;this.updateProjectionMatrix()},updateProjectionMatrix:function(){var a=this.near,b=a*Math.tan(.5*h.Math.DEG2RAD*this.fov)/this.zoom,c=2*b,d=this.aspect*c,e=-.5*d,f=this.view;if(null!==f)var g=f.fullWidth,k=
+f.fullHeight,e=e+f.offsetX*d/g,b=b-f.offsetY*c/k,d=f.width/g*d,c=f.height/k*c;f=this.filmOffset;0!==f&&(e+=a*f/this.getFilmWidth());this.projectionMatrix.makeFrustum(e,e+d,b-c,b,a,this.far)},toJSON:function(a){a=D.prototype.toJSON.call(this,a);a.object.fov=this.fov;a.object.zoom=this.zoom;a.object.near=this.near;a.object.far=this.far;a.object.focus=this.focus;a.object.aspect=this.aspect;null!==this.view&&(a.object.view=Object.assign({},this.view));a.object.filmGauge=this.filmGauge;a.object.filmOffset=
+this.filmOffset;return a}});Db.prototype=Object.assign(Object.create(ma.prototype),{constructor:Db,isOrthographicCamera:!0,copy:function(a){ma.prototype.copy.call(this,a);this.left=a.left;this.right=a.right;this.top=a.top;this.bottom=a.bottom;this.near=a.near;this.far=a.far;this.zoom=a.zoom;this.view=null===a.view?null:Object.assign({},a.view);return this},setViewOffset:function(a,b,c,d,e,f){this.view={fullWidth:a,fullHeight:b,offsetX:c,offsetY:d,width:e,height:f};this.updateProjectionMatrix()},clearViewOffset:function(){this.view=
+null;this.updateProjectionMatrix()},updateProjectionMatrix:function(){var a=(this.right-this.left)/(2*this.zoom),b=(this.top-this.bottom)/(2*this.zoom),c=(this.right+this.left)/2,d=(this.top+this.bottom)/2,e=c-a,c=c+a,a=d+b,b=d-b;if(null!==this.view)var c=this.zoom/(this.view.width/this.view.fullWidth),b=this.zoom/(this.view.height/this.view.fullHeight),f=(this.right-this.left)/this.view.width,d=(this.top-this.bottom)/this.view.height,e=e+this.view.offsetX/c*f,c=e+this.view.width/c*f,a=a-this.view.offsetY/
+b*d,b=a-this.view.height/b*d;this.projectionMatrix.makeOrthographic(e,c,a,b,this.near,this.far)},toJSON:function(a){a=D.prototype.toJSON.call(this,a);a.object.zoom=this.zoom;a.object.left=this.left;a.object.right=this.right;a.object.top=this.top;a.object.bottom=this.bottom;a.object.near=this.near;a.object.far=this.far;null!==this.view&&(a.object.view=Object.assign({},this.view));return a}});var df=0;Eb.prototype.isFogExp2=!0;Eb.prototype.clone=function(){return new Eb(this.color.getHex(),this.density)};
+Eb.prototype.toJSON=function(a){return{type:"FogExp2",color:this.color.getHex(),density:this.density}};Fb.prototype.isFog=!0;Fb.prototype.clone=function(){return new Fb(this.color.getHex(),this.near,this.far)};Fb.prototype.toJSON=function(a){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}};fb.prototype=Object.create(D.prototype);fb.prototype.constructor=fb;fb.prototype.copy=function(a,b){D.prototype.copy.call(this,a,b);null!==a.background&&(this.background=a.background.clone());
+null!==a.fog&&(this.fog=a.fog.clone());null!==a.overrideMaterial&&(this.overrideMaterial=a.overrideMaterial.clone());this.autoUpdate=a.autoUpdate;this.matrixAutoUpdate=a.matrixAutoUpdate;return this};fb.prototype.toJSON=function(a){var b=D.prototype.toJSON.call(this,a);null!==this.background&&(b.object.background=this.background.toJSON(a));null!==this.fog&&(b.object.fog=this.fog.toJSON());return b};sd.prototype=Object.assign(Object.create(D.prototype),{constructor:sd,isLensFlare:!0,copy:function(a){D.prototype.copy.call(this,
+a);this.positionScreen.copy(a.positionScreen);this.customUpdateCallback=a.customUpdateCallback;for(var b=0,c=a.lensFlares.length;b<c;b++)this.lensFlares.push(a.lensFlares[b]);return this},add:function(a,b,c,d,e,f){void 0===b&&(b=-1);void 0===c&&(c=0);void 0===f&&(f=1);void 0===e&&(e=new I(16777215));void 0===d&&(d=1);c=Math.min(c,Math.max(0,c));this.lensFlares.push({texture:a,size:b,distance:c,x:0,y:0,z:0,scale:1,rotation:0,opacity:f,color:e,blending:d})},updateLensFlares:function(){var a,b=this.lensFlares.length,
+c,d=2*-this.positionScreen.x,e=2*-this.positionScreen.y;for(a=0;a<b;a++)c=this.lensFlares[a],c.x=this.positionScreen.x+d*c.distance,c.y=this.positionScreen.y+e*c.distance,c.wantedRotation=c.x*Math.PI*.25,c.rotation+=.25*(c.wantedRotation-c.rotation)}});gb.prototype=Object.create(T.prototype);gb.prototype.constructor=gb;gb.prototype.copy=function(a){T.prototype.copy.call(this,a);this.color.copy(a.color);this.map=a.map;this.rotation=a.rotation;return this};gc.prototype=Object.assign(Object.create(D.prototype),
+{constructor:gc,isSprite:!0,raycast:function(){var a=new q;return function(b,c){a.setFromMatrixPosition(this.matrixWorld);var d=b.ray.distanceSqToPoint(a);d>this.scale.x*this.scale.y/4||c.push({distance:Math.sqrt(d),point:this.position,face:null,object:this})}}(),clone:function(){return(new this.constructor(this.material)).copy(this)}});hc.prototype=Object.assign(Object.create(D.prototype),{constructor:hc,copy:function(a){D.prototype.copy.call(this,a,!1);a=a.levels;for(var b=0,c=a.length;b<c;b++){var d=
+a[b];this.addLevel(d.object.clone(),d.distance)}return this},addLevel:function(a,b){void 0===b&&(b=0);b=Math.abs(b);for(var c=this.levels,d=0;d<c.length&&!(b<c[d].distance);d++);c.splice(d,0,{distance:b,object:a});this.add(a)},getObjectForDistance:function(a){for(var b=this.levels,c=1,d=b.length;c<d&&!(a<b[c].distance);c++);return b[c-1].object},raycast:function(){var a=new q;return function(b,c){a.setFromMatrixPosition(this.matrixWorld);var d=b.ray.origin.distanceTo(a);this.getObjectForDistance(d).raycast(b,
+c)}}(),update:function(){var a=new q,b=new q;return function(c){var d=this.levels;if(1<d.length){a.setFromMatrixPosition(c.matrixWorld);b.setFromMatrixPosition(this.matrixWorld);c=a.distanceTo(b);d[0].object.visible=!0;for(var e=1,f=d.length;e<f;e++)if(c>=d[e].distance)d[e-1].object.visible=!1,d[e].object.visible=!0;else break;for(;e<f;e++)d[e].object.visible=!1}}}(),toJSON:function(a){a=D.prototype.toJSON.call(this,a);a.object.levels=[];for(var b=this.levels,c=0,d=b.length;c<d;c++){var e=b[c];a.object.levels.push({object:e.object.uuid,
+distance:e.distance})}return a}});hb.prototype=Object.create(Z.prototype);hb.prototype.constructor=hb;hb.prototype.isDataTexture=!0;Object.assign(Nc.prototype,{calculateInverses:function(){this.boneInverses=[];for(var a=0,b=this.bones.length;a<b;a++){var c=new Q;this.bones[a]&&c.getInverse(this.bones[a].matrixWorld);this.boneInverses.push(c)}},pose:function(){for(var a,b=0,c=this.bones.length;b<c;b++)(a=this.bones[b])&&a.matrixWorld.getInverse(this.boneInverses[b]);b=0;for(c=this.bones.length;b<c;b++)if(a=
+this.bones[b])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(){var a=new Q;return function(){for(var b=0,c=this.bones.length;b<c;b++)a.multiplyMatrices(this.bones[b]?this.bones[b].matrixWorld:this.identityMatrix,this.boneInverses[b]),a.toArray(this.boneMatrices,16*b);this.useVertexTexture&&(this.boneTexture.needsUpdate=!0)}}(),clone:function(){return new Nc(this.bones,
+this.boneInverses,this.useVertexTexture)}});Oc.prototype=Object.assign(Object.create(D.prototype),{constructor:Oc,isBone:!0,copy:function(a){D.prototype.copy.call(this,a);this.skin=a.skin;return this}});Pc.prototype=Object.assign(Object.create(va.prototype),{constructor:Pc,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(){if(this.geometry&&this.geometry.isGeometry)for(var a=0;a<this.geometry.skinWeights.length;a++){var b=this.geometry.skinWeights[a],c=1/b.lengthManhattan();Infinity!==c?b.multiplyScalar(c):b.set(1,0,0,0)}else if(this.geometry&&this.geometry.isBufferGeometry)for(var b=new da,d=this.geometry.attributes.skinWeight,a=0;a<d.count;a++)b.x=d.getX(a),b.y=d.getY(a),b.z=d.getZ(a),b.w=d.getW(a),c=1/b.lengthManhattan(),Infinity!==c?b.multiplyScalar(c):b.set(1,0,0,0),d.setXYZW(a,
+b.x,b.y,b.z,b.w)},updateMatrixWorld:function(a){va.prototype.updateMatrixWorld.call(this,!0);"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,this.skeleton.useVertexTexture)).copy(this)}});ga.prototype=Object.create(T.prototype);ga.prototype.constructor=
+ga;ga.prototype.isLineBasicMaterial=!0;ga.prototype.copy=function(a){T.prototype.copy.call(this,a);this.color.copy(a.color);this.linewidth=a.linewidth;this.linecap=a.linecap;this.linejoin=a.linejoin;return this};Qa.prototype=Object.assign(Object.create(D.prototype),{constructor:Qa,isLine:!0,raycast:function(){var a=new Q,b=new Ya,c=new Aa;return function(d,e){var f=d.linePrecision,f=f*f,g=this.geometry,k=this.matrixWorld;null===g.boundingSphere&&g.computeBoundingSphere();c.copy(g.boundingSphere);
+c.applyMatrix4(k);if(!1!==d.ray.intersectsSphere(c)){a.getInverse(k);b.copy(d.ray).applyMatrix4(a);var h=new q,n=new q,k=new q,r=new q,p=this&&this.isLineSegments?2:1;if(g&&g.isBufferGeometry){var m=g.index,t=g.attributes.position.array;if(null!==m)for(var m=m.array,g=0,u=m.length-1;g<u;g+=p){var v=m[g+1];h.fromArray(t,3*m[g]);n.fromArray(t,3*v);v=b.distanceSqToSegment(h,n,r,k);v>f||(r.applyMatrix4(this.matrixWorld),v=d.ray.origin.distanceTo(r),v<d.near||v>d.far||e.push({distance:v,point:k.clone().applyMatrix4(this.matrixWorld),
+index:g,face:null,faceIndex:null,object:this}))}else for(g=0,u=t.length/3-1;g<u;g+=p)h.fromArray(t,3*g),n.fromArray(t,3*g+3),v=b.distanceSqToSegment(h,n,r,k),v>f||(r.applyMatrix4(this.matrixWorld),v=d.ray.origin.distanceTo(r),v<d.near||v>d.far||e.push({distance:v,point:k.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this}))}else if(g&&g.isGeometry)for(h=g.vertices,n=h.length,g=0;g<n-1;g+=p)v=b.distanceSqToSegment(h[g],h[g+1],r,k),v>f||(r.applyMatrix4(this.matrixWorld),
+v=d.ray.origin.distanceTo(r),v<d.near||v>d.far||e.push({distance:v,point:k.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this}))}}}(),clone:function(){return(new this.constructor(this.geometry,this.material)).copy(this)}});ba.prototype=Object.assign(Object.create(Qa.prototype),{constructor:ba,isLineSegments:!0});Ka.prototype=Object.create(T.prototype);Ka.prototype.constructor=Ka;Ka.prototype.isPointsMaterial=!0;Ka.prototype.copy=function(a){T.prototype.copy.call(this,
+a);this.color.copy(a.color);this.map=a.map;this.size=a.size;this.sizeAttenuation=a.sizeAttenuation;return this};Gb.prototype=Object.assign(Object.create(D.prototype),{constructor:Gb,isPoints:!0,raycast:function(){var a=new Q,b=new Ya,c=new Aa;return function(d,e){function f(a,c){var f=b.distanceSqToPoint(a);if(f<r){var k=b.closestPointToPoint(a);k.applyMatrix4(h);var m=d.ray.origin.distanceTo(k);m<d.near||m>d.far||e.push({distance:m,distanceToRay:Math.sqrt(f),point:k.clone(),index:c,face:null,object:g})}}
+var g=this,k=this.geometry,h=this.matrixWorld,n=d.params.Points.threshold;null===k.boundingSphere&&k.computeBoundingSphere();c.copy(k.boundingSphere);c.applyMatrix4(h);if(!1!==d.ray.intersectsSphere(c)){a.getInverse(h);b.copy(d.ray).applyMatrix4(a);var n=n/((this.scale.x+this.scale.y+this.scale.z)/3),r=n*n,n=new q;if(k&&k.isBufferGeometry){var p=k.index,k=k.attributes.position.array;if(null!==p)for(var m=p.array,p=0,t=m.length;p<t;p++){var u=m[p];n.fromArray(k,3*u);f(n,u)}else for(p=0,m=k.length/
+3;p<m;p++)n.fromArray(k,3*p),f(n,p)}else for(n=k.vertices,p=0,m=n.length;p<m;p++)f(n[p],p)}}}(),clone:function(){return(new this.constructor(this.geometry,this.material)).copy(this)}});ic.prototype=Object.assign(Object.create(D.prototype),{constructor:ic});Qc.prototype=Object.create(Z.prototype);Qc.prototype.constructor=Qc;Hb.prototype=Object.create(Z.prototype);Hb.prototype.constructor=Hb;Hb.prototype.isCompressedTexture=!0;Rc.prototype=Object.create(Z.prototype);Rc.prototype.constructor=Rc;jc.prototype=
+Object.create(Z.prototype);jc.prototype.constructor=jc;jc.prototype.isDepthTexture=!0;Ib.prototype=Object.create(Ea.prototype);Ib.prototype.constructor=Ib;Ib.prototype.isShadowMaterial=!0;Jb.prototype=Object.create(Ea.prototype);Jb.prototype.constructor=Jb;Jb.prototype.isRawShaderMaterial=!0;kc.prototype={constructor:kc,isMultiMaterial:!0,toJSON:function(a){for(var b={metadata:{version:4.2,type:"material",generator:"MaterialExporter"},uuid:this.uuid,type:this.type,materials:[]},c=this.materials,d=
+0,e=c.length;d<e;d++){var f=c[d].toJSON(a);delete f.metadata;b.materials.push(f)}b.visible=this.visible;return b},clone:function(){for(var a=new this.constructor,b=0;b<this.materials.length;b++)a.materials.push(this.materials[b].clone());a.visible=this.visible;return a}};La.prototype=Object.create(T.prototype);La.prototype.constructor=La;La.prototype.isMeshStandardMaterial=!0;La.prototype.copy=function(a){T.prototype.copy.call(this,a);this.defines={STANDARD:""};this.color.copy(a.color);this.roughness=
+a.roughness;this.metalness=a.metalness;this.map=a.map;this.lightMap=a.lightMap;this.lightMapIntensity=a.lightMapIntensity;this.aoMap=a.aoMap;this.aoMapIntensity=a.aoMapIntensity;this.emissive.copy(a.emissive);this.emissiveMap=a.emissiveMap;this.emissiveIntensity=a.emissiveIntensity;this.bumpMap=a.bumpMap;this.bumpScale=a.bumpScale;this.normalMap=a.normalMap;this.normalScale.copy(a.normalScale);this.displacementMap=a.displacementMap;this.displacementScale=a.displacementScale;this.displacementBias=
+a.displacementBias;this.roughnessMap=a.roughnessMap;this.metalnessMap=a.metalnessMap;this.alphaMap=a.alphaMap;this.envMap=a.envMap;this.envMapIntensity=a.envMapIntensity;this.refractionRatio=a.refractionRatio;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.wireframeLinecap=a.wireframeLinecap;this.wireframeLinejoin=a.wireframeLinejoin;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;return this};ib.prototype=Object.create(La.prototype);
+ib.prototype.constructor=ib;ib.prototype.isMeshPhysicalMaterial=!0;ib.prototype.copy=function(a){La.prototype.copy.call(this,a);this.defines={PHYSICAL:""};this.reflectivity=a.reflectivity;this.clearCoat=a.clearCoat;this.clearCoatRoughness=a.clearCoatRoughness;return this};Za.prototype=Object.create(T.prototype);Za.prototype.constructor=Za;Za.prototype.isMeshPhongMaterial=!0;Za.prototype.copy=function(a){T.prototype.copy.call(this,a);this.color.copy(a.color);this.specular.copy(a.specular);this.shininess=
+a.shininess;this.map=a.map;this.lightMap=a.lightMap;this.lightMapIntensity=a.lightMapIntensity;this.aoMap=a.aoMap;this.aoMapIntensity=a.aoMapIntensity;this.emissive.copy(a.emissive);this.emissiveMap=a.emissiveMap;this.emissiveIntensity=a.emissiveIntensity;this.bumpMap=a.bumpMap;this.bumpScale=a.bumpScale;this.normalMap=a.normalMap;this.normalScale.copy(a.normalScale);this.displacementMap=a.displacementMap;this.displacementScale=a.displacementScale;this.displacementBias=a.displacementBias;this.specularMap=
+a.specularMap;this.alphaMap=a.alphaMap;this.envMap=a.envMap;this.combine=a.combine;this.reflectivity=a.reflectivity;this.refractionRatio=a.refractionRatio;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.wireframeLinecap=a.wireframeLinecap;this.wireframeLinejoin=a.wireframeLinejoin;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;return this};jb.prototype=Object.create(T.prototype);jb.prototype.constructor=jb;jb.prototype.isMeshNormalMaterial=
+!0;jb.prototype.copy=function(a){T.prototype.copy.call(this,a);this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;return this};kb.prototype=Object.create(T.prototype);kb.prototype.constructor=kb;kb.prototype.isMeshLambertMaterial=!0;kb.prototype.copy=function(a){T.prototype.copy.call(this,a);this.color.copy(a.color);this.map=a.map;this.lightMap=a.lightMap;this.lightMapIntensity=a.lightMapIntensity;this.aoMap=a.aoMap;this.aoMapIntensity=a.aoMapIntensity;this.emissive.copy(a.emissive);
+this.emissiveMap=a.emissiveMap;this.emissiveIntensity=a.emissiveIntensity;this.specularMap=a.specularMap;this.alphaMap=a.alphaMap;this.envMap=a.envMap;this.combine=a.combine;this.reflectivity=a.reflectivity;this.refractionRatio=a.refractionRatio;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.wireframeLinecap=a.wireframeLinecap;this.wireframeLinejoin=a.wireframeLinejoin;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;return this};
+lb.prototype=Object.create(T.prototype);lb.prototype.constructor=lb;lb.prototype.isLineDashedMaterial=!0;lb.prototype.copy=function(a){T.prototype.copy.call(this,a);this.color.copy(a.color);this.linewidth=a.linewidth;this.scale=a.scale;this.dashSize=a.dashSize;this.gapSize=a.gapSize;return this};var pf=Object.freeze({ShadowMaterial:Ib,SpriteMaterial:gb,RawShaderMaterial:Jb,ShaderMaterial:Ea,PointsMaterial:Ka,MultiMaterial:kc,MeshPhysicalMaterial:ib,MeshStandardMaterial:La,MeshPhongMaterial:Za,MeshNormalMaterial:jb,
+MeshLambertMaterial:kb,MeshDepthMaterial:Va,MeshBasicMaterial:Ja,LineDashedMaterial:lb,LineBasicMaterial:ga,Material:T});h.Cache={enabled:!1,files:{},add:function(a,b){!1!==this.enabled&&(this.files[a]=b)},get:function(a){if(!1!==this.enabled)return this.files[a]},remove:function(a){delete this.files[a]},clear:function(){this.files={}}};h.DefaultLoadingManager=new td;Object.assign(wa.prototype,{load:function(a,b,c,d){void 0!==this.path&&(a=this.path+a);var e=this,f=h.Cache.get(a);if(void 0!==f)return e.manager.itemStart(a),
+setTimeout(function(){b&&b(f);e.manager.itemEnd(a)},0),f;var g=new XMLHttpRequest;g.open("GET",a,!0);g.addEventListener("load",function(c){var f=c.target.response;h.Cache.add(a,f);200===this.status?(b&&b(f),e.manager.itemEnd(a)):0===this.status?(console.warn("THREE.XHRLoader: HTTP Status 0 received."),b&&b(f),e.manager.itemEnd(a)):(d&&d(c),e.manager.itemError(a))},!1);void 0!==c&&g.addEventListener("progress",function(a){c(a)},!1);g.addEventListener("error",function(b){d&&d(b);e.manager.itemError(a)},
+!1);void 0!==this.responseType&&(g.responseType=this.responseType);void 0!==this.withCredentials&&(g.withCredentials=this.withCredentials);g.overrideMimeType&&g.overrideMimeType("text/plain");g.send(null);e.manager.itemStart(a);return g},setPath:function(a){this.path=a;return this},setResponseType:function(a){this.responseType=a;return this},setWithCredentials:function(a){this.withCredentials=a;return this}});Object.assign(ke.prototype,{load:function(a,b,c,d){function e(e){h.load(a[e],function(a){a=
+f._parser(a,!0);g[e]={width:a.width,height:a.height,format:a.format,mipmaps:a.mipmaps};n+=1;6===n&&(1===a.mipmapCount&&(k.minFilter=1006),k.format=a.format,k.needsUpdate=!0,b&&b(k))},c,d)}var f=this,g=[],k=new Hb;k.image=g;var h=new wa(this.manager);h.setPath(this.path);h.setResponseType("arraybuffer");if(Array.isArray(a))for(var n=0,r=0,p=a.length;r<p;++r)e(r);else h.load(a,function(a){a=f._parser(a,!0);if(a.isCubemap)for(var c=a.mipmaps.length/a.mipmapCount,d=0;d<c;d++){g[d]={mipmaps:[]};for(var e=
+0;e<a.mipmapCount;e++)g[d].mipmaps.push(a.mipmaps[d*a.mipmapCount+e]),g[d].format=a.format,g[d].width=a.width,g[d].height=a.height}else k.image.width=a.width,k.image.height=a.height,k.mipmaps=a.mipmaps;1===a.mipmapCount&&(k.minFilter=1006);k.format=a.format;k.needsUpdate=!0;b&&b(k)},c,d);return k},setPath:function(a){this.path=a;return this}});Object.assign(ud.prototype,{load:function(a,b,c,d){var e=this,f=new hb,g=new wa(this.manager);g.setResponseType("arraybuffer");g.load(a,function(a){if(a=e._parser(a))void 0!==
+a.image?f.image=a.image:void 0!==a.data&&(f.image.width=a.width,f.image.height=a.height,f.image.data=a.data),f.wrapS=void 0!==a.wrapS?a.wrapS:1001,f.wrapT=void 0!==a.wrapT?a.wrapT:1001,f.magFilter=void 0!==a.magFilter?a.magFilter:1006,f.minFilter=void 0!==a.minFilter?a.minFilter:1008,f.anisotropy=void 0!==a.anisotropy?a.anisotropy:1,void 0!==a.format&&(f.format=a.format),void 0!==a.type&&(f.type=a.type),void 0!==a.mipmaps&&(f.mipmaps=a.mipmaps),1===a.mipmapCount&&(f.minFilter=1006),f.needsUpdate=
+!0,b&&b(f,a)},c,d);return f}});Object.assign(lc.prototype,{load:function(a,b,c,d){var e=this,f=document.createElementNS("http://www.w3.org/1999/xhtml","img");f.onload=function(){URL.revokeObjectURL(f.src);b&&b(f);e.manager.itemEnd(a)};if(0===a.indexOf("data:"))f.src=a;else{var g=new wa;g.setPath(this.path);g.setResponseType("blob");g.setWithCredentials(this.withCredentials);g.load(a,function(a){f.src=URL.createObjectURL(a)},c,d)}e.manager.itemStart(a);return f},setCrossOrigin:function(a){this.crossOrigin=
+a;return this},setWithCredentials:function(a){this.withCredentials=a;return this},setPath:function(a){this.path=a;return this}});Object.assign(vd.prototype,{load:function(a,b,c,d){function e(c){g.load(a[c],function(a){f.images[c]=a;k++;6===k&&(f.needsUpdate=!0,b&&b(f))},void 0,d)}var f=new Ua,g=new lc(this.manager);g.setCrossOrigin(this.crossOrigin);g.setPath(this.path);var k=0;for(c=0;c<a.length;++c)e(c);return f},setCrossOrigin:function(a){this.crossOrigin=a;return this},setPath:function(a){this.path=
+a;return this}});Object.assign(Sc.prototype,{load:function(a,b,c,d){var e=new Z,f=new lc(this.manager);f.setCrossOrigin(this.crossOrigin);f.setWithCredentials(this.withCredentials);f.setPath(this.path);f.load(a,function(c){var d=0<a.search(/\.(jpg|jpeg)$/)||0===a.search(/^data\:image\/jpeg/);e.format=d?1022:1023;e.image=c;e.needsUpdate=!0;void 0!==b&&b(e)},c,d);return e},setCrossOrigin:function(a){this.crossOrigin=a;return this},setWithCredentials:function(a){this.withCredentials=a;return this},setPath:function(a){this.path=
+a;return this}});ca.prototype=Object.assign(Object.create(D.prototype),{constructor:ca,isLight:!0,copy:function(a){D.prototype.copy.call(this,a);this.color.copy(a.color);this.intensity=a.intensity;return this},toJSON:function(a){a=D.prototype.toJSON.call(this,a);a.object.color=this.color.getHex();a.object.intensity=this.intensity;void 0!==this.groundColor&&(a.object.groundColor=this.groundColor.getHex());void 0!==this.distance&&(a.object.distance=this.distance);void 0!==this.angle&&(a.object.angle=
+this.angle);void 0!==this.decay&&(a.object.decay=this.decay);void 0!==this.penumbra&&(a.object.penumbra=this.penumbra);void 0!==this.shadow&&(a.object.shadow=this.shadow.toJSON());return a}});Tc.prototype=Object.assign(Object.create(ca.prototype),{constructor:Tc,isHemisphereLight:!0,copy:function(a){ca.prototype.copy.call(this,a);this.groundColor.copy(a.groundColor);return this}});Object.assign(mb.prototype,{copy:function(a){this.camera=a.camera.clone();this.bias=a.bias;this.radius=a.radius;this.mapSize.copy(a.mapSize);
+return this},clone:function(){return(new this.constructor).copy(this)},toJSON:function(){var a={};0!==this.bias&&(a.bias=this.bias);1!==this.radius&&(a.radius=this.radius);if(512!==this.mapSize.x||512!==this.mapSize.y)a.mapSize=this.mapSize.toArray();a.camera=this.camera.toJSON(!1).object;delete a.camera.matrix;return a}});Uc.prototype=Object.assign(Object.create(mb.prototype),{constructor:Uc,isSpotLightShadow:!0,update:function(a){var b=2*h.Math.RAD2DEG*a.angle,c=this.mapSize.width/this.mapSize.height;
+a=a.distance||500;var d=this.camera;if(b!==d.fov||c!==d.aspect||a!==d.far)d.fov=b,d.aspect=c,d.far=a,d.updateProjectionMatrix()}});Vc.prototype=Object.assign(Object.create(ca.prototype),{constructor:Vc,isSpotLight:!0,copy:function(a){ca.prototype.copy.call(this,a);this.distance=a.distance;this.angle=a.angle;this.penumbra=a.penumbra;this.decay=a.decay;this.target=a.target.clone();this.shadow=a.shadow.clone();return this}});Wc.prototype=Object.assign(Object.create(ca.prototype),{constructor:Wc,isPointLight:!0,
+copy:function(a){ca.prototype.copy.call(this,a);this.distance=a.distance;this.decay=a.decay;this.shadow=a.shadow.clone();return this}});Xc.prototype=Object.assign(Object.create(mb.prototype),{constructor:Xc});Yc.prototype=Object.assign(Object.create(ca.prototype),{constructor:Yc,isDirectionalLight:!0,copy:function(a){ca.prototype.copy.call(this,a);this.target=a.target.clone();this.shadow=a.shadow.clone();return this}});Zc.prototype=Object.assign(Object.create(ca.prototype),{constructor:Zc,isAmbientLight:!0});
+h.AnimationUtils={arraySlice:function(a,b,c){return h.AnimationUtils.isTypedArray(a)?new a.constructor(a.subarray(b,c)):a.slice(b,c)},convertArray:function(a,b,c){return!a||!c&&a.constructor===b?a:"number"===typeof b.BYTES_PER_ELEMENT?new b(a):Array.prototype.slice.call(a)},isTypedArray:function(a){return ArrayBuffer.isView(a)&&!(a instanceof DataView)},getKeyframeOrder:function(a){for(var b=a.length,c=Array(b),d=0;d!==b;++d)c[d]=d;c.sort(function(b,c){return a[b]-a[c]});return c},sortedArray:function(a,
+b,c){for(var d=a.length,e=new a.constructor(d),f=0,g=0;g!==d;++f)for(var k=c[f]*b,h=0;h!==b;++h)e[g++]=a[k+h];return e},flattenJSON:function(a,b,c,d){for(var e=1,f=a[0];void 0!==f&&void 0===f[d];)f=a[e++];if(void 0!==f){var g=f[d];if(void 0!==g)if(Array.isArray(g)){do g=f[d],void 0!==g&&(b.push(f.time),c.push.apply(c,g)),f=a[e++];while(void 0!==f)}else if(void 0!==g.toArray){do g=f[d],void 0!==g&&(b.push(f.time),g.toArray(c,c.length)),f=a[e++];while(void 0!==f)}else{do g=f[d],void 0!==g&&(b.push(f.time),
+c.push(g)),f=a[e++];while(void 0!==f)}}}};ja.prototype={constructor:ja,evaluate:function(a){var b=this.parameterPositions,c=this._cachedIndex,d=b[c],e=b[c-1];a:{b:{c:{d:if(!(a<d)){for(var f=c+2;;){if(void 0===d){if(a<e)break d;this._cachedIndex=c=b.length;return this.afterEnd_(c-1,a,e)}if(c===f)break;e=d;d=b[++c];if(a<d)break b}d=b.length;break c}if(a>=e)break a;else{f=b[1];a<f&&(c=2,e=f);for(f=c-2;;){if(void 0===e)return this._cachedIndex=0,this.beforeStart_(0,a,d);if(c===f)break;d=e;e=b[--c-1];
+if(a>=e)break b}d=c;c=0}}for(;c<d;)e=c+d>>>1,a<b[e]?d=e:c=e+1;d=b[c];e=b[c-1];if(void 0===e)return this._cachedIndex=0,this.beforeStart_(0,a,d);if(void 0===d)return this._cachedIndex=c=b.length,this.afterEnd_(c-1,e,a)}this._cachedIndex=c;this.intervalChanged_(c,e,d)}return this.interpolate_(c,e,a,d)},settings:null,DefaultSettings_:{},getSettings_:function(){return this.settings||this.DefaultSettings_},copySampleValue_:function(a){var b=this.resultBuffer,c=this.sampleValues,d=this.valueSize;a*=d;for(var e=
+0;e!==d;++e)b[e]=c[a+e];return b},interpolate_:function(a,b,c,d){throw Error("call to abstract method");},intervalChanged_:function(a,b,c){}};Object.assign(ja.prototype,{beforeStart_:ja.prototype.copySampleValue_,afterEnd_:ja.prototype.copySampleValue_});$c.prototype=Object.assign(Object.create(ja.prototype),{constructor:$c,DefaultSettings_:{endingStart:2400,endingEnd:2400},intervalChanged_:function(a,b,c){var d=this.parameterPositions,e=a-2,f=a+1,g=d[e],k=d[f];if(void 0===g)switch(this.getSettings_().endingStart){case 2401:e=
+a;g=2*b-c;break;case 2402:e=d.length-2;g=b+d[e]-d[e+1];break;default:e=a,g=c}if(void 0===k)switch(this.getSettings_().endingEnd){case 2401:f=a;k=2*c-b;break;case 2402:f=1;k=c+d[1]-d[0];break;default:f=a-1,k=b}a=.5*(c-b);d=this.valueSize;this._weightPrev=a/(b-g);this._weightNext=a/(k-c);this._offsetPrev=e*d;this._offsetNext=f*d},interpolate_:function(a,b,c,d){var e=this.resultBuffer,f=this.sampleValues,g=this.valueSize;a*=g;var k=a-g,h=this._offsetPrev,n=this._offsetNext,r=this._weightPrev,p=this._weightNext,
+m=(c-b)/(d-b);c=m*m;d=c*m;b=-r*d+2*r*c-r*m;r=(1+r)*d+(-1.5-2*r)*c+(-.5+r)*m+1;m=(-1-p)*d+(1.5+p)*c+.5*m;p=p*d-p*c;for(c=0;c!==g;++c)e[c]=b*f[h+c]+r*f[k+c]+m*f[a+c]+p*f[n+c];return e}});mc.prototype=Object.assign(Object.create(ja.prototype),{constructor:mc,interpolate_:function(a,b,c,d){var e=this.resultBuffer,f=this.sampleValues,g=this.valueSize;a*=g;var k=a-g;b=(c-b)/(d-b);c=1-b;for(d=0;d!==g;++d)e[d]=f[k+d]*c+f[a+d]*b;return e}});ad.prototype=Object.assign(Object.create(ja.prototype),{constructor:ad,
+interpolate_:function(a,b,c,d){return this.copySampleValue_(a-1)}});var Ta;Ta={TimeBufferType:Float32Array,ValueBufferType:Float32Array,DefaultInterpolation:2301,InterpolantFactoryMethodDiscrete:function(a){return new ad(this.times,this.values,this.getValueSize(),a)},InterpolantFactoryMethodLinear:function(a){return new mc(this.times,this.values,this.getValueSize(),a)},InterpolantFactoryMethodSmooth:function(a){return new $c(this.times,this.values,this.getValueSize(),a)},setInterpolation:function(a){var b;
+switch(a){case 2300:b=this.InterpolantFactoryMethodDiscrete;break;case 2301:b=this.InterpolantFactoryMethodLinear;break;case 2302:b=this.InterpolantFactoryMethodSmooth}if(void 0===b){b="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(void 0===this.createInterpolant)if(a!==this.DefaultInterpolation)this.setInterpolation(this.DefaultInterpolation);else throw Error(b);console.warn(b)}else this.createInterpolant=b},getInterpolation:function(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return 2300;
+case this.InterpolantFactoryMethodLinear:return 2301;case this.InterpolantFactoryMethodSmooth:return 2302}},getValueSize:function(){return this.values.length/this.times.length},shift:function(a){if(0!==a)for(var b=this.times,c=0,d=b.length;c!==d;++c)b[c]+=a;return this},scale:function(a){if(1!==a)for(var b=this.times,c=0,d=b.length;c!==d;++c)b[c]*=a;return this},trim:function(a,b){for(var c=this.times,d=c.length,e=0,f=d-1;e!==d&&c[e]<a;)++e;for(;-1!==f&&c[f]>b;)--f;++f;if(0!==e||f!==d)e>=f&&(f=Math.max(f,
+1),e=f-1),d=this.getValueSize(),this.times=h.AnimationUtils.arraySlice(c,e,f),this.values=h.AnimationUtils.arraySlice(this.values,e*d,f*d);return this},validate:function(){var a=!0,b=this.getValueSize();0!==b-Math.floor(b)&&(console.error("invalid value size in track",this),a=!1);var c=this.times,b=this.values,d=c.length;0===d&&(console.error("track is empty",this),a=!1);for(var e=null,f=0;f!==d;f++){var g=c[f];if("number"===typeof g&&isNaN(g)){console.error("time is not a valid number",this,f,g);
+a=!1;break}if(null!==e&&e>g){console.error("out of order keys",this,f,g,e);a=!1;break}e=g}if(void 0!==b&&h.AnimationUtils.isTypedArray(b))for(f=0,c=b.length;f!==c;++f)if(d=b[f],isNaN(d)){console.error("value is not a valid number",this,f,d);a=!1;break}return a},optimize:function(){for(var a=this.times,b=this.values,c=this.getValueSize(),d=2302===this.getInterpolation(),e=1,f=a.length-1,g=1;g<f;++g){var k=!1,l=a[g];if(l!==a[g+1]&&(1!==g||l!==l[0]))if(d)k=!0;else for(var n=g*c,r=n-c,p=n+c,l=0;l!==c;++l){var m=
+b[n+l];if(m!==b[r+l]||m!==b[p+l]){k=!0;break}}if(k){if(g!==e){a[e]=a[g];for(var k=g*c,t=e*c,l=0;l!==c;++l)b[t+l]=b[k+l]}++e}}a[e++]=a[f];k=f*c;for(l=0;l!==c;++l)b[t+l]=b[k+l];e!==a.length&&(this.times=h.AnimationUtils.arraySlice(a,0,e),this.values=h.AnimationUtils.arraySlice(b,0,e*c));return this}};Kb.prototype=Object.assign(Object.create(Ta),{constructor:Kb,ValueTypeName:"vector"});bd.prototype=Object.assign(Object.create(ja.prototype),{constructor:bd,interpolate_:function(a,b,c,d){var e=this.resultBuffer,
+f=this.sampleValues,g=this.valueSize;a*=g;b=(c-b)/(d-b);for(c=a+g;a!==c;a+=4)oa.slerpFlat(e,0,f,a-g,f,a,b);return e}});nc.prototype=Object.assign(Object.create(Ta),{constructor:nc,ValueTypeName:"quaternion",DefaultInterpolation:2301,InterpolantFactoryMethodLinear:function(a){return new bd(this.times,this.values,this.getValueSize(),a)},InterpolantFactoryMethodSmooth:void 0});Lb.prototype=Object.assign(Object.create(Ta),{constructor:Lb,ValueTypeName:"number"});cd.prototype=Object.assign(Object.create(Ta),
+{constructor:cd,ValueTypeName:"string",ValueBufferType:Array,DefaultInterpolation:2300,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0});dd.prototype=Object.assign(Object.create(Ta),{constructor:dd,ValueTypeName:"bool",ValueBufferType:Array,DefaultInterpolation:2300,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0});ed.prototype=Object.assign(Object.create(Ta),{constructor:ed,ValueTypeName:"color"});ob.prototype=Ta;Ta.constructor=ob;Object.assign(ob,
+{parse:function(a){if(void 0===a.type)throw Error("track type undefined, can not parse");var b=ob._getTrackTypeForValueTypeName(a.type);if(void 0===a.times){var c=[],d=[];h.AnimationUtils.flattenJSON(a.keys,c,d,"value");a.times=c;a.values=d}return void 0!==b.parse?b.parse(a):new b(a.name,a.times,a.values,a.interpolation)},toJSON:function(a){var b=a.constructor;if(void 0!==b.toJSON)b=b.toJSON(a);else{var b={name:a.name,times:h.AnimationUtils.convertArray(a.times,Array),values:h.AnimationUtils.convertArray(a.values,
+Array)},c=a.getInterpolation();c!==a.DefaultInterpolation&&(b.interpolation=c)}b.type=a.ValueTypeName;return b},_getTrackTypeForValueTypeName:function(a){switch(a.toLowerCase()){case "scalar":case "double":case "float":case "number":case "integer":return Lb;case "vector":case "vector2":case "vector3":case "vector4":return Kb;case "color":return ed;case "quaternion":return nc;case "bool":case "boolean":return dd;case "string":return cd}throw Error("Unsupported typeName: "+a);}});sa.prototype={constructor:sa,
+resetDuration:function(){for(var a=0,b=0,c=this.tracks.length;b!==c;++b)var d=this.tracks[b],a=Math.max(a,d.times[d.times.length-1]);this.duration=a},trim:function(){for(var a=0;a<this.tracks.length;a++)this.tracks[a].trim(0,this.duration);return this},optimize:function(){for(var a=0;a<this.tracks.length;a++)this.tracks[a].optimize();return this}};Object.assign(sa,{parse:function(a){for(var b=[],c=a.tracks,d=1/(a.fps||1),e=0,f=c.length;e!==f;++e)b.push(ob.parse(c[e]).scale(d));return new sa(a.name,
+a.duration,b)},toJSON:function(a){var b=[],c=a.tracks;a={name:a.name,duration:a.duration,tracks:b};for(var d=0,e=c.length;d!==e;++d)b.push(ob.toJSON(c[d]));return a},CreateFromMorphTargetSequence:function(a,b,c,d){for(var e=b.length,f=[],g=0;g<e;g++){var k=[],l=[];k.push((g+e-1)%e,g,(g+1)%e);l.push(0,1,0);var n=h.AnimationUtils.getKeyframeOrder(k),k=h.AnimationUtils.sortedArray(k,1,n),l=h.AnimationUtils.sortedArray(l,1,n);d||0!==k[0]||(k.push(e),l.push(l[0]));f.push((new Lb(".morphTargetInfluences["+
+b[g].name+"]",k,l)).scale(1/c))}return new sa(a,-1,f)},findByName:function(a,b){var c=a;Array.isArray(a)||(c=a.geometry&&a.geometry.animations||a.animations);for(var d=0;d<c.length;d++)if(c[d].name===b)return c[d];return null},CreateClipsFromMorphTargetSequences:function(a,b,c){for(var d={},e=/^([\w-]*?)([\d]+)$/,f=0,g=a.length;f<g;f++){var k=a[f],h=k.name.match(e);if(h&&1<h.length){var n=h[1];(h=d[n])||(d[n]=h=[]);h.push(k)}}a=[];for(n in d)a.push(sa.CreateFromMorphTargetSequence(n,d[n],b,c));return a},
+parseAnimation:function(a,b,c){if(!a)return console.error("  no animation in JSONLoader data"),null;c=function(a,b,c,d,e){if(0!==c.length){var f=[],g=[];h.AnimationUtils.flattenJSON(c,f,g,d);0!==f.length&&e.push(new a(b,f,g))}};var d=[],e=a.name||"default",f=a.length||-1,g=a.fps||30;a=a.hierarchy||[];for(var k=0;k<a.length;k++){var l=a[k].keys;if(l&&0!==l.length)if(l[0].morphTargets){for(var f={},n=0;n<l.length;n++)if(l[n].morphTargets)for(var r=0;r<l[n].morphTargets.length;r++)f[l[n].morphTargets[r]]=
+-1;for(var p in f){for(var m=[],t=[],r=0;r!==l[n].morphTargets.length;++r){var u=l[n];m.push(u.time);t.push(u.morphTarget===p?1:0)}d.push(new Lb(".morphTargetInfluence["+p+"]",m,t))}f=f.length*(g||1)}else n=".bones["+b[k].name+"]",c(Kb,n+".position",l,"pos",d),c(nc,n+".quaternion",l,"rot",d),c(Kb,n+".scale",l,"scl",d)}return 0===d.length?null:new sa(e,f,d)}});Object.assign(fd.prototype,{load:function(a,b,c,d){var e=this;(new wa(e.manager)).load(a,function(a){b(e.parse(JSON.parse(a)))},c,d)},setTextures:function(a){this.textures=
+a},parse:function(a){function b(a){void 0===c[a]&&console.warn("THREE.MaterialLoader: Undefined texture",a);return c[a]}var c=this.textures,d=new pf[a.type];void 0!==a.uuid&&(d.uuid=a.uuid);void 0!==a.name&&(d.name=a.name);void 0!==a.color&&d.color.setHex(a.color);void 0!==a.roughness&&(d.roughness=a.roughness);void 0!==a.metalness&&(d.metalness=a.metalness);void 0!==a.emissive&&d.emissive.setHex(a.emissive);void 0!==a.specular&&d.specular.setHex(a.specular);void 0!==a.shininess&&(d.shininess=a.shininess);
+void 0!==a.uniforms&&(d.uniforms=a.uniforms);void 0!==a.vertexShader&&(d.vertexShader=a.vertexShader);void 0!==a.fragmentShader&&(d.fragmentShader=a.fragmentShader);void 0!==a.vertexColors&&(d.vertexColors=a.vertexColors);void 0!==a.fog&&(d.fog=a.fog);void 0!==a.shading&&(d.shading=a.shading);void 0!==a.blending&&(d.blending=a.blending);void 0!==a.side&&(d.side=a.side);void 0!==a.opacity&&(d.opacity=a.opacity);void 0!==a.transparent&&(d.transparent=a.transparent);void 0!==a.alphaTest&&(d.alphaTest=
+a.alphaTest);void 0!==a.depthTest&&(d.depthTest=a.depthTest);void 0!==a.depthWrite&&(d.depthWrite=a.depthWrite);void 0!==a.colorWrite&&(d.colorWrite=a.colorWrite);void 0!==a.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.skinning&&(d.skinning=a.skinning);void 0!==a.morphTargets&&(d.morphTargets=
+a.morphTargets);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.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));if(void 0!==a.normalScale){var e=a.normalScale;!1===Array.isArray(e)&&(e=[e,e]);d.normalScale=(new B).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.reflectivity&&(d.reflectivity=a.reflectivity);void 0!==a.lightMap&&(d.lightMap=b(a.lightMap));void 0!==a.lightMapIntensity&&(d.lightMapIntensity=a.lightMapIntensity);void 0!==a.aoMap&&(d.aoMap=b(a.aoMap));void 0!==a.aoMapIntensity&&(d.aoMapIntensity=a.aoMapIntensity);if(void 0!==a.materials)for(var e=0,f=a.materials.length;e<f;e++)d.materials.push(this.parse(a.materials[e]));return d}});Object.assign(wd.prototype,{load:function(a,b,c,d){var e=this;(new wa(e.manager)).load(a,function(a){b(e.parse(JSON.parse(a)))},
+c,d)},parse:function(a){var b=new H,c=a.data.index,d={Int8Array:Int8Array,Uint8Array:Uint8Array,Uint8ClampedArray:Uint8ClampedArray,Int16Array:Int16Array,Uint16Array:Uint16Array,Int32Array:Int32Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array};void 0!==c&&(c=new d[c.type](c.array),b.setIndex(new C(c,1)));var e=a.data.attributes,f;for(f in e){var g=e[f],c=new d[g.type](g.array);b.addAttribute(f,new C(c,g.itemSize,g.normalized))}d=a.data.groups||a.data.drawcalls||a.data.offsets;
+if(void 0!==d)for(f=0,c=d.length;f!==c;++f)e=d[f],b.addGroup(e.start,e.count,e.materialIndex);a=a.data.boundingSphere;void 0!==a&&(d=new q,void 0!==a.center&&d.fromArray(a.center),b.boundingSphere=new Aa(d,a.radius));return b}});pb.prototype={constructor:pb,crossOrigin:void 0,extractUrlBase:function(a){a=a.split("/");if(1===a.length)return"./";a.pop();return a.join("/")+"/"},initMaterials:function(a,b,c){for(var d=[],e=0;e<a.length;++e)d[e]=this.createMaterial(a[e],b,c);return d},createMaterial:function(){var a,
+b,c;return function(d,e,f){function g(a,c,d,g,l){a=e+a;var n=pb.Handlers.get(a);null!==n?a=n.load(a):(b.setCrossOrigin(f),a=b.load(a));void 0!==c&&(a.repeat.fromArray(c),1!==c[0]&&(a.wrapS=1E3),1!==c[1]&&(a.wrapT=1E3));void 0!==d&&a.offset.fromArray(d);void 0!==g&&("repeat"===g[0]&&(a.wrapS=1E3),"mirror"===g[0]&&(a.wrapS=1002),"repeat"===g[1]&&(a.wrapT=1E3),"mirror"===g[1]&&(a.wrapT=1002));void 0!==l&&(a.anisotropy=l);c=h.Math.generateUUID();k[c]=a;return c}void 0===a&&(a=new I);void 0===b&&(b=new Sc);
+void 0===c&&(c=new fd);var k={},l={uuid:h.Math.generateUUID(),type:"MeshLambertMaterial"},n;for(n in d){var r=d[n];switch(n){case "DbgColor":case "DbgIndex":case "opticalDensity":case "illumination":break;case "DbgName":l.name=r;break;case "blending":l.blending=se[r];break;case "colorAmbient":case "mapAmbient":console.warn("THREE.Loader.createMaterial:",n,"is no longer supported.");break;case "colorDiffuse":l.color=a.fromArray(r).getHex();break;case "colorSpecular":l.specular=a.fromArray(r).getHex();
+break;case "colorEmissive":l.emissive=a.fromArray(r).getHex();break;case "specularCoef":l.shininess=r;break;case "shading":"basic"===r.toLowerCase()&&(l.type="MeshBasicMaterial");"phong"===r.toLowerCase()&&(l.type="MeshPhongMaterial");"standard"===r.toLowerCase()&&(l.type="MeshStandardMaterial");break;case "mapDiffuse":l.map=g(r,d.mapDiffuseRepeat,d.mapDiffuseOffset,d.mapDiffuseWrap,d.mapDiffuseAnisotropy);break;case "mapDiffuseRepeat":case "mapDiffuseOffset":case "mapDiffuseWrap":case "mapDiffuseAnisotropy":break;
+case "mapEmissive":l.emissiveMap=g(r,d.mapEmissiveRepeat,d.mapEmissiveOffset,d.mapEmissiveWrap,d.mapEmissiveAnisotropy);break;case "mapEmissiveRepeat":case "mapEmissiveOffset":case "mapEmissiveWrap":case "mapEmissiveAnisotropy":break;case "mapLight":l.lightMap=g(r,d.mapLightRepeat,d.mapLightOffset,d.mapLightWrap,d.mapLightAnisotropy);break;case "mapLightRepeat":case "mapLightOffset":case "mapLightWrap":case "mapLightAnisotropy":break;case "mapAO":l.aoMap=g(r,d.mapAORepeat,d.mapAOOffset,d.mapAOWrap,
+d.mapAOAnisotropy);break;case "mapAORepeat":case "mapAOOffset":case "mapAOWrap":case "mapAOAnisotropy":break;case "mapBump":l.bumpMap=g(r,d.mapBumpRepeat,d.mapBumpOffset,d.mapBumpWrap,d.mapBumpAnisotropy);break;case "mapBumpScale":l.bumpScale=r;break;case "mapBumpRepeat":case "mapBumpOffset":case "mapBumpWrap":case "mapBumpAnisotropy":break;case "mapNormal":l.normalMap=g(r,d.mapNormalRepeat,d.mapNormalOffset,d.mapNormalWrap,d.mapNormalAnisotropy);break;case "mapNormalFactor":l.normalScale=[r,r];break;
+case "mapNormalRepeat":case "mapNormalOffset":case "mapNormalWrap":case "mapNormalAnisotropy":break;case "mapSpecular":l.specularMap=g(r,d.mapSpecularRepeat,d.mapSpecularOffset,d.mapSpecularWrap,d.mapSpecularAnisotropy);break;case "mapSpecularRepeat":case "mapSpecularOffset":case "mapSpecularWrap":case "mapSpecularAnisotropy":break;case "mapMetalness":l.metalnessMap=g(r,d.mapMetalnessRepeat,d.mapMetalnessOffset,d.mapMetalnessWrap,d.mapMetalnessAnisotropy);break;case "mapMetalnessRepeat":case "mapMetalnessOffset":case "mapMetalnessWrap":case "mapMetalnessAnisotropy":break;
+case "mapRoughness":l.roughnessMap=g(r,d.mapRoughnessRepeat,d.mapRoughnessOffset,d.mapRoughnessWrap,d.mapRoughnessAnisotropy);break;case "mapRoughnessRepeat":case "mapRoughnessOffset":case "mapRoughnessWrap":case "mapRoughnessAnisotropy":break;case "mapAlpha":l.alphaMap=g(r,d.mapAlphaRepeat,d.mapAlphaOffset,d.mapAlphaWrap,d.mapAlphaAnisotropy);break;case "mapAlphaRepeat":case "mapAlphaOffset":case "mapAlphaWrap":case "mapAlphaAnisotropy":break;case "flipSided":l.side=1;break;case "doubleSided":l.side=
+2;break;case "transparency":console.warn("THREE.Loader.createMaterial: transparency has been renamed to opacity");l.opacity=r;break;case "depthTest":case "depthWrite":case "colorWrite":case "opacity":case "reflectivity":case "transparent":case "visible":case "wireframe":l[n]=r;break;case "vertexColors":!0===r&&(l.vertexColors=2);"face"===r&&(l.vertexColors=1);break;default:console.error("THREE.Loader.createMaterial: Unsupported",n,r)}}"MeshBasicMaterial"===l.type&&delete l.emissive;"MeshPhongMaterial"!==
+l.type&&delete l.specular;1>l.opacity&&(l.transparent=!0);c.setTextures(k);return c.parse(l)}}()};pb.Handlers={handlers:[],add:function(a,b){this.handlers.push(a,b)},get:function(a){for(var b=this.handlers,c=0,d=b.length;c<d;c+=2){var e=b[c+1];if(b[c].test(a))return e}return null}};Object.assign(xd.prototype,{load:function(a,b,c,d){var e=this,f=this.texturePath&&"string"===typeof this.texturePath?this.texturePath:pb.prototype.extractUrlBase(a),g=new wa(this.manager);g.setWithCredentials(this.withCredentials);
+g.load(a,function(c){c=JSON.parse(c);var d=c.metadata;if(void 0!==d&&(d=d.type,void 0!==d)){if("object"===d.toLowerCase()){console.error("THREE.JSONLoader: "+a+" should be loaded with THREE.ObjectLoader instead.");return}if("scene"===d.toLowerCase()){console.error("THREE.JSONLoader: "+a+" should be loaded with THREE.SceneLoader instead.");return}}c=e.parse(c,f);b(c.geometry,c.materials)},c,d)},setTexturePath:function(a){this.texturePath=a},parse:function(a,b){var c=new S,d=void 0!==a.scale?1/a.scale:
+1;(function(b){var d,g,k,h,n,r,p,m,t,u,v,z,w,x=a.faces;r=a.vertices;var N=a.normals,y=a.colors,F=0;if(void 0!==a.uvs){for(d=0;d<a.uvs.length;d++)a.uvs[d].length&&F++;for(d=0;d<F;d++)c.faceVertexUvs[d]=[]}h=0;for(n=r.length;h<n;)d=new q,d.x=r[h++]*b,d.y=r[h++]*b,d.z=r[h++]*b,c.vertices.push(d);h=0;for(n=x.length;h<n;)if(b=x[h++],t=b&1,k=b&2,d=b&8,p=b&16,u=b&32,r=b&64,b&=128,t){t=new la;t.a=x[h];t.b=x[h+1];t.c=x[h+3];v=new la;v.a=x[h+1];v.b=x[h+2];v.c=x[h+3];h+=4;k&&(k=x[h++],t.materialIndex=k,v.materialIndex=
+k);k=c.faces.length;if(d)for(d=0;d<F;d++)for(z=a.uvs[d],c.faceVertexUvs[d][k]=[],c.faceVertexUvs[d][k+1]=[],g=0;4>g;g++)m=x[h++],w=z[2*m],m=z[2*m+1],w=new B(w,m),2!==g&&c.faceVertexUvs[d][k].push(w),0!==g&&c.faceVertexUvs[d][k+1].push(w);p&&(p=3*x[h++],t.normal.set(N[p++],N[p++],N[p]),v.normal.copy(t.normal));if(u)for(d=0;4>d;d++)p=3*x[h++],u=new q(N[p++],N[p++],N[p]),2!==d&&t.vertexNormals.push(u),0!==d&&v.vertexNormals.push(u);r&&(r=x[h++],r=y[r],t.color.setHex(r),v.color.setHex(r));if(b)for(d=
+0;4>d;d++)r=x[h++],r=y[r],2!==d&&t.vertexColors.push(new I(r)),0!==d&&v.vertexColors.push(new I(r));c.faces.push(t);c.faces.push(v)}else{t=new la;t.a=x[h++];t.b=x[h++];t.c=x[h++];k&&(k=x[h++],t.materialIndex=k);k=c.faces.length;if(d)for(d=0;d<F;d++)for(z=a.uvs[d],c.faceVertexUvs[d][k]=[],g=0;3>g;g++)m=x[h++],w=z[2*m],m=z[2*m+1],w=new B(w,m),c.faceVertexUvs[d][k].push(w);p&&(p=3*x[h++],t.normal.set(N[p++],N[p++],N[p]));if(u)for(d=0;3>d;d++)p=3*x[h++],u=new q(N[p++],N[p++],N[p]),t.vertexNormals.push(u);
+r&&(r=x[h++],t.color.setHex(y[r]));if(b)for(d=0;3>d;d++)r=x[h++],t.vertexColors.push(new I(y[r]));c.faces.push(t)}})(d);(function(){var b=void 0!==a.influencesPerVertex?a.influencesPerVertex:2;if(a.skinWeights)for(var d=0,g=a.skinWeights.length;d<g;d+=b)c.skinWeights.push(new da(a.skinWeights[d],1<b?a.skinWeights[d+1]:0,2<b?a.skinWeights[d+2]:0,3<b?a.skinWeights[d+3]:0));if(a.skinIndices)for(d=0,g=a.skinIndices.length;d<g;d+=b)c.skinIndices.push(new da(a.skinIndices[d],1<b?a.skinIndices[d+1]:0,2<
+b?a.skinIndices[d+2]:0,3<b?a.skinIndices[d+3]:0));c.bones=a.bones;c.bones&&0<c.bones.length&&(c.skinWeights.length!==c.skinIndices.length||c.skinIndices.length!==c.vertices.length)&&console.warn("When skinning, number of vertices ("+c.vertices.length+"), skinIndices ("+c.skinIndices.length+"), and skinWeights ("+c.skinWeights.length+") should match.")})();(function(b){if(void 0!==a.morphTargets)for(var d=0,g=a.morphTargets.length;d<g;d++){c.morphTargets[d]={};c.morphTargets[d].name=a.morphTargets[d].name;
+c.morphTargets[d].vertices=[];for(var k=c.morphTargets[d].vertices,h=a.morphTargets[d].vertices,n=0,r=h.length;n<r;n+=3){var p=new q;p.x=h[n]*b;p.y=h[n+1]*b;p.z=h[n+2]*b;k.push(p)}}if(void 0!==a.morphColors&&0<a.morphColors.length)for(console.warn('THREE.JSONLoader: "morphColors" no longer supported. Using them as face colors.'),b=c.faces,k=a.morphColors[0].colors,d=0,g=b.length;d<g;d++)b[d].color.fromArray(k,3*d)})(d);(function(){var b=[],d=[];void 0!==a.animation&&d.push(a.animation);void 0!==a.animations&&
+(a.animations.length?d=d.concat(a.animations):d.push(a.animations));for(var g=0;g<d.length;g++){var k=sa.parseAnimation(d[g],c.bones);k&&b.push(k)}c.morphTargets&&(d=sa.CreateClipsFromMorphTargetSequences(c.morphTargets,10),b=b.concat(d));0<b.length&&(c.animations=b)})();c.computeFaceNormals();c.computeBoundingSphere();if(void 0===a.materials||0===a.materials.length)return{geometry:c};d=pb.prototype.initMaterials(a.materials,b,this.crossOrigin);return{geometry:c,materials:d}}});Mb.prototype=Object.create(H.prototype);
+Mb.prototype.constructor=Mb;oc.prototype=Object.create(S.prototype);oc.prototype.constructor=oc;pa.prototype=Object.create(S.prototype);pa.prototype.constructor=pa;pc.prototype=Object.create(pa.prototype);pc.prototype.constructor=pc;qc.prototype=Object.create(pa.prototype);qc.prototype.constructor=qc;rc.prototype=Object.create(pa.prototype);rc.prototype.constructor=rc;sc.prototype=Object.create(pa.prototype);sc.prototype.constructor=sc;za.prototype=Object.create(S.prototype);za.prototype.constructor=
+za;za.NoTaper=function(a){return 1};za.SinusoidalTaper=function(a){return Math.sin(Math.PI*a)};za.FrenetFrames=function(a,b,c){var d=new q,e=[],f=[],g=[],k=new q,l=new Q;b+=1;var n,r,p;this.tangents=e;this.normals=f;this.binormals=g;for(n=0;n<b;n++)r=n/(b-1),e[n]=a.getTangentAt(r),e[n].normalize();f[0]=new q;g[0]=new q;a=Number.MAX_VALUE;n=Math.abs(e[0].x);r=Math.abs(e[0].y);p=Math.abs(e[0].z);n<=a&&(a=n,d.set(1,0,0));r<=a&&(a=r,d.set(0,1,0));p<=a&&d.set(0,0,1);k.crossVectors(e[0],d).normalize();
+f[0].crossVectors(e[0],k);g[0].crossVectors(e[0],f[0]);for(n=1;n<b;n++)f[n]=f[n-1].clone(),g[n]=g[n-1].clone(),k.crossVectors(e[n-1],e[n]),k.length()>Number.EPSILON&&(k.normalize(),d=Math.acos(h.Math.clamp(e[n-1].dot(e[n]),-1,1)),f[n].applyMatrix4(l.makeRotationAxis(k,d))),g[n].crossVectors(e[n],f[n]);if(c)for(d=Math.acos(h.Math.clamp(f[0].dot(f[b-1]),-1,1)),d/=b-1,0<e[0].dot(k.crossVectors(f[0],f[b-1]))&&(d=-d),n=1;n<b;n++)f[n].applyMatrix4(l.makeRotationAxis(e[n],d*n)),g[n].crossVectors(e[n],f[n])};
+Nb.prototype=Object.create(H.prototype);Nb.prototype.constructor=Nb;tc.prototype=Object.create(S.prototype);tc.prototype.constructor=tc;Ob.prototype=Object.create(H.prototype);Ob.prototype.constructor=Ob;uc.prototype=Object.create(S.prototype);uc.prototype.constructor=uc;h.ShapeUtils={area:function(a){for(var b=a.length,c=0,d=b-1,e=0;e<b;d=e++)c+=a[d].x*a[e].y-a[e].x*a[d].y;return.5*c},triangulate:function(){return function(a,b){var c=a.length;if(3>c)return null;var d=[],e=[],f=[],g,k,l;if(0<h.ShapeUtils.area(a))for(k=
+0;k<c;k++)e[k]=k;else for(k=0;k<c;k++)e[k]=c-1-k;var n=2*c;for(k=c-1;2<c;){if(0>=n--){console.warn("THREE.ShapeUtils: Unable to triangulate polygon! in triangulate()");break}g=k;c<=g&&(g=0);k=g+1;c<=k&&(k=0);l=k+1;c<=l&&(l=0);var r;a:{var p,m,t,q,v,z,w,x;p=a[e[g]].x;m=a[e[g]].y;t=a[e[k]].x;q=a[e[k]].y;v=a[e[l]].x;z=a[e[l]].y;if(Number.EPSILON>(t-p)*(z-m)-(q-m)*(v-p))r=!1;else{var B,y,F,G,E,K,C,D,H,I;B=v-t;y=z-q;F=p-v;G=m-z;E=t-p;K=q-m;for(r=0;r<c;r++)if(w=a[e[r]].x,x=a[e[r]].y,!(w===p&&x===m||w===
+t&&x===q||w===v&&x===z)&&(C=w-p,D=x-m,H=w-t,I=x-q,w-=v,x-=z,H=B*I-y*H,C=E*D-K*C,D=F*x-G*w,H>=-Number.EPSILON&&D>=-Number.EPSILON&&C>=-Number.EPSILON)){r=!1;break a}r=!0}}if(r){d.push([a[e[g]],a[e[k]],a[e[l]]]);f.push([e[g],e[k],e[l]]);g=k;for(l=k+1;l<c;g++,l++)e[g]=e[l];c--;n=2*c}}return b?f:d}}(),triangulateShape:function(a,b){function c(a){var b=a.length;2<b&&a[b-1].equals(a[0])&&a.pop()}function d(a,b,c){return a.x!==b.x?a.x<b.x?a.x<=c.x&&c.x<=b.x:b.x<=c.x&&c.x<=a.x:a.y<b.y?a.y<=c.y&&c.y<=b.y:
+b.y<=c.y&&c.y<=a.y}function e(a,b,c,e,f){var g=b.x-a.x,k=b.y-a.y,h=e.x-c.x,l=e.y-c.y,m=a.x-c.x,n=a.y-c.y,p=k*h-g*l,r=k*m-g*n;if(Math.abs(p)>Number.EPSILON){if(0<p){if(0>r||r>p)return[];h=l*m-h*n;if(0>h||h>p)return[]}else{if(0<r||r<p)return[];h=l*m-h*n;if(0<h||h<p)return[]}if(0===h)return!f||0!==r&&r!==p?[a]:[];if(h===p)return!f||0!==r&&r!==p?[b]:[];if(0===r)return[c];if(r===p)return[e];f=h/p;return[{x:a.x+f*g,y:a.y+f*k}]}if(0!==r||l*m!==h*n)return[];k=0===g&&0===k;h=0===h&&0===l;if(k&&h)return a.x!==
+c.x||a.y!==c.y?[]:[a];if(k)return d(c,e,a)?[a]:[];if(h)return d(a,b,c)?[c]:[];0!==g?(a.x<b.x?(g=a,h=a.x,k=b,a=b.x):(g=b,h=b.x,k=a,a=a.x),c.x<e.x?(b=c,p=c.x,l=e,c=e.x):(b=e,p=e.x,l=c,c=c.x)):(a.y<b.y?(g=a,h=a.y,k=b,a=b.y):(g=b,h=b.y,k=a,a=a.y),c.y<e.y?(b=c,p=c.y,l=e,c=e.y):(b=e,p=e.y,l=c,c=c.y));return h<=p?a<p?[]:a===p?f?[]:[b]:a<=c?[b,k]:[b,l]:h>c?[]:h===c?f?[]:[g]:a<=c?[g,k]:[g,l]}function f(a,b,c,d){var e=b.x-a.x,f=b.y-a.y;b=c.x-a.x;c=c.y-a.y;var g=d.x-a.x;d=d.y-a.y;a=e*c-f*b;e=e*d-f*g;return Math.abs(a)>
+Number.EPSILON?(b=g*c-d*b,0<a?0<=e&&0<=b:0<=e||0<=b):0<e}c(a);b.forEach(c);var g,k,l,n,r,p={};l=a.concat();g=0;for(k=b.length;g<k;g++)Array.prototype.push.apply(l,b[g]);g=0;for(k=l.length;g<k;g++)r=l[g].x+":"+l[g].y,void 0!==p[r]&&console.warn("THREE.ShapeUtils: Duplicate point",r,g),p[r]=g;g=function(a,b){function c(a,b){var d=k.length-1,e=a-1;0>e&&(e=d);var g=a+1;g>d&&(g=0);d=f(k[a],k[e],k[g],h[b]);if(!d)return!1;d=h.length-1;e=b-1;0>e&&(e=d);g=b+1;g>d&&(g=0);return(d=f(h[b],h[e],h[g],k[a]))?!0:
+!1}function d(a,b){var c,f;for(c=0;c<k.length;c++)if(f=c+1,f%=k.length,f=e(a,b,k[c],k[f],!0),0<f.length)return!0;return!1}function g(a,c){var d,f,k,h;for(d=0;d<l.length;d++)for(f=b[l[d]],k=0;k<f.length;k++)if(h=k+1,h%=f.length,h=e(a,c,f[k],f[h],!0),0<h.length)return!0;return!1}var k=a.concat(),h,l=[],m,n,p,r,q,B=[],C,D,H,I=0;for(m=b.length;I<m;I++)l.push(I);C=0;for(var L=2*l.length;0<l.length;){L--;if(0>L){console.log("Infinite Loop! Holes left:"+l.length+", Probably Hole outside Shape!");break}for(n=
+C;n<k.length;n++){p=k[n];m=-1;for(I=0;I<l.length;I++)if(r=l[I],q=p.x+":"+p.y+":"+r,void 0===B[q]){h=b[r];for(D=0;D<h.length;D++)if(r=h[D],c(n,D)&&!d(p,r)&&!g(p,r)){m=D;l.splice(I,1);C=k.slice(0,n+1);r=k.slice(n);D=h.slice(m);H=h.slice(0,m+1);k=C.concat(D).concat(H).concat(r);C=n;break}if(0<=m)break;B[q]=!0}if(0<=m)break}}return k}(a,b);var m=h.ShapeUtils.triangulate(g,!1);g=0;for(k=m.length;g<k;g++)for(n=m[g],l=0;3>l;l++)r=n[l].x+":"+n[l].y,r=p[r],void 0!==r&&(n[l]=r);return m.concat()},isClockWise:function(a){return 0>
+h.ShapeUtils.area(a)},b2:function(){return function(a,b,c,d){var e=1-a;return e*e*b+2*(1-a)*a*c+a*a*d}}(),b3:function(){return function(a,b,c,d,e){var f=1-a,g=1-a;return f*f*f*b+3*g*g*a*c+3*(1-a)*a*a*d+a*a*a*e}}()};ta.prototype=Object.create(S.prototype);ta.prototype.constructor=ta;ta.prototype.addShapeList=function(a,b){for(var c=a.length,d=0;d<c;d++)this.addShape(a[d],b)};ta.prototype.addShape=function(a,b){function c(a,b,c){b||console.error("THREE.ExtrudeGeometry: vec does not exist");return b.clone().multiplyScalar(c).add(a)}
+function d(a,b,c){var d,e,f;e=a.x-b.x;f=a.y-b.y;d=c.x-a.x;var g=c.y-a.y,k=e*e+f*f;if(Math.abs(e*g-f*d)>Number.EPSILON){var h=Math.sqrt(k),l=Math.sqrt(d*d+g*g),k=b.x-f/h;b=b.y+e/h;g=((c.x-g/l-k)*g-(c.y+d/l-b)*d)/(e*g-f*d);d=k+e*g-a.x;e=b+f*g-a.y;f=d*d+e*e;if(2>=f)return new B(d,e);f=Math.sqrt(f/2)}else a=!1,e>Number.EPSILON?d>Number.EPSILON&&(a=!0):e<-Number.EPSILON?d<-Number.EPSILON&&(a=!0):Math.sign(f)===Math.sign(g)&&(a=!0),a?(d=-f,f=Math.sqrt(k)):(d=e,e=f,f=Math.sqrt(k/2));return new B(d/f,e/f)}
+function e(a,b){var c,d;for(J=a.length;0<=--J;){c=J;d=J-1;0>d&&(d=a.length-1);var e,f=t+2*r;for(e=0;e<f;e++){var g=U*e,k=U*(e+1),h=b+c+g,g=b+d+g,l=b+d+k,k=b+c+k,h=h+M,g=g+M,l=l+M,k=k+M;H.faces.push(new la(h,g,k,null,null,1));H.faces.push(new la(g,l,k,null,null,1));h=w.generateSideWallUV(H,h,g,l,k);H.faceVertexUvs[0].push([h[0],h[1],h[3]]);H.faceVertexUvs[0].push([h[1],h[2],h[3]])}}}function f(a,b,c){H.vertices.push(new q(a,b,c))}function g(a,b,c){a+=M;b+=M;c+=M;H.faces.push(new la(a,b,c,null,null,
+0));a=w.generateTopUV(H,a,b,c);H.faceVertexUvs[0].push(a)}var k=void 0!==b.amount?b.amount:100,l=void 0!==b.bevelThickness?b.bevelThickness:6,n=void 0!==b.bevelSize?b.bevelSize:l-2,r=void 0!==b.bevelSegments?b.bevelSegments:3,p=void 0!==b.bevelEnabled?b.bevelEnabled:!0,m=void 0!==b.curveSegments?b.curveSegments:12,t=void 0!==b.steps?b.steps:1,u=b.extrudePath,v,z=!1,w=void 0!==b.UVGenerator?b.UVGenerator:ta.WorldUVGenerator,x,C,y,F;u&&(v=u.getSpacedPoints(t),z=!0,p=!1,x=void 0!==b.frames?b.frames:
+new za.FrenetFrames(u,t,!1),C=new q,y=new q,F=new q);p||(n=l=r=0);var G,E,D,H=this,M=this.vertices.length,u=a.extractPoints(m),m=u.shape,I=u.holes;if(u=!h.ShapeUtils.isClockWise(m)){m=m.reverse();E=0;for(D=I.length;E<D;E++)G=I[E],h.ShapeUtils.isClockWise(G)&&(I[E]=G.reverse());u=!1}var Q=h.ShapeUtils.triangulateShape(m,I),T=m;E=0;for(D=I.length;E<D;E++)G=I[E],m=m.concat(G);var S,L,O,P,R,U=m.length,V,W=Q.length,u=[],J=0;O=T.length;S=O-1;for(L=J+1;J<O;J++,S++,L++)S===O&&(S=0),L===O&&(L=0),u[J]=d(T[J],
+T[S],T[L]);var Y=[],Z,ba=u.concat();E=0;for(D=I.length;E<D;E++){G=I[E];Z=[];J=0;O=G.length;S=O-1;for(L=J+1;J<O;J++,S++,L++)S===O&&(S=0),L===O&&(L=0),Z[J]=d(G[J],G[S],G[L]);Y.push(Z);ba=ba.concat(Z)}for(S=0;S<r;S++){O=S/r;P=l*Math.cos(O*Math.PI/2);L=n*Math.sin(O*Math.PI/2);J=0;for(O=T.length;J<O;J++)R=c(T[J],u[J],L),f(R.x,R.y,-P);E=0;for(D=I.length;E<D;E++)for(G=I[E],Z=Y[E],J=0,O=G.length;J<O;J++)R=c(G[J],Z[J],L),f(R.x,R.y,-P)}L=n;for(J=0;J<U;J++)R=p?c(m[J],ba[J],L):m[J],z?(y.copy(x.normals[0]).multiplyScalar(R.x),
+C.copy(x.binormals[0]).multiplyScalar(R.y),F.copy(v[0]).add(y).add(C),f(F.x,F.y,F.z)):f(R.x,R.y,0);for(O=1;O<=t;O++)for(J=0;J<U;J++)R=p?c(m[J],ba[J],L):m[J],z?(y.copy(x.normals[O]).multiplyScalar(R.x),C.copy(x.binormals[O]).multiplyScalar(R.y),F.copy(v[O]).add(y).add(C),f(F.x,F.y,F.z)):f(R.x,R.y,k/t*O);for(S=r-1;0<=S;S--){O=S/r;P=l*Math.cos(O*Math.PI/2);L=n*Math.sin(O*Math.PI/2);J=0;for(O=T.length;J<O;J++)R=c(T[J],u[J],L),f(R.x,R.y,k+P);E=0;for(D=I.length;E<D;E++)for(G=I[E],Z=Y[E],J=0,O=G.length;J<
+O;J++)R=c(G[J],Z[J],L),z?f(R.x,R.y+v[t-1].y,v[t-1].x+P):f(R.x,R.y,k+P)}(function(){if(p){var a=0*U;for(J=0;J<W;J++)V=Q[J],g(V[2]+a,V[1]+a,V[0]+a);a=U*(t+2*r);for(J=0;J<W;J++)V=Q[J],g(V[0]+a,V[1]+a,V[2]+a)}else{for(J=0;J<W;J++)V=Q[J],g(V[2],V[1],V[0]);for(J=0;J<W;J++)V=Q[J],g(V[0]+U*t,V[1]+U*t,V[2]+U*t)}})();(function(){var a=0;e(T,a);a+=T.length;E=0;for(D=I.length;E<D;E++)G=I[E],e(G,a),a+=G.length})()};ta.WorldUVGenerator={generateTopUV:function(a,b,c,d){a=a.vertices;b=a[b];c=a[c];d=a[d];return[new B(b.x,
+b.y),new B(c.x,c.y),new B(d.x,d.y)]},generateSideWallUV:function(a,b,c,d,e){a=a.vertices;b=a[b];c=a[c];d=a[d];e=a[e];return.01>Math.abs(b.y-c.y)?[new B(b.x,1-b.z),new B(c.x,1-c.z),new B(d.x,1-d.z),new B(e.x,1-e.z)]:[new B(b.y,1-b.z),new B(c.y,1-c.z),new B(d.y,1-d.z),new B(e.y,1-e.z)]}};vc.prototype=Object.create(ta.prototype);vc.prototype.constructor=vc;qb.prototype=Object.create(H.prototype);qb.prototype.constructor=qb;Pb.prototype=Object.create(S.prototype);Pb.prototype.constructor=Pb;Qb.prototype=
+Object.create(H.prototype);Qb.prototype.constructor=Qb;wc.prototype=Object.create(S.prototype);wc.prototype.constructor=wc;xc.prototype=Object.create(S.prototype);xc.prototype.constructor=xc;Rb.prototype=Object.create(H.prototype);Rb.prototype.constructor=Rb;yc.prototype=Object.create(S.prototype);yc.prototype.constructor=yc;$a.prototype=Object.create(S.prototype);$a.prototype.constructor=$a;$a.prototype.addShapeList=function(a,b){for(var c=0,d=a.length;c<d;c++)this.addShape(a[c],b);return this};
+$a.prototype.addShape=function(a,b){void 0===b&&(b={});var c=b.material,d=void 0===b.UVGenerator?ta.WorldUVGenerator:b.UVGenerator,e,f,g,k=this.vertices.length;e=a.extractPoints(void 0!==b.curveSegments?b.curveSegments:12);var l=e.shape,n=e.holes;if(!h.ShapeUtils.isClockWise(l))for(l=l.reverse(),e=0,f=n.length;e<f;e++)g=n[e],h.ShapeUtils.isClockWise(g)&&(n[e]=g.reverse());var r=h.ShapeUtils.triangulateShape(l,n);e=0;for(f=n.length;e<f;e++)g=n[e],l=l.concat(g);n=l.length;f=r.length;for(e=0;e<n;e++)g=
+l[e],this.vertices.push(new q(g.x,g.y,0));for(e=0;e<f;e++)n=r[e],l=n[0]+k,g=n[1]+k,n=n[2]+k,this.faces.push(new la(l,g,n,null,null,c)),this.faceVertexUvs[0].push(d.generateTopUV(this,l,g,n))};Sb.prototype=Object.create(H.prototype);Sb.prototype.constructor=Sb;ab.prototype=Object.create(H.prototype);ab.prototype.constructor=ab;rb.prototype=Object.create(S.prototype);rb.prototype.constructor=rb;zc.prototype=Object.create(rb.prototype);zc.prototype.constructor=zc;Ac.prototype=Object.create(H.prototype);
+Ac.prototype.constructor=Ac;Tb.prototype=Object.create(H.prototype);Tb.prototype.constructor=Tb;Bc.prototype=Object.create(S.prototype);Bc.prototype.constructor=Bc;sb.prototype=Object.create(S.prototype);sb.prototype.constructor=sb;var ua=Object.freeze({WireframeGeometry:Mb,ParametricGeometry:oc,TetrahedronGeometry:pc,OctahedronGeometry:qc,IcosahedronGeometry:rc,DodecahedronGeometry:sc,PolyhedronGeometry:pa,TubeGeometry:za,TorusKnotGeometry:tc,TorusKnotBufferGeometry:Nb,TorusGeometry:uc,TorusBufferGeometry:Ob,
+TextGeometry:vc,SphereBufferGeometry:qb,SphereGeometry:Pb,RingGeometry:wc,RingBufferGeometry:Qb,PlaneBufferGeometry:eb,PlaneGeometry:xc,LatheGeometry:yc,LatheBufferGeometry:Rb,ShapeGeometry:$a,ExtrudeGeometry:ta,EdgesGeometry:Sb,ConeGeometry:zc,ConeBufferGeometry:Ac,CylinderGeometry:rb,CylinderBufferGeometry:ab,CircleBufferGeometry:Tb,CircleGeometry:Bc,BoxBufferGeometry:db,BoxGeometry:sb});Object.assign(le.prototype,{load:function(a,b,c,d){""===this.texturePath&&(this.texturePath=a.substring(0,a.lastIndexOf("/")+
+1));var e=this;(new wa(e.manager)).load(a,function(a){e.parse(JSON.parse(a),b)},c,d)},setTexturePath:function(a){this.texturePath=a},setCrossOrigin:function(a){this.crossOrigin=a},parse:function(a,b){var c=this.parseGeometries(a.geometries),d=this.parseImages(a.images,function(){void 0!==b&&b(e)}),d=this.parseTextures(a.textures,d),d=this.parseMaterials(a.materials,d),e=this.parseObject(a.object,c,d);a.animations&&(e.animations=this.parseAnimations(a.animations));void 0!==a.images&&0!==a.images.length||
+void 0===b||b(e);return e},parseGeometries:function(a){var b={};if(void 0!==a)for(var c=new xd,d=new wd,e=0,f=a.length;e<f;e++){var g,k=a[e];switch(k.type){case "PlaneGeometry":case "PlaneBufferGeometry":g=new ua[k.type](k.width,k.height,k.widthSegments,k.heightSegments);break;case "BoxGeometry":case "BoxBufferGeometry":case "CubeGeometry":g=new ua[k.type](k.width,k.height,k.depth,k.widthSegments,k.heightSegments,k.depthSegments);break;case "CircleGeometry":case "CircleBufferGeometry":g=new ua[k.type](k.radius,
+k.segments,k.thetaStart,k.thetaLength);break;case "CylinderGeometry":case "CylinderBufferGeometry":g=new ua[k.type](k.radiusTop,k.radiusBottom,k.height,k.radialSegments,k.heightSegments,k.openEnded,k.thetaStart,k.thetaLength);break;case "ConeGeometry":case "ConeBufferGeometry":g=new ua[k.type](k.radius,k.height,k.radialSegments,k.heightSegments,k.openEnded,k.thetaStart,k.thetaLength);break;case "SphereGeometry":case "SphereBufferGeometry":g=new ua[k.type](k.radius,k.widthSegments,k.heightSegments,
+k.phiStart,k.phiLength,k.thetaStart,k.thetaLength);break;case "DodecahedronGeometry":case "IcosahedronGeometry":case "OctahedronGeometry":case "TetrahedronGeometry":g=new ua[k.type](k.radius,k.detail);break;case "RingGeometry":case "RingBufferGeometry":g=new ua[k.type](k.innerRadius,k.outerRadius,k.thetaSegments,k.phiSegments,k.thetaStart,k.thetaLength);break;case "TorusGeometry":case "TorusBufferGeometry":g=new ua[k.type](k.radius,k.tube,k.radialSegments,k.tubularSegments,k.arc);break;case "TorusKnotGeometry":case "TorusKnotBufferGeometry":g=
+new ua[k.type](k.radius,k.tube,k.tubularSegments,k.radialSegments,k.p,k.q);break;case "LatheGeometry":case "LatheBufferGeometry":g=new ua[k.type](k.points,k.segments,k.phiStart,k.phiLength);break;case "BufferGeometry":g=d.parse(k);break;case "Geometry":g=c.parse(k.data,this.texturePath).geometry;break;default:console.warn('THREE.ObjectLoader: Unsupported geometry type "'+k.type+'"');continue}g.uuid=k.uuid;void 0!==k.name&&(g.name=k.name);b[k.uuid]=g}return b},parseMaterials:function(a,b){var c={};
+if(void 0!==a){var d=new fd;d.setTextures(b);for(var e=0,f=a.length;e<f;e++){var g=d.parse(a[e]);c[g.uuid]=g}}return c},parseAnimations:function(a){for(var b=[],c=0;c<a.length;c++){var d=sa.parse(a[c]);b.push(d)}return b},parseImages:function(a,b){function c(a){d.manager.itemStart(a);return g.load(a,function(){d.manager.itemEnd(a)},void 0,function(){d.manager.itemError(a)})}var d=this,e={};if(void 0!==a&&0<a.length){var f=new td(b),g=new lc(f);g.setCrossOrigin(this.crossOrigin);for(var f=0,k=a.length;f<
+k;f++){var h=a[f],n=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(h.url)?h.url:d.texturePath+h.url;e[h.uuid]=c(n)}}return e},parseTextures:function(a,b){function c(a,b){if("number"===typeof a)return a;console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",a);return b[a]}var d={};if(void 0!==a)for(var e=0,f=a.length;e<f;e++){var g=a[e];void 0===g.image&&console.warn('THREE.ObjectLoader: No "image" specified for',g.uuid);void 0===b[g.image]&&console.warn("THREE.ObjectLoader: Undefined image",
+g.image);var k=new Z(b[g.image]);k.needsUpdate=!0;k.uuid=g.uuid;void 0!==g.name&&(k.name=g.name);void 0!==g.mapping&&(k.mapping=c(g.mapping,te));void 0!==g.offset&&k.offset.fromArray(g.offset);void 0!==g.repeat&&k.repeat.fromArray(g.repeat);void 0!==g.wrap&&(k.wrapS=c(g.wrap[0],Pd),k.wrapT=c(g.wrap[1],Pd));void 0!==g.minFilter&&(k.minFilter=c(g.minFilter,Qd));void 0!==g.magFilter&&(k.magFilter=c(g.magFilter,Qd));void 0!==g.anisotropy&&(k.anisotropy=g.anisotropy);void 0!==g.flipY&&(k.flipY=g.flipY);
+d[g.uuid]=k}return d},parseObject:function(){var a=new Q;return function(b,c,d){function e(a){void 0===c[a]&&console.warn("THREE.ObjectLoader: Undefined geometry",a);return c[a]}function f(a){if(void 0!==a)return void 0===d[a]&&console.warn("THREE.ObjectLoader: Undefined material",a),d[a]}var g;switch(b.type){case "Scene":g=new fb;void 0!==b.background&&Number.isInteger(b.background)&&(g.background=new I(b.background));void 0!==b.fog&&("Fog"===b.fog.type?g.fog=new Fb(b.fog.color,b.fog.near,b.fog.far):
+"FogExp2"===b.fog.type&&(g.fog=new Eb(b.fog.color,b.fog.density)));break;case "PerspectiveCamera":g=new Ca(b.fov,b.aspect,b.near,b.far);void 0!==b.focus&&(g.focus=b.focus);void 0!==b.zoom&&(g.zoom=b.zoom);void 0!==b.filmGauge&&(g.filmGauge=b.filmGauge);void 0!==b.filmOffset&&(g.filmOffset=b.filmOffset);void 0!==b.view&&(g.view=Object.assign({},b.view));break;case "OrthographicCamera":g=new Db(b.left,b.right,b.top,b.bottom,b.near,b.far);break;case "AmbientLight":g=new Zc(b.color,b.intensity);break;
+case "DirectionalLight":g=new Yc(b.color,b.intensity);break;case "PointLight":g=new Wc(b.color,b.intensity,b.distance,b.decay);break;case "SpotLight":g=new Vc(b.color,b.intensity,b.distance,b.angle,b.penumbra,b.decay);break;case "HemisphereLight":g=new Tc(b.color,b.groundColor,b.intensity);break;case "Mesh":g=e(b.geometry);var k=f(b.material);g=g.bones&&0<g.bones.length?new Pc(g,k):new va(g,k);break;case "LOD":g=new hc;break;case "Line":g=new Qa(e(b.geometry),f(b.material),b.mode);break;case "LineSegments":g=
+new ba(e(b.geometry),f(b.material));break;case "PointCloud":case "Points":g=new Gb(e(b.geometry),f(b.material));break;case "Sprite":g=new gc(f(b.material));break;case "Group":g=new ic;break;default:g=new D}g.uuid=b.uuid;void 0!==b.name&&(g.name=b.name);void 0!==b.matrix?(a.fromArray(b.matrix),a.decompose(g.position,g.quaternion,g.scale)):(void 0!==b.position&&g.position.fromArray(b.position),void 0!==b.rotation&&g.rotation.fromArray(b.rotation),void 0!==b.quaternion&&g.quaternion.fromArray(b.quaternion),
+void 0!==b.scale&&g.scale.fromArray(b.scale));void 0!==b.castShadow&&(g.castShadow=b.castShadow);void 0!==b.receiveShadow&&(g.receiveShadow=b.receiveShadow);b.shadow&&(void 0!==b.shadow.bias&&(g.shadow.bias=b.shadow.bias),void 0!==b.shadow.radius&&(g.shadow.radius=b.shadow.radius),void 0!==b.shadow.mapSize&&g.shadow.mapSize.fromArray(b.shadow.mapSize),void 0!==b.shadow.camera&&(g.shadow.camera=this.parseObject(b.shadow.camera)));void 0!==b.visible&&(g.visible=b.visible);void 0!==b.userData&&(g.userData=
+b.userData);if(void 0!==b.children)for(var h in b.children)g.add(this.parseObject(b.children[h],c,d));if("LOD"===b.type)for(b=b.levels,k=0;k<b.length;k++){var n=b[k];h=g.getObjectByProperty("uuid",n.object);void 0!==h&&g.addLevel(h,n.distance)}return g}}()});qa.prototype={constructor:qa,getPoint:function(a){console.warn("THREE.Curve: Warning, getPoint() not implemented!");return null},getPointAt:function(a){a=this.getUtoTmapping(a);return this.getPoint(a)},getPoints:function(a){a||(a=5);for(var b=
+[],c=0;c<=a;c++)b.push(this.getPoint(c/a));return b},getSpacedPoints:function(a){a||(a=5);for(var b=[],c=0;c<=a;c++)b.push(this.getPointAt(c/a));return b},getLength:function(){var a=this.getLengths();return a[a.length-1]},getLengths:function(a){a||(a=this.__arcLengthDivisions?this.__arcLengthDivisions:200);if(this.cacheArcLengths&&this.cacheArcLengths.length===a+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var b=[],c,d=this.getPoint(0),e,f=0;b.push(0);for(e=1;e<=a;e++)c=this.getPoint(e/
+a),f+=c.distanceTo(d),b.push(f),d=c;return this.cacheArcLengths=b},updateArcLengths:function(){this.needsUpdate=!0;this.getLengths()},getUtoTmapping:function(a,b){var c=this.getLengths(),d,e=c.length,f;f=b?b:a*c[e-1];for(var g=0,k=e-1,h;g<=k;)if(d=Math.floor(g+(k-g)/2),h=c[d]-f,0>h)g=d+1;else if(0<h)k=d-1;else{k=d;break}d=k;if(c[d]===f)return d/(e-1);g=c[d];return(d+(f-g)/(c[d+1]-g))/(e-1)},getTangent:function(a){var b=a-1E-4;a+=1E-4;0>b&&(b=0);1<a&&(a=1);b=this.getPoint(b);return this.getPoint(a).clone().sub(b).normalize()},
+getTangentAt:function(a){a=this.getUtoTmapping(a);return this.getTangent(a)}};qa.create=function(a,b){a.prototype=Object.create(qa.prototype);a.prototype.constructor=a;a.prototype.getPoint=b;return a};Ma.prototype=Object.create(qa.prototype);Ma.prototype.constructor=Ma;Ma.prototype.isLineCurve=!0;Ma.prototype.getPoint=function(a){if(1===a)return this.v2.clone();var b=this.v2.clone().sub(this.v1);b.multiplyScalar(a).add(this.v1);return b};Ma.prototype.getPointAt=function(a){return this.getPoint(a)};
+Ma.prototype.getTangent=function(a){return this.v2.clone().sub(this.v1).normalize()};Cc.prototype=Object.assign(Object.create(qa.prototype),{constructor:Cc,add:function(a){this.curves.push(a)},closePath:function(){var a=this.curves[0].getPoint(0),b=this.curves[this.curves.length-1].getPoint(1);a.equals(b)||this.curves.push(new Ma(b,a))},getPoint:function(a){var b=a*this.getLength(),c=this.getCurveLengths();for(a=0;a<c.length;){if(c[a]>=b)return b=c[a]-b,a=this.curves[a],c=a.getLength(),a.getPointAt(0===
+c?0:1-b/c);a++}return null},getLength:function(){var a=this.getCurveLengths();return a[a.length-1]},updateArcLengths:function(){this.needsUpdate=!0;this.cacheLengths=null;this.getLengths()},getCurveLengths:function(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var a=[],b=0,c=0,d=this.curves.length;c<d;c++)b+=this.curves[c].getLength(),a.push(b);return this.cacheLengths=a},getSpacedPoints:function(a){a||(a=40);for(var b=[],c=0;c<=a;c++)b.push(this.getPoint(c/
+a));this.autoClose&&b.push(b[0]);return b},getPoints:function(a){a=a||12;for(var b=[],c,d=0,e=this.curves;d<e.length;d++)for(var f=e[d],f=f.getPoints(f&&f.isEllipseCurve?2*a:f&&f.isLineCurve?1:f&&f.isSplineCurve?a*f.points.length:a),g=0;g<f.length;g++){var k=f[g];c&&c.equals(k)||(b.push(k),c=k)}this.autoClose&&1<b.length&&!b[b.length-1].equals(b[0])&&b.push(b[0]);return b},createPointsGeometry:function(a){a=this.getPoints(a);return this.createGeometry(a)},createSpacedPointsGeometry:function(a){a=
+this.getSpacedPoints(a);return this.createGeometry(a)},createGeometry:function(a){for(var b=new S,c=0,d=a.length;c<d;c++){var e=a[c];b.vertices.push(new q(e.x,e.y,e.z||0))}return b}});Sa.prototype=Object.create(qa.prototype);Sa.prototype.constructor=Sa;Sa.prototype.isEllipseCurve=!0;Sa.prototype.getPoint=function(a){for(var b=2*Math.PI,c=this.aEndAngle-this.aStartAngle,d=Math.abs(c)<Number.EPSILON;0>c;)c+=b;for(;c>b;)c-=b;c<Number.EPSILON&&(c=d?0:b);!0!==this.aClockwise||d||(c=c===b?-b:c-b);b=this.aStartAngle+
+a*c;a=this.aX+this.xRadius*Math.cos(b);var e=this.aY+this.yRadius*Math.sin(b);0!==this.aRotation&&(b=Math.cos(this.aRotation),c=Math.sin(this.aRotation),d=a-this.aX,e-=this.aY,a=d*b-e*c+this.aX,e=d*c+e*b+this.aY);return new B(a,e)};h.CurveUtils={tangentQuadraticBezier:function(a,b,c,d){return 2*(1-a)*(c-b)+2*a*(d-c)},tangentCubicBezier:function(a,b,c,d,e){return-3*b*(1-a)*(1-a)+3*c*(1-a)*(1-a)-6*a*c*(1-a)+6*a*d*(1-a)-3*a*a*d+3*a*a*e},tangentSpline:function(a,b,c,d,e){return 6*a*a-6*a+(3*a*a-4*a+1)+
+(-6*a*a+6*a)+(3*a*a-2*a)},interpolate:function(a,b,c,d,e){a=.5*(c-a);d=.5*(d-b);var f=e*e;return(2*b-2*c+a+d)*e*f+(-3*b+3*c-2*a-d)*f+a*e+b}};tb.prototype=Object.create(qa.prototype);tb.prototype.constructor=tb;tb.prototype.isSplineCurve=!0;tb.prototype.getPoint=function(a){var b=this.points;a*=b.length-1;var c=Math.floor(a);a-=c;var d=b[0===c?c:c-1],e=b[c],f=b[c>b.length-2?b.length-1:c+1],b=b[c>b.length-3?b.length-1:c+2],c=h.CurveUtils.interpolate;return new B(c(d.x,e.x,f.x,b.x,a),c(d.y,e.y,f.y,b.y,
+a))};ub.prototype=Object.create(qa.prototype);ub.prototype.constructor=ub;ub.prototype.getPoint=function(a){var b=h.ShapeUtils.b3;return new B(b(a,this.v0.x,this.v1.x,this.v2.x,this.v3.x),b(a,this.v0.y,this.v1.y,this.v2.y,this.v3.y))};ub.prototype.getTangent=function(a){var b=h.CurveUtils.tangentCubicBezier;return(new B(b(a,this.v0.x,this.v1.x,this.v2.x,this.v3.x),b(a,this.v0.y,this.v1.y,this.v2.y,this.v3.y))).normalize()};vb.prototype=Object.create(qa.prototype);vb.prototype.constructor=vb;vb.prototype.getPoint=
+function(a){var b=h.ShapeUtils.b2;return new B(b(a,this.v0.x,this.v1.x,this.v2.x),b(a,this.v0.y,this.v1.y,this.v2.y))};vb.prototype.getTangent=function(a){var b=h.CurveUtils.tangentQuadraticBezier;return(new B(b(a,this.v0.x,this.v1.x,this.v2.x),b(a,this.v0.y,this.v1.y,this.v2.y))).normalize()};var Rd=Object.assign(Object.create(Cc.prototype),{fromPoints:function(a){this.moveTo(a[0].x,a[0].y);for(var b=1,c=a.length;b<c;b++)this.lineTo(a[b].x,a[b].y)},moveTo:function(a,b){this.currentPoint.set(a,b)},
+lineTo:function(a,b){var c=new Ma(this.currentPoint.clone(),new B(a,b));this.curves.push(c);this.currentPoint.set(a,b)},quadraticCurveTo:function(a,b,c,d){a=new vb(this.currentPoint.clone(),new B(a,b),new B(c,d));this.curves.push(a);this.currentPoint.set(c,d)},bezierCurveTo:function(a,b,c,d,e,f){a=new ub(this.currentPoint.clone(),new B(a,b),new B(c,d),new B(e,f));this.curves.push(a);this.currentPoint.set(e,f)},splineThru:function(a){var b=[this.currentPoint.clone()].concat(a),b=new tb(b);this.curves.push(b);
+this.currentPoint.copy(a[a.length-1])},arc:function(a,b,c,d,e,f){this.absarc(a+this.currentPoint.x,b+this.currentPoint.y,c,d,e,f)},absarc:function(a,b,c,d,e,f){this.absellipse(a,b,c,c,d,e,f)},ellipse:function(a,b,c,d,e,f,g,k){this.absellipse(a+this.currentPoint.x,b+this.currentPoint.y,c,d,e,f,g,k)},absellipse:function(a,b,c,d,e,f,g,k){a=new Sa(a,b,c,d,e,f,g,k);0<this.curves.length&&(b=a.getPoint(0),b.equals(this.currentPoint)||this.lineTo(b.x,b.y));this.curves.push(a);a=a.getPoint(1);this.currentPoint.copy(a)}});
+Ub.prototype=Object.assign(Object.create(Rd),{constructor:Ub,extrude:function(a){return new ta(this,a)},makeGeometry:function(a){return new $a(this,a)},getPointsHoles:function(a){for(var b=[],c=0,d=this.holes.length;c<d;c++)b[c]=this.holes[c].getPoints(a);return b},extractAllPoints:function(a){return{shape:this.getPoints(a),holes:this.getPointsHoles(a)}},extractPoints:function(a){return this.extractAllPoints(a)}});Dc.prototype=Rd;Rd.constructor=Dc;yd.prototype={moveTo:function(a,b){this.currentPath=
+new Dc;this.subPaths.push(this.currentPath);this.currentPath.moveTo(a,b)},lineTo:function(a,b){this.currentPath.lineTo(a,b)},quadraticCurveTo:function(a,b,c,d){this.currentPath.quadraticCurveTo(a,b,c,d)},bezierCurveTo:function(a,b,c,d,e,f){this.currentPath.bezierCurveTo(a,b,c,d,e,f)},splineThru:function(a){this.currentPath.splineThru(a)},toShapes:function(a,b){function c(a){for(var b=[],c=0,d=a.length;c<d;c++){var e=a[c],f=new Ub;f.curves=e.curves;b.push(f)}return b}function d(a,b){for(var c=b.length,
+d=!1,e=c-1,f=0;f<c;e=f++){var g=b[e],k=b[f],h=k.x-g.x,l=k.y-g.y;if(Math.abs(l)>Number.EPSILON){if(0>l&&(g=b[f],h=-h,k=b[e],l=-l),!(a.y<g.y||a.y>k.y))if(a.y===g.y){if(a.x===g.x)return!0}else{e=l*(a.x-g.x)-h*(a.y-g.y);if(0===e)return!0;0>e||(d=!d)}}else if(a.y===g.y&&(k.x<=a.x&&a.x<=g.x||g.x<=a.x&&a.x<=k.x))return!0}return d}var e=h.ShapeUtils.isClockWise,f=this.subPaths;if(0===f.length)return[];if(!0===b)return c(f);var g,k,l,n=[];if(1===f.length)return k=f[0],l=new Ub,l.curves=k.curves,n.push(l),
+n;var r=!e(f[0].getPoints()),r=a?!r:r;l=[];var p=[],m=[],q=0,u;p[q]=void 0;m[q]=[];for(var v=0,z=f.length;v<z;v++)k=f[v],u=k.getPoints(),g=e(u),(g=a?!g:g)?(!r&&p[q]&&q++,p[q]={s:new Ub,p:u},p[q].s.curves=k.curves,r&&q++,m[q]=[]):m[q].push({h:k,p:u[0]});if(!p[0])return c(f);if(1<p.length){v=!1;k=[];e=0;for(f=p.length;e<f;e++)l[e]=[];e=0;for(f=p.length;e<f;e++)for(g=m[e],r=0;r<g.length;r++){q=g[r];u=!0;for(z=0;z<p.length;z++)d(q.p,p[z].p)&&(e!==z&&k.push({froms:e,tos:z,hole:r}),u?(u=!1,l[z].push(q)):
+v=!0);u&&l[e].push(q)}0<k.length&&(v||(m=l))}v=0;for(e=p.length;v<e;v++)for(l=p[v].s,n.push(l),k=m[v],f=0,g=k.length;f<g;f++)l.holes.push(k[f].h);return n}};Object.assign(zd.prototype,{isFont:!0,generateShapes:function(a,b,c){void 0===b&&(b=100);void 0===c&&(c=4);var d=this.data;a=String(a).split("");var e=b/d.resolution,f=0;b=[];for(var g=0;g<a.length;g++){var k;k=e;var l=f,n=d.glyphs[a[g]]||d.glyphs["?"];if(n){var r=new yd,p=[],m=h.ShapeUtils.b2,q=h.ShapeUtils.b3,u,v,z,w,x,B,y,D;if(n.o)for(var C=
+n._cachedOutline||(n._cachedOutline=n.o.split(" ")),E=0,I=C.length;E<I;)switch(C[E++]){case "m":u=C[E++]*k+l;v=C[E++]*k;r.moveTo(u,v);break;case "l":u=C[E++]*k+l;v=C[E++]*k;r.lineTo(u,v);break;case "q":u=C[E++]*k+l;v=C[E++]*k;x=C[E++]*k+l;B=C[E++]*k;r.quadraticCurveTo(x,B,u,v);if(w=p[p.length-1]){z=w.x;w=w.y;for(var H=1;H<=c;H++){var M=H/c;m(M,z,x,u);m(M,w,B,v)}}break;case "b":if(u=C[E++]*k+l,v=C[E++]*k,x=C[E++]*k+l,B=C[E++]*k,y=C[E++]*k+l,D=C[E++]*k,r.bezierCurveTo(x,B,y,D,u,v),w=p[p.length-1])for(z=
+w.x,w=w.y,H=1;H<=c;H++)M=H/c,q(M,z,x,y,u),q(M,w,B,D,v)}k={offset:n.ha*k,path:r}}else k=void 0;f+=k.offset;b.push(k.path)}c=[];d=0;for(a=b.length;d<a;d++)Array.prototype.push.apply(c,b[d].toShapes());return c}});Object.assign(me.prototype,{load:function(a,b,c,d){var e=this;(new wa(this.manager)).load(a,function(a){var c;try{c=JSON.parse(a)}catch(d){console.warn("THREE.FontLoader: typeface.js support is being deprecated. Use typeface.json instead."),c=JSON.parse(a.substring(65,a.length-2))}a=e.parse(c);
+b&&b(a)},c,d)},parse:function(a){return new zd(a)}});var Bd;Object.assign(Cd.prototype,{load:function(a,b,c,d){var e=new wa(this.manager);e.setResponseType("arraybuffer");e.load(a,function(a){Ad().decodeAudioData(a,function(a){b(a)})},c,d)}});Object.assign(ne.prototype,{update:function(){var a,b,c,d,e,f=new Q,g=new Q;return function(k){if(a!==k.focus||b!==k.fov||c!==k.aspect*this.aspect||d!==k.near||e!==k.far){a=k.focus;b=k.fov;c=k.aspect*this.aspect;d=k.near;e=k.far;var l=k.projectionMatrix.clone(),
+n=this.eyeSep/2,r=n*d/a,p=d*Math.tan(h.Math.DEG2RAD*b*.5),m;g.elements[12]=-n;f.elements[12]=n;n=-p*c+r;m=p*c+r;l.elements[0]=2*d/(m-n);l.elements[8]=(m+n)/(m-n);this.cameraL.projectionMatrix.copy(l);n=-p*c-r;m=p*c-r;l.elements[0]=2*d/(m-n);l.elements[8]=(m+n)/(m-n);this.cameraR.projectionMatrix.copy(l)}this.cameraL.matrixWorld.copy(k.matrixWorld).multiply(g);this.cameraR.matrixWorld.copy(k.matrixWorld).multiply(f)}}()});gd.prototype=Object.create(D.prototype);gd.prototype.constructor=gd;Dd.prototype=
+Object.assign(Object.create(D.prototype),{constructor:Dd,getInput:function(){return this.gain},removeFilter:function(){null!==this.filter&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null)},getFilter:function(){return this.filter},setFilter:function(a){null!==this.filter?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination);this.filter=
+a;this.gain.connect(this.filter);this.filter.connect(this.context.destination)},getMasterVolume:function(){return this.gain.gain.value},setMasterVolume:function(a){this.gain.gain.value=a},updateMatrixWorld:function(){var a=new q,b=new oa,c=new q,d=new q;return function(e){D.prototype.updateMatrixWorld.call(this,e);e=this.context.listener;var f=this.up;this.matrixWorld.decompose(a,b,c);d.set(0,0,-1).applyQuaternion(b);e.setPosition(a.x,a.y,a.z);e.setOrientation(d.x,d.y,d.z,f.x,f.y,f.z)}}()});Vb.prototype=
+Object.assign(Object.create(D.prototype),{constructor:Vb,getOutput:function(){return this.gain},setNodeSource:function(a){this.hasPlaybackControl=!1;this.sourceType="audioNode";this.source=a;this.connect();return this},setBuffer:function(a){this.source.buffer=a;this.sourceType="buffer";this.autoplay&&this.play();return this},play:function(){if(!0===this.isPlaying)console.warn("THREE.Audio: Audio is already playing.");else if(!1===this.hasPlaybackControl)console.warn("THREE.Audio: this Audio has no playback control.");
 else{var a=this.context.createBufferSource();a.buffer=this.source.buffer;a.loop=this.source.loop;a.onended=this.source.onended;a.start(0,this.startTime);a.playbackRate.value=this.playbackRate;this.isPlaying=!0;this.source=a;return this.connect()}},pause:function(){if(!1===this.hasPlaybackControl)console.warn("THREE.Audio: this Audio has no playback control.");else return this.source.stop(),this.startTime=this.context.currentTime,this.isPlaying=!1,this},stop:function(){if(!1===this.hasPlaybackControl)console.warn("THREE.Audio: this Audio has no playback control.");
 else return this.source.stop(),this.startTime=0,this.isPlaying=!1,this},connect:function(){if(0<this.filters.length){this.source.connect(this.filters[0]);for(var a=1,b=this.filters.length;a<b;a++)this.filters[a-1].connect(this.filters[a]);this.filters[this.filters.length-1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this},disconnect:function(){if(0<this.filters.length){this.source.disconnect(this.filters[0]);for(var a=1,b=this.filters.length;a<b;a++)this.filters[a-
 1].disconnect(this.filters[a]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this},getFilters:function(){return this.filters},setFilters:function(a){a||(a=[]);!0===this.isPlaying?(this.disconnect(),this.filters=a,this.connect()):this.filters=a;return this},getFilter:function(){return this.getFilters()[0]},setFilter:function(a){return this.setFilters(a?[a]:[])},setPlaybackRate:function(a){if(!1===this.hasPlaybackControl)console.warn("THREE.Audio: this Audio has no playback control.");