|
@@ -481,7 +481,7 @@ b.clientY):this.noPan||(w=u=this.getMouseOnScreen(b.clientX,b.clientY))}),!1);th
|
|
this.STATE.NONE&&(f=!0)}}),!1);window.addEventListener("keyup",e(this,function(){if(h!==this.STATE.NONE)h=this.STATE.NONE}),!1)};THREE.TrackballControls.prototype.STATE={NONE:-1,ROTATE:0,ZOOM:1,PAN:2};
|
|
this.STATE.NONE&&(f=!0)}}),!1);window.addEventListener("keyup",e(this,function(){if(h!==this.STATE.NONE)h=this.STATE.NONE}),!1)};THREE.TrackballControls.prototype.STATE={NONE:-1,ROTATE:0,ZOOM:1,PAN:2};
|
|
THREE.CubeGeometry=function(b,c,e,f,h,k,m,n,p){function t(b,e,c,m,n,t,p,u){var v,x,z=f||1,A=h||1,P=n/2,Q=t/2,T=w.vertices.length;if(b=="x"&&e=="y"||b=="y"&&e=="x")v="z";else if(b=="x"&&e=="z"||b=="z"&&e=="x")v="y",A=k||1;else if(b=="z"&&e=="y"||b=="y"&&e=="z")v="x",z=k||1;var X=z+1,o=A+1;n/=z;var ea=t/A;for(x=0;x<o;x++)for(t=0;t<X;t++){var V=new THREE.Vector3;V[b]=(t*n-P)*c;V[e]=(x*ea-Q)*m;V[v]=p;w.vertices.push(new THREE.Vertex(V))}for(x=0;x<A;x++)for(t=0;t<z;t++)w.faces.push(new THREE.Face4(t+X*
|
|
THREE.CubeGeometry=function(b,c,e,f,h,k,m,n,p){function t(b,e,c,m,n,t,p,u){var v,x,z=f||1,A=h||1,P=n/2,Q=t/2,T=w.vertices.length;if(b=="x"&&e=="y"||b=="y"&&e=="x")v="z";else if(b=="x"&&e=="z"||b=="z"&&e=="x")v="y",A=k||1;else if(b=="z"&&e=="y"||b=="y"&&e=="z")v="x",z=k||1;var X=z+1,o=A+1;n/=z;var ea=t/A;for(x=0;x<o;x++)for(t=0;t<X;t++){var V=new THREE.Vector3;V[b]=(t*n-P)*c;V[e]=(x*ea-Q)*m;V[v]=p;w.vertices.push(new THREE.Vertex(V))}for(x=0;x<A;x++)for(t=0;t<z;t++)w.faces.push(new THREE.Face4(t+X*
|
|
x+T,t+X*(x+1)+T,t+1+X*(x+1)+T,t+1+X*x+T,null,null,u)),w.faceVertexUvs[0].push([new THREE.UV(t/z,x/A),new THREE.UV(t/z,(x+1)/A),new THREE.UV((t+1)/z,(x+1)/A),new THREE.UV((t+1)/z,x/A)])}THREE.Geometry.call(this);var w=this,u=b/2,x=c/2,v=e/2,n=n?-1:1;if(m!==void 0)if(m instanceof Array)this.materials=m;else{this.materials=[];for(var A=0;A<6;A++)this.materials.push([m])}else this.materials=[];this.sides={px:!0,nx:!0,py:!0,ny:!0,pz:!0,nz:!0};if(p!=void 0)for(var z in p)this.sides[z]!=void 0&&(this.sides[z]=
|
|
x+T,t+X*(x+1)+T,t+1+X*(x+1)+T,t+1+X*x+T,null,null,u)),w.faceVertexUvs[0].push([new THREE.UV(t/z,x/A),new THREE.UV(t/z,(x+1)/A),new THREE.UV((t+1)/z,(x+1)/A),new THREE.UV((t+1)/z,x/A)])}THREE.Geometry.call(this);var w=this,u=b/2,x=c/2,v=e/2,n=n?-1:1;if(m!==void 0)if(m instanceof Array)this.materials=m;else{this.materials=[];for(var A=0;A<6;A++)this.materials.push([m])}else this.materials=[];this.sides={px:!0,nx:!0,py:!0,ny:!0,pz:!0,nz:!0};if(p!=void 0)for(var z in p)this.sides[z]!=void 0&&(this.sides[z]=
|
|
-p[z]);this.sides.px&&t("z","y",1*n,-1,e,c,-u,this.materials[0]);this.sides.nx&&t("z","y",-1*n,-1,e,c,u,this.materials[1]);this.sides.py&&t("x","z",1*n,1,b,e,x,this.materials[2]);this.sides.ny&&t("x","z",1*n,-1,b,e,-x,this.materials[3]);this.sides.pz&&t("x","y",1*n,-1,b,c,v,this.materials[4]);this.sides.nz&&t("x","y",-1*n,-1,b,c,-v,this.materials[5]);this.mergeVertices();this.computeCentroids();this.computeFaceNormals()};THREE.CubeGeometry.prototype=new THREE.Geometry;
|
|
|
|
|
|
+p[z]);this.sides.px&&t("z","y",-1*n,-1,e,c,u,this.materials[0]);this.sides.nx&&t("z","y",1*n,-1,e,c,-u,this.materials[1]);this.sides.py&&t("x","z",1*n,1,b,e,x,this.materials[2]);this.sides.ny&&t("x","z",1*n,-1,b,e,-x,this.materials[3]);this.sides.pz&&t("x","y",1*n,-1,b,c,v,this.materials[4]);this.sides.nz&&t("x","y",-1*n,-1,b,c,-v,this.materials[5]);this.mergeVertices();this.computeCentroids();this.computeFaceNormals()};THREE.CubeGeometry.prototype=new THREE.Geometry;
|
|
THREE.CubeGeometry.prototype.constructor=THREE.CubeGeometry;
|
|
THREE.CubeGeometry.prototype.constructor=THREE.CubeGeometry;
|
|
THREE.CylinderGeometry=function(b,c,e,f,h,k){THREE.Geometry.call(this);var b=b!=null?b:20,c=c!=null?c:20,e=e||100,m=e/2,f=f||8,h=h||1,n,p,t=[],w=[];for(p=0;p<=h;p++){var u=[],x=[],v=p/h,A=v*(c-b)+b;for(n=0;n<=f;n++){var z=n/f;this.vertices.push(new THREE.Vertex(new THREE.Vector3(A*Math.sin(z*Math.PI*2),-v*e+m,A*Math.cos(z*Math.PI*2))));u.push(this.vertices.length-1);x.push(new THREE.UV(z,v))}t.push(u);w.push(x)}for(p=0;p<h;p++)for(n=0;n<f;n++){var e=t[p][n],u=t[p+1][n],x=t[p+1][n+1],v=t[p][n+1],A=
|
|
THREE.CylinderGeometry=function(b,c,e,f,h,k){THREE.Geometry.call(this);var b=b!=null?b:20,c=c!=null?c:20,e=e||100,m=e/2,f=f||8,h=h||1,n,p,t=[],w=[];for(p=0;p<=h;p++){var u=[],x=[],v=p/h,A=v*(c-b)+b;for(n=0;n<=f;n++){var z=n/f;this.vertices.push(new THREE.Vertex(new THREE.Vector3(A*Math.sin(z*Math.PI*2),-v*e+m,A*Math.cos(z*Math.PI*2))));u.push(this.vertices.length-1);x.push(new THREE.UV(z,v))}t.push(u);w.push(x)}for(p=0;p<h;p++)for(n=0;n<f;n++){var e=t[p][n],u=t[p+1][n],x=t[p+1][n+1],v=t[p][n+1],A=
|
|
this.vertices[e].position.clone().setY(0).normalize(),z=this.vertices[u].position.clone().setY(0).normalize(),y=this.vertices[x].position.clone().setY(0).normalize(),E=this.vertices[v].position.clone().setY(0).normalize(),F=w[p][n].clone(),D=w[p+1][n].clone(),G=w[p+1][n+1].clone(),L=w[p][n+1].clone();this.faces.push(new THREE.Face4(e,u,x,v,[A,z,y,E]));this.faceVertexUvs[0].push([F,D,G,L])}if(!k&&b>0){this.vertices.push(new THREE.Vertex(new THREE.Vector3(0,m,0)));for(n=0;n<f;n++)e=t[0][n],u=t[0][n+
|
|
this.vertices[e].position.clone().setY(0).normalize(),z=this.vertices[u].position.clone().setY(0).normalize(),y=this.vertices[x].position.clone().setY(0).normalize(),E=this.vertices[v].position.clone().setY(0).normalize(),F=w[p][n].clone(),D=w[p+1][n].clone(),G=w[p+1][n+1].clone(),L=w[p][n+1].clone();this.faces.push(new THREE.Face4(e,u,x,v,[A,z,y,E]));this.faceVertexUvs[0].push([F,D,G,L])}if(!k&&b>0){this.vertices.push(new THREE.Vertex(new THREE.Vector3(0,m,0)));for(n=0;n<f;n++)e=t[0][n],u=t[0][n+
|