Browse Source

Updated builds.

Mr.doob 8 years ago
parent
commit
15e6d33eb0
3 changed files with 100 additions and 100 deletions
  1. 1 1
      build/three.js
  2. 98 98
      build/three.min.js
  3. 1 1
      build/three.module.js

+ 1 - 1
build/three.js

@@ -12019,7 +12019,7 @@
 
 		clone: function () {
 
-			return new this.constructor().copy( this );
+			return new this.constructor( this.array, this.itemSize ).copy( this );
 
 		}
 

+ 98 - 98
build/three.min.js

@@ -502,104 +502,104 @@ new a.array.constructor(a.array);this.itemSize=a.itemSize;this.count=a.count;thi
 d),f=new F);b[c++]=f.r;b[c++]=f.g;b[c++]=f.b}return this},copyIndicesArray:function(a){for(var b=this.array,c=0,d=0,e=a.length;d<e;d++){var f=a[d];b[c++]=f.a;b[c++]=f.b;b[c++]=f.c}return this},copyVector2sArray:function(a){for(var b=this.array,c=0,d=0,e=a.length;d<e;d++){var f=a[d];void 0===f&&(console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",d),f=new E);b[c++]=f.x;b[c++]=f.y}return this},copyVector3sArray:function(a){for(var b=this.array,c=0,d=0,e=a.length;d<e;d++){var f=
 a[d];void 0===f&&(console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",d),f=new q);b[c++]=f.x;b[c++]=f.y;b[c++]=f.z}return this},copyVector4sArray:function(a){for(var b=this.array,c=0,d=0,e=a.length;d<e;d++){var f=a[d];void 0===f&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",d),f=new fa);b[c++]=f.x;b[c++]=f.y;b[c++]=f.z;b[c++]=f.w}return this},set:function(a,b){void 0===b&&(b=0);this.array.set(a,b);return this},getX:function(a){return this.array[a*
 this.itemSize]},setX:function(a,b){this.array[a*this.itemSize]=b;return this},getY:function(a){return this.array[a*this.itemSize+1]},setY:function(a,b){this.array[a*this.itemSize+1]=b;return this},getZ:function(a){return this.array[a*this.itemSize+2]},setZ:function(a,b){this.array[a*this.itemSize+2]=b;return this},getW:function(a){return this.array[a*this.itemSize+3]},setW:function(a,b){this.array[a*this.itemSize+3]=b;return this},setXY:function(a,b,c){a*=this.itemSize;this.array[a+0]=b;this.array[a+
-1]=c;return this},setXYZ:function(a,b,c,d){a*=this.itemSize;this.array[a+0]=b;this.array[a+1]=c;this.array[a+2]=d;return this},setXYZW:function(a,b,c,d,e){a*=this.itemSize;this.array[a+0]=b;this.array[a+1]=c;this.array[a+2]=d;this.array[a+3]=e;return this},onUpload:function(a){this.onUploadCallback=a;return this},clone:function(){return(new this.constructor).copy(this)}};wc.prototype=Object.create(w.prototype);wc.prototype.constructor=wc;xc.prototype=Object.create(w.prototype);xc.prototype.constructor=
-xc;yc.prototype=Object.create(w.prototype);yc.prototype.constructor=yc;zc.prototype=Object.create(w.prototype);zc.prototype.constructor=zc;Ua.prototype=Object.create(w.prototype);Ua.prototype.constructor=Ua;Ac.prototype=Object.create(w.prototype);Ac.prototype.constructor=Ac;Va.prototype=Object.create(w.prototype);Va.prototype.constructor=Va;V.prototype=Object.create(w.prototype);V.prototype.constructor=V;Bc.prototype=Object.create(w.prototype);Bc.prototype.constructor=Bc;Object.assign(Je.prototype,
-{computeGroups:function(a){var b,c=[],d=void 0;a=a.faces;for(var e=0;e<a.length;e++){var f=a[e];f.materialIndex!==d&&(d=f.materialIndex,void 0!==b&&(b.count=3*e-b.start,c.push(b)),b={start:3*e,materialIndex:d})}void 0!==b&&(b.count=3*e-b.start,c.push(b));this.groups=c},fromGeometry:function(a){var b=a.faces,c=a.vertices,d=a.faceVertexUvs,e=d[0]&&0<d[0].length,f=d[1]&&0<d[1].length,g=a.morphTargets,h=g.length,m;if(0<h){m=[];for(var k=0;k<h;k++)m[k]=[];this.morphTargets.position=m}var l=a.morphNormals,
-p=l.length,n;if(0<p){n=[];for(k=0;k<p;k++)n[k]=[];this.morphTargets.normal=n}for(var t=a.skinIndices,q=a.skinWeights,r=t.length===c.length,x=q.length===c.length,k=0;k<b.length;k++){var u=b[k];this.vertices.push(c[u.a],c[u.b],c[u.c]);var v=u.vertexNormals;3===v.length?this.normals.push(v[0],v[1],v[2]):(v=u.normal,this.normals.push(v,v,v));v=u.vertexColors;3===v.length?this.colors.push(v[0],v[1],v[2]):(v=u.color,this.colors.push(v,v,v));!0===e&&(v=d[0][k],void 0!==v?this.uvs.push(v[0],v[1],v[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv ",
-k),this.uvs.push(new E,new E,new E)));!0===f&&(v=d[1][k],void 0!==v?this.uvs2.push(v[0],v[1],v[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 ",k),this.uvs2.push(new E,new E,new E)));for(v=0;v<h;v++){var L=g[v].vertices;m[v].push(L[u.a],L[u.b],L[u.c])}for(v=0;v<p;v++)L=l[v].vertexNormals[k],n[v].push(L.a,L.b,L.c);r&&this.skinIndices.push(t[u.a],t[u.b],t[u.c]);x&&this.skinWeights.push(q[u.a],q[u.b],q[u.c])}this.computeGroups(a);this.verticesNeedUpdate=a.verticesNeedUpdate;
-this.normalsNeedUpdate=a.normalsNeedUpdate;this.colorsNeedUpdate=a.colorsNeedUpdate;this.uvsNeedUpdate=a.uvsNeedUpdate;this.groupsNeedUpdate=a.groupsNeedUpdate;return this}});var Ud=0;I.prototype={constructor:I,isGeometry:!0,applyMatrix:function(a){for(var b=(new xa).getNormalMatrix(a),c=0,d=this.vertices.length;c<d;c++)this.vertices[c].applyMatrix4(a);c=0;for(d=this.faces.length;c<d;c++){a=this.faces[c];a.normal.applyMatrix3(b).normalize();for(var e=0,f=a.vertexNormals.length;e<f;e++)a.vertexNormals[e].applyMatrix3(b).normalize()}null!==
-this.boundingBox&&this.computeBoundingBox();null!==this.boundingSphere&&this.computeBoundingSphere();this.normalsNeedUpdate=this.verticesNeedUpdate=!0;return this},rotateX:function(){var a;return function(b){void 0===a&&(a=new M);a.makeRotationX(b);this.applyMatrix(a);return this}}(),rotateY:function(){var a;return function(b){void 0===a&&(a=new M);a.makeRotationY(b);this.applyMatrix(a);return this}}(),rotateZ:function(){var a;return function(b){void 0===a&&(a=new M);a.makeRotationZ(b);this.applyMatrix(a);
-return this}}(),translate:function(){var a;return function(b,c,d){void 0===a&&(a=new M);a.makeTranslation(b,c,d);this.applyMatrix(a);return this}}(),scale:function(){var a;return function(b,c,d){void 0===a&&(a=new M);a.makeScale(b,c,d);this.applyMatrix(a);return this}}(),lookAt:function(){var a;return function(b){void 0===a&&(a=new A);a.lookAt(b);a.updateMatrix();this.applyMatrix(a.matrix)}}(),fromBufferGeometry:function(a){function b(a,b,d,e){var f=void 0!==g?[l[a].clone(),l[b].clone(),l[d].clone()]:
-[],t=void 0!==h?[c.colors[a].clone(),c.colors[b].clone(),c.colors[d].clone()]:[];e=new ha(a,b,d,f,t,e);c.faces.push(e);void 0!==m&&c.faceVertexUvs[0].push([p[a].clone(),p[b].clone(),p[d].clone()]);void 0!==k&&c.faceVertexUvs[1].push([n[a].clone(),n[b].clone(),n[d].clone()])}var c=this,d=null!==a.index?a.index.array:void 0,e=a.attributes,f=e.position.array,g=void 0!==e.normal?e.normal.array:void 0,h=void 0!==e.color?e.color.array:void 0,m=void 0!==e.uv?e.uv.array:void 0,k=void 0!==e.uv2?e.uv2.array:
-void 0;void 0!==k&&(this.faceVertexUvs[1]=[]);for(var l=[],p=[],n=[],t=e=0;e<f.length;e+=3,t+=2)c.vertices.push(new q(f[e],f[e+1],f[e+2])),void 0!==g&&l.push(new q(g[e],g[e+1],g[e+2])),void 0!==h&&c.colors.push(new F(h[e],h[e+1],h[e+2])),void 0!==m&&p.push(new E(m[t],m[t+1])),void 0!==k&&n.push(new E(k[t],k[t+1]));if(void 0!==d)if(f=a.groups,0<f.length)for(e=0;e<f.length;e++)for(var H=f[e],r=H.start,x=H.count,t=r,r=r+x;t<r;t+=3)b(d[t],d[t+1],d[t+2],H.materialIndex);else for(e=0;e<d.length;e+=3)b(d[e],
-d[e+1],d[e+2]);else for(e=0;e<f.length/3;e+=3)b(e,e+1,e+2);this.computeFaceNormals();null!==a.boundingBox&&(this.boundingBox=a.boundingBox.clone());null!==a.boundingSphere&&(this.boundingSphere=a.boundingSphere.clone());return this},center:function(){this.computeBoundingBox();var a=this.boundingBox.getCenter().negate();this.translate(a.x,a.y,a.z);return a},normalize:function(){this.computeBoundingSphere();var a=this.boundingSphere.center,b=this.boundingSphere.radius,b=0===b?1:1/b,c=new M;c.set(b,
-0,0,-b*a.x,0,b,0,-b*a.y,0,0,b,-b*a.z,0,0,0,1);this.applyMatrix(c);return this},computeFaceNormals:function(){for(var a=new q,b=new q,c=0,d=this.faces.length;c<d;c++){var e=this.faces[c],f=this.vertices[e.a],g=this.vertices[e.b];a.subVectors(this.vertices[e.c],g);b.subVectors(f,g);a.cross(b);a.normalize();e.normal.copy(a)}},computeVertexNormals:function(a){void 0===a&&(a=!0);var b,c,d;d=Array(this.vertices.length);b=0;for(c=this.vertices.length;b<c;b++)d[b]=new q;if(a){var e,f,g,h=new q,m=new q;a=
-0;for(b=this.faces.length;a<b;a++)c=this.faces[a],e=this.vertices[c.a],f=this.vertices[c.b],g=this.vertices[c.c],h.subVectors(g,f),m.subVectors(e,f),h.cross(m),d[c.a].add(h),d[c.b].add(h),d[c.c].add(h)}else for(this.computeFaceNormals(),a=0,b=this.faces.length;a<b;a++)c=this.faces[a],d[c.a].add(c.normal),d[c.b].add(c.normal),d[c.c].add(c.normal);b=0;for(c=this.vertices.length;b<c;b++)d[b].normalize();a=0;for(b=this.faces.length;a<b;a++)c=this.faces[a],e=c.vertexNormals,3===e.length?(e[0].copy(d[c.a]),
-e[1].copy(d[c.b]),e[2].copy(d[c.c])):(e[0]=d[c.a].clone(),e[1]=d[c.b].clone(),e[2]=d[c.c].clone());0<this.faces.length&&(this.normalsNeedUpdate=!0)},computeFlatVertexNormals:function(){var a,b,c;this.computeFaceNormals();a=0;for(b=this.faces.length;a<b;a++){c=this.faces[a];var d=c.vertexNormals;3===d.length?(d[0].copy(c.normal),d[1].copy(c.normal),d[2].copy(c.normal)):(d[0]=c.normal.clone(),d[1]=c.normal.clone(),d[2]=c.normal.clone())}0<this.faces.length&&(this.normalsNeedUpdate=!0)},computeMorphNormals:function(){var a,
-b,c,d,e;c=0;for(d=this.faces.length;c<d;c++)for(e=this.faces[c],e.__originalFaceNormal?e.__originalFaceNormal.copy(e.normal):e.__originalFaceNormal=e.normal.clone(),e.__originalVertexNormals||(e.__originalVertexNormals=[]),a=0,b=e.vertexNormals.length;a<b;a++)e.__originalVertexNormals[a]?e.__originalVertexNormals[a].copy(e.vertexNormals[a]):e.__originalVertexNormals[a]=e.vertexNormals[a].clone();var f=new I;f.faces=this.faces;a=0;for(b=this.morphTargets.length;a<b;a++){if(!this.morphNormals[a]){this.morphNormals[a]=
-{};this.morphNormals[a].faceNormals=[];this.morphNormals[a].vertexNormals=[];e=this.morphNormals[a].faceNormals;var g=this.morphNormals[a].vertexNormals,h,m;c=0;for(d=this.faces.length;c<d;c++)h=new q,m={a:new q,b:new q,c:new q},e.push(h),g.push(m)}g=this.morphNormals[a];f.vertices=this.morphTargets[a].vertices;f.computeFaceNormals();f.computeVertexNormals();c=0;for(d=this.faces.length;c<d;c++)e=this.faces[c],h=g.faceNormals[c],m=g.vertexNormals[c],h.copy(e.normal),m.a.copy(e.vertexNormals[0]),m.b.copy(e.vertexNormals[1]),
-m.c.copy(e.vertexNormals[2])}c=0;for(d=this.faces.length;c<d;c++)e=this.faces[c],e.normal=e.__originalFaceNormal,e.vertexNormals=e.__originalVertexNormals},computeLineDistances:function(){for(var a=0,b=this.vertices,c=0,d=b.length;c<d;c++)0<c&&(a+=b[c].distanceTo(b[c-1])),this.lineDistances[c]=a},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new Pa);this.boundingBox.setFromPoints(this.vertices)},computeBoundingSphere:function(){null===this.boundingSphere&&(this.boundingSphere=
-new Ea);this.boundingSphere.setFromPoints(this.vertices)},merge:function(a,b,c){if(!1===(a&&a.isGeometry))console.error("THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.",a);else{var d,e=this.vertices.length,f=this.vertices,g=a.vertices,h=this.faces,m=a.faces,k=this.faceVertexUvs[0],l=a.faceVertexUvs[0],p=this.colors,n=a.colors;void 0===c&&(c=0);void 0!==b&&(d=(new xa).getNormalMatrix(b));a=0;for(var t=g.length;a<t;a++){var q=g[a].clone();void 0!==b&&q.applyMatrix4(b);f.push(q)}a=
-0;for(t=n.length;a<t;a++)p.push(n[a].clone());a=0;for(t=m.length;a<t;a++){var g=m[a],r=g.vertexNormals,n=g.vertexColors,p=new ha(g.a+e,g.b+e,g.c+e);p.normal.copy(g.normal);void 0!==d&&p.normal.applyMatrix3(d).normalize();b=0;for(f=r.length;b<f;b++)q=r[b].clone(),void 0!==d&&q.applyMatrix3(d).normalize(),p.vertexNormals.push(q);p.color.copy(g.color);b=0;for(f=n.length;b<f;b++)q=n[b],p.vertexColors.push(q.clone());p.materialIndex=g.materialIndex+c;h.push(p)}a=0;for(t=l.length;a<t;a++)if(c=l[a],d=[],
-void 0!==c){b=0;for(f=c.length;b<f;b++)d.push(c[b].clone());k.push(d)}}},mergeMesh:function(a){!1===(a&&a.isMesh)?console.error("THREE.Geometry.mergeMesh(): mesh not an instance of THREE.Mesh.",a):(a.matrixAutoUpdate&&a.updateMatrix(),this.merge(a.geometry,a.matrix))},mergeVertices:function(){var a={},b=[],c=[],d,e=Math.pow(10,4),f,g;f=0;for(g=this.vertices.length;f<g;f++)d=this.vertices[f],d=Math.round(d.x*e)+"_"+Math.round(d.y*e)+"_"+Math.round(d.z*e),void 0===a[d]?(a[d]=f,b.push(this.vertices[f]),
-c[f]=b.length-1):c[f]=c[a[d]];a=[];f=0;for(g=this.faces.length;f<g;f++)for(e=this.faces[f],e.a=c[e.a],e.b=c[e.b],e.c=c[e.c],e=[e.a,e.b,e.c],d=0;3>d;d++)if(e[d]===e[(d+1)%3]){a.push(f);break}for(f=a.length-1;0<=f;f--)for(e=a[f],this.faces.splice(e,1),c=0,g=this.faceVertexUvs.length;c<g;c++)this.faceVertexUvs[c].splice(e,1);f=this.vertices.length-b.length;this.vertices=b;return f},sortFacesByMaterialIndex:function(){for(var a=this.faces,b=a.length,c=0;c<b;c++)a[c]._id=c;a.sort(function(a,b){return a.materialIndex-
-b.materialIndex});var d=this.faceVertexUvs[0],e=this.faceVertexUvs[1],f,g;d&&d.length===b&&(f=[]);e&&e.length===b&&(g=[]);for(c=0;c<b;c++){var h=a[c]._id;f&&f.push(d[h]);g&&g.push(e[h])}f&&(this.faceVertexUvs[0]=f);g&&(this.faceVertexUvs[1]=g)},toJSON:function(){function a(a,b,c){return c?a|1<<b:a&~(1<<b)}function b(a){var b=a.x.toString()+a.y.toString()+a.z.toString();if(void 0!==k[b])return k[b];k[b]=m.length/3;m.push(a.x,a.y,a.z);return k[b]}function c(a){var b=a.r.toString()+a.g.toString()+a.b.toString();
-if(void 0!==p[b])return p[b];p[b]=l.length;l.push(a.getHex());return p[b]}function d(a){var b=a.x.toString()+a.y.toString();if(void 0!==t[b])return t[b];t[b]=n.length/2;n.push(a.x,a.y);return t[b]}var e={metadata:{version:4.4,type:"Geometry",generator:"Geometry.toJSON"}};e.uuid=this.uuid;e.type=this.type;""!==this.name&&(e.name=this.name);if(void 0!==this.parameters){var f=this.parameters,g;for(g in f)void 0!==f[g]&&(e[g]=f[g]);return e}f=[];for(g=0;g<this.vertices.length;g++){var h=this.vertices[g];
-f.push(h.x,h.y,h.z)}var h=[],m=[],k={},l=[],p={},n=[],t={};for(g=0;g<this.faces.length;g++){var q=this.faces[g],r=void 0!==this.faceVertexUvs[0][g],x=0<q.normal.length(),u=0<q.vertexNormals.length,v=1!==q.color.r||1!==q.color.g||1!==q.color.b,L=0<q.vertexColors.length,y=0,y=a(y,0,0),y=a(y,1,!0),y=a(y,2,!1),y=a(y,3,r),y=a(y,4,x),y=a(y,5,u),y=a(y,6,v),y=a(y,7,L);h.push(y);h.push(q.a,q.b,q.c);h.push(q.materialIndex);r&&(r=this.faceVertexUvs[0][g],h.push(d(r[0]),d(r[1]),d(r[2])));x&&h.push(b(q.normal));
-u&&(x=q.vertexNormals,h.push(b(x[0]),b(x[1]),b(x[2])));v&&h.push(c(q.color));L&&(q=q.vertexColors,h.push(c(q[0]),c(q[1]),c(q[2])))}e.data={};e.data.vertices=f;e.data.normals=m;0<l.length&&(e.data.colors=l);0<n.length&&(e.data.uvs=[n]);e.data.faces=h;return e},clone:function(){return(new I).copy(this)},copy:function(a){this.vertices=[];this.faces=[];this.faceVertexUvs=[[]];this.colors=[];for(var b=a.vertices,c=0,d=b.length;c<d;c++)this.vertices.push(b[c].clone());b=a.colors;c=0;for(d=b.length;c<d;c++)this.colors.push(b[c].clone());
-b=a.faces;c=0;for(d=b.length;c<d;c++)this.faces.push(b[c].clone());c=0;for(d=a.faceVertexUvs.length;c<d;c++){b=a.faceVertexUvs[c];void 0===this.faceVertexUvs[c]&&(this.faceVertexUvs[c]=[]);for(var e=0,f=b.length;e<f;e++){for(var g=b[e],h=[],m=0,k=g.length;m<k;m++)h.push(g[m].clone());this.faceVertexUvs[c].push(h)}}return this},dispose:function(){this.dispatchEvent({type:"dispose"})}};Object.assign(I.prototype,pa.prototype);G.prototype={constructor:G,isBufferGeometry:!0,getIndex:function(){return this.index},
-setIndex:function(a){this.index=a},addAttribute:function(a,b,c){if(!1===(b&&b.isBufferAttribute)&&!1===(b&&b.isInterleavedBufferAttribute))console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),this.addAttribute(a,new w(b,c));else if("index"===a)console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),this.setIndex(b);else return this.attributes[a]=b,this},getAttribute:function(a){return this.attributes[a]},removeAttribute:function(a){delete this.attributes[a];
-return this},addGroup:function(a,b,c){this.groups.push({start:a,count:b,materialIndex:void 0!==c?c:0})},clearGroups:function(){this.groups=[]},setDrawRange:function(a,b){this.drawRange.start=a;this.drawRange.count=b},applyMatrix:function(a){var b=this.attributes.position;void 0!==b&&(a.applyToBufferAttribute(b),b.needsUpdate=!0);b=this.attributes.normal;void 0!==b&&((new xa).getNormalMatrix(a).applyToBufferAttribute(b),b.needsUpdate=!0);null!==this.boundingBox&&this.computeBoundingBox();null!==this.boundingSphere&&
-this.computeBoundingSphere();return this},rotateX:function(){var a;return function(b){void 0===a&&(a=new M);a.makeRotationX(b);this.applyMatrix(a);return this}}(),rotateY:function(){var a;return function(b){void 0===a&&(a=new M);a.makeRotationY(b);this.applyMatrix(a);return this}}(),rotateZ:function(){var a;return function(b){void 0===a&&(a=new M);a.makeRotationZ(b);this.applyMatrix(a);return this}}(),translate:function(){var a;return function(b,c,d){void 0===a&&(a=new M);a.makeTranslation(b,c,d);
-this.applyMatrix(a);return this}}(),scale:function(){var a;return function(b,c,d){void 0===a&&(a=new M);a.makeScale(b,c,d);this.applyMatrix(a);return this}}(),lookAt:function(){var a;return function(b){void 0===a&&(a=new A);a.lookAt(b);a.updateMatrix();this.applyMatrix(a.matrix)}}(),center:function(){this.computeBoundingBox();var a=this.boundingBox.getCenter().negate();this.translate(a.x,a.y,a.z);return a},setFromObject:function(a){var b=a.geometry;if(a.isPoints||a.isLine){a=new V(3*b.vertices.length,
-3);var c=new V(3*b.colors.length,3);this.addAttribute("position",a.copyVector3sArray(b.vertices));this.addAttribute("color",c.copyColorsArray(b.colors));b.lineDistances&&b.lineDistances.length===b.vertices.length&&(a=new V(b.lineDistances.length,1),this.addAttribute("lineDistance",a.copyArray(b.lineDistances)));null!==b.boundingSphere&&(this.boundingSphere=b.boundingSphere.clone());null!==b.boundingBox&&(this.boundingBox=b.boundingBox.clone())}else a.isMesh&&b&&b.isGeometry&&this.fromGeometry(b);
-return this},updateFromObject:function(a){var b=a.geometry;if(a.isMesh){var c=b.__directGeometry;!0===b.elementsNeedUpdate&&(c=void 0,b.elementsNeedUpdate=!1);if(void 0===c)return this.fromGeometry(b);c.verticesNeedUpdate=b.verticesNeedUpdate;c.normalsNeedUpdate=b.normalsNeedUpdate;c.colorsNeedUpdate=b.colorsNeedUpdate;c.uvsNeedUpdate=b.uvsNeedUpdate;c.groupsNeedUpdate=b.groupsNeedUpdate;b.verticesNeedUpdate=!1;b.normalsNeedUpdate=!1;b.colorsNeedUpdate=!1;b.uvsNeedUpdate=!1;b.groupsNeedUpdate=!1;
-b=c}!0===b.verticesNeedUpdate&&(c=this.attributes.position,void 0!==c&&(c.copyVector3sArray(b.vertices),c.needsUpdate=!0),b.verticesNeedUpdate=!1);!0===b.normalsNeedUpdate&&(c=this.attributes.normal,void 0!==c&&(c.copyVector3sArray(b.normals),c.needsUpdate=!0),b.normalsNeedUpdate=!1);!0===b.colorsNeedUpdate&&(c=this.attributes.color,void 0!==c&&(c.copyColorsArray(b.colors),c.needsUpdate=!0),b.colorsNeedUpdate=!1);b.uvsNeedUpdate&&(c=this.attributes.uv,void 0!==c&&(c.copyVector2sArray(b.uvs),c.needsUpdate=
-!0),b.uvsNeedUpdate=!1);b.lineDistancesNeedUpdate&&(c=this.attributes.lineDistance,void 0!==c&&(c.copyArray(b.lineDistances),c.needsUpdate=!0),b.lineDistancesNeedUpdate=!1);b.groupsNeedUpdate&&(b.computeGroups(a.geometry),this.groups=b.groups,b.groupsNeedUpdate=!1);return this},fromGeometry:function(a){a.__directGeometry=(new Je).fromGeometry(a);return this.fromDirectGeometry(a.__directGeometry)},fromDirectGeometry:function(a){var b=new Float32Array(3*a.vertices.length);this.addAttribute("position",
-(new w(b,3)).copyVector3sArray(a.vertices));0<a.normals.length&&(b=new Float32Array(3*a.normals.length),this.addAttribute("normal",(new w(b,3)).copyVector3sArray(a.normals)));0<a.colors.length&&(b=new Float32Array(3*a.colors.length),this.addAttribute("color",(new w(b,3)).copyColorsArray(a.colors)));0<a.uvs.length&&(b=new Float32Array(2*a.uvs.length),this.addAttribute("uv",(new w(b,2)).copyVector2sArray(a.uvs)));0<a.uvs2.length&&(b=new Float32Array(2*a.uvs2.length),this.addAttribute("uv2",(new w(b,
-2)).copyVector2sArray(a.uvs2)));0<a.indices.length&&(b=new (65535<a.vertices.length?Uint32Array:Uint16Array)(3*a.indices.length),this.setIndex((new w(b,1)).copyIndicesArray(a.indices)));this.groups=a.groups;for(var c in a.morphTargets){for(var b=[],d=a.morphTargets[c],e=0,f=d.length;e<f;e++){var g=d[e],h=new V(3*g.length,3);b.push(h.copyVector3sArray(g))}this.morphAttributes[c]=b}0<a.skinIndices.length&&(c=new V(4*a.skinIndices.length,4),this.addAttribute("skinIndex",c.copyVector4sArray(a.skinIndices)));
-0<a.skinWeights.length&&(c=new V(4*a.skinWeights.length,4),this.addAttribute("skinWeight",c.copyVector4sArray(a.skinWeights)));null!==a.boundingSphere&&(this.boundingSphere=a.boundingSphere.clone());null!==a.boundingBox&&(this.boundingBox=a.boundingBox.clone());return this},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new Pa);var a=this.attributes.position;void 0!==a?this.boundingBox.setFromBufferAttribute(a):this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||
-isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox: Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)},computeBoundingSphere:function(){var a=new Pa,b=new q;return function(){null===this.boundingSphere&&(this.boundingSphere=new Ea);var c=this.attributes.position;if(c){var d=this.boundingSphere.center;a.setFromBufferAttribute(c);a.getCenter(d);for(var e=0,f=0,g=c.count;f<g;f++)b.x=c.getX(f),
-b.y=c.getY(f),b.z=c.getZ(f),e=Math.max(e,d.distanceToSquared(b));this.boundingSphere.radius=Math.sqrt(e);isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}}(),computeFaceNormals:function(){},computeVertexNormals:function(){var a=this.index,b=this.attributes,c=this.groups;if(b.position){var d=b.position.array;if(void 0===b.normal)this.addAttribute("normal",new w(new Float32Array(d.length),
-3));else for(var e=b.normal.array,f=0,g=e.length;f<g;f++)e[f]=0;var e=b.normal.array,h,m,k,l=new q,p=new q,n=new q,t=new q,H=new q;if(a){a=a.array;0===c.length&&this.addGroup(0,a.length);for(var r=0,x=c.length;r<x;++r)for(f=c[r],g=f.start,h=f.count,f=g,g+=h;f<g;f+=3)h=3*a[f+0],m=3*a[f+1],k=3*a[f+2],l.fromArray(d,h),p.fromArray(d,m),n.fromArray(d,k),t.subVectors(n,p),H.subVectors(l,p),t.cross(H),e[h]+=t.x,e[h+1]+=t.y,e[h+2]+=t.z,e[m]+=t.x,e[m+1]+=t.y,e[m+2]+=t.z,e[k]+=t.x,e[k+1]+=t.y,e[k+2]+=t.z}else for(f=
-0,g=d.length;f<g;f+=9)l.fromArray(d,f),p.fromArray(d,f+3),n.fromArray(d,f+6),t.subVectors(n,p),H.subVectors(l,p),t.cross(H),e[f]=t.x,e[f+1]=t.y,e[f+2]=t.z,e[f+3]=t.x,e[f+4]=t.y,e[f+5]=t.z,e[f+6]=t.x,e[f+7]=t.y,e[f+8]=t.z;this.normalizeNormals();b.normal.needsUpdate=!0}},merge:function(a,b){if(!1===(a&&a.isBufferGeometry))console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",a);else{void 0===b&&(b=0);var c=this.attributes,d;for(d in c)if(void 0!==a.attributes[d])for(var e=
-c[d].array,f=a.attributes[d],g=f.array,h=0,f=f.itemSize*b;h<g.length;h++,f++)e[f]=g[h];return this}},normalizeNormals:function(){for(var a=this.attributes.normal.array,b,c,d,e=0,f=a.length;e<f;e+=3)b=a[e],c=a[e+1],d=a[e+2],b=1/Math.sqrt(b*b+c*c+d*d),a[e]*=b,a[e+1]*=b,a[e+2]*=b},toNonIndexed:function(){if(null===this.index)return console.warn("THREE.BufferGeometry.toNonIndexed(): Geometry is already non-indexed."),this;var a=new G,b=this.index.array,c=this.attributes,d;for(d in c){for(var e=c[d],f=
-e.array,e=e.itemSize,g=new f.constructor(b.length*e),h,m=0,k=0,l=b.length;k<l;k++){h=b[k]*e;for(var p=0;p<e;p++)g[m++]=f[h++]}a.addAttribute(d,new w(g,e))}return a},toJSON:function(){var a={metadata:{version:4.4,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};a.uuid=this.uuid;a.type=this.type;""!==this.name&&(a.name=this.name);if(void 0!==this.parameters){var b=this.parameters,c;for(c in b)void 0!==b[c]&&(a[c]=b[c]);return a}a.data={attributes:{}};var d=this.index;null!==d&&(b=Array.prototype.slice.call(d.array),
-a.data.index={type:d.array.constructor.name,array:b});d=this.attributes;for(c in d){var e=d[c],b=Array.prototype.slice.call(e.array);a.data.attributes[c]={itemSize:e.itemSize,type:e.array.constructor.name,array:b,normalized:e.normalized}}c=this.groups;0<c.length&&(a.data.groups=JSON.parse(JSON.stringify(c)));c=this.boundingSphere;null!==c&&(a.data.boundingSphere={center:c.center.toArray(),radius:c.radius});return a},clone:function(){return(new G).copy(this)},copy:function(a){var b,c,d;this.index=
-null;this.attributes={};this.morphAttributes={};this.groups=[];this.boundingSphere=this.boundingBox=null;this.name=a.name;c=a.index;null!==c&&this.setIndex(c.clone());c=a.attributes;for(b in c)this.addAttribute(b,c[b].clone());var e=a.morphAttributes;for(b in e){var f=[],g=e[b];c=0;for(d=g.length;c<d;c++)f.push(g[c].clone());this.morphAttributes[b]=f}b=a.groups;c=0;for(d=b.length;c<d;c++)e=b[c],this.addGroup(e.start,e.count,e.materialIndex);b=a.boundingBox;null!==b&&(this.boundingBox=b.clone());b=
-a.boundingSphere;null!==b&&(this.boundingSphere=b.clone());this.drawRange.start=a.drawRange.start;this.drawRange.count=a.drawRange.count;return this},dispose:function(){this.dispatchEvent({type:"dispose"})}};G.MaxIndex=65535;Object.assign(G.prototype,pa.prototype);za.prototype=Object.assign(Object.create(A.prototype),{constructor:za,isMesh:!0,setDrawMode:function(a){this.drawMode=a},copy:function(a){A.prototype.copy.call(this,a);this.drawMode=a.drawMode;return this},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){ya.barycoordFromPoint(a,b,c,d,r);e.multiplyScalar(r.x);f.multiplyScalar(r.y);g.multiplyScalar(r.z);e.add(f).add(g);return e.clone()}function b(a,b,c,d,e,f,g){var h=a.material;if(null===(1===h.side?c.intersectTriangle(f,e,d,!0,g):c.intersectTriangle(d,
-e,f,2!==h.side,g)))return null;u.copy(g);u.applyMatrix4(a.matrixWorld);c=b.ray.origin.distanceTo(u);return c<b.near||c>b.far?null:{distance:c,point:u.clone(),object:a}}function c(c,d,e,f,k,l,p,q){g.fromBufferAttribute(f,l);h.fromBufferAttribute(f,p);m.fromBufferAttribute(f,q);if(c=b(c,d,e,g,h,m,x))k&&(n.fromBufferAttribute(k,l),t.fromBufferAttribute(k,p),H.fromBufferAttribute(k,q),c.uv=a(x,g,h,m,n,t,H)),c.face=new ha(l,p,q,ya.normal(g,h,m)),c.faceIndex=l;return c}var d=new M,e=new db,f=new Ea,g=new q,
-h=new q,m=new q,k=new q,l=new q,p=new q,n=new E,t=new E,H=new E,r=new q,x=new q,u=new q;return function(q,r){var u=this.geometry,D=this.material,w=this.matrixWorld;if(void 0!==D&&(null===u.boundingSphere&&u.computeBoundingSphere(),f.copy(u.boundingSphere),f.applyMatrix4(w),!1!==q.ray.intersectsSphere(f)&&(d.getInverse(w),e.copy(q.ray).applyMatrix4(d),null===u.boundingBox||!1!==e.intersectsBox(u.boundingBox)))){var C;if(u.isBufferGeometry){var J,E,D=u.index,A=u.attributes.position,w=u.attributes.uv,
-F,G;if(null!==D)for(F=0,G=D.count;F<G;F+=3){if(u=D.getX(F),J=D.getX(F+1),E=D.getX(F+2),C=c(this,q,e,A,w,u,J,E))C.faceIndex=Math.floor(F/3),r.push(C)}else for(F=0,G=A.count;F<G;F+=3)if(u=F,J=F+1,E=F+2,C=c(this,q,e,A,w,u,J,E))C.index=u,r.push(C)}else if(u.isGeometry){var I,M,w=D&&D.isMultiMaterial;F=!0===w?D.materials:null;G=u.vertices;J=u.faces;E=u.faceVertexUvs[0];0<E.length&&(A=E);for(var N=0,O=J.length;N<O;N++){var R=J[N];C=!0===w?F[R.materialIndex]:D;if(void 0!==C){E=G[R.a];I=G[R.b];M=G[R.c];if(!0===
-C.morphTargets){C=u.morphTargets;var S=this.morphTargetInfluences;g.set(0,0,0);h.set(0,0,0);m.set(0,0,0);for(var U=0,W=C.length;U<W;U++){var P=S[U];if(0!==P){var K=C[U].vertices;g.addScaledVector(k.subVectors(K[R.a],E),P);h.addScaledVector(l.subVectors(K[R.b],I),P);m.addScaledVector(p.subVectors(K[R.c],M),P)}}g.add(E);h.add(I);m.add(M);E=g;I=h;M=m}if(C=b(this,q,e,E,I,M,x))A&&(S=A[N],n.copy(S[0]),t.copy(S[1]),H.copy(S[2]),C.uv=a(x,E,I,M,n,t,H)),C.face=R,C.faceIndex=N,r.push(C)}}}}}}(),clone:function(){return(new this.constructor(this.geometry,
-this.material)).copy(this)}});Jb.prototype=Object.create(I.prototype);Jb.prototype.constructor=Jb;jb.prototype=Object.create(G.prototype);jb.prototype.constructor=jb;Cc.prototype=Object.create(I.prototype);Cc.prototype.constructor=Cc;kb.prototype=Object.create(G.prototype);kb.prototype.constructor=kb;sa.prototype=Object.create(A.prototype);sa.prototype.constructor=sa;sa.prototype.isCamera=!0;sa.prototype.getWorldDirection=function(){var a=new Z;return function(b){b=b||new q;this.getWorldQuaternion(a);
-return b.set(0,0,-1).applyQuaternion(a)}}();sa.prototype.lookAt=function(){var a=new M;return function(b){a.lookAt(this.position,b,this.up);this.quaternion.setFromRotationMatrix(a)}}();sa.prototype.clone=function(){return(new this.constructor).copy(this)};sa.prototype.copy=function(a){A.prototype.copy.call(this,a);this.matrixWorldInverse.copy(a.matrixWorldInverse);this.projectionMatrix.copy(a.projectionMatrix);return this};Ga.prototype=Object.assign(Object.create(sa.prototype),{constructor:Ga,isPerspectiveCamera:!0,
-copy:function(a){sa.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*P.RAD2DEG*Math.atan(a);this.updateProjectionMatrix()},getFocalLength:function(){var a=Math.tan(.5*P.DEG2RAD*this.fov);return.5*this.getFilmHeight()/a},getEffectiveFOV:function(){return 2*
-P.RAD2DEG*Math.atan(Math.tan(.5*P.DEG2RAD*this.fov)/this.zoom)},getFilmWidth:function(){return this.filmGauge*Math.min(this.aspect,1)},getFilmHeight:function(){return this.filmGauge/Math.max(this.aspect,1)},setViewOffset:function(a,b,c,d,e,f){this.aspect=a/b;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*
-P.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,h=f.fullHeight,e=e+f.offsetX*d/g,b=b-f.offsetY*c/h,d=f.width/g*d,c=f.height/h*c;f=this.filmOffset;0!==f&&(e+=a*f/this.getFilmWidth());this.projectionMatrix.makePerspective(e,e+d,b,b-c,a,this.far)},toJSON:function(a){a=A.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}});Kb.prototype=Object.assign(Object.create(sa.prototype),{constructor:Kb,isOrthographicCamera:!0,copy:function(a){sa.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=A.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 Kf=0;Lb.prototype.isFogExp2=!0;Lb.prototype.clone=function(){return new Lb(this.color.getHex(),this.density)};Lb.prototype.toJSON=function(a){return{type:"FogExp2",color:this.color.getHex(),density:this.density}};Mb.prototype.isFog=!0;Mb.prototype.clone=function(){return new Mb(this.color.getHex(),this.near,this.far)};Mb.prototype.toJSON=function(a){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}};lb.prototype=Object.create(A.prototype);
-lb.prototype.constructor=lb;lb.prototype.copy=function(a,b){A.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};lb.prototype.toJSON=function(a){var b=A.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};Yd.prototype=Object.assign(Object.create(A.prototype),{constructor:Yd,isLensFlare:!0,copy:function(a){A.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 F(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)}});mb.prototype=Object.create(X.prototype);mb.prototype.constructor=
-mb;mb.prototype.copy=function(a){X.prototype.copy.call(this,a);this.color.copy(a.color);this.map=a.map;this.rotation=a.rotation;return this};Fc.prototype=Object.assign(Object.create(A.prototype),{constructor:Fc,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)}});
-Gc.prototype=Object.assign(Object.create(A.prototype),{constructor:Gc,copy:function(a){A.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=A.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}});Object.assign(qd.prototype,{calculateInverses:function(){this.boneInverses=[];for(var a=0,b=this.bones.length;a<b;a++){var c=new M;this.bones[a]&&c.getInverse(this.bones[a].matrixWorld);this.boneInverses.push(c)}},pose:function(){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 M;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 qd(this.bones,this.boneInverses,this.useVertexTexture)}});rd.prototype=Object.assign(Object.create(A.prototype),{constructor:rd,isBone:!0});sd.prototype=Object.assign(Object.create(za.prototype),{constructor:sd,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 fa,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){za.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)}});
-ia.prototype=Object.create(X.prototype);ia.prototype.constructor=ia;ia.prototype.isLineBasicMaterial=!0;ia.prototype.copy=function(a){X.prototype.copy.call(this,a);this.color.copy(a.color);this.linewidth=a.linewidth;this.linecap=a.linecap;this.linejoin=a.linejoin;return this};Wa.prototype=Object.assign(Object.create(A.prototype),{constructor:Wa,isLine:!0,raycast:function(){var a=new M,b=new db,c=new Ea;return function(d,e){var f=d.linePrecision,f=f*f,g=this.geometry,h=this.matrixWorld;null===g.boundingSphere&&
-g.computeBoundingSphere();c.copy(g.boundingSphere);c.applyMatrix4(h);if(!1!==d.ray.intersectsSphere(c)){a.getInverse(h);b.copy(d.ray).applyMatrix4(a);var m=new q,k=new q,h=new q,l=new q,p=this&&this.isLineSegments?2:1;if(g.isBufferGeometry){var n=g.index,t=g.attributes.position.array;if(null!==n)for(var n=n.array,g=0,H=n.length-1;g<H;g+=p){var r=n[g+1];m.fromArray(t,3*n[g]);k.fromArray(t,3*r);r=b.distanceSqToSegment(m,k,l,h);r>f||(l.applyMatrix4(this.matrixWorld),r=d.ray.origin.distanceTo(l),r<d.near||
-r>d.far||e.push({distance:r,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this}))}else for(g=0,H=t.length/3-1;g<H;g+=p)m.fromArray(t,3*g),k.fromArray(t,3*g+3),r=b.distanceSqToSegment(m,k,l,h),r>f||(l.applyMatrix4(this.matrixWorld),r=d.ray.origin.distanceTo(l),r<d.near||r>d.far||e.push({distance:r,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this}))}else if(g.isGeometry)for(m=g.vertices,k=m.length,g=0;g<k-1;g+=p)r=b.distanceSqToSegment(m[g],
-m[g+1],l,h),r>f||(l.applyMatrix4(this.matrixWorld),r=d.ray.origin.distanceTo(l),r<d.near||r>d.far||e.push({distance:r,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this}))}}}(),clone:function(){return(new this.constructor(this.geometry,this.material)).copy(this)}});ga.prototype=Object.assign(Object.create(Wa.prototype),{constructor:ga,isLineSegments:!0});Na.prototype=Object.create(X.prototype);Na.prototype.constructor=Na;Na.prototype.isPointsMaterial=!0;Na.prototype.copy=
-function(a){X.prototype.copy.call(this,a);this.color.copy(a.color);this.map=a.map;this.size=a.size;this.sizeAttenuation=a.sizeAttenuation;return this};Nb.prototype=Object.assign(Object.create(A.prototype),{constructor:Nb,isPoints:!0,raycast:function(){var a=new M,b=new db,c=new Ea;return function(d,e){function f(a,c){var f=b.distanceSqToPoint(a);if(f<l){var h=b.closestPointToPoint(a);h.applyMatrix4(m);var k=d.ray.origin.distanceTo(h);k<d.near||k>d.far||e.push({distance:k,distanceToRay:Math.sqrt(f),
-point:h.clone(),index:c,face:null,object:g})}}var g=this,h=this.geometry,m=this.matrixWorld,k=d.params.Points.threshold;null===h.boundingSphere&&h.computeBoundingSphere();c.copy(h.boundingSphere);c.applyMatrix4(m);if(!1!==d.ray.intersectsSphere(c)){a.getInverse(m);b.copy(d.ray).applyMatrix4(a);var k=k/((this.scale.x+this.scale.y+this.scale.z)/3),l=k*k,k=new q;if(h.isBufferGeometry){var p=h.index,h=h.attributes.position.array;if(null!==p)for(var n=p.array,p=0,t=n.length;p<t;p++){var H=n[p];k.fromArray(h,
-3*H);f(k,H)}else for(p=0,n=h.length/3;p<n;p++)k.fromArray(h,3*p),f(k,p)}else for(k=h.vertices,p=0,n=k.length;p<n;p++)f(k[p],p)}}}(),clone:function(){return(new this.constructor(this.geometry,this.material)).copy(this)}});Hc.prototype=Object.assign(Object.create(A.prototype),{constructor:Hc});td.prototype=Object.create(da.prototype);td.prototype.constructor=td;Ob.prototype=Object.create(da.prototype);Ob.prototype.constructor=Ob;Ob.prototype.isCompressedTexture=!0;ud.prototype=Object.create(da.prototype);
-ud.prototype.constructor=ud;Ic.prototype=Object.create(da.prototype);Ic.prototype.constructor=Ic;Ic.prototype.isDepthTexture=!0;Pb.prototype=Object.create(G.prototype);Pb.prototype.constructor=Pb;Jc.prototype=Object.create(I.prototype);Jc.prototype.constructor=Jc;Qb.prototype=Object.create(G.prototype);Qb.prototype.constructor=Qb;Kc.prototype=Object.create(I.prototype);Kc.prototype.constructor=Kc;Aa.prototype=Object.create(G.prototype);Aa.prototype.constructor=Aa;Lc.prototype=Object.create(I.prototype);
-Lc.prototype.constructor=Lc;Rb.prototype=Object.create(Aa.prototype);Rb.prototype.constructor=Rb;Mc.prototype=Object.create(I.prototype);Mc.prototype.constructor=Mc;nb.prototype=Object.create(Aa.prototype);nb.prototype.constructor=nb;Nc.prototype=Object.create(I.prototype);Nc.prototype.constructor=Nc;Sb.prototype=Object.create(Aa.prototype);Sb.prototype.constructor=Sb;Oc.prototype=Object.create(I.prototype);Oc.prototype.constructor=Oc;Tb.prototype=Object.create(Aa.prototype);Tb.prototype.constructor=
-Tb;Pc.prototype=Object.create(I.prototype);Pc.prototype.constructor=Pc;Ub.prototype=Object.create(G.prototype);Ub.prototype.constructor=Ub;Qc.prototype=Object.create(I.prototype);Qc.prototype.constructor=Qc;Vb.prototype=Object.create(G.prototype);Vb.prototype.constructor=Vb;Rc.prototype=Object.create(I.prototype);Rc.prototype.constructor=Rc;Wb.prototype=Object.create(G.prototype);Wb.prototype.constructor=Wb;var Oa={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,h,m;if(0<Oa.area(a))for(h=0;h<c;h++)e[h]=h;else for(h=0;h<c;h++)e[h]=c-1-h;var k=2*c;for(h=c-1;2<c;){if(0>=k--){console.warn("THREE.ShapeUtils: Unable to triangulate polygon! in triangulate()");break}g=h;c<=g&&(g=0);h=g+1;c<=h&&(h=0);m=h+1;c<=m&&(m=0);var l;a:{var p,n,t,q,r,x,u,v;p=a[e[g]].x;n=a[e[g]].y;t=a[e[h]].x;q=a[e[h]].y;r=a[e[m]].x;x=a[e[m]].y;if(0>=(t-p)*(x-n)-(q-n)*(r-p))l=
-!1;else{var L,y,D,w,C,J,E,A,F,G;L=r-t;y=x-q;D=p-r;w=n-x;C=t-p;J=q-n;for(l=0;l<c;l++)if(u=a[e[l]].x,v=a[e[l]].y,!(u===p&&v===n||u===t&&v===q||u===r&&v===x)&&(E=u-p,A=v-n,F=u-t,G=v-q,u-=r,v-=x,F=L*G-y*F,E=C*A-J*E,A=D*v-w*u,F>=-Number.EPSILON&&A>=-Number.EPSILON&&E>=-Number.EPSILON)){l=!1;break a}l=!0}}if(l){d.push([a[e[g]],a[e[h]],a[e[m]]]);f.push([e[g],e[h],e[m]]);g=h;for(m=h+1;m<c;g++,m++)e[g]=e[m];c--;k=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,h=b.y-a.y,k=e.x-c.x,m=e.y-c.y,l=a.x-c.x,n=a.y-c.y,p=h*k-g*m,q=h*l-g*n;if(Math.abs(p)>Number.EPSILON){if(0<p){if(0>q||q>p)return[];k=m*l-k*n;if(0>k||k>p)return[]}else{if(0<q||q<p)return[];k=m*l-k*n;if(0<k||k<p)return[]}if(0===k)return!f||0!==q&&q!==p?[a]:[];if(k===p)return!f||0!==q&&q!==p?[b]:[];if(0===q)return[c];if(q===p)return[e];
-f=k/p;return[{x:a.x+f*g,y:a.y+f*h}]}if(0!==q||m*l!==k*n)return[];h=0===g&&0===h;k=0===k&&0===m;if(h&&k)return a.x!==c.x||a.y!==c.y?[]:[a];if(h)return d(c,e,a)?[a]:[];if(k)return d(a,b,c)?[c]:[];0!==g?(a.x<b.x?(g=a,k=a.x,h=b,a=b.x):(g=b,k=b.x,h=a,a=a.x),c.x<e.x?(b=c,p=c.x,m=e,c=e.x):(b=e,p=e.x,m=c,c=c.x)):(a.y<b.y?(g=a,k=a.y,h=b,a=b.y):(g=b,k=b.y,h=a,a=a.y),c.y<e.y?(b=c,p=c.y,m=e,c=e.y):(b=e,p=e.y,m=c,c=c.y));return k<=p?a<p?[]:a===p?f?[]:[b]:a<=c?[b,h]:[b,m]:k>c?[]:k===c?f?[]:[g]:a<=c?[g,h]:[g,m]}
-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,h,m,k,l,p={};m=a.concat();g=0;for(h=b.length;g<h;g++)Array.prototype.push.apply(m,b[g]);g=0;for(h=m.length;g<h;g++)l=m[g].x+":"+m[g].y,void 0!==p[l]&&console.warn("THREE.ShapeUtils: Duplicate point",l,g),p[l]=g;g=function(a,b){function c(a,b){var d=h.length-1,e=a-1;0>e&&(e=d);var g=a+1;g>d&&(g=
-0);d=f(h[a],h[e],h[g],k[b]);if(!d)return!1;d=k.length-1;e=b-1;0>e&&(e=d);g=b+1;g>d&&(g=0);return(d=f(k[b],k[e],k[g],h[a]))?!0:!1}function d(a,b){var c,f;for(c=0;c<h.length;c++)if(f=c+1,f%=h.length,f=e(a,b,h[c],h[f],!0),0<f.length)return!0;return!1}function g(a,c){var d,f,h,k;for(d=0;d<m.length;d++)for(f=b[m[d]],h=0;h<f.length;h++)if(k=h+1,k%=f.length,k=e(a,c,f[h],f[k],!0),0<k.length)return!0;return!1}var h=a.concat(),k,m=[],l,n,p,q,z,w=[],E,A,F,G=0;for(l=b.length;G<l;G++)m.push(G);E=0;for(var N=2*
-m.length;0<m.length;){N--;if(0>N){console.log("Infinite Loop! Holes left:"+m.length+", Probably Hole outside Shape!");break}for(n=E;n<h.length;n++){p=h[n];l=-1;for(G=0;G<m.length;G++)if(q=m[G],z=p.x+":"+p.y+":"+q,void 0===w[z]){k=b[q];for(A=0;A<k.length;A++)if(q=k[A],c(n,A)&&!d(p,q)&&!g(p,q)){l=A;m.splice(G,1);E=h.slice(0,n+1);q=h.slice(n);A=k.slice(l);F=k.slice(0,l+1);h=E.concat(A).concat(F).concat(q);E=n;break}if(0<=l)break;w[z]=!0}if(0<=l)break}}return h}(a,b);var n=Oa.triangulate(g,!1);g=0;for(h=
-n.length;g<h;g++)for(k=n[g],m=0;3>m;m++)l=k[m].x+":"+k[m].y,l=p[l],void 0!==l&&(k[m]=l);return n.concat()},isClockWise:function(a){return 0>Oa.area(a)}};La.prototype=Object.create(I.prototype);La.prototype.constructor=La;La.prototype.addShapeList=function(a,b){for(var c=a.length,d=0;d<c;d++)this.addShape(a[d],b)};La.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,h=e*e+f*f;if(Math.abs(e*g-f*d)>Number.EPSILON){var k=Math.sqrt(h),m=Math.sqrt(d*d+g*g),h=b.x-f/k;b=b.y+e/k;g=((c.x-g/m-h)*g-(c.y+d/m-b)*d)/(e*g-f*d);d=h+e*g-a.x;e=b+f*g-a.y;f=d*d+e*e;if(2>=f)return new E(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(h)):(d=e,e=f,f=Math.sqrt(h/2));return new E(d/f,e/f)}function e(a,b){var c,d;for(K=
-a.length;0<=--K;){c=K;d=K-1;0>d&&(d=a.length-1);var e,f=t+2*l;for(e=0;e<f;e++){var g=V*e,h=V*(e+1),k=b+c+g,g=b+d+g,m=b+d+h,h=b+c+h,k=k+G,g=g+G,m=m+G,h=h+G;F.faces.push(new ha(k,g,h,null,null,1));F.faces.push(new ha(g,m,h,null,null,1));k=u.generateSideWallUV(F,k,g,m,h);F.faceVertexUvs[0].push([k[0],k[1],k[3]]);F.faceVertexUvs[0].push([k[1],k[2],k[3]])}}}function f(a,b,c){F.vertices.push(new q(a,b,c))}function g(a,b,c){a+=G;b+=G;c+=G;F.faces.push(new ha(a,b,c,null,null,0));a=u.generateTopUV(F,a,b,c);
-F.faceVertexUvs[0].push(a)}var h=void 0!==b.amount?b.amount:100,m=void 0!==b.bevelThickness?b.bevelThickness:6,k=void 0!==b.bevelSize?b.bevelSize:m-2,l=void 0!==b.bevelSegments?b.bevelSegments:3,p=void 0!==b.bevelEnabled?b.bevelEnabled:!0,n=void 0!==b.curveSegments?b.curveSegments:12,t=void 0!==b.steps?b.steps:1,H=b.extrudePath,r,x=!1,u=void 0!==b.UVGenerator?b.UVGenerator:La.WorldUVGenerator,v,w,y,D;H&&(r=H.getSpacedPoints(t),x=!0,p=!1,v=void 0!==b.frames?b.frames:H.computeFrenetFrames(t,!1),w=new q,
-y=new q,D=new q);p||(k=m=l=0);var A,C,J,F=this,G=this.vertices.length,H=a.extractPoints(n),n=H.shape,I=H.holes;if(H=!Oa.isClockWise(n)){n=n.reverse();C=0;for(J=I.length;C<J;C++)A=I[C],Oa.isClockWise(A)&&(I[C]=A.reverse());H=!1}var M=Oa.triangulateShape(n,I),U=n;C=0;for(J=I.length;C<J;C++)A=I[C],n=n.concat(A);var P,N,O,R,S,V=n.length,W,X=M.length,H=[],K=0;O=U.length;P=O-1;for(N=K+1;K<O;K++,P++,N++)P===O&&(P=0),N===O&&(N=0),H[K]=d(U[K],U[P],U[N]);var ba=[],Z,da=H.concat();C=0;for(J=I.length;C<J;C++){A=
-I[C];Z=[];K=0;O=A.length;P=O-1;for(N=K+1;K<O;K++,P++,N++)P===O&&(P=0),N===O&&(N=0),Z[K]=d(A[K],A[P],A[N]);ba.push(Z);da=da.concat(Z)}for(P=0;P<l;P++){O=P/l;R=m*Math.cos(O*Math.PI/2);N=k*Math.sin(O*Math.PI/2);K=0;for(O=U.length;K<O;K++)S=c(U[K],H[K],N),f(S.x,S.y,-R);C=0;for(J=I.length;C<J;C++)for(A=I[C],Z=ba[C],K=0,O=A.length;K<O;K++)S=c(A[K],Z[K],N),f(S.x,S.y,-R)}N=k;for(K=0;K<V;K++)S=p?c(n[K],da[K],N):n[K],x?(y.copy(v.normals[0]).multiplyScalar(S.x),w.copy(v.binormals[0]).multiplyScalar(S.y),D.copy(r[0]).add(y).add(w),
-f(D.x,D.y,D.z)):f(S.x,S.y,0);for(O=1;O<=t;O++)for(K=0;K<V;K++)S=p?c(n[K],da[K],N):n[K],x?(y.copy(v.normals[O]).multiplyScalar(S.x),w.copy(v.binormals[O]).multiplyScalar(S.y),D.copy(r[O]).add(y).add(w),f(D.x,D.y,D.z)):f(S.x,S.y,h/t*O);for(P=l-1;0<=P;P--){O=P/l;R=m*Math.cos(O*Math.PI/2);N=k*Math.sin(O*Math.PI/2);K=0;for(O=U.length;K<O;K++)S=c(U[K],H[K],N),f(S.x,S.y,h+R);C=0;for(J=I.length;C<J;C++)for(A=I[C],Z=ba[C],K=0,O=A.length;K<O;K++)S=c(A[K],Z[K],N),x?f(S.x,S.y+r[t-1].y,r[t-1].x+R):f(S.x,S.y,h+
-R)}(function(){if(p){var a=0*V;for(K=0;K<X;K++)W=M[K],g(W[2]+a,W[1]+a,W[0]+a);a=V*(t+2*l);for(K=0;K<X;K++)W=M[K],g(W[0]+a,W[1]+a,W[2]+a)}else{for(K=0;K<X;K++)W=M[K],g(W[2],W[1],W[0]);for(K=0;K<X;K++)W=M[K],g(W[0]+V*t,W[1]+V*t,W[2]+V*t)}})();(function(){var a=0;e(U,a);a+=U.length;C=0;for(J=I.length;C<J;C++)A=I[C],e(A,a),a+=A.length})()};La.WorldUVGenerator={generateTopUV:function(a,b,c,d){a=a.vertices;b=a[b];c=a[c];d=a[d];return[new E(b.x,b.y),new E(c.x,c.y),new E(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 E(b.x,1-b.z),new E(c.x,1-c.z),new E(d.x,1-d.z),new E(e.x,1-e.z)]:[new E(b.y,1-b.z),new E(c.y,1-c.z),new E(d.y,1-d.z),new E(e.y,1-e.z)]}};Sc.prototype=Object.create(La.prototype);Sc.prototype.constructor=Sc;Tc.prototype=Object.create(I.prototype);Tc.prototype.constructor=Tc;ob.prototype=Object.create(G.prototype);ob.prototype.constructor=ob;Uc.prototype=Object.create(I.prototype);Uc.prototype.constructor=Uc;Xb.prototype=
-Object.create(G.prototype);Xb.prototype.constructor=Xb;Vc.prototype=Object.create(I.prototype);Vc.prototype.constructor=Vc;Yb.prototype=Object.create(G.prototype);Yb.prototype.constructor=Yb;Zb.prototype=Object.create(I.prototype);Zb.prototype.constructor=Zb;$b.prototype=Object.create(G.prototype);$b.prototype.constructor=$b;ac.prototype=Object.create(G.prototype);ac.prototype.constructor=ac;pb.prototype=Object.create(I.prototype);pb.prototype.constructor=pb;Xa.prototype=Object.create(G.prototype);
+1]=c;return this},setXYZ:function(a,b,c,d){a*=this.itemSize;this.array[a+0]=b;this.array[a+1]=c;this.array[a+2]=d;return this},setXYZW:function(a,b,c,d,e){a*=this.itemSize;this.array[a+0]=b;this.array[a+1]=c;this.array[a+2]=d;this.array[a+3]=e;return this},onUpload:function(a){this.onUploadCallback=a;return this},clone:function(){return(new this.constructor(this.array,this.itemSize)).copy(this)}};wc.prototype=Object.create(w.prototype);wc.prototype.constructor=wc;xc.prototype=Object.create(w.prototype);
+xc.prototype.constructor=xc;yc.prototype=Object.create(w.prototype);yc.prototype.constructor=yc;zc.prototype=Object.create(w.prototype);zc.prototype.constructor=zc;Ua.prototype=Object.create(w.prototype);Ua.prototype.constructor=Ua;Ac.prototype=Object.create(w.prototype);Ac.prototype.constructor=Ac;Va.prototype=Object.create(w.prototype);Va.prototype.constructor=Va;V.prototype=Object.create(w.prototype);V.prototype.constructor=V;Bc.prototype=Object.create(w.prototype);Bc.prototype.constructor=Bc;
+Object.assign(Je.prototype,{computeGroups:function(a){var b,c=[],d=void 0;a=a.faces;for(var e=0;e<a.length;e++){var f=a[e];f.materialIndex!==d&&(d=f.materialIndex,void 0!==b&&(b.count=3*e-b.start,c.push(b)),b={start:3*e,materialIndex:d})}void 0!==b&&(b.count=3*e-b.start,c.push(b));this.groups=c},fromGeometry:function(a){var b=a.faces,c=a.vertices,d=a.faceVertexUvs,e=d[0]&&0<d[0].length,f=d[1]&&0<d[1].length,g=a.morphTargets,h=g.length,m;if(0<h){m=[];for(var k=0;k<h;k++)m[k]=[];this.morphTargets.position=
+m}var l=a.morphNormals,p=l.length,n;if(0<p){n=[];for(k=0;k<p;k++)n[k]=[];this.morphTargets.normal=n}for(var t=a.skinIndices,q=a.skinWeights,r=t.length===c.length,x=q.length===c.length,k=0;k<b.length;k++){var u=b[k];this.vertices.push(c[u.a],c[u.b],c[u.c]);var v=u.vertexNormals;3===v.length?this.normals.push(v[0],v[1],v[2]):(v=u.normal,this.normals.push(v,v,v));v=u.vertexColors;3===v.length?this.colors.push(v[0],v[1],v[2]):(v=u.color,this.colors.push(v,v,v));!0===e&&(v=d[0][k],void 0!==v?this.uvs.push(v[0],
+v[1],v[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv ",k),this.uvs.push(new E,new E,new E)));!0===f&&(v=d[1][k],void 0!==v?this.uvs2.push(v[0],v[1],v[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 ",k),this.uvs2.push(new E,new E,new E)));for(v=0;v<h;v++){var L=g[v].vertices;m[v].push(L[u.a],L[u.b],L[u.c])}for(v=0;v<p;v++)L=l[v].vertexNormals[k],n[v].push(L.a,L.b,L.c);r&&this.skinIndices.push(t[u.a],t[u.b],t[u.c]);x&&this.skinWeights.push(q[u.a],
+q[u.b],q[u.c])}this.computeGroups(a);this.verticesNeedUpdate=a.verticesNeedUpdate;this.normalsNeedUpdate=a.normalsNeedUpdate;this.colorsNeedUpdate=a.colorsNeedUpdate;this.uvsNeedUpdate=a.uvsNeedUpdate;this.groupsNeedUpdate=a.groupsNeedUpdate;return this}});var Ud=0;I.prototype={constructor:I,isGeometry:!0,applyMatrix:function(a){for(var b=(new xa).getNormalMatrix(a),c=0,d=this.vertices.length;c<d;c++)this.vertices[c].applyMatrix4(a);c=0;for(d=this.faces.length;c<d;c++){a=this.faces[c];a.normal.applyMatrix3(b).normalize();
+for(var e=0,f=a.vertexNormals.length;e<f;e++)a.vertexNormals[e].applyMatrix3(b).normalize()}null!==this.boundingBox&&this.computeBoundingBox();null!==this.boundingSphere&&this.computeBoundingSphere();this.normalsNeedUpdate=this.verticesNeedUpdate=!0;return this},rotateX:function(){var a;return function(b){void 0===a&&(a=new M);a.makeRotationX(b);this.applyMatrix(a);return this}}(),rotateY:function(){var a;return function(b){void 0===a&&(a=new M);a.makeRotationY(b);this.applyMatrix(a);return this}}(),
+rotateZ:function(){var a;return function(b){void 0===a&&(a=new M);a.makeRotationZ(b);this.applyMatrix(a);return this}}(),translate:function(){var a;return function(b,c,d){void 0===a&&(a=new M);a.makeTranslation(b,c,d);this.applyMatrix(a);return this}}(),scale:function(){var a;return function(b,c,d){void 0===a&&(a=new M);a.makeScale(b,c,d);this.applyMatrix(a);return this}}(),lookAt:function(){var a;return function(b){void 0===a&&(a=new A);a.lookAt(b);a.updateMatrix();this.applyMatrix(a.matrix)}}(),
+fromBufferGeometry:function(a){function b(a,b,d,e){var f=void 0!==g?[l[a].clone(),l[b].clone(),l[d].clone()]:[],t=void 0!==h?[c.colors[a].clone(),c.colors[b].clone(),c.colors[d].clone()]:[];e=new ha(a,b,d,f,t,e);c.faces.push(e);void 0!==m&&c.faceVertexUvs[0].push([p[a].clone(),p[b].clone(),p[d].clone()]);void 0!==k&&c.faceVertexUvs[1].push([n[a].clone(),n[b].clone(),n[d].clone()])}var c=this,d=null!==a.index?a.index.array:void 0,e=a.attributes,f=e.position.array,g=void 0!==e.normal?e.normal.array:
+void 0,h=void 0!==e.color?e.color.array:void 0,m=void 0!==e.uv?e.uv.array:void 0,k=void 0!==e.uv2?e.uv2.array:void 0;void 0!==k&&(this.faceVertexUvs[1]=[]);for(var l=[],p=[],n=[],t=e=0;e<f.length;e+=3,t+=2)c.vertices.push(new q(f[e],f[e+1],f[e+2])),void 0!==g&&l.push(new q(g[e],g[e+1],g[e+2])),void 0!==h&&c.colors.push(new F(h[e],h[e+1],h[e+2])),void 0!==m&&p.push(new E(m[t],m[t+1])),void 0!==k&&n.push(new E(k[t],k[t+1]));if(void 0!==d)if(f=a.groups,0<f.length)for(e=0;e<f.length;e++)for(var H=f[e],
+r=H.start,x=H.count,t=r,r=r+x;t<r;t+=3)b(d[t],d[t+1],d[t+2],H.materialIndex);else for(e=0;e<d.length;e+=3)b(d[e],d[e+1],d[e+2]);else for(e=0;e<f.length/3;e+=3)b(e,e+1,e+2);this.computeFaceNormals();null!==a.boundingBox&&(this.boundingBox=a.boundingBox.clone());null!==a.boundingSphere&&(this.boundingSphere=a.boundingSphere.clone());return this},center:function(){this.computeBoundingBox();var a=this.boundingBox.getCenter().negate();this.translate(a.x,a.y,a.z);return a},normalize:function(){this.computeBoundingSphere();
+var a=this.boundingSphere.center,b=this.boundingSphere.radius,b=0===b?1:1/b,c=new M;c.set(b,0,0,-b*a.x,0,b,0,-b*a.y,0,0,b,-b*a.z,0,0,0,1);this.applyMatrix(c);return this},computeFaceNormals:function(){for(var a=new q,b=new q,c=0,d=this.faces.length;c<d;c++){var e=this.faces[c],f=this.vertices[e.a],g=this.vertices[e.b];a.subVectors(this.vertices[e.c],g);b.subVectors(f,g);a.cross(b);a.normalize();e.normal.copy(a)}},computeVertexNormals:function(a){void 0===a&&(a=!0);var b,c,d;d=Array(this.vertices.length);
+b=0;for(c=this.vertices.length;b<c;b++)d[b]=new q;if(a){var e,f,g,h=new q,m=new q;a=0;for(b=this.faces.length;a<b;a++)c=this.faces[a],e=this.vertices[c.a],f=this.vertices[c.b],g=this.vertices[c.c],h.subVectors(g,f),m.subVectors(e,f),h.cross(m),d[c.a].add(h),d[c.b].add(h),d[c.c].add(h)}else for(this.computeFaceNormals(),a=0,b=this.faces.length;a<b;a++)c=this.faces[a],d[c.a].add(c.normal),d[c.b].add(c.normal),d[c.c].add(c.normal);b=0;for(c=this.vertices.length;b<c;b++)d[b].normalize();a=0;for(b=this.faces.length;a<
+b;a++)c=this.faces[a],e=c.vertexNormals,3===e.length?(e[0].copy(d[c.a]),e[1].copy(d[c.b]),e[2].copy(d[c.c])):(e[0]=d[c.a].clone(),e[1]=d[c.b].clone(),e[2]=d[c.c].clone());0<this.faces.length&&(this.normalsNeedUpdate=!0)},computeFlatVertexNormals:function(){var a,b,c;this.computeFaceNormals();a=0;for(b=this.faces.length;a<b;a++){c=this.faces[a];var d=c.vertexNormals;3===d.length?(d[0].copy(c.normal),d[1].copy(c.normal),d[2].copy(c.normal)):(d[0]=c.normal.clone(),d[1]=c.normal.clone(),d[2]=c.normal.clone())}0<
+this.faces.length&&(this.normalsNeedUpdate=!0)},computeMorphNormals:function(){var a,b,c,d,e;c=0;for(d=this.faces.length;c<d;c++)for(e=this.faces[c],e.__originalFaceNormal?e.__originalFaceNormal.copy(e.normal):e.__originalFaceNormal=e.normal.clone(),e.__originalVertexNormals||(e.__originalVertexNormals=[]),a=0,b=e.vertexNormals.length;a<b;a++)e.__originalVertexNormals[a]?e.__originalVertexNormals[a].copy(e.vertexNormals[a]):e.__originalVertexNormals[a]=e.vertexNormals[a].clone();var f=new I;f.faces=
+this.faces;a=0;for(b=this.morphTargets.length;a<b;a++){if(!this.morphNormals[a]){this.morphNormals[a]={};this.morphNormals[a].faceNormals=[];this.morphNormals[a].vertexNormals=[];e=this.morphNormals[a].faceNormals;var g=this.morphNormals[a].vertexNormals,h,m;c=0;for(d=this.faces.length;c<d;c++)h=new q,m={a:new q,b:new q,c:new q},e.push(h),g.push(m)}g=this.morphNormals[a];f.vertices=this.morphTargets[a].vertices;f.computeFaceNormals();f.computeVertexNormals();c=0;for(d=this.faces.length;c<d;c++)e=
+this.faces[c],h=g.faceNormals[c],m=g.vertexNormals[c],h.copy(e.normal),m.a.copy(e.vertexNormals[0]),m.b.copy(e.vertexNormals[1]),m.c.copy(e.vertexNormals[2])}c=0;for(d=this.faces.length;c<d;c++)e=this.faces[c],e.normal=e.__originalFaceNormal,e.vertexNormals=e.__originalVertexNormals},computeLineDistances:function(){for(var a=0,b=this.vertices,c=0,d=b.length;c<d;c++)0<c&&(a+=b[c].distanceTo(b[c-1])),this.lineDistances[c]=a},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new Pa);
+this.boundingBox.setFromPoints(this.vertices)},computeBoundingSphere:function(){null===this.boundingSphere&&(this.boundingSphere=new Ea);this.boundingSphere.setFromPoints(this.vertices)},merge:function(a,b,c){if(!1===(a&&a.isGeometry))console.error("THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.",a);else{var d,e=this.vertices.length,f=this.vertices,g=a.vertices,h=this.faces,m=a.faces,k=this.faceVertexUvs[0],l=a.faceVertexUvs[0],p=this.colors,n=a.colors;void 0===c&&(c=0);void 0!==
+b&&(d=(new xa).getNormalMatrix(b));a=0;for(var t=g.length;a<t;a++){var q=g[a].clone();void 0!==b&&q.applyMatrix4(b);f.push(q)}a=0;for(t=n.length;a<t;a++)p.push(n[a].clone());a=0;for(t=m.length;a<t;a++){var g=m[a],r=g.vertexNormals,n=g.vertexColors,p=new ha(g.a+e,g.b+e,g.c+e);p.normal.copy(g.normal);void 0!==d&&p.normal.applyMatrix3(d).normalize();b=0;for(f=r.length;b<f;b++)q=r[b].clone(),void 0!==d&&q.applyMatrix3(d).normalize(),p.vertexNormals.push(q);p.color.copy(g.color);b=0;for(f=n.length;b<f;b++)q=
+n[b],p.vertexColors.push(q.clone());p.materialIndex=g.materialIndex+c;h.push(p)}a=0;for(t=l.length;a<t;a++)if(c=l[a],d=[],void 0!==c){b=0;for(f=c.length;b<f;b++)d.push(c[b].clone());k.push(d)}}},mergeMesh:function(a){!1===(a&&a.isMesh)?console.error("THREE.Geometry.mergeMesh(): mesh not an instance of THREE.Mesh.",a):(a.matrixAutoUpdate&&a.updateMatrix(),this.merge(a.geometry,a.matrix))},mergeVertices:function(){var a={},b=[],c=[],d,e=Math.pow(10,4),f,g;f=0;for(g=this.vertices.length;f<g;f++)d=this.vertices[f],
+d=Math.round(d.x*e)+"_"+Math.round(d.y*e)+"_"+Math.round(d.z*e),void 0===a[d]?(a[d]=f,b.push(this.vertices[f]),c[f]=b.length-1):c[f]=c[a[d]];a=[];f=0;for(g=this.faces.length;f<g;f++)for(e=this.faces[f],e.a=c[e.a],e.b=c[e.b],e.c=c[e.c],e=[e.a,e.b,e.c],d=0;3>d;d++)if(e[d]===e[(d+1)%3]){a.push(f);break}for(f=a.length-1;0<=f;f--)for(e=a[f],this.faces.splice(e,1),c=0,g=this.faceVertexUvs.length;c<g;c++)this.faceVertexUvs[c].splice(e,1);f=this.vertices.length-b.length;this.vertices=b;return f},sortFacesByMaterialIndex:function(){for(var a=
+this.faces,b=a.length,c=0;c<b;c++)a[c]._id=c;a.sort(function(a,b){return a.materialIndex-b.materialIndex});var d=this.faceVertexUvs[0],e=this.faceVertexUvs[1],f,g;d&&d.length===b&&(f=[]);e&&e.length===b&&(g=[]);for(c=0;c<b;c++){var h=a[c]._id;f&&f.push(d[h]);g&&g.push(e[h])}f&&(this.faceVertexUvs[0]=f);g&&(this.faceVertexUvs[1]=g)},toJSON:function(){function a(a,b,c){return c?a|1<<b:a&~(1<<b)}function b(a){var b=a.x.toString()+a.y.toString()+a.z.toString();if(void 0!==k[b])return k[b];k[b]=m.length/
+3;m.push(a.x,a.y,a.z);return k[b]}function c(a){var b=a.r.toString()+a.g.toString()+a.b.toString();if(void 0!==p[b])return p[b];p[b]=l.length;l.push(a.getHex());return p[b]}function d(a){var b=a.x.toString()+a.y.toString();if(void 0!==t[b])return t[b];t[b]=n.length/2;n.push(a.x,a.y);return t[b]}var e={metadata:{version:4.4,type:"Geometry",generator:"Geometry.toJSON"}};e.uuid=this.uuid;e.type=this.type;""!==this.name&&(e.name=this.name);if(void 0!==this.parameters){var f=this.parameters,g;for(g in f)void 0!==
+f[g]&&(e[g]=f[g]);return e}f=[];for(g=0;g<this.vertices.length;g++){var h=this.vertices[g];f.push(h.x,h.y,h.z)}var h=[],m=[],k={},l=[],p={},n=[],t={};for(g=0;g<this.faces.length;g++){var q=this.faces[g],r=void 0!==this.faceVertexUvs[0][g],x=0<q.normal.length(),u=0<q.vertexNormals.length,v=1!==q.color.r||1!==q.color.g||1!==q.color.b,L=0<q.vertexColors.length,y=0,y=a(y,0,0),y=a(y,1,!0),y=a(y,2,!1),y=a(y,3,r),y=a(y,4,x),y=a(y,5,u),y=a(y,6,v),y=a(y,7,L);h.push(y);h.push(q.a,q.b,q.c);h.push(q.materialIndex);
+r&&(r=this.faceVertexUvs[0][g],h.push(d(r[0]),d(r[1]),d(r[2])));x&&h.push(b(q.normal));u&&(x=q.vertexNormals,h.push(b(x[0]),b(x[1]),b(x[2])));v&&h.push(c(q.color));L&&(q=q.vertexColors,h.push(c(q[0]),c(q[1]),c(q[2])))}e.data={};e.data.vertices=f;e.data.normals=m;0<l.length&&(e.data.colors=l);0<n.length&&(e.data.uvs=[n]);e.data.faces=h;return e},clone:function(){return(new I).copy(this)},copy:function(a){this.vertices=[];this.faces=[];this.faceVertexUvs=[[]];this.colors=[];for(var b=a.vertices,c=0,
+d=b.length;c<d;c++)this.vertices.push(b[c].clone());b=a.colors;c=0;for(d=b.length;c<d;c++)this.colors.push(b[c].clone());b=a.faces;c=0;for(d=b.length;c<d;c++)this.faces.push(b[c].clone());c=0;for(d=a.faceVertexUvs.length;c<d;c++){b=a.faceVertexUvs[c];void 0===this.faceVertexUvs[c]&&(this.faceVertexUvs[c]=[]);for(var e=0,f=b.length;e<f;e++){for(var g=b[e],h=[],m=0,k=g.length;m<k;m++)h.push(g[m].clone());this.faceVertexUvs[c].push(h)}}return this},dispose:function(){this.dispatchEvent({type:"dispose"})}};
+Object.assign(I.prototype,pa.prototype);G.prototype={constructor:G,isBufferGeometry:!0,getIndex:function(){return this.index},setIndex:function(a){this.index=a},addAttribute:function(a,b,c){if(!1===(b&&b.isBufferAttribute)&&!1===(b&&b.isInterleavedBufferAttribute))console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),this.addAttribute(a,new w(b,c));else if("index"===a)console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),this.setIndex(b);
+else return this.attributes[a]=b,this},getAttribute:function(a){return this.attributes[a]},removeAttribute:function(a){delete this.attributes[a];return this},addGroup:function(a,b,c){this.groups.push({start:a,count:b,materialIndex:void 0!==c?c:0})},clearGroups:function(){this.groups=[]},setDrawRange:function(a,b){this.drawRange.start=a;this.drawRange.count=b},applyMatrix:function(a){var b=this.attributes.position;void 0!==b&&(a.applyToBufferAttribute(b),b.needsUpdate=!0);b=this.attributes.normal;
+void 0!==b&&((new xa).getNormalMatrix(a).applyToBufferAttribute(b),b.needsUpdate=!0);null!==this.boundingBox&&this.computeBoundingBox();null!==this.boundingSphere&&this.computeBoundingSphere();return this},rotateX:function(){var a;return function(b){void 0===a&&(a=new M);a.makeRotationX(b);this.applyMatrix(a);return this}}(),rotateY:function(){var a;return function(b){void 0===a&&(a=new M);a.makeRotationY(b);this.applyMatrix(a);return this}}(),rotateZ:function(){var a;return function(b){void 0===
+a&&(a=new M);a.makeRotationZ(b);this.applyMatrix(a);return this}}(),translate:function(){var a;return function(b,c,d){void 0===a&&(a=new M);a.makeTranslation(b,c,d);this.applyMatrix(a);return this}}(),scale:function(){var a;return function(b,c,d){void 0===a&&(a=new M);a.makeScale(b,c,d);this.applyMatrix(a);return this}}(),lookAt:function(){var a;return function(b){void 0===a&&(a=new A);a.lookAt(b);a.updateMatrix();this.applyMatrix(a.matrix)}}(),center:function(){this.computeBoundingBox();var a=this.boundingBox.getCenter().negate();
+this.translate(a.x,a.y,a.z);return a},setFromObject:function(a){var b=a.geometry;if(a.isPoints||a.isLine){a=new V(3*b.vertices.length,3);var c=new V(3*b.colors.length,3);this.addAttribute("position",a.copyVector3sArray(b.vertices));this.addAttribute("color",c.copyColorsArray(b.colors));b.lineDistances&&b.lineDistances.length===b.vertices.length&&(a=new V(b.lineDistances.length,1),this.addAttribute("lineDistance",a.copyArray(b.lineDistances)));null!==b.boundingSphere&&(this.boundingSphere=b.boundingSphere.clone());
+null!==b.boundingBox&&(this.boundingBox=b.boundingBox.clone())}else a.isMesh&&b&&b.isGeometry&&this.fromGeometry(b);return this},updateFromObject:function(a){var b=a.geometry;if(a.isMesh){var c=b.__directGeometry;!0===b.elementsNeedUpdate&&(c=void 0,b.elementsNeedUpdate=!1);if(void 0===c)return this.fromGeometry(b);c.verticesNeedUpdate=b.verticesNeedUpdate;c.normalsNeedUpdate=b.normalsNeedUpdate;c.colorsNeedUpdate=b.colorsNeedUpdate;c.uvsNeedUpdate=b.uvsNeedUpdate;c.groupsNeedUpdate=b.groupsNeedUpdate;
+b.verticesNeedUpdate=!1;b.normalsNeedUpdate=!1;b.colorsNeedUpdate=!1;b.uvsNeedUpdate=!1;b.groupsNeedUpdate=!1;b=c}!0===b.verticesNeedUpdate&&(c=this.attributes.position,void 0!==c&&(c.copyVector3sArray(b.vertices),c.needsUpdate=!0),b.verticesNeedUpdate=!1);!0===b.normalsNeedUpdate&&(c=this.attributes.normal,void 0!==c&&(c.copyVector3sArray(b.normals),c.needsUpdate=!0),b.normalsNeedUpdate=!1);!0===b.colorsNeedUpdate&&(c=this.attributes.color,void 0!==c&&(c.copyColorsArray(b.colors),c.needsUpdate=!0),
+b.colorsNeedUpdate=!1);b.uvsNeedUpdate&&(c=this.attributes.uv,void 0!==c&&(c.copyVector2sArray(b.uvs),c.needsUpdate=!0),b.uvsNeedUpdate=!1);b.lineDistancesNeedUpdate&&(c=this.attributes.lineDistance,void 0!==c&&(c.copyArray(b.lineDistances),c.needsUpdate=!0),b.lineDistancesNeedUpdate=!1);b.groupsNeedUpdate&&(b.computeGroups(a.geometry),this.groups=b.groups,b.groupsNeedUpdate=!1);return this},fromGeometry:function(a){a.__directGeometry=(new Je).fromGeometry(a);return this.fromDirectGeometry(a.__directGeometry)},
+fromDirectGeometry:function(a){var b=new Float32Array(3*a.vertices.length);this.addAttribute("position",(new w(b,3)).copyVector3sArray(a.vertices));0<a.normals.length&&(b=new Float32Array(3*a.normals.length),this.addAttribute("normal",(new w(b,3)).copyVector3sArray(a.normals)));0<a.colors.length&&(b=new Float32Array(3*a.colors.length),this.addAttribute("color",(new w(b,3)).copyColorsArray(a.colors)));0<a.uvs.length&&(b=new Float32Array(2*a.uvs.length),this.addAttribute("uv",(new w(b,2)).copyVector2sArray(a.uvs)));
+0<a.uvs2.length&&(b=new Float32Array(2*a.uvs2.length),this.addAttribute("uv2",(new w(b,2)).copyVector2sArray(a.uvs2)));0<a.indices.length&&(b=new (65535<a.vertices.length?Uint32Array:Uint16Array)(3*a.indices.length),this.setIndex((new w(b,1)).copyIndicesArray(a.indices)));this.groups=a.groups;for(var c in a.morphTargets){for(var b=[],d=a.morphTargets[c],e=0,f=d.length;e<f;e++){var g=d[e],h=new V(3*g.length,3);b.push(h.copyVector3sArray(g))}this.morphAttributes[c]=b}0<a.skinIndices.length&&(c=new V(4*
+a.skinIndices.length,4),this.addAttribute("skinIndex",c.copyVector4sArray(a.skinIndices)));0<a.skinWeights.length&&(c=new V(4*a.skinWeights.length,4),this.addAttribute("skinWeight",c.copyVector4sArray(a.skinWeights)));null!==a.boundingSphere&&(this.boundingSphere=a.boundingSphere.clone());null!==a.boundingBox&&(this.boundingBox=a.boundingBox.clone());return this},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new Pa);var a=this.attributes.position;void 0!==a?this.boundingBox.setFromBufferAttribute(a):
+this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox: Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)},computeBoundingSphere:function(){var a=new Pa,b=new q;return function(){null===this.boundingSphere&&(this.boundingSphere=new Ea);var c=this.attributes.position;if(c){var d=this.boundingSphere.center;a.setFromBufferAttribute(c);
+a.getCenter(d);for(var e=0,f=0,g=c.count;f<g;f++)b.x=c.getX(f),b.y=c.getY(f),b.z=c.getZ(f),e=Math.max(e,d.distanceToSquared(b));this.boundingSphere.radius=Math.sqrt(e);isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}}(),computeFaceNormals:function(){},computeVertexNormals:function(){var a=this.index,b=this.attributes,c=this.groups;if(b.position){var d=b.position.array;
+if(void 0===b.normal)this.addAttribute("normal",new w(new Float32Array(d.length),3));else for(var e=b.normal.array,f=0,g=e.length;f<g;f++)e[f]=0;var e=b.normal.array,h,m,k,l=new q,p=new q,n=new q,t=new q,H=new q;if(a){a=a.array;0===c.length&&this.addGroup(0,a.length);for(var r=0,x=c.length;r<x;++r)for(f=c[r],g=f.start,h=f.count,f=g,g+=h;f<g;f+=3)h=3*a[f+0],m=3*a[f+1],k=3*a[f+2],l.fromArray(d,h),p.fromArray(d,m),n.fromArray(d,k),t.subVectors(n,p),H.subVectors(l,p),t.cross(H),e[h]+=t.x,e[h+1]+=t.y,
+e[h+2]+=t.z,e[m]+=t.x,e[m+1]+=t.y,e[m+2]+=t.z,e[k]+=t.x,e[k+1]+=t.y,e[k+2]+=t.z}else for(f=0,g=d.length;f<g;f+=9)l.fromArray(d,f),p.fromArray(d,f+3),n.fromArray(d,f+6),t.subVectors(n,p),H.subVectors(l,p),t.cross(H),e[f]=t.x,e[f+1]=t.y,e[f+2]=t.z,e[f+3]=t.x,e[f+4]=t.y,e[f+5]=t.z,e[f+6]=t.x,e[f+7]=t.y,e[f+8]=t.z;this.normalizeNormals();b.normal.needsUpdate=!0}},merge:function(a,b){if(!1===(a&&a.isBufferGeometry))console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",
+a);else{void 0===b&&(b=0);var c=this.attributes,d;for(d in c)if(void 0!==a.attributes[d])for(var e=c[d].array,f=a.attributes[d],g=f.array,h=0,f=f.itemSize*b;h<g.length;h++,f++)e[f]=g[h];return this}},normalizeNormals:function(){for(var a=this.attributes.normal.array,b,c,d,e=0,f=a.length;e<f;e+=3)b=a[e],c=a[e+1],d=a[e+2],b=1/Math.sqrt(b*b+c*c+d*d),a[e]*=b,a[e+1]*=b,a[e+2]*=b},toNonIndexed:function(){if(null===this.index)return console.warn("THREE.BufferGeometry.toNonIndexed(): Geometry is already non-indexed."),
+this;var a=new G,b=this.index.array,c=this.attributes,d;for(d in c){for(var e=c[d],f=e.array,e=e.itemSize,g=new f.constructor(b.length*e),h,m=0,k=0,l=b.length;k<l;k++){h=b[k]*e;for(var p=0;p<e;p++)g[m++]=f[h++]}a.addAttribute(d,new w(g,e))}return a},toJSON:function(){var a={metadata:{version:4.4,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};a.uuid=this.uuid;a.type=this.type;""!==this.name&&(a.name=this.name);if(void 0!==this.parameters){var b=this.parameters,c;for(c in b)void 0!==b[c]&&
+(a[c]=b[c]);return a}a.data={attributes:{}};var d=this.index;null!==d&&(b=Array.prototype.slice.call(d.array),a.data.index={type:d.array.constructor.name,array:b});d=this.attributes;for(c in d){var e=d[c],b=Array.prototype.slice.call(e.array);a.data.attributes[c]={itemSize:e.itemSize,type:e.array.constructor.name,array:b,normalized:e.normalized}}c=this.groups;0<c.length&&(a.data.groups=JSON.parse(JSON.stringify(c)));c=this.boundingSphere;null!==c&&(a.data.boundingSphere={center:c.center.toArray(),
+radius:c.radius});return a},clone:function(){return(new G).copy(this)},copy:function(a){var b,c,d;this.index=null;this.attributes={};this.morphAttributes={};this.groups=[];this.boundingSphere=this.boundingBox=null;this.name=a.name;c=a.index;null!==c&&this.setIndex(c.clone());c=a.attributes;for(b in c)this.addAttribute(b,c[b].clone());var e=a.morphAttributes;for(b in e){var f=[],g=e[b];c=0;for(d=g.length;c<d;c++)f.push(g[c].clone());this.morphAttributes[b]=f}b=a.groups;c=0;for(d=b.length;c<d;c++)e=
+b[c],this.addGroup(e.start,e.count,e.materialIndex);b=a.boundingBox;null!==b&&(this.boundingBox=b.clone());b=a.boundingSphere;null!==b&&(this.boundingSphere=b.clone());this.drawRange.start=a.drawRange.start;this.drawRange.count=a.drawRange.count;return this},dispose:function(){this.dispatchEvent({type:"dispose"})}};G.MaxIndex=65535;Object.assign(G.prototype,pa.prototype);za.prototype=Object.assign(Object.create(A.prototype),{constructor:za,isMesh:!0,setDrawMode:function(a){this.drawMode=a},copy:function(a){A.prototype.copy.call(this,
+a);this.drawMode=a.drawMode;return this},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){ya.barycoordFromPoint(a,b,c,d,r);e.multiplyScalar(r.x);f.multiplyScalar(r.y);g.multiplyScalar(r.z);e.add(f).add(g);return e.clone()}function b(a,b,c,d,e,f,g){var h=
+a.material;if(null===(1===h.side?c.intersectTriangle(f,e,d,!0,g):c.intersectTriangle(d,e,f,2!==h.side,g)))return null;u.copy(g);u.applyMatrix4(a.matrixWorld);c=b.ray.origin.distanceTo(u);return c<b.near||c>b.far?null:{distance:c,point:u.clone(),object:a}}function c(c,d,e,f,k,l,p,q){g.fromBufferAttribute(f,l);h.fromBufferAttribute(f,p);m.fromBufferAttribute(f,q);if(c=b(c,d,e,g,h,m,x))k&&(n.fromBufferAttribute(k,l),t.fromBufferAttribute(k,p),H.fromBufferAttribute(k,q),c.uv=a(x,g,h,m,n,t,H)),c.face=
+new ha(l,p,q,ya.normal(g,h,m)),c.faceIndex=l;return c}var d=new M,e=new db,f=new Ea,g=new q,h=new q,m=new q,k=new q,l=new q,p=new q,n=new E,t=new E,H=new E,r=new q,x=new q,u=new q;return function(q,r){var u=this.geometry,D=this.material,w=this.matrixWorld;if(void 0!==D&&(null===u.boundingSphere&&u.computeBoundingSphere(),f.copy(u.boundingSphere),f.applyMatrix4(w),!1!==q.ray.intersectsSphere(f)&&(d.getInverse(w),e.copy(q.ray).applyMatrix4(d),null===u.boundingBox||!1!==e.intersectsBox(u.boundingBox)))){var C;
+if(u.isBufferGeometry){var J,E,D=u.index,A=u.attributes.position,w=u.attributes.uv,F,G;if(null!==D)for(F=0,G=D.count;F<G;F+=3){if(u=D.getX(F),J=D.getX(F+1),E=D.getX(F+2),C=c(this,q,e,A,w,u,J,E))C.faceIndex=Math.floor(F/3),r.push(C)}else for(F=0,G=A.count;F<G;F+=3)if(u=F,J=F+1,E=F+2,C=c(this,q,e,A,w,u,J,E))C.index=u,r.push(C)}else if(u.isGeometry){var I,M,w=D&&D.isMultiMaterial;F=!0===w?D.materials:null;G=u.vertices;J=u.faces;E=u.faceVertexUvs[0];0<E.length&&(A=E);for(var N=0,O=J.length;N<O;N++){var R=
+J[N];C=!0===w?F[R.materialIndex]:D;if(void 0!==C){E=G[R.a];I=G[R.b];M=G[R.c];if(!0===C.morphTargets){C=u.morphTargets;var S=this.morphTargetInfluences;g.set(0,0,0);h.set(0,0,0);m.set(0,0,0);for(var U=0,W=C.length;U<W;U++){var P=S[U];if(0!==P){var K=C[U].vertices;g.addScaledVector(k.subVectors(K[R.a],E),P);h.addScaledVector(l.subVectors(K[R.b],I),P);m.addScaledVector(p.subVectors(K[R.c],M),P)}}g.add(E);h.add(I);m.add(M);E=g;I=h;M=m}if(C=b(this,q,e,E,I,M,x))A&&(S=A[N],n.copy(S[0]),t.copy(S[1]),H.copy(S[2]),
+C.uv=a(x,E,I,M,n,t,H)),C.face=R,C.faceIndex=N,r.push(C)}}}}}}(),clone:function(){return(new this.constructor(this.geometry,this.material)).copy(this)}});Jb.prototype=Object.create(I.prototype);Jb.prototype.constructor=Jb;jb.prototype=Object.create(G.prototype);jb.prototype.constructor=jb;Cc.prototype=Object.create(I.prototype);Cc.prototype.constructor=Cc;kb.prototype=Object.create(G.prototype);kb.prototype.constructor=kb;sa.prototype=Object.create(A.prototype);sa.prototype.constructor=sa;sa.prototype.isCamera=
+!0;sa.prototype.getWorldDirection=function(){var a=new Z;return function(b){b=b||new q;this.getWorldQuaternion(a);return b.set(0,0,-1).applyQuaternion(a)}}();sa.prototype.lookAt=function(){var a=new M;return function(b){a.lookAt(this.position,b,this.up);this.quaternion.setFromRotationMatrix(a)}}();sa.prototype.clone=function(){return(new this.constructor).copy(this)};sa.prototype.copy=function(a){A.prototype.copy.call(this,a);this.matrixWorldInverse.copy(a.matrixWorldInverse);this.projectionMatrix.copy(a.projectionMatrix);
+return this};Ga.prototype=Object.assign(Object.create(sa.prototype),{constructor:Ga,isPerspectiveCamera:!0,copy:function(a){sa.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*P.RAD2DEG*Math.atan(a);this.updateProjectionMatrix()},
+getFocalLength:function(){var a=Math.tan(.5*P.DEG2RAD*this.fov);return.5*this.getFilmHeight()/a},getEffectiveFOV:function(){return 2*P.RAD2DEG*Math.atan(Math.tan(.5*P.DEG2RAD*this.fov)/this.zoom)},getFilmWidth:function(){return this.filmGauge*Math.min(this.aspect,1)},getFilmHeight:function(){return this.filmGauge/Math.max(this.aspect,1)},setViewOffset:function(a,b,c,d,e,f){this.aspect=a/b;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*P.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,h=f.fullHeight,e=e+f.offsetX*d/g,b=b-f.offsetY*c/h,d=f.width/g*d,c=f.height/h*c;f=this.filmOffset;0!==f&&(e+=a*f/this.getFilmWidth());this.projectionMatrix.makePerspective(e,e+d,b,b-c,a,this.far)},toJSON:function(a){a=A.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}});Kb.prototype=Object.assign(Object.create(sa.prototype),{constructor:Kb,isOrthographicCamera:!0,copy:function(a){sa.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=A.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 Kf=0;Lb.prototype.isFogExp2=!0;Lb.prototype.clone=function(){return new Lb(this.color.getHex(),this.density)};Lb.prototype.toJSON=function(a){return{type:"FogExp2",color:this.color.getHex(),density:this.density}};Mb.prototype.isFog=!0;Mb.prototype.clone=function(){return new Mb(this.color.getHex(),this.near,this.far)};Mb.prototype.toJSON=function(a){return{type:"Fog",
+color:this.color.getHex(),near:this.near,far:this.far}};lb.prototype=Object.create(A.prototype);lb.prototype.constructor=lb;lb.prototype.copy=function(a,b){A.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};lb.prototype.toJSON=function(a){var b=A.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};Yd.prototype=Object.assign(Object.create(A.prototype),{constructor:Yd,isLensFlare:!0,copy:function(a){A.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 F(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)}});mb.prototype=Object.create(X.prototype);mb.prototype.constructor=mb;mb.prototype.copy=function(a){X.prototype.copy.call(this,a);this.color.copy(a.color);this.map=a.map;this.rotation=a.rotation;return this};Fc.prototype=Object.assign(Object.create(A.prototype),{constructor:Fc,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)}});Gc.prototype=Object.assign(Object.create(A.prototype),{constructor:Gc,copy:function(a){A.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=A.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}});Object.assign(qd.prototype,{calculateInverses:function(){this.boneInverses=[];for(var a=0,b=this.bones.length;a<b;a++){var c=new M;this.bones[a]&&c.getInverse(this.bones[a].matrixWorld);this.boneInverses.push(c)}},
+pose:function(){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 M;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 qd(this.bones,this.boneInverses,this.useVertexTexture)}});rd.prototype=Object.assign(Object.create(A.prototype),{constructor:rd,isBone:!0});sd.prototype=Object.assign(Object.create(za.prototype),{constructor:sd,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 fa,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){za.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)}});ia.prototype=Object.create(X.prototype);ia.prototype.constructor=ia;ia.prototype.isLineBasicMaterial=!0;ia.prototype.copy=function(a){X.prototype.copy.call(this,a);this.color.copy(a.color);this.linewidth=a.linewidth;this.linecap=a.linecap;this.linejoin=a.linejoin;return this};Wa.prototype=Object.assign(Object.create(A.prototype),{constructor:Wa,isLine:!0,raycast:function(){var a=new M,b=new db,c=new Ea;return function(d,e){var f=d.linePrecision,f=f*f,
+g=this.geometry,h=this.matrixWorld;null===g.boundingSphere&&g.computeBoundingSphere();c.copy(g.boundingSphere);c.applyMatrix4(h);if(!1!==d.ray.intersectsSphere(c)){a.getInverse(h);b.copy(d.ray).applyMatrix4(a);var m=new q,k=new q,h=new q,l=new q,p=this&&this.isLineSegments?2:1;if(g.isBufferGeometry){var n=g.index,t=g.attributes.position.array;if(null!==n)for(var n=n.array,g=0,H=n.length-1;g<H;g+=p){var r=n[g+1];m.fromArray(t,3*n[g]);k.fromArray(t,3*r);r=b.distanceSqToSegment(m,k,l,h);r>f||(l.applyMatrix4(this.matrixWorld),
+r=d.ray.origin.distanceTo(l),r<d.near||r>d.far||e.push({distance:r,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this}))}else for(g=0,H=t.length/3-1;g<H;g+=p)m.fromArray(t,3*g),k.fromArray(t,3*g+3),r=b.distanceSqToSegment(m,k,l,h),r>f||(l.applyMatrix4(this.matrixWorld),r=d.ray.origin.distanceTo(l),r<d.near||r>d.far||e.push({distance:r,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this}))}else if(g.isGeometry)for(m=g.vertices,
+k=m.length,g=0;g<k-1;g+=p)r=b.distanceSqToSegment(m[g],m[g+1],l,h),r>f||(l.applyMatrix4(this.matrixWorld),r=d.ray.origin.distanceTo(l),r<d.near||r>d.far||e.push({distance:r,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this}))}}}(),clone:function(){return(new this.constructor(this.geometry,this.material)).copy(this)}});ga.prototype=Object.assign(Object.create(Wa.prototype),{constructor:ga,isLineSegments:!0});Na.prototype=Object.create(X.prototype);Na.prototype.constructor=
+Na;Na.prototype.isPointsMaterial=!0;Na.prototype.copy=function(a){X.prototype.copy.call(this,a);this.color.copy(a.color);this.map=a.map;this.size=a.size;this.sizeAttenuation=a.sizeAttenuation;return this};Nb.prototype=Object.assign(Object.create(A.prototype),{constructor:Nb,isPoints:!0,raycast:function(){var a=new M,b=new db,c=new Ea;return function(d,e){function f(a,c){var f=b.distanceSqToPoint(a);if(f<l){var h=b.closestPointToPoint(a);h.applyMatrix4(m);var k=d.ray.origin.distanceTo(h);k<d.near||
+k>d.far||e.push({distance:k,distanceToRay:Math.sqrt(f),point:h.clone(),index:c,face:null,object:g})}}var g=this,h=this.geometry,m=this.matrixWorld,k=d.params.Points.threshold;null===h.boundingSphere&&h.computeBoundingSphere();c.copy(h.boundingSphere);c.applyMatrix4(m);if(!1!==d.ray.intersectsSphere(c)){a.getInverse(m);b.copy(d.ray).applyMatrix4(a);var k=k/((this.scale.x+this.scale.y+this.scale.z)/3),l=k*k,k=new q;if(h.isBufferGeometry){var p=h.index,h=h.attributes.position.array;if(null!==p)for(var n=
+p.array,p=0,t=n.length;p<t;p++){var H=n[p];k.fromArray(h,3*H);f(k,H)}else for(p=0,n=h.length/3;p<n;p++)k.fromArray(h,3*p),f(k,p)}else for(k=h.vertices,p=0,n=k.length;p<n;p++)f(k[p],p)}}}(),clone:function(){return(new this.constructor(this.geometry,this.material)).copy(this)}});Hc.prototype=Object.assign(Object.create(A.prototype),{constructor:Hc});td.prototype=Object.create(da.prototype);td.prototype.constructor=td;Ob.prototype=Object.create(da.prototype);Ob.prototype.constructor=Ob;Ob.prototype.isCompressedTexture=
+!0;ud.prototype=Object.create(da.prototype);ud.prototype.constructor=ud;Ic.prototype=Object.create(da.prototype);Ic.prototype.constructor=Ic;Ic.prototype.isDepthTexture=!0;Pb.prototype=Object.create(G.prototype);Pb.prototype.constructor=Pb;Jc.prototype=Object.create(I.prototype);Jc.prototype.constructor=Jc;Qb.prototype=Object.create(G.prototype);Qb.prototype.constructor=Qb;Kc.prototype=Object.create(I.prototype);Kc.prototype.constructor=Kc;Aa.prototype=Object.create(G.prototype);Aa.prototype.constructor=
+Aa;Lc.prototype=Object.create(I.prototype);Lc.prototype.constructor=Lc;Rb.prototype=Object.create(Aa.prototype);Rb.prototype.constructor=Rb;Mc.prototype=Object.create(I.prototype);Mc.prototype.constructor=Mc;nb.prototype=Object.create(Aa.prototype);nb.prototype.constructor=nb;Nc.prototype=Object.create(I.prototype);Nc.prototype.constructor=Nc;Sb.prototype=Object.create(Aa.prototype);Sb.prototype.constructor=Sb;Oc.prototype=Object.create(I.prototype);Oc.prototype.constructor=Oc;Tb.prototype=Object.create(Aa.prototype);
+Tb.prototype.constructor=Tb;Pc.prototype=Object.create(I.prototype);Pc.prototype.constructor=Pc;Ub.prototype=Object.create(G.prototype);Ub.prototype.constructor=Ub;Qc.prototype=Object.create(I.prototype);Qc.prototype.constructor=Qc;Vb.prototype=Object.create(G.prototype);Vb.prototype.constructor=Vb;Rc.prototype=Object.create(I.prototype);Rc.prototype.constructor=Rc;Wb.prototype=Object.create(G.prototype);Wb.prototype.constructor=Wb;var Oa={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,h,m;if(0<Oa.area(a))for(h=0;h<c;h++)e[h]=h;else for(h=0;h<c;h++)e[h]=c-1-h;var k=2*c;for(h=c-1;2<c;){if(0>=k--){console.warn("THREE.ShapeUtils: Unable to triangulate polygon! in triangulate()");break}g=h;c<=g&&(g=0);h=g+1;c<=h&&(h=0);m=h+1;c<=m&&(m=0);var l;a:{var p,n,t,q,r,x,u,v;p=a[e[g]].x;n=a[e[g]].y;t=a[e[h]].x;q=a[e[h]].y;r=a[e[m]].x;x=a[e[m]].y;if(0>=(t-
+p)*(x-n)-(q-n)*(r-p))l=!1;else{var L,y,D,w,C,J,E,A,F,G;L=r-t;y=x-q;D=p-r;w=n-x;C=t-p;J=q-n;for(l=0;l<c;l++)if(u=a[e[l]].x,v=a[e[l]].y,!(u===p&&v===n||u===t&&v===q||u===r&&v===x)&&(E=u-p,A=v-n,F=u-t,G=v-q,u-=r,v-=x,F=L*G-y*F,E=C*A-J*E,A=D*v-w*u,F>=-Number.EPSILON&&A>=-Number.EPSILON&&E>=-Number.EPSILON)){l=!1;break a}l=!0}}if(l){d.push([a[e[g]],a[e[h]],a[e[m]]]);f.push([e[g],e[h],e[m]]);g=h;for(m=h+1;m<c;g++,m++)e[g]=e[m];c--;k=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,h=b.y-a.y,k=e.x-c.x,m=e.y-c.y,l=a.x-c.x,n=a.y-c.y,p=h*k-g*m,q=h*l-g*n;if(Math.abs(p)>Number.EPSILON){if(0<p){if(0>q||q>p)return[];k=m*l-k*n;if(0>k||k>p)return[]}else{if(0<q||q<p)return[];k=m*l-k*n;if(0<k||k<p)return[]}if(0===k)return!f||0!==q&&q!==p?[a]:[];if(k===p)return!f||0!==q&&q!==p?[b]:[];
+if(0===q)return[c];if(q===p)return[e];f=k/p;return[{x:a.x+f*g,y:a.y+f*h}]}if(0!==q||m*l!==k*n)return[];h=0===g&&0===h;k=0===k&&0===m;if(h&&k)return a.x!==c.x||a.y!==c.y?[]:[a];if(h)return d(c,e,a)?[a]:[];if(k)return d(a,b,c)?[c]:[];0!==g?(a.x<b.x?(g=a,k=a.x,h=b,a=b.x):(g=b,k=b.x,h=a,a=a.x),c.x<e.x?(b=c,p=c.x,m=e,c=e.x):(b=e,p=e.x,m=c,c=c.x)):(a.y<b.y?(g=a,k=a.y,h=b,a=b.y):(g=b,k=b.y,h=a,a=a.y),c.y<e.y?(b=c,p=c.y,m=e,c=e.y):(b=e,p=e.y,m=c,c=c.y));return k<=p?a<p?[]:a===p?f?[]:[b]:a<=c?[b,h]:[b,m]:
+k>c?[]:k===c?f?[]:[g]:a<=c?[g,h]:[g,m]}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,h,m,k,l,p={};m=a.concat();g=0;for(h=b.length;g<h;g++)Array.prototype.push.apply(m,b[g]);g=0;for(h=m.length;g<h;g++)l=m[g].x+":"+m[g].y,void 0!==p[l]&&console.warn("THREE.ShapeUtils: Duplicate point",l,g),p[l]=g;g=function(a,b){function c(a,b){var d=h.length-
+1,e=a-1;0>e&&(e=d);var g=a+1;g>d&&(g=0);d=f(h[a],h[e],h[g],k[b]);if(!d)return!1;d=k.length-1;e=b-1;0>e&&(e=d);g=b+1;g>d&&(g=0);return(d=f(k[b],k[e],k[g],h[a]))?!0:!1}function d(a,b){var c,f;for(c=0;c<h.length;c++)if(f=c+1,f%=h.length,f=e(a,b,h[c],h[f],!0),0<f.length)return!0;return!1}function g(a,c){var d,f,h,k;for(d=0;d<m.length;d++)for(f=b[m[d]],h=0;h<f.length;h++)if(k=h+1,k%=f.length,k=e(a,c,f[h],f[k],!0),0<k.length)return!0;return!1}var h=a.concat(),k,m=[],l,n,p,q,z,w=[],E,A,F,G=0;for(l=b.length;G<
+l;G++)m.push(G);E=0;for(var N=2*m.length;0<m.length;){N--;if(0>N){console.log("Infinite Loop! Holes left:"+m.length+", Probably Hole outside Shape!");break}for(n=E;n<h.length;n++){p=h[n];l=-1;for(G=0;G<m.length;G++)if(q=m[G],z=p.x+":"+p.y+":"+q,void 0===w[z]){k=b[q];for(A=0;A<k.length;A++)if(q=k[A],c(n,A)&&!d(p,q)&&!g(p,q)){l=A;m.splice(G,1);E=h.slice(0,n+1);q=h.slice(n);A=k.slice(l);F=k.slice(0,l+1);h=E.concat(A).concat(F).concat(q);E=n;break}if(0<=l)break;w[z]=!0}if(0<=l)break}}return h}(a,b);var n=
+Oa.triangulate(g,!1);g=0;for(h=n.length;g<h;g++)for(k=n[g],m=0;3>m;m++)l=k[m].x+":"+k[m].y,l=p[l],void 0!==l&&(k[m]=l);return n.concat()},isClockWise:function(a){return 0>Oa.area(a)}};La.prototype=Object.create(I.prototype);La.prototype.constructor=La;La.prototype.addShapeList=function(a,b){for(var c=a.length,d=0;d<c;d++)this.addShape(a[d],b)};La.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,h=e*e+f*f;if(Math.abs(e*g-f*d)>Number.EPSILON){var k=Math.sqrt(h),m=Math.sqrt(d*d+g*g),h=b.x-f/k;b=b.y+e/k;g=((c.x-g/m-h)*g-(c.y+d/m-b)*d)/(e*g-f*d);d=h+e*g-a.x;e=b+f*g-a.y;f=d*d+e*e;if(2>=f)return new E(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(h)):(d=e,e=f,f=Math.sqrt(h/2));return new E(d/f,e/f)}
+function e(a,b){var c,d;for(K=a.length;0<=--K;){c=K;d=K-1;0>d&&(d=a.length-1);var e,f=t+2*l;for(e=0;e<f;e++){var g=V*e,h=V*(e+1),k=b+c+g,g=b+d+g,m=b+d+h,h=b+c+h,k=k+G,g=g+G,m=m+G,h=h+G;F.faces.push(new ha(k,g,h,null,null,1));F.faces.push(new ha(g,m,h,null,null,1));k=u.generateSideWallUV(F,k,g,m,h);F.faceVertexUvs[0].push([k[0],k[1],k[3]]);F.faceVertexUvs[0].push([k[1],k[2],k[3]])}}}function f(a,b,c){F.vertices.push(new q(a,b,c))}function g(a,b,c){a+=G;b+=G;c+=G;F.faces.push(new ha(a,b,c,null,null,
+0));a=u.generateTopUV(F,a,b,c);F.faceVertexUvs[0].push(a)}var h=void 0!==b.amount?b.amount:100,m=void 0!==b.bevelThickness?b.bevelThickness:6,k=void 0!==b.bevelSize?b.bevelSize:m-2,l=void 0!==b.bevelSegments?b.bevelSegments:3,p=void 0!==b.bevelEnabled?b.bevelEnabled:!0,n=void 0!==b.curveSegments?b.curveSegments:12,t=void 0!==b.steps?b.steps:1,H=b.extrudePath,r,x=!1,u=void 0!==b.UVGenerator?b.UVGenerator:La.WorldUVGenerator,v,w,y,D;H&&(r=H.getSpacedPoints(t),x=!0,p=!1,v=void 0!==b.frames?b.frames:
+H.computeFrenetFrames(t,!1),w=new q,y=new q,D=new q);p||(k=m=l=0);var A,C,J,F=this,G=this.vertices.length,H=a.extractPoints(n),n=H.shape,I=H.holes;if(H=!Oa.isClockWise(n)){n=n.reverse();C=0;for(J=I.length;C<J;C++)A=I[C],Oa.isClockWise(A)&&(I[C]=A.reverse());H=!1}var M=Oa.triangulateShape(n,I),U=n;C=0;for(J=I.length;C<J;C++)A=I[C],n=n.concat(A);var P,N,O,R,S,V=n.length,W,X=M.length,H=[],K=0;O=U.length;P=O-1;for(N=K+1;K<O;K++,P++,N++)P===O&&(P=0),N===O&&(N=0),H[K]=d(U[K],U[P],U[N]);var ba=[],Z,da=H.concat();
+C=0;for(J=I.length;C<J;C++){A=I[C];Z=[];K=0;O=A.length;P=O-1;for(N=K+1;K<O;K++,P++,N++)P===O&&(P=0),N===O&&(N=0),Z[K]=d(A[K],A[P],A[N]);ba.push(Z);da=da.concat(Z)}for(P=0;P<l;P++){O=P/l;R=m*Math.cos(O*Math.PI/2);N=k*Math.sin(O*Math.PI/2);K=0;for(O=U.length;K<O;K++)S=c(U[K],H[K],N),f(S.x,S.y,-R);C=0;for(J=I.length;C<J;C++)for(A=I[C],Z=ba[C],K=0,O=A.length;K<O;K++)S=c(A[K],Z[K],N),f(S.x,S.y,-R)}N=k;for(K=0;K<V;K++)S=p?c(n[K],da[K],N):n[K],x?(y.copy(v.normals[0]).multiplyScalar(S.x),w.copy(v.binormals[0]).multiplyScalar(S.y),
+D.copy(r[0]).add(y).add(w),f(D.x,D.y,D.z)):f(S.x,S.y,0);for(O=1;O<=t;O++)for(K=0;K<V;K++)S=p?c(n[K],da[K],N):n[K],x?(y.copy(v.normals[O]).multiplyScalar(S.x),w.copy(v.binormals[O]).multiplyScalar(S.y),D.copy(r[O]).add(y).add(w),f(D.x,D.y,D.z)):f(S.x,S.y,h/t*O);for(P=l-1;0<=P;P--){O=P/l;R=m*Math.cos(O*Math.PI/2);N=k*Math.sin(O*Math.PI/2);K=0;for(O=U.length;K<O;K++)S=c(U[K],H[K],N),f(S.x,S.y,h+R);C=0;for(J=I.length;C<J;C++)for(A=I[C],Z=ba[C],K=0,O=A.length;K<O;K++)S=c(A[K],Z[K],N),x?f(S.x,S.y+r[t-1].y,
+r[t-1].x+R):f(S.x,S.y,h+R)}(function(){if(p){var a=0*V;for(K=0;K<X;K++)W=M[K],g(W[2]+a,W[1]+a,W[0]+a);a=V*(t+2*l);for(K=0;K<X;K++)W=M[K],g(W[0]+a,W[1]+a,W[2]+a)}else{for(K=0;K<X;K++)W=M[K],g(W[2],W[1],W[0]);for(K=0;K<X;K++)W=M[K],g(W[0]+V*t,W[1]+V*t,W[2]+V*t)}})();(function(){var a=0;e(U,a);a+=U.length;C=0;for(J=I.length;C<J;C++)A=I[C],e(A,a),a+=A.length})()};La.WorldUVGenerator={generateTopUV:function(a,b,c,d){a=a.vertices;b=a[b];c=a[c];d=a[d];return[new E(b.x,b.y),new E(c.x,c.y),new E(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 E(b.x,1-b.z),new E(c.x,1-c.z),new E(d.x,1-d.z),new E(e.x,1-e.z)]:[new E(b.y,1-b.z),new E(c.y,1-c.z),new E(d.y,1-d.z),new E(e.y,1-e.z)]}};Sc.prototype=Object.create(La.prototype);Sc.prototype.constructor=Sc;Tc.prototype=Object.create(I.prototype);Tc.prototype.constructor=Tc;ob.prototype=Object.create(G.prototype);ob.prototype.constructor=ob;Uc.prototype=Object.create(I.prototype);Uc.prototype.constructor=
+Uc;Xb.prototype=Object.create(G.prototype);Xb.prototype.constructor=Xb;Vc.prototype=Object.create(I.prototype);Vc.prototype.constructor=Vc;Yb.prototype=Object.create(G.prototype);Yb.prototype.constructor=Yb;Zb.prototype=Object.create(I.prototype);Zb.prototype.constructor=Zb;$b.prototype=Object.create(G.prototype);$b.prototype.constructor=$b;ac.prototype=Object.create(G.prototype);ac.prototype.constructor=ac;pb.prototype=Object.create(I.prototype);pb.prototype.constructor=pb;Xa.prototype=Object.create(G.prototype);
 Xa.prototype.constructor=Xa;Wc.prototype=Object.create(pb.prototype);Wc.prototype.constructor=Wc;Xc.prototype=Object.create(Xa.prototype);Xc.prototype.constructor=Xc;Yc.prototype=Object.create(I.prototype);Yc.prototype.constructor=Yc;bc.prototype=Object.create(G.prototype);bc.prototype.constructor=bc;var Ma=Object.freeze({WireframeGeometry:Pb,ParametricGeometry:Jc,ParametricBufferGeometry:Qb,TetrahedronGeometry:Lc,TetrahedronBufferGeometry:Rb,OctahedronGeometry:Mc,OctahedronBufferGeometry:nb,IcosahedronGeometry:Nc,
 IcosahedronBufferGeometry:Sb,DodecahedronGeometry:Oc,DodecahedronBufferGeometry:Tb,PolyhedronGeometry:Kc,PolyhedronBufferGeometry:Aa,TubeGeometry:Pc,TubeBufferGeometry:Ub,TorusKnotGeometry:Qc,TorusKnotBufferGeometry:Vb,TorusGeometry:Rc,TorusBufferGeometry:Wb,TextGeometry:Sc,SphereGeometry:Tc,SphereBufferGeometry:ob,RingGeometry:Uc,RingBufferGeometry:Xb,PlaneGeometry:Cc,PlaneBufferGeometry:kb,LatheGeometry:Vc,LatheBufferGeometry:Yb,ShapeGeometry:Zb,ShapeBufferGeometry:$b,ExtrudeGeometry:La,EdgesGeometry:ac,
 ConeGeometry:Wc,ConeBufferGeometry:Xc,CylinderGeometry:pb,CylinderBufferGeometry:Xa,CircleGeometry:Yc,CircleBufferGeometry:bc,BoxGeometry:Jb,BoxBufferGeometry:jb});cc.prototype=Object.create(Ia.prototype);cc.prototype.constructor=cc;cc.prototype.isShadowMaterial=!0;dc.prototype=Object.create(Ia.prototype);dc.prototype.constructor=dc;dc.prototype.isRawShaderMaterial=!0;Zc.prototype={constructor:Zc,isMultiMaterial:!0,toJSON:function(a){for(var b={metadata:{version:4.2,type:"material",generator:"MaterialExporter"},

+ 1 - 1
build/three.module.js

@@ -12013,7 +12013,7 @@ BufferAttribute.prototype = {
 
 	clone: function () {
 
-		return new this.constructor().copy( this );
+		return new this.constructor( this.array, this.itemSize ).copy( this );
 
 	}