Browse Source

Updated builds.

alteredq 13 years ago
parent
commit
0b55092d61
2 changed files with 8 additions and 8 deletions
  1. 4 4
      build/Three.js
  2. 4 4
      build/custom/ThreeExtras.js

+ 4 - 4
build/Three.js

@@ -525,10 +525,10 @@ this.vertices[f].position.clone(),q=this.vertices[i].position.clone(),n=this.ver
 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.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]},getTextShapes:function(a,c){return(new THREE.TextPath(a,c)).toShapes()},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=0,g=String(a).split(""),e=g.length,f=[],a=0;a<e;a++){var h=new THREE.Path,h=this.extractGlyphPoints(g[a],c,b,d,h);d+=h.offset;f.push(h.path)}return{paths:f,offset:d/2}},extractGlyphPoints:function(a,c,b,d,g){var e=[],f,h,i,l,m,k,o,p,q,n,t,u=c.glyphs[a]||c.glyphs["?"];if(u){if(u.o){c=u._cachedOutline||(u._cachedOutline=u.o.split(" "));l=c.length;for(a=0;a<l;)switch(i=c[a++],i){case "m":i=c[a++]*b+d;m=c[a++]*b;e.push(new THREE.Vector2(i,
-m));g.moveTo(i,m);break;case "l":i=c[a++]*b+d;m=c[a++]*b;e.push(new THREE.Vector2(i,m));g.lineTo(i,m);break;case "q":i=c[a++]*b+d;m=c[a++]*b;p=c[a++]*b+d;q=c[a++]*b;g.quadraticCurveTo(p,q,i,m);if(f=e[e.length-1]){k=f.x;o=f.y;f=1;for(h=this.divisions;f<=h;f++){var v=f/h,r=THREE.Shape.Utils.b2(v,k,p,i),v=THREE.Shape.Utils.b2(v,o,q,m);e.push(new THREE.Vector2(r,v))}}break;case "b":if(i=c[a++]*b+d,m=c[a++]*b,p=c[a++]*b+d,q=c[a++]*-b,n=c[a++]*b+d,t=c[a++]*-b,g.bezierCurveTo(i,m,p,q,n,t),f=e[e.length-1]){k=
-f.x;o=f.y;f=1;for(h=this.divisions;f<=h;f++)v=f/h,r=THREE.Shape.Utils.b3(v,k,p,n,i),v=THREE.Shape.Utils.b3(v,o,q,t,m),e.push(new THREE.Vector2(r,v))}}}return{offset:u.ha*b,points:e,path:g}}}};
+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=
+0,g=String(a).split(""),e=g.length,f=[],a=0;a<e;a++){var h=new THREE.Path,h=this.extractGlyphPoints(g[a],c,b,d,h);d+=h.offset;f.push(h.path)}return{paths:f,offset:d/2}},extractGlyphPoints:function(a,c,b,d,g){var e=[],f,h,i,l,m,k,o,p,q,n,t,u=c.glyphs[a]||c.glyphs["?"];if(u){if(u.o){c=u._cachedOutline||(u._cachedOutline=u.o.split(" "));l=c.length;for(a=0;a<l;)switch(i=c[a++],i){case "m":i=c[a++]*b+d;m=c[a++]*b;e.push(new THREE.Vector2(i,m));g.moveTo(i,m);break;case "l":i=c[a++]*b+d;m=c[a++]*b;e.push(new THREE.Vector2(i,
+m));g.lineTo(i,m);break;case "q":i=c[a++]*b+d;m=c[a++]*b;p=c[a++]*b+d;q=c[a++]*b;g.quadraticCurveTo(p,q,i,m);if(f=e[e.length-1]){k=f.x;o=f.y;f=1;for(h=this.divisions;f<=h;f++){var v=f/h,r=THREE.Shape.Utils.b2(v,k,p,i),v=THREE.Shape.Utils.b2(v,o,q,m);e.push(new THREE.Vector2(r,v))}}break;case "b":if(i=c[a++]*b+d,m=c[a++]*b,p=c[a++]*b+d,q=c[a++]*-b,n=c[a++]*b+d,t=c[a++]*-b,g.bezierCurveTo(i,m,p,q,n,t),f=e[e.length-1]){k=f.x;o=f.y;f=1;for(h=this.divisions;f<=h;f++)v=f/h,r=THREE.Shape.Utils.b3(v,k,p,
+n,i),v=THREE.Shape.Utils.b3(v,o,q,t,m),e.push(new THREE.Vector2(r,v))}}}return{offset:u.ha*b,points:e,path:g}}}};
 (function(a){var c=function(a){for(var c=a.length,g=0,e=c-1,f=0;f<c;e=f++)g+=a[e].x*a[f].y-a[f].x*a[e].y;return g*0.5};a.Triangulate=function(a,d){var g=a.length;if(g<3)return null;var e=[],f=[],h=[],i,l,m;if(c(a)>0)for(l=0;l<g;l++)f[l]=l;else for(l=0;l<g;l++)f[l]=g-1-l;var k=2*g;for(l=g-1;g>2;){if(k--<=0){console.log("Warning, unable to triangulate polygon!");if(d)return h;return e}i=l;g<=i&&(i=0);l=i+1;g<=l&&(l=0);m=l+1;g<=m&&(m=0);var o;a:{o=a;var p=i,q=l,n=m,t=g,u=f,v=void 0,r=void 0,z=void 0,
 E=void 0,N=void 0,A=void 0,J=void 0,x=void 0,w=void 0,r=o[u[p]].x,z=o[u[p]].y,E=o[u[q]].x,N=o[u[q]].y,A=o[u[n]].x,J=o[u[n]].y;if(1.0E-10>(E-r)*(J-z)-(N-z)*(A-r))o=!1;else{for(v=0;v<t;v++)if(!(v==p||v==q||v==n)){var x=o[u[v]].x,w=o[u[v]].y,D=void 0,M=void 0,S=void 0,ca=void 0,L=void 0,P=void 0,j=void 0,ea=void 0,ha=void 0,F=void 0,B=void 0,R=void 0,D=S=L=void 0,D=A-E,M=J-N,S=r-A,ca=z-J,L=E-r,P=N-z,j=x-r,ea=w-z,ha=x-E,F=w-N,B=x-A,R=w-J,D=D*F-M*ha,L=L*ea-P*j,S=S*R-ca*B;if(D>=0&&S>=0&&L>=0){o=!1;break a}}o=
 !0}}if(o){e.push([a[f[i]],a[f[l]],a[f[m]]]);h.push([f[i],f[l],f[m]]);i=l;for(m=l+1;m<g;i++,m++)f[i]=f[m];g--;k=2*g}}if(d)return h;return e};a.Triangulate.area=c;return a})(THREE.FontUtils);self._typeface_js={faces:THREE.FontUtils.faces,loadFace:THREE.FontUtils.loadFace};

+ 4 - 4
build/custom/ThreeExtras.js

@@ -171,10 +171,10 @@ this.vertices[e].position.clone(),t=this.vertices[i].position.clone(),q=this.ver
 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.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]},getTextShapes:function(a,c){return(new THREE.TextPath(a,c)).toShapes()},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=0,f=String(a).split(""),g=f.length,e=[],a=0;a<g;a++){var h=new THREE.Path,h=this.extractGlyphPoints(f[a],c,b,d,h);d+=h.offset;e.push(h.path)}return{paths:e,offset:d/2}},extractGlyphPoints:function(a,c,b,d,f){var g=[],e,h,i,j,k,m,o,n,t,q,r,p=c.glyphs[a]||c.glyphs["?"];if(p){if(p.o){c=p._cachedOutline||(p._cachedOutline=p.o.split(" "));j=c.length;for(a=0;a<j;)switch(i=c[a++],i){case "m":i=c[a++]*b+d;k=c[a++]*b;g.push(new THREE.Vector2(i,
-k));f.moveTo(i,k);break;case "l":i=c[a++]*b+d;k=c[a++]*b;g.push(new THREE.Vector2(i,k));f.lineTo(i,k);break;case "q":i=c[a++]*b+d;k=c[a++]*b;n=c[a++]*b+d;t=c[a++]*b;f.quadraticCurveTo(n,t,i,k);if(e=g[g.length-1]){m=e.x;o=e.y;e=1;for(h=this.divisions;e<=h;e++){var s=e/h,l=THREE.Shape.Utils.b2(s,m,n,i),s=THREE.Shape.Utils.b2(s,o,t,k);g.push(new THREE.Vector2(l,s))}}break;case "b":if(i=c[a++]*b+d,k=c[a++]*b,n=c[a++]*b+d,t=c[a++]*-b,q=c[a++]*b+d,r=c[a++]*-b,f.bezierCurveTo(i,k,n,t,q,r),e=g[g.length-1]){m=
-e.x;o=e.y;e=1;for(h=this.divisions;e<=h;e++)s=e/h,l=THREE.Shape.Utils.b3(s,m,n,q,i),s=THREE.Shape.Utils.b3(s,o,t,r,k),g.push(new THREE.Vector2(l,s))}}}return{offset:p.ha*b,points:g,path:f}}}};
+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=
+0,f=String(a).split(""),g=f.length,e=[],a=0;a<g;a++){var h=new THREE.Path,h=this.extractGlyphPoints(f[a],c,b,d,h);d+=h.offset;e.push(h.path)}return{paths:e,offset:d/2}},extractGlyphPoints:function(a,c,b,d,f){var g=[],e,h,i,j,k,m,o,n,t,q,r,p=c.glyphs[a]||c.glyphs["?"];if(p){if(p.o){c=p._cachedOutline||(p._cachedOutline=p.o.split(" "));j=c.length;for(a=0;a<j;)switch(i=c[a++],i){case "m":i=c[a++]*b+d;k=c[a++]*b;g.push(new THREE.Vector2(i,k));f.moveTo(i,k);break;case "l":i=c[a++]*b+d;k=c[a++]*b;g.push(new THREE.Vector2(i,
+k));f.lineTo(i,k);break;case "q":i=c[a++]*b+d;k=c[a++]*b;n=c[a++]*b+d;t=c[a++]*b;f.quadraticCurveTo(n,t,i,k);if(e=g[g.length-1]){m=e.x;o=e.y;e=1;for(h=this.divisions;e<=h;e++){var s=e/h,l=THREE.Shape.Utils.b2(s,m,n,i),s=THREE.Shape.Utils.b2(s,o,t,k);g.push(new THREE.Vector2(l,s))}}break;case "b":if(i=c[a++]*b+d,k=c[a++]*b,n=c[a++]*b+d,t=c[a++]*-b,q=c[a++]*b+d,r=c[a++]*-b,f.bezierCurveTo(i,k,n,t,q,r),e=g[g.length-1]){m=e.x;o=e.y;e=1;for(h=this.divisions;e<=h;e++)s=e/h,l=THREE.Shape.Utils.b3(s,m,n,
+q,i),s=THREE.Shape.Utils.b3(s,o,t,r,k),g.push(new THREE.Vector2(l,s))}}}return{offset:p.ha*b,points:g,path:f}}}};
 (function(a){var c=function(a){for(var c=a.length,f=0,g=c-1,e=0;e<c;g=e++)f+=a[g].x*a[e].y-a[e].x*a[g].y;return f*0.5};a.Triangulate=function(a,d){var f=a.length;if(f<3)return null;var g=[],e=[],h=[],i,j,k;if(c(a)>0)for(j=0;j<f;j++)e[j]=j;else for(j=0;j<f;j++)e[j]=f-1-j;var m=2*f;for(j=f-1;f>2;){if(m--<=0){console.log("Warning, unable to triangulate polygon!");if(d)return h;return g}i=j;f<=i&&(i=0);j=i+1;f<=j&&(j=0);k=j+1;f<=k&&(k=0);var o;a:{o=a;var n=i,t=j,q=k,r=f,p=e,s=void 0,l=void 0,v=void 0,
 w=void 0,x=void 0,y=void 0,C=void 0,A=void 0,E=void 0,l=o[p[n]].x,v=o[p[n]].y,w=o[p[t]].x,x=o[p[t]].y,y=o[p[q]].x,C=o[p[q]].y;if(1.0E-10>(w-l)*(C-v)-(x-v)*(y-l))o=!1;else{for(s=0;s<r;s++)if(!(s==n||s==t||s==q)){var A=o[p[s]].x,E=o[p[s]].y,u=void 0,G=void 0,D=void 0,H=void 0,B=void 0,F=void 0,J=void 0,N=void 0,M=void 0,O=void 0,z=void 0,K=void 0,u=D=B=void 0,u=y-w,G=C-x,D=l-y,H=v-C,B=w-l,F=x-v,J=A-l,N=E-v,M=A-w,O=E-x,z=A-y,K=E-C,u=u*O-G*M,B=B*N-F*J,D=D*K-H*z;if(u>=0&&D>=0&&B>=0){o=!1;break a}}o=!0}}if(o){g.push([a[e[i]],
 a[e[j]],a[e[k]]]);h.push([e[i],e[j],e[k]]);i=j;for(k=j+1;k<f;i++,k++)e[i]=e[k];f--;m=2*f}}if(d)return h;return g};a.Triangulate.area=c;return a})(THREE.FontUtils);self._typeface_js={faces:THREE.FontUtils.faces,loadFace:THREE.FontUtils.loadFace};