|
@@ -517,9 +517,9 @@ f.faces.push(h),h=Math.atan2(h.centroid.z,-h.centroid.x),f.faceVertexUvs[0].push
|
|
{radius:a}};THREE.OctahedronGeometry.prototype=new THREE.Geometry;THREE.OctahedronGeometry.prototype.constructor=THREE.OctahedronGeometry;
|
|
{radius:a}};THREE.OctahedronGeometry.prototype=new THREE.Geometry;THREE.OctahedronGeometry.prototype.constructor=THREE.OctahedronGeometry;
|
|
THREE.PlaneGeometry=function(a,c,b,d){THREE.Geometry.call(this);for(var g=a/2,e=c/2,b=b||1,d=d||1,f=b+1,h=d+1,i=a/b,l=c/d,k=new THREE.Vector3(0,0,1),a=0;a<h;a++)for(c=0;c<f;c++)this.vertices.push(new THREE.Vertex(new THREE.Vector3(c*i-g,-(a*l-e),0)));for(a=0;a<d;a++)for(c=0;c<b;c++)g=new THREE.Face4(c+f*a,c+f*(a+1),c+1+f*(a+1),c+1+f*a),g.normal.copy(k),g.vertexNormals.push(k.clone(),k.clone(),k.clone(),k.clone()),this.faces.push(g),this.faceVertexUvs[0].push([new THREE.UV(c/b,a/d),new THREE.UV(c/
|
|
THREE.PlaneGeometry=function(a,c,b,d){THREE.Geometry.call(this);for(var g=a/2,e=c/2,b=b||1,d=d||1,f=b+1,h=d+1,i=a/b,l=c/d,k=new THREE.Vector3(0,0,1),a=0;a<h;a++)for(c=0;c<f;c++)this.vertices.push(new THREE.Vertex(new THREE.Vector3(c*i-g,-(a*l-e),0)));for(a=0;a<d;a++)for(c=0;c<b;c++)g=new THREE.Face4(c+f*a,c+f*(a+1),c+1+f*(a+1),c+1+f*a),g.normal.copy(k),g.vertexNormals.push(k.clone(),k.clone(),k.clone(),k.clone()),this.faces.push(g),this.faceVertexUvs[0].push([new THREE.UV(c/b,a/d),new THREE.UV(c/
|
|
b,(a+1)/d),new THREE.UV((c+1)/b,(a+1)/d),new THREE.UV((c+1)/b,a/d)]);this.computeCentroids()};THREE.PlaneGeometry.prototype=new THREE.Geometry;THREE.PlaneGeometry.prototype.constructor=THREE.PlaneGeometry;
|
|
b,(a+1)/d),new THREE.UV((c+1)/b,(a+1)/d),new THREE.UV((c+1)/b,a/d)]);this.computeCentroids()};THREE.PlaneGeometry.prototype=new THREE.Geometry;THREE.PlaneGeometry.prototype.constructor=THREE.PlaneGeometry;
|
|
-THREE.SphereGeometry=function(a,c,b,d,g,e,f){THREE.Geometry.call(this);var a=a||50,c=c||8,b=b||6,d=d!=void 0?d:0,g=g!=void 0?g:Math.PI*2,e=e!=void 0?e:0,f=f!=void 0?f:Math.PI,h,i,l=[],k=[];for(i=0;i<=b;i++){var p=[],q=[];for(h=0;h<=c;h++){var m=h/c,t=i/b;this.vertices.push(new THREE.Vertex(new THREE.Vector3(-a*Math.cos(d+m*g)*Math.sin(e+t*f),a*Math.cos(e+t*f),a*Math.sin(d+m*g)*Math.sin(e+t*f))));p.push(this.vertices.length-1);q.push(new THREE.UV(m,t))}l.push(p);k.push(q)}for(i=0;i<b;i++)for(h=0;h<
|
|
|
|
-c;h++){var d=l[i][h+1],g=l[i][h],e=l[i+1][h],f=l[i+1][h+1],p=this.vertices[d].position.clone().normalize(),q=this.vertices[g].position.clone().normalize(),m=this.vertices[e].position.clone().normalize(),t=this.vertices[f].position.clone().normalize(),n=k[i][h+1].clone(),o=k[i][h].clone(),s=k[i+1][h].clone(),u=k[i+1][h+1].clone();Math.abs(this.vertices[d].position.y)==a?(this.faces.push(new THREE.Face3(d,e,f,[p,m,t])),this.faceVertexUvs[0].push([n,s,u])):Math.abs(this.vertices[e].position.y)==a?(this.faces.push(new THREE.Face3(d,
|
|
|
|
-g,e,[p,q,m])),this.faceVertexUvs[0].push([n,o,s])):(this.faces.push(new THREE.Face4(d,g,e,f,[p,q,m,t])),this.faceVertexUvs[0].push([n,o,s,u]))}this.computeCentroids();this.computeFaceNormals();this.boundingSphere={radius:a}};THREE.SphereGeometry.prototype=new THREE.Geometry;THREE.SphereGeometry.prototype.constructor=THREE.SphereGeometry;
|
|
|
|
|
|
+THREE.SphereGeometry=function(a,c,b,d,g,e,f){THREE.Geometry.call(this);var a=a||50,c=Math.max(3,Math.floor(c)||8),b=Math.max(2,Math.floor(b)||6),d=d!=void 0?d:0,g=g!=void 0?g:Math.PI*2,e=e!=void 0?e:0,f=f!=void 0?f:Math.PI,h,i,l=[],k=[];for(i=0;i<=b;i++){var p=[],q=[];for(h=0;h<=c;h++){var m=h/c,t=i/b;this.vertices.push(new THREE.Vertex(new THREE.Vector3(-a*Math.cos(d+m*g)*Math.sin(e+t*f),a*Math.cos(e+t*f),a*Math.sin(d+m*g)*Math.sin(e+t*f))));p.push(this.vertices.length-1);q.push(new THREE.UV(m,t))}l.push(p);
|
|
|
|
+k.push(q)}for(i=0;i<b;i++)for(h=0;h<c;h++){var d=l[i][h+1],g=l[i][h],e=l[i+1][h],f=l[i+1][h+1],p=this.vertices[d].position.clone().normalize(),q=this.vertices[g].position.clone().normalize(),m=this.vertices[e].position.clone().normalize(),t=this.vertices[f].position.clone().normalize(),n=k[i][h+1].clone(),o=k[i][h].clone(),s=k[i+1][h].clone(),u=k[i+1][h+1].clone();Math.abs(this.vertices[d].position.y)==a?(this.faces.push(new THREE.Face3(d,e,f,[p,m,t])),this.faceVertexUvs[0].push([n,s,u])):Math.abs(this.vertices[e].position.y)==
|
|
|
|
+a?(this.faces.push(new THREE.Face3(d,g,e,[p,q,m])),this.faceVertexUvs[0].push([n,o,s])):(this.faces.push(new THREE.Face4(d,g,e,f,[p,q,m,t])),this.faceVertexUvs[0].push([n,o,s,u]))}this.computeCentroids();this.computeFaceNormals();this.boundingSphere={radius:a}};THREE.SphereGeometry.prototype=new THREE.Geometry;THREE.SphereGeometry.prototype.constructor=THREE.SphereGeometry;
|
|
THREE.TextGeometry=function(a,c){var b=(new THREE.TextPath(a,c)).toShapes();c.amount=c.height!==void 0?c.height:50;if(c.bevelThickness===void 0)c.bevelThickness=10;if(c.bevelSize===void 0)c.bevelSize=8;if(c.bevelEnabled===void 0)c.bevelEnabled=!1;if(c.bend){var d=b[b.length-1].getBoundingBox().maxX;c.bendPath=new THREE.QuadraticBezierCurve(new THREE.Vector2(0,0),new THREE.Vector2(d/2,120),new THREE.Vector2(d,0))}THREE.ExtrudeGeometry.call(this,b,c)};THREE.TextGeometry.prototype=new THREE.ExtrudeGeometry;
|
|
THREE.TextGeometry=function(a,c){var b=(new THREE.TextPath(a,c)).toShapes();c.amount=c.height!==void 0?c.height:50;if(c.bevelThickness===void 0)c.bevelThickness=10;if(c.bevelSize===void 0)c.bevelSize=8;if(c.bevelEnabled===void 0)c.bevelEnabled=!1;if(c.bend){var d=b[b.length-1].getBoundingBox().maxX;c.bendPath=new THREE.QuadraticBezierCurve(new THREE.Vector2(0,0),new THREE.Vector2(d/2,120),new THREE.Vector2(d,0))}THREE.ExtrudeGeometry.call(this,b,c)};THREE.TextGeometry.prototype=new THREE.ExtrudeGeometry;
|
|
THREE.TextGeometry.prototype.constructor=THREE.TextGeometry;
|
|
THREE.TextGeometry.prototype.constructor=THREE.TextGeometry;
|
|
THREE.FontUtils={faces:{},face:"helvetiker",weight:"normal",style:"normal",size:150,divisions:10,getFace:function(){return this.faces[this.face][this.weight][this.style]},loadFace:function(a){var c=a.familyName.toLowerCase();this.faces[c]=this.faces[c]||{};this.faces[c][a.cssFontWeight]=this.faces[c][a.cssFontWeight]||{};this.faces[c][a.cssFontWeight][a.cssFontStyle]=a;return this.faces[c][a.cssFontWeight][a.cssFontStyle]=a},drawText:function(a){for(var c=this.getFace(),b=this.size/c.resolution,d=
|
|
THREE.FontUtils={faces:{},face:"helvetiker",weight:"normal",style:"normal",size:150,divisions:10,getFace:function(){return this.faces[this.face][this.weight][this.style]},loadFace:function(a){var c=a.familyName.toLowerCase();this.faces[c]=this.faces[c]||{};this.faces[c][a.cssFontWeight]=this.faces[c][a.cssFontWeight]||{};this.faces[c][a.cssFontWeight][a.cssFontStyle]=a;return this.faces[c][a.cssFontWeight][a.cssFontStyle]=a},drawText:function(a){for(var c=this.getFace(),b=this.size/c.resolution,d=
|