|
@@ -672,8 +672,8 @@ vertexShader:j.vertexShader,uniforms:a,lights:!0,fog:!0})}else s=new THREE[s.typ
|
|
|
THREE.UTF8Loader.prototype.load=function(a,b,c){if(a instanceof Object)console.warn("DEPRECATED: UTF8Loader( parameters ) is now UTF8Loader( url, callback, metaData )."),c=a,a=c.model,b=c.callback,c={scale:c.scale,offsetX:c.offsetX,offsetY:c.offsetY,offsetZ:c.offsetZ};var d=new XMLHttpRequest,e=c.scale!==void 0?c.scale:1,f=c.offsetX!==void 0?c.offsetX:0,g=c.offsetY!==void 0?c.offsetY:0,h=c.offsetZ!==void 0?c.offsetZ:0;d.onreadystatechange=function(){d.readyState==4?d.status==200||d.status==0?THREE.UTF8Loader.prototype.createModel(d.responseText,
|
|
|
b,e,f,g,h):alert("Couldn't load ["+a+"] ["+d.status+"]"):d.readyState!=3&&d.readyState==2&&d.getResponseHeader("Content-Length")};d.open("GET",a,!0);d.send(null)};THREE.UTF8Loader.prototype.decompressMesh=function(a){var b=a.charCodeAt(0);b>=57344&&(b-=2048);b++;for(var c=new Float32Array(8*b),d=1,e=0;e<8;e++){for(var f=0,g=0;g<b;++g){var h=a.charCodeAt(g+d);f+=h>>1^-(h&1);c[8*g+e]=f}d+=b}b=a.length-d;f=new Uint16Array(b);for(e=g=0;e<b;e++)h=a.charCodeAt(e+d),f[e]=g-h,h==0&&g++;return[c,f]};
|
|
|
THREE.UTF8Loader.prototype.createModel=function(a,b,c,d,e,f){var g=function(){var b=this;b.materials=[];THREE.Geometry.call(this);var g=THREE.UTF8Loader.prototype.decompressMesh(a),k=[],j=[];(function(a,g,i){for(var j,k,s,r=a.length;i<r;i+=g)j=a[i],k=a[i+1],s=a[i+2],j=j/16383*c,k=k/16383*c,s=s/16383*c,j+=d,k+=e,s+=f,b.vertices.push(new THREE.Vertex(new THREE.Vector3(j,k,s)))})(g[0],8,0);(function(a,b,c){for(var d,e,f=a.length;c<f;c+=b)d=a[c],e=a[c+1],d/=1023,e/=1023,j.push(d,1-e)})(g[0],8,3);(function(a,
|
|
|
-b,c){for(var d,e,f,g=a.length;c<g;c+=b)d=a[c],e=a[c+1],f=a[c+2],d=(d-512)/511,e=(e-512)/511,f=(f-512)/511,k.push(d,e,f)})(g[0],8,5);(function(a){var c,d,e,f,g,i,u,t,z,A=a.length;for(c=0;c<A;c+=3){d=a[c];e=a[c+1];f=a[c+2];g=b;t=d;z=e;i=f;u=d;var E=e,D=f,B=g.materials[0],w=k[E*3],G=k[E*3+1],E=k[E*3+2],y=k[D*3],K=k[D*3+1],D=k[D*3+2];u=new THREE.Vector3(k[u*3],k[u*3+1],k[u*3+2]);E=new THREE.Vector3(w,G,E);D=new THREE.Vector3(y,K,D);g.faces.push(new THREE.Face3(t,z,i,[u,E,D],null,B));g=j[d*2];d=j[d*2+
|
|
|
-1];i=j[e*2];u=j[e*2+1];t=j[f*2];z=j[f*2+1];f=b.faceVertexUvs[0];e=i;i=u;u=[];u.push(new THREE.UV(g,d));u.push(new THREE.UV(e,i));u.push(new THREE.UV(t,z));f.push(u)}})(g[1]);this.computeCentroids();this.computeFaceNormals()};g.prototype=new THREE.Geometry;g.prototype.constructor=g;b(new g)};
|
|
|
+b,c){for(var d,e,f,g=a.length;c<g;c+=b)d=a[c],e=a[c+1],f=a[c+2],d=(d-512)/511,e=(e-512)/511,f=(f-512)/511,k.push(d,e,f)})(g[0],8,5);(function(a){var c,d,e,f,g,i,u,t,z,A=a.length;for(c=0;c<A;c+=3){d=a[c];e=a[c+1];f=a[c+2];g=b;t=d;z=e;i=f;u=d;var E=e,D=f,B=k[E*3],w=k[E*3+1],E=k[E*3+2],G=k[D*3],y=k[D*3+1],D=k[D*3+2];u=new THREE.Vector3(k[u*3],k[u*3+1],k[u*3+2]);E=new THREE.Vector3(B,w,E);D=new THREE.Vector3(G,y,D);g.faces.push(new THREE.Face3(t,z,i,[u,E,D],null,0));g=j[d*2];d=j[d*2+1];i=j[e*2];u=j[e*
|
|
|
+2+1];t=j[f*2];z=j[f*2+1];f=b.faceVertexUvs[0];e=i;i=u;u=[];u.push(new THREE.UV(g,d));u.push(new THREE.UV(e,i));u.push(new THREE.UV(t,z));f.push(u)}})(g[1]);this.computeCentroids();this.computeFaceNormals()};g.prototype=new THREE.Geometry;g.prototype.constructor=g;b(new g)};
|
|
|
THREE.Axes=function(){THREE.Object3D.call(this);var a=new THREE.Geometry;a.vertices.push(new THREE.Vertex);a.vertices.push(new THREE.Vertex(new THREE.Vector3(0,100,0)));var b=new THREE.CylinderGeometry(0,5,25,5,1),c=new THREE.Line(a,new THREE.LineBasicMaterial({color:16711680}));c.rotation.z=-Math.PI/2;this.add(c);c=new THREE.Mesh(b,new THREE.MeshBasicMaterial({color:16711680}));c.position.x=100;c.rotation.z=-Math.PI/2;this.add(c);c=new THREE.Line(a,new THREE.LineBasicMaterial({color:65280}));this.add(c);
|
|
|
c=new THREE.Mesh(b,new THREE.MeshBasicMaterial({color:65280}));c.position.y=100;this.add(c);c=new THREE.Line(a,new THREE.LineBasicMaterial({color:255}));c.rotation.x=Math.PI/2;this.add(c);c=new THREE.Mesh(b,new THREE.MeshBasicMaterial({color:255}));c.position.z=100;c.rotation.x=Math.PI/2;this.add(c)};THREE.Axes.prototype=new THREE.Object3D;THREE.Axes.prototype.constructor=THREE.Axes;
|
|
|
THREE.MarchingCubes=function(a,b){THREE.Object3D.call(this);this.material=b;this.init=function(a){this.resolution=a;this.isolation=80;this.size=a;this.size2=this.size*this.size;this.size3=this.size2*this.size;this.halfsize=this.size/2;this.delta=2/this.size;this.yd=this.size;this.zd=this.size2;this.field=new Float32Array(this.size3);this.normal_cache=new Float32Array(this.size3*3);this.vlist=new Float32Array(36);this.nlist=new Float32Array(36);this.firstDraw=!0;this.maxCount=4096;this.count=0;this.hasNormal=
|