diff --git a/build/Three.js b/build/Three.js index 65fdaeca517d36bbfbc960a5abcf4b169b5a3a2a..71f9b0b1747d6a8a21135eff221d4f20126561bc 100644 --- a/build/Three.js +++ b/build/Three.js @@ -101,10 +101,10 @@ Q=new THREE.Vector3,L=new THREE.Vector3,B=new THREE.Vector3;for(b=0,c=this.verti C=D[e],Q.copy(C),Q.subSelf(B.multiplyScalar(B.dot(C))).normalize(),L.cross(f.vertexNormals[d],C),e=L.dot(I[e]),e=0>e?-1:1,f.vertexTangents[d]=new THREE.Vector4(Q.x,Q.y,Q.z,e)}this.hasTangents=!0},computeBoundingBox:function(){if(!this.boundingBox)this.boundingBox={min:new THREE.Vector3,max:new THREE.Vector3};if(0c.x)c.x=a.x;if(a.yc.y)c.y=a.y;if(a.zc.z)c.z=a.z}}else this.boundingBox.min.set(0,0,0),this.boundingBox.max.set(0,0,0)},computeBoundingSphere:function(){if(!this.boundingSphere)this.boundingSphere={radius:0};for(var a,b=0,c=0,d=this.vertices.length;cb&&(b=a);this.boundingSphere.radius=b},mergeVertices:function(){var a={},b=[],c=[],d,e=Math.pow(10, 4),f,g;for(f=0,g=this.vertices.length;fa.length-2?a.length-1:f+1;c[3]=f>a.length-3?a.length-1:f+2;j=this.points[c[0]];k=this.points[c[1]]; -p=this.points[c[2]];m=this.points[c[3]];h=g*g;i=g*h;d.x=b(j.x,k.x,p.x,m.x,g,h,i);d.y=b(j.y,k.y,p.y,m.y,g,h,i);d.z=b(j.z,k.z,p.z,m.z,g,h,i);return d};this.getControlPointsArray=function(){var a,b,c=this.points.length,d=[];for(a=0;athis.points.length-2?this.points.length-1:f+1;c[3]=f>this.points.length-3?this.points.length-1: +f+2;j=this.points[c[0]];k=this.points[c[1]];p=this.points[c[2]];m=this.points[c[3]];h=g*g;i=g*h;d.x=b(j.x,k.x,p.x,m.x,g,h,i);d.y=b(j.y,k.y,p.y,m.y,g,h,i);d.z=b(j.z,k.z,p.z,m.z,g,h,i);return d};this.getControlPointsArray=function(){var a,b,c=this.points.length,d=[];for(a=0;ao;o++)this.materials.push(g)}o=0;r=1;q=2;s= +THREE.CubeGeometry=function(a,b,c,d,e,f,g,h){function i(a,b,c,g,h,i,k,m){var n,p=d||1,o=e||1,q=h/2,r=i/2,s=j.vertices.length;if("x"===a&&"y"===b||"y"===a&&"x"===b)n="z";else if("x"===a&&"z"===b||"z"===a&&"x"===b)n="y",o=f||1;else if("z"===a&&"y"===b||"y"===a&&"z"===b)n="x",p=f||1;var l=p+1,u=o+1,v=h/p,y=i/o,T=new THREE.Vector3;T[n]=0o;o++)this.materials.push(g)}o=0;r=1;q=2;s= 3;n=4;u=5}else this.materials=[];this.sides={px:!0,nx:!0,py:!0,ny:!0,pz:!0,nz:!0};if(void 0!=h)for(var v in h)void 0!==this.sides[v]&&(this.sides[v]=h[v]);this.sides.px&&i("z","y",-1,-1,c,b,k,o);this.sides.nx&&i("z","y",1,-1,c,b,-k,r);this.sides.py&&i("x","z",1,1,a,c,p,q);this.sides.ny&&i("x","z",1,-1,a,c,-p,s);this.sides.pz&&i("x","y",1,-1,a,b,m,n);this.sides.nz&&i("x","y",-1,-1,a,b,-m,u);this.computeCentroids();this.mergeVertices()};THREE.CubeGeometry.prototype=new THREE.Geometry; THREE.CubeGeometry.prototype.constructor=THREE.CubeGeometry; THREE.CylinderGeometry=function(a,b,c,d,e,f){THREE.Geometry.call(this);var a=void 0!==a?a:20,b=void 0!==b?b:20,c=void 0!==c?c:100,g=c/2,d=d||8,e=e||1,h,i,j=[],k=[];for(i=0;i<=e;i++){var p=[],m=[],o=i/e,q=o*(b-a)+a;for(h=0;h<=d;h++){var n=h/d,r=q*Math.sin(2*n*Math.PI),s=-o*c+g,u=q*Math.cos(2*n*Math.PI);this.vertices.push(new THREE.Vertex(new THREE.Vector3(r,s,u)));p.push(this.vertices.length-1);m.push(new THREE.UV(n,o))}j.push(p);k.push(m)}for(i=0;ie?-1:1,g.vertexTangents[d]=new THREE.Vector4(oa.x,oa.y,oa.z,e)}this.hasTangents=!0},computeBoundingBox:function(){if(!this.boundingBox)this.boundingBox={min:new THREE.Vector3,max:new THREE.Vector3};if(0c.x)c.x=a.x;if(a.yc.y)c.y=a.y;if(a.zc.z)c.z=a.z}}else this.boundingBox.min.set(0,0,0),this.boundingBox.max.set(0,0,0)},computeBoundingSphere:function(){if(!this.boundingSphere)this.boundingSphere={radius:0};for(var a,b=0,c=0,d=this.vertices.length;cb&&(b=a);this.boundingSphere.radius=b},mergeVertices:function(){var a={},b=[],c=[],d,e=Math.pow(10, 4),g,h;for(g=0,h=this.vertices.length;ga.length-2?a.length-1:g+1;c[3]=g>a.length-3?a.length-1:g+2;k=this.points[c[0]];j=this.points[c[1]]; -n=this.points[c[2]];l=this.points[c[3]];i=h*h;m=h*i;d.x=b(k.x,j.x,n.x,l.x,h,i,m);d.y=b(k.y,j.y,n.y,l.y,h,i,m);d.z=b(k.z,j.z,n.z,l.z,h,i,m);return d};this.getControlPointsArray=function(){var a,b,c=this.points.length,d=[];for(a=0;athis.points.length-2?this.points.length-1:g+1;c[3]=g>this.points.length-3?this.points.length-1: +g+2;k=this.points[c[0]];j=this.points[c[1]];n=this.points[c[2]];l=this.points[c[3]];i=h*h;m=h*i;d.x=b(k.x,j.x,n.x,l.x,h,i,m);d.y=b(k.y,j.y,n.y,l.y,h,i,m);d.z=b(k.z,j.z,n.z,l.z,h,i,m);return d};this.getControlPointsArray=function(){var a,b,c=this.points.length,d=[];for(a=0;a points.length - 2 ? points.length -1 : intPoint + 1; - c[ 3 ] = intPoint > points.length - 3 ? points.length -1 : intPoint + 2; + c[ 2 ] = intPoint > this.points.length - 2 ? this.points.length - 1 : intPoint + 1; + c[ 3 ] = intPoint > this.points.length - 3 ? this.points.length - 1 : intPoint + 2; pa = this.points[ c[ 0 ] ]; pb = this.points[ c[ 1 ] ];