THREE.Matrix3.prototype={constructor:THREE.Matrix3,set:function(a,b,c,d,e,f,g,h,k){varl=this.elements;l[0]=a;l[3]=b;l[6]=c;l[1]=d;l[4]=e;l[7]=f;l[2]=g;l[5]=h;l[8]=k;returnthis},identity:function(){this.set(1,0,0,0,1,0,0,0,1);returnthis},copy:function(a){a=a.elements;this.set(a[0],a[3],a[6],a[1],a[4],a[7],a[2],a[5],a[8]);returnthis},multiplyVector3:function(a){console.warn("DEPRECATED: Matrix3's .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead.");returna.applyMatrix3(this)},
multiplyVector3Array:function(a){console.warn("DEPRECATED: Matrix3's .multiplyVector3Array() has been renamed. Use matrix.applyToVector3Array( array ) instead.");returnthis.applyToVector3Array(a)},applyToVector3Array:function(){vara=newTHREE.Vector3;returnfunction(b){for(varc=0,d=b.length;c<d;c+=3)a.x=b[c],a.y=b[c+1],a.z=b[c+2],a.applyMatrix3(this),b[c]=a.x,b[c+1]=a.y,b[c+2]=a.z;returnb}}(),multiplyScalar:function(a){varb=this.elements;b[0]*=a;b[3]*=a;b[6]*=a;b[1]*=a;b[4]*=a;b[7]*=a;b[2]*=
THREE.Matrix4.prototype={constructor:THREE.Matrix4,set:function(a,b,c,d,e,f,g,h,k,l,p,n,r,s,t,q){varv=this.elements;v[0]=a;v[4]=b;v[8]=c;v[12]=d;v[1]=e;v[5]=f;v[9]=g;v[13]=h;v[2]=k;v[6]=l;v[10]=p;v[14]=n;v[3]=r;v[7]=s;v[11]=t;v[15]=q;returnthis},identity:function(){this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1);returnthis},copy:function(a){this.elements.set(a.elements);returnthis},extractPosition:function(a){console.warn("DEPRECATED: Matrix4's .extractPosition() has been renamed to .copyPosition().");
ainstanceofTHREE.Euler&&console.error("ERROR: Matrix's .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order. Please update your code.");varb=this.elements,c=a.x,d=a.y,e=a.z,f=Math.cos(c),c=Math.sin(c),g=Math.cos(d),d=Math.sin(d),h=Math.cos(e),e=Math.sin(e);if("XYZ"===a.order){a=f*h;vark=f*e,l=c*h,p=c*e;b[0]=g*h;b[4]=-g*e;b[8]=d;b[1]=k+l*d;b[5]=a-p*d;b[9]=-c*g;b[2]=p-a*d;b[6]=l+k*d;b[10]=f*g}else"YXZ"===a.order?(a=g*h,k=g*e,l=d*h,p=d*e,b[0]=a+p*c,b[4]=l*c-k,b[8]=
a.x;g[4]=b.x;g[8]=c.x;g[1]=a.y;g[5]=b.y;g[9]=c.y;g[2]=a.z;g[6]=b.z;g[10]=c.z;returnthis}}(),multiply:function(a,b){returnvoid0!==b?(console.warn("DEPRECATED: Matrix4's .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(a,b)):this.multiplyMatrices(this,a)},multiplyMatrices:function(a,b){varc=a.elements,d=b.elements,e=this.elements,f=c[0],g=c[4],h=c[8],k=c[12],l=c[1],p=c[5],n=c[9],r=c[13],s=c[2],t=c[6],q=c[10],v=c[14],w=c[3],u=c[7],x=c[11],
b,c){vard=this.elements;this.multiplyMatrices(a,b);c[0]=d[0];c[1]=d[1];c[2]=d[2];c[3]=d[3];c[4]=d[4];c[5]=d[5];c[6]=d[6];c[7]=d[7];c[8]=d[8];c[9]=d[9];c[10]=d[10];c[11]=d[11];c[12]=d[12];c[13]=d[13];c[14]=d[14];c[15]=d[15];returnthis},multiplyScalar:function(a){varb=this.elements;b[0]*=a;b[4]*=a;b[8]*=a;b[12]*=a;b[1]*=a;b[5]*=a;b[9]*=a;b[13]*=a;b[2]*=a;b[6]*=a;b[10]*=a;b[14]*=a;b[3]*=a;b[7]*=a;b[11]*=a;b[15]*=a;returnthis},multiplyVector3:function(a){console.warn("DEPRECATED: Matrix4's .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) or vector.applyProjection( matrix ) instead.");
returna.applyProjection(this)},multiplyVector4:function(a){console.warn("DEPRECATED: Matrix4's .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead.");returna.applyMatrix4(this)},multiplyVector3Array:function(){vara=newTHREE.Vector3;returnfunction(b){for(varc=0,d=b.length;c<d;c+=3)a.x=b[c],a.y=b[c+1],a.z=b[c+2],a.applyProjection(this),b[c]=a.x,b[c+1]=a.y,b[c+2]=a.z;returnb}}(),rotateAxis:function(a){console.warn("DEPRECATED: Matrix4's .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead.");
a.transformDirection(this)},crossVector:function(a){console.warn("DEPRECATED: Matrix4's .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead.");returna.applyMatrix4(this)},determinant:function(){vara=this.elements,b=a[0],c=a[4],d=a[8],e=a[12],f=a[1],g=a[5],h=a[9],k=a[13],l=a[2],p=a[6],n=a[10],r=a[14];returna[3]*(+e*h*p-d*k*p-e*g*n+c*k*n+d*g*r-c*h*r)+a[7]*(+b*h*r-b*k*n+e*f*n-d*f*r+d*k*l-e*h*l)+a[11]*(+b*k*p-b*g*r-e*f*p+c*f*r+e*g*l-c*k*l)+a[15]*(-d*g*l-b*h*p+b*g*n+d*f*p-c*f*
a[b]=c[0];a[b+1]=c[1];a[b+2]=c[2];a[b+3]=c[3];a[b+4]=c[4];a[b+5]=c[5];a[b+6]=c[6];a[b+7]=c[7];a[b+8]=c[8];a[b+9]=c[9];a[b+10]=c[10];a[b+11]=c[11];a[b+12]=c[12];a[b+13]=c[13];a[b+14]=c[14];a[b+15]=c[15];returna},getPosition:function(){vara=newTHREE.Vector3;returnfunction(){console.warn("DEPRECATED: Matrix4's .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead.");varb=this.elements;returna.set(b[12],b[13],b[14])}}(),setPosition:function(a){varb=this.elements;
e*p*d;c[13]=g*n*r-h*p*r+h*k*t-e*n*t-g*k*q+e*p*q;c[2]=l*q*v-n*s*v+n*r*w-k*q*w-l*r*d+k*s*d;c[6]=h*s*v-f*q*v-h*r*w+e*q*w+f*r*d-e*s*d;c[10]=f*n*v-h*l*v+h*k*w-e*n*w-f*k*d+e*l*d;c[14]=h*l*r-f*n*r-h*k*s+e*n*s+f*k*q-e*l*q;c[3]=p*s*v-l*t*v-p*r*w+k*t*w+l*r*u-k*s*u;c[7]=f*t*v-g*s*v+g*r*w-e*t*w-f*r*u+e*s*u;c[11]=g*l*v-f*p*v-g*k*w+e*p*w+f*k*u-e*l*u;c[15]=f*p*r-g*l*r+g*k*s-e*p*s-f*k*t+e*l*t;c=e*c[0]+k*c[4]+r*c[8]+v*c[12];if(0==c){if(b)throwError("Matrix4.getInverse(): can't invert matrix, determinant is 0");console.warn("Matrix4.getInverse(): can't invert matrix, determinant is 0");
this.identity();returnthis}this.multiplyScalar(1/c);returnthis},translate:function(a){console.warn("DEPRECATED: Matrix4's .translate() has been removed.")},rotateX:function(a){console.warn("DEPRECATED: Matrix4's .rotateX() has been removed.")},rotateY:function(a){console.warn("DEPRECATED: Matrix4's .rotateY() has been removed.")},rotateZ:function(a){console.warn("DEPRECATED: Matrix4's .rotateZ() has been removed.")},rotateByAxis:function(a,b){console.warn("DEPRECATED: Matrix4's .rotateByAxis() has been removed.")},
returna.applyProjection(this)},multiplyVector4:function(a){console.warn("DEPRECATED: Matrix4's .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead.");returna.applyMatrix4(this)},multiplyVector3Array:function(a){console.warn("DEPRECATED: Matrix4's .multiplyVector3Array() has been renamed. Use matrix.applyToVector3Array( array ) instead.");returnthis.applyToVector3Array(a)},applyToVector3Array:function(){vara=newTHREE.Vector3;returnfunction(b){for(varc=0,d=b.length;c<
d;c+=3)a.x=b[c],a.y=b[c+1],a.z=b[c+2],a.applyMatrix4(this),b[c]=a.x,b[c+1]=a.y,b[c+2]=a.z;returnb}}(),rotateAxis:function(a){console.warn("DEPRECATED: Matrix4's .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead.");a.transformDirection(this)},crossVector:function(a){console.warn("DEPRECATED: Matrix4's .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead.");returna.applyMatrix4(this)},determinant:function(){vara=this.elements,b=a[0],c=a[4],d=a[8],
a[0]=b[0];a[1]=b[1];a[2]=b[2];a[3]=b[3];a[4]=b[4];a[5]=b[5];a[6]=b[6];a[7]=b[7];a[8]=b[8];a[9]=b[9];a[10]=b[10];a[11]=b[11];a[12]=b[12];a[13]=b[13];a[14]=b[14];a[15]=b[15];returna},flattenToArrayOffset:function(a,b){varc=this.elements;a[b]=c[0];a[b+1]=c[1];a[b+2]=c[2];a[b+3]=c[3];a[b+4]=c[4];a[b+5]=c[5];a[b+6]=c[6];a[b+7]=c[7];a[b+8]=c[8];a[b+9]=c[9];a[b+10]=c[10];a[b+11]=c[11];a[b+12]=c[12];a[b+13]=c[13];a[b+14]=c[14];a[b+15]=c[15];returna},getPosition:function(){vara=newTHREE.Vector3;returnfunction(){console.warn("DEPRECATED: Matrix4's .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead.");
v*c[12];if(0==c){if(b)throwError("Matrix4.getInverse(): can't invert matrix, determinant is 0");console.warn("Matrix4.getInverse(): can't invert matrix, determinant is 0");this.identity();returnthis}this.multiplyScalar(1/c);returnthis},translate:function(a){console.warn("DEPRECATED: Matrix4's .translate() has been removed.")},rotateX:function(a){console.warn("DEPRECATED: Matrix4's .rotateX() has been removed.")},rotateY:function(a){console.warn("DEPRECATED: Matrix4's .rotateY() has been removed.")},
rotateZ:function(a){console.warn("DEPRECATED: Matrix4's .rotateZ() has been removed.")},rotateByAxis:function(a,b){console.warn("DEPRECATED: Matrix4's .rotateByAxis() has been removed.")},scale:function(a){varb=this.elements,c=a.x,d=a.y;a=a.z;b[0]*=c;b[4]*=d;b[8]*=a;b[1]*=c;b[5]*=d;b[9]*=a;b[2]*=c;b[6]*=d;b[10]*=a;b[3]*=c;b[7]*=d;b[11]*=a;returnthis},getMaxScaleOnAxis:function(){vara=this.elements;returnMath.sqrt(Math.max(a[0]*a[0]+a[1]*a[1]+a[2]*a[2],Math.max(a[4]*a[4]+a[5]*a[5]+a[6]*a[6],a[8]*
THREE.Face3.prototype={constructor:THREE.Face3,clone:function(){vara=newTHREE.Face3(this.a,this.b,this.c);a.normal.copy(this.normal);a.color.copy(this.color);a.materialIndex=this.materialIndex;varb,c;b=0;for(c=this.vertexNormals.length;b<c;b++)a.vertexNormals[b]=this.vertexNormals[b].clone();b=0;for(c=this.vertexColors.length;b<c;b++)a.vertexColors[b]=this.vertexColors[b].clone();b=0;for(c=this.vertexTangents.length;b<c;b++)a.vertexTangents[b]=this.vertexTangents[b].clone();returna}};THREE.Face4=function(a,b,c,d,e,f,g){console.warn("THREE.Face4 has been removed. A THREE.Face3 will be created instead.");returnnewTHREE.Face3(a,b,c,e,f,g)};THREE.BufferGeometry=function(){this.id=THREE.GeometryIdCount++;this.uuid=THREE.Math.generateUUID();this.name="";this.attributes={};this.offsets=[];this.boundingSphere=this.boundingBox=null};
THREE.BufferGeometry.prototype={constructor:THREE.BufferGeometry,addAttribute:function(a,b,c){4===arguments.length?(console.warn("DEPRECATED: BufferGeometry.addAttribute() now accepts only 3 arguments ( name, array, itemSize )"),this.attributes[arguments[0]]={array:newarguments[1](arguments[2]*arguments[3]),itemSize:arguments[3]}):this.attributes[a]={array:b,itemSize:c}},getAttribute:function(a){returnthis.attributes[a]},applyMatrix:function(a){varb=this.attributes.position;void0!==b&&(a.multiplyVector3Array(b.array),