|
@@ -37,14 +37,15 @@ b[c+15]=this.n44;return b},setTranslation:function(b,c,e){this.set(1,0,0,b,0,1,0
|
|
new THREE.Vector3;this.columnX.set(this.n11,this.n21,this.n31);return this.columnX},getColumnY:function(){if(!this.columnY)this.columnY=new THREE.Vector3;this.columnY.set(this.n12,this.n22,this.n32);return this.columnY},getColumnZ:function(){if(!this.columnZ)this.columnZ=new THREE.Vector3;this.columnZ.set(this.n13,this.n23,this.n33);return this.columnZ},setRotationFromEuler:function(b,c){var e=b.x,f=b.y,g=b.z,j=Math.cos(e),e=Math.sin(e),h=Math.cos(f),f=Math.sin(f),k=Math.cos(g),g=Math.sin(g);switch(c){case "YXZ":var t=
|
|
new THREE.Vector3;this.columnX.set(this.n11,this.n21,this.n31);return this.columnX},getColumnY:function(){if(!this.columnY)this.columnY=new THREE.Vector3;this.columnY.set(this.n12,this.n22,this.n32);return this.columnY},getColumnZ:function(){if(!this.columnZ)this.columnZ=new THREE.Vector3;this.columnZ.set(this.n13,this.n23,this.n33);return this.columnZ},setRotationFromEuler:function(b,c){var e=b.x,f=b.y,g=b.z,j=Math.cos(e),e=Math.sin(e),h=Math.cos(f),f=Math.sin(f),k=Math.cos(g),g=Math.sin(g);switch(c){case "YXZ":var t=
|
|
h*k,o=h*g,p=f*k,u=f*g;this.n11=t+u*e;this.n12=p*e-o;this.n13=j*f;this.n21=j*g;this.n22=j*k;this.n23=-e;this.n31=o*e-p;this.n32=u+t*e;this.n33=j*h;break;case "ZXY":t=h*k;o=h*g;p=f*k;u=f*g;this.n11=t-u*e;this.n12=-j*g;this.n13=p+o*e;this.n21=o+p*e;this.n22=j*k;this.n23=u-t*e;this.n31=-j*f;this.n32=e;this.n33=j*h;break;case "ZYX":t=j*k;o=j*g;p=e*k;u=e*g;this.n11=h*k;this.n12=p*f-o;this.n13=t*f+u;this.n21=h*g;this.n22=u*f+t;this.n23=o*f-p;this.n31=-f;this.n32=e*h;this.n33=j*h;break;case "YZX":t=j*h;o=
|
|
h*k,o=h*g,p=f*k,u=f*g;this.n11=t+u*e;this.n12=p*e-o;this.n13=j*f;this.n21=j*g;this.n22=j*k;this.n23=-e;this.n31=o*e-p;this.n32=u+t*e;this.n33=j*h;break;case "ZXY":t=h*k;o=h*g;p=f*k;u=f*g;this.n11=t-u*e;this.n12=-j*g;this.n13=p+o*e;this.n21=o+p*e;this.n22=j*k;this.n23=u-t*e;this.n31=-j*f;this.n32=e;this.n33=j*h;break;case "ZYX":t=j*k;o=j*g;p=e*k;u=e*g;this.n11=h*k;this.n12=p*f-o;this.n13=t*f+u;this.n21=h*g;this.n22=u*f+t;this.n23=o*f-p;this.n31=-f;this.n32=e*h;this.n33=j*h;break;case "YZX":t=j*h;o=
|
|
j*f;p=e*h;u=e*f;this.n11=h*k;this.n12=u-t*g;this.n13=p*g+o;this.n21=g;this.n22=j*k;this.n23=-e*k;this.n31=-f*k;this.n32=o*g+p;this.n33=t-u*g;break;case "XZY":t=j*h;o=j*f;p=e*h;u=e*f;this.n11=h*k;this.n12=-g;this.n13=f*k;this.n21=t*g+u;this.n22=j*k;this.n23=o*g-p;this.n31=p*g-o;this.n32=e*k;this.n33=u*g+t;break;default:t=j*k,o=j*g,p=e*k,u=e*g,this.n11=h*k,this.n12=-h*g,this.n13=f,this.n21=o+p*f,this.n22=t-u*f,this.n23=-e*h,this.n31=u-t*f,this.n32=p+o*f,this.n33=j*h}return this},setRotationFromQuaternion:function(b){var c=
|
|
j*f;p=e*h;u=e*f;this.n11=h*k;this.n12=u-t*g;this.n13=p*g+o;this.n21=g;this.n22=j*k;this.n23=-e*k;this.n31=-f*k;this.n32=o*g+p;this.n33=t-u*g;break;case "XZY":t=j*h;o=j*f;p=e*h;u=e*f;this.n11=h*k;this.n12=-g;this.n13=f*k;this.n21=t*g+u;this.n22=j*k;this.n23=o*g-p;this.n31=p*g-o;this.n32=e*k;this.n33=u*g+t;break;default:t=j*k,o=j*g,p=e*k,u=e*g,this.n11=h*k,this.n12=-h*g,this.n13=f,this.n21=o+p*f,this.n22=t-u*f,this.n23=-e*h,this.n31=u-t*f,this.n32=p+o*f,this.n33=j*h}return this},setRotationFromQuaternion:function(b){var c=
|
|
-b.x,e=b.y,f=b.z,g=b.w,j=c+c,h=e+e,k=f+f,b=c*j,t=c*h;c*=k;var o=e*h;e*=k;f*=k;j*=g;h*=g;g*=k;this.n11=1-(o+f);this.n12=t-g;this.n13=c+h;this.n21=t+g;this.n22=1-(b+f);this.n23=e-j;this.n31=c-h;this.n32=e+j;this.n33=1-(b+o);return this},scale:function(b){var c=b.x,e=b.y,b=b.z;this.n11*=c;this.n12*=e;this.n13*=b;this.n21*=c;this.n22*=e;this.n23*=b;this.n31*=c;this.n32*=e;this.n33*=b;this.n41*=c;this.n42*=e;this.n43*=b;return this},compose:function(b,c,e){var f=new THREE.Matrix4,g=new THREE.Matrix4;f.setRotationFromQuaternion(c);
|
|
|
|
-g.setScale(e.x,e.y,e.z);this.multiply(f,g);this.n14=b.x;this.n24=b.y;this.n34=b.z;return this},decompose:function(b,c,e){var f=new THREE.Vector3(this.n11,this.n21,this.n31),g=new THREE.Vector3(this.n12,this.n22,this.n32),j=new THREE.Vector3(this.n13,this.n23,this.n33),b=b instanceof THREE.Vector3?b:new THREE.Vector3,c=c instanceof THREE.Quaternion?c:new THREE.Quaternion,e=e instanceof THREE.Vector3?e:new THREE.Vector3;e.x=f.length();e.y=g.length();e.z=j.length();b.x=this.n14;b.y=this.n24;b.z=this.n34;
|
|
|
|
-f=this.clone();f.n11/=e.x;f.n21/=e.x;f.n31/=e.x;f.n12/=e.y;f.n22/=e.y;f.n32/=e.y;f.n13/=e.z;f.n23/=e.z;f.n33/=e.z;c.setFromRotationMatrix(f);return[b,c,e]},extractPosition:function(b){this.n14=b.n14;this.n24=b.n24;this.n34=b.n34},extractRotation:function(b,c){var e=1/c.x,f=1/c.y,g=1/c.z;this.n11=b.n11*e;this.n21=b.n21*e;this.n31=b.n31*e;this.n12=b.n12*f;this.n22=b.n22*f;this.n32=b.n32*f;this.n13=b.n13*g;this.n23=b.n23*g;this.n33=b.n33*g}};
|
|
|
|
|
|
+b.x,e=b.y,f=b.z,g=b.w,j=c+c,h=e+e,k=f+f,b=c*j,t=c*h;c*=k;var o=e*h;e*=k;f*=k;j*=g;h*=g;g*=k;this.n11=1-(o+f);this.n12=t-g;this.n13=c+h;this.n21=t+g;this.n22=1-(b+f);this.n23=e-j;this.n31=c-h;this.n32=e+j;this.n33=1-(b+o);return this},scale:function(b){var c=b.x,e=b.y,b=b.z;this.n11*=c;this.n12*=e;this.n13*=b;this.n21*=c;this.n22*=e;this.n23*=b;this.n31*=c;this.n32*=e;this.n33*=b;this.n41*=c;this.n42*=e;this.n43*=b;return this},compose:function(b,c,e){var f=THREE.Matrix4.__m1,g=THREE.Matrix4.__m2;
|
|
|
|
+f.identity();f.setRotationFromQuaternion(c);g.setScale(e.x,e.y,e.z);this.multiply(f,g);this.n14=b.x;this.n24=b.y;this.n34=b.z;return this},decompose:function(b,c,e){var f=THREE.Matrix4.__v1,g=THREE.Matrix4.__v2,j=THREE.Matrix4.__v3;f.set(this.n11,this.n21,this.n31);g.set(this.n12,this.n22,this.n32);j.set(this.n13,this.n23,this.n33);b=b instanceof THREE.Vector3?b:new THREE.Vector3;c=c instanceof THREE.Quaternion?c:new THREE.Quaternion;e=e instanceof THREE.Vector3?e:new THREE.Vector3;e.x=f.length();
|
|
|
|
+e.y=g.length();e.z=j.length();b.x=this.n14;b.y=this.n24;b.z=this.n34;f=THREE.Matrix4.__m1;f.copy(this);f.n11/=e.x;f.n21/=e.x;f.n31/=e.x;f.n12/=e.y;f.n22/=e.y;f.n32/=e.y;f.n13/=e.z;f.n23/=e.z;f.n33/=e.z;c.setFromRotationMatrix(f);return[b,c,e]},extractPosition:function(b){this.n14=b.n14;this.n24=b.n24;this.n34=b.n34},extractRotation:function(b,c){var e=1/c.x,f=1/c.y,g=1/c.z;this.n11=b.n11*e;this.n21=b.n21*e;this.n31=b.n31*e;this.n12=b.n12*f;this.n22=b.n22*f;this.n32=b.n32*f;this.n13=b.n13*g;this.n23=
|
|
|
|
+b.n23*g;this.n33=b.n33*g}};
|
|
THREE.Matrix4.makeInvert=function(b,c){var e=b.n11,f=b.n12,g=b.n13,j=b.n14,h=b.n21,k=b.n22,t=b.n23,o=b.n24,p=b.n31,u=b.n32,v=b.n33,n=b.n34,x=b.n41,w=b.n42,B=b.n43,y=b.n44;c===void 0&&(c=new THREE.Matrix4);c.n11=t*n*w-o*v*w+o*u*B-k*n*B-t*u*y+k*v*y;c.n12=j*v*w-g*n*w-j*u*B+f*n*B+g*u*y-f*v*y;c.n13=g*o*w-j*t*w+j*k*B-f*o*B-g*k*y+f*t*y;c.n14=j*t*u-g*o*u-j*k*v+f*o*v+g*k*n-f*t*n;c.n21=o*v*x-t*n*x-o*p*B+h*n*B+t*p*y-h*v*y;c.n22=g*n*x-j*v*x+j*p*B-e*n*B-g*p*y+e*v*y;c.n23=j*t*x-g*o*x-j*h*B+e*o*B+g*h*y-e*t*y;c.n24=
|
|
THREE.Matrix4.makeInvert=function(b,c){var e=b.n11,f=b.n12,g=b.n13,j=b.n14,h=b.n21,k=b.n22,t=b.n23,o=b.n24,p=b.n31,u=b.n32,v=b.n33,n=b.n34,x=b.n41,w=b.n42,B=b.n43,y=b.n44;c===void 0&&(c=new THREE.Matrix4);c.n11=t*n*w-o*v*w+o*u*B-k*n*B-t*u*y+k*v*y;c.n12=j*v*w-g*n*w-j*u*B+f*n*B+g*u*y-f*v*y;c.n13=g*o*w-j*t*w+j*k*B-f*o*B-g*k*y+f*t*y;c.n14=j*t*u-g*o*u-j*k*v+f*o*v+g*k*n-f*t*n;c.n21=o*v*x-t*n*x-o*p*B+h*n*B+t*p*y-h*v*y;c.n22=g*n*x-j*v*x+j*p*B-e*n*B-g*p*y+e*v*y;c.n23=j*t*x-g*o*x-j*h*B+e*o*B+g*h*y-e*t*y;c.n24=
|
|
g*o*p-j*t*p+j*h*v-e*o*v-g*h*n+e*t*n;c.n31=k*n*x-o*u*x+o*p*w-h*n*w-k*p*y+h*u*y;c.n32=j*u*x-f*n*x-j*p*w+e*n*w+f*p*y-e*u*y;c.n33=g*o*x-j*k*x+j*h*w-e*o*w-f*h*y+e*k*y;c.n34=j*k*p-f*o*p-j*h*u+e*o*u+f*h*n-e*k*n;c.n41=t*u*x-k*v*x-t*p*w+h*v*w+k*p*B-h*u*B;c.n42=f*v*x-g*u*x+g*p*w-e*v*w-f*p*B+e*u*B;c.n43=g*k*x-f*t*x-g*h*w+e*t*w+f*h*B-e*k*B;c.n44=f*t*p-g*k*p+g*h*u-e*t*u-f*h*v+e*k*v;c.multiplyScalar(1/b.determinant());return c};
|
|
g*o*p-j*t*p+j*h*v-e*o*v-g*h*n+e*t*n;c.n31=k*n*x-o*u*x+o*p*w-h*n*w-k*p*y+h*u*y;c.n32=j*u*x-f*n*x-j*p*w+e*n*w+f*p*y-e*u*y;c.n33=g*o*x-j*k*x+j*h*w-e*o*w-f*h*y+e*k*y;c.n34=j*k*p-f*o*p-j*h*u+e*o*u+f*h*n-e*k*n;c.n41=t*u*x-k*v*x-t*p*w+h*v*w+k*p*B-h*u*B;c.n42=f*v*x-g*u*x+g*p*w-e*v*w-f*p*B+e*u*B;c.n43=g*k*x-f*t*x-g*h*w+e*t*w+f*h*B-e*k*B;c.n44=f*t*p-g*k*p+g*h*u-e*t*u-f*h*v+e*k*v;c.multiplyScalar(1/b.determinant());return c};
|
|
THREE.Matrix4.makeInvert3x3=function(b){var c=b.m33,e=c.m,f=b.n33*b.n22-b.n32*b.n23,g=-b.n33*b.n21+b.n31*b.n23,j=b.n32*b.n21-b.n31*b.n22,h=-b.n33*b.n12+b.n32*b.n13,k=b.n33*b.n11-b.n31*b.n13,t=-b.n32*b.n11+b.n31*b.n12,o=b.n23*b.n12-b.n22*b.n13,p=-b.n23*b.n11+b.n21*b.n13,u=b.n22*b.n11-b.n21*b.n12,b=b.n11*f+b.n21*h+b.n31*o;b==0&&console.error("THREE.Matrix4.makeInvert3x3: Matrix not invertible.");b=1/b;e[0]=b*f;e[1]=b*g;e[2]=b*j;e[3]=b*h;e[4]=b*k;e[5]=b*t;e[6]=b*o;e[7]=b*p;e[8]=b*u;return c};
|
|
THREE.Matrix4.makeInvert3x3=function(b){var c=b.m33,e=c.m,f=b.n33*b.n22-b.n32*b.n23,g=-b.n33*b.n21+b.n31*b.n23,j=b.n32*b.n21-b.n31*b.n22,h=-b.n33*b.n12+b.n32*b.n13,k=b.n33*b.n11-b.n31*b.n13,t=-b.n32*b.n11+b.n31*b.n12,o=b.n23*b.n12-b.n22*b.n13,p=-b.n23*b.n11+b.n21*b.n13,u=b.n22*b.n11-b.n21*b.n12,b=b.n11*f+b.n21*h+b.n31*o;b==0&&console.error("THREE.Matrix4.makeInvert3x3: Matrix not invertible.");b=1/b;e[0]=b*f;e[1]=b*g;e[2]=b*j;e[3]=b*h;e[4]=b*k;e[5]=b*t;e[6]=b*o;e[7]=b*p;e[8]=b*u;return c};
|
|
THREE.Matrix4.makeFrustum=function(b,c,e,f,g,j){var h;h=new THREE.Matrix4;h.n11=2*g/(c-b);h.n12=0;h.n13=(c+b)/(c-b);h.n14=0;h.n21=0;h.n22=2*g/(f-e);h.n23=(f+e)/(f-e);h.n24=0;h.n31=0;h.n32=0;h.n33=-(j+g)/(j-g);h.n34=-2*j*g/(j-g);h.n41=0;h.n42=0;h.n43=-1;h.n44=0;return h};THREE.Matrix4.makePerspective=function(b,c,e,f){var g,b=e*Math.tan(b*Math.PI/360);g=-b;return THREE.Matrix4.makeFrustum(g*c,b*c,g,b,e,f)};
|
|
THREE.Matrix4.makeFrustum=function(b,c,e,f,g,j){var h;h=new THREE.Matrix4;h.n11=2*g/(c-b);h.n12=0;h.n13=(c+b)/(c-b);h.n14=0;h.n21=0;h.n22=2*g/(f-e);h.n23=(f+e)/(f-e);h.n24=0;h.n31=0;h.n32=0;h.n33=-(j+g)/(j-g);h.n34=-2*j*g/(j-g);h.n41=0;h.n42=0;h.n43=-1;h.n44=0;return h};THREE.Matrix4.makePerspective=function(b,c,e,f){var g,b=e*Math.tan(b*Math.PI/360);g=-b;return THREE.Matrix4.makeFrustum(g*c,b*c,g,b,e,f)};
|
|
-THREE.Matrix4.makeOrtho=function(b,c,e,f,g,j){var h,k,t,o;h=new THREE.Matrix4;k=c-b;t=e-f;o=j-g;h.n11=2/k;h.n12=0;h.n13=0;h.n14=-((c+b)/k);h.n21=0;h.n22=2/t;h.n23=0;h.n24=-((e+f)/t);h.n31=0;h.n32=0;h.n33=-2/o;h.n34=-((j+g)/o);h.n41=0;h.n42=0;h.n43=0;h.n44=1;return h};THREE.Matrix4.__v1=new THREE.Vector3;THREE.Matrix4.__v2=new THREE.Vector3;THREE.Matrix4.__v3=new THREE.Vector3;
|
|
|
|
|
|
+THREE.Matrix4.makeOrtho=function(b,c,e,f,g,j){var h,k,t,o;h=new THREE.Matrix4;k=c-b;t=e-f;o=j-g;h.n11=2/k;h.n12=0;h.n13=0;h.n14=-((c+b)/k);h.n21=0;h.n22=2/t;h.n23=0;h.n24=-((e+f)/t);h.n31=0;h.n32=0;h.n33=-2/o;h.n34=-((j+g)/o);h.n41=0;h.n42=0;h.n43=0;h.n44=1;return h};THREE.Matrix4.__v1=new THREE.Vector3;THREE.Matrix4.__v2=new THREE.Vector3;THREE.Matrix4.__v3=new THREE.Vector3;THREE.Matrix4.__m1=new THREE.Matrix4;THREE.Matrix4.__m2=new THREE.Matrix4;
|
|
THREE.Object3D=function(){this.parent=void 0;this.children=[];this.up=new THREE.Vector3(0,1,0);this.position=new THREE.Vector3;this.rotation=new THREE.Vector3;this.eulerOrder="XYZ";this.scale=new THREE.Vector3(1,1,1);this.flipSided=this.doubleSided=this.dynamic=!1;this.renderDepth=null;this.rotationAutoUpdate=!0;this.matrix=new THREE.Matrix4;this.matrixWorld=new THREE.Matrix4;this.matrixRotationWorld=new THREE.Matrix4;this.matrixWorldNeedsUpdate=this.matrixAutoUpdate=!0;this.quaternion=new THREE.Quaternion;
|
|
THREE.Object3D=function(){this.parent=void 0;this.children=[];this.up=new THREE.Vector3(0,1,0);this.position=new THREE.Vector3;this.rotation=new THREE.Vector3;this.eulerOrder="XYZ";this.scale=new THREE.Vector3(1,1,1);this.flipSided=this.doubleSided=this.dynamic=!1;this.renderDepth=null;this.rotationAutoUpdate=!0;this.matrix=new THREE.Matrix4;this.matrixWorld=new THREE.Matrix4;this.matrixRotationWorld=new THREE.Matrix4;this.matrixWorldNeedsUpdate=this.matrixAutoUpdate=!0;this.quaternion=new THREE.Quaternion;
|
|
this.useQuaternion=!1;this.boundRadius=0;this.boundRadiusScale=1;this.visible=!0;this.receiveShadow=this.castShadow=!1;this._vector=new THREE.Vector3;this.name=""};
|
|
this.useQuaternion=!1;this.boundRadius=0;this.boundRadiusScale=1;this.visible=!0;this.receiveShadow=this.castShadow=!1;this._vector=new THREE.Vector3;this.name=""};
|
|
THREE.Object3D.prototype={constructor:THREE.Object3D,translate:function(b,c){this.matrix.rotateAxis(c);this.position.addSelf(c.multiplyScalar(b))},translateX:function(b){this.translate(b,this._vector.set(1,0,0))},translateY:function(b){this.translate(b,this._vector.set(0,1,0))},translateZ:function(b){this.translate(b,this._vector.set(0,0,1))},lookAt:function(b){this.matrix.lookAt(b,this.position,this.up);this.rotationAutoUpdate&&this.rotation.setRotationFromMatrix(this.matrix)},addChild:function(b){if(this.children.indexOf(b)===
|
|
THREE.Object3D.prototype={constructor:THREE.Object3D,translate:function(b,c){this.matrix.rotateAxis(c);this.position.addSelf(c.multiplyScalar(b))},translateX:function(b){this.translate(b,this._vector.set(1,0,0))},translateY:function(b){this.translate(b,this._vector.set(0,1,0))},translateZ:function(b){this.translate(b,this._vector.set(0,0,1))},lookAt:function(b){this.matrix.lookAt(b,this.position,this.up);this.rotationAutoUpdate&&this.rotation.setRotationFromMatrix(this.matrix)},addChild:function(b){if(this.children.indexOf(b)===
|