|
@@ -229,7 +229,7 @@ THREE.Snippets.lights_pars_vertex,THREE.Snippets.color_pars_vertex,"void main()
|
|
|
"void main() {",THREE.Snippets.color_vertex,"vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\ngl_Position = projectionMatrix * mvPosition;\ngl_PointSize = size;\n}"].join("\n")}};THREE.RenderableObject=function(){this.z=this.object=null};
|
|
|
THREE.RenderableFace3=function(){this.z=null;this.v1=new THREE.Vertex;this.v2=new THREE.Vertex;this.v3=new THREE.Vertex;this.centroidWorld=new THREE.Vector3;this.centroidScreen=new THREE.Vector3;this.normalWorld=new THREE.Vector3;this.vertexNormalsWorld=[];this.faceMaterials=this.meshMaterials=null;this.overdraw=false;this.uvs=[null,null,null]};THREE.RenderableParticle=function(){this.rotation=this.z=this.y=this.x=null;this.scale=new THREE.Vector2;this.materials=null};
|
|
|
THREE.RenderableLine=function(){this.z=null;this.v1=new THREE.Vertex;this.v2=new THREE.Vertex;this.materials=null};
|
|
|
-THREE.Detector={canvas:!!document.createElement("canvas").getContext,webgl:window.Uint8Array!=undefined,workers:!!window.Worker,addGetWebGLMessage:function(a){var b=document.body,c="oldie";if(a){if(a.parent!==undefined)b=a.parent;if(a.id!==undefined)c=a.id}a=document.createElement("center");var e=document.createElement("div");e.innerHTML='Sorry, your browser doesn\'t support <a href="http://khronos.org/webgl/wiki/Getting_a_WebGL_Implementation">WebGL</a><br/>\n<br/>\nPlease try in\n<a href="http://www.google.com/chrome">Chrome 9+</a> /\n<a href="http://www.mozilla.com/en-US/firefox/all-beta.html">Firefox 4+</a> /\n<a href="http://nightly.webkit.org/">Safari OSX 10.6+</a>';e.id=
|
|
|
+THREE.Detector={canvas:!!window.CanvasRenderingContext2D,webgl:!!window.WebGLRenderingContext,workers:!!window.Worker,addGetWebGLMessage:function(a){var b=document.body,c="oldie";if(a){if(a.parent!==undefined)b=a.parent;if(a.id!==undefined)c=a.id}a=document.createElement("center");var e=document.createElement("div");e.innerHTML='Sorry, your browser doesn\'t support <a href="http://khronos.org/webgl/wiki/Getting_a_WebGL_Implementation">WebGL</a><br/>\n<br/>\nPlease try in\n<a href="http://www.google.com/chrome">Chrome 9+</a> /\n<a href="http://www.mozilla.com/en-US/firefox/all-beta.html">Firefox 4+</a> /\n<a href="http://nightly.webkit.org/">Safari OSX 10.6+</a>';e.id=
|
|
|
c;c=e.style;c.fontFamily="monospace";c.fontSize="13px";c.textAlign="center";c.background="#eee";c.color="#000";c.padding="1em";c.width="475px";c.margin="5em auto 0";a.appendChild(e);b.appendChild(a);return e}};
|
|
|
var GeometryUtils={merge:function(a,b){var c=b instanceof THREE.Mesh,e=a.vertices.length,g=c?b.geometry:b,f=a.vertices,h=g.vertices,k=a.faces,j=g.faces,m=a.uvs;g=g.uvs;c&&b.autoUpdateMatrix&&b.updateMatrix();for(var p=0,x=h.length;p<x;p++){var t=new THREE.Vertex(h[p].position.clone());c&&b.matrix.multiplyVector3(t.position);f.push(t)}p=0;for(x=j.length;p<x;p++){h=j[p];var q,y=h.vertexNormals;if(h instanceof THREE.Face3)q=new THREE.Face3(h.a+e,h.b+e,h.c+e);else if(h instanceof THREE.Face4)q=new THREE.Face4(h.a+
|
|
|
e,h.b+e,h.c+e,h.d+e);q.centroid.copy(h.centroid);q.normal.copy(h.normal);c=0;for(f=y.length;c<f;c++){t=y[c];q.vertexNormals.push(t.clone())}q.materials=h.materials.slice();k.push(q)}p=0;for(x=g.length;p<x;p++){e=g[p];k=[];c=0;for(f=e.length;c<f;c++)k.push(new THREE.UV(e[c].u,e[c].v));m.push(k)}}},ImageUtils={loadTexture:function(a,b,c){var e=new Image;e.onload=function(){this.loaded=true;c&&c(this)};e.src=a;return new THREE.Texture(e,b)},loadArray:function(a,b){var c,e,g=[];c=g.loadCount=0;for(e=
|