|
@@ -99,8 +99,8 @@ THREE.ParticleBasicMaterial=function(b){THREE.Material.call(this,b);b=b||{};this
|
|
|
THREE.ParticleCanvasMaterial=function(b){THREE.Material.call(this,b);b=b||{};this.color=b.color!==undefined?new THREE.Color(b.color):new THREE.Color(16777215);this.program=b.program!==undefined?b.program:function(){}};THREE.ParticleCanvasMaterial.prototype=new THREE.Material;THREE.ParticleCanvasMaterial.prototype.constructor=THREE.ParticleCanvasMaterial;THREE.ParticleDOMMaterial=function(b){THREE.Material.call(this);this.domElement=b};
|
|
|
THREE.Texture=function(b,d,c,f,g,h){this.image=b;this.mapping=d!==undefined?d:new THREE.UVMapping;this.wrapS=c!==undefined?c:THREE.ClampToEdgeWrapping;this.wrapT=f!==undefined?f:THREE.ClampToEdgeWrapping;this.magFilter=g!==undefined?g:THREE.LinearFilter;this.minFilter=h!==undefined?h:THREE.LinearMipMapLinearFilter;this.needsUpdate=!1};THREE.Texture.prototype={clone:function(){return new THREE.Texture(this.image,this.mapping,this.wrapS,this.wrapT,this.magFilter,this.minFilter)}};
|
|
|
THREE.MultiplyOperation=0;THREE.MixOperation=1;THREE.RepeatWrapping=0;THREE.ClampToEdgeWrapping=1;THREE.MirroredRepeatWrapping=2;THREE.NearestFilter=3;THREE.NearestMipMapNearestFilter=4;THREE.NearestMipMapLinearFilter=5;THREE.LinearFilter=6;THREE.LinearMipMapNearestFilter=7;THREE.LinearMipMapLinearFilter=8;THREE.ByteType=9;THREE.UnsignedByteType=10;THREE.ShortType=11;THREE.UnsignedShortType=12;THREE.IntType=13;THREE.UnsignedIntType=14;THREE.FloatType=15;THREE.AlphaFormat=16;THREE.RGBFormat=17;
|
|
|
-THREE.RGBAFormat=18;THREE.LuminanceFormat=19;THREE.LuminanceAlphaFormat=20;THREE.Particle=function(b){THREE.Object3D.call(this);this.materials=b instanceof Array?b:[b];this.matrixAutoUpdate=!1};THREE.Particle.prototype=new THREE.Object3D;THREE.Particle.prototype.constructor=THREE.Particle;THREE.ParticleSystem=function(b,d){THREE.Object3D.call(this);this.geometry=b;this.materials=d instanceof Array?d:[d];this.sortParticles=!1};THREE.ParticleSystem.prototype=new THREE.Object3D;
|
|
|
-THREE.ParticleSystem.prototype.constructor=THREE.ParticleSystem;THREE.Line=function(b,d,c){THREE.Object3D.call(this);this.geometry=b;this.materials=d instanceof Array?d:[d];this.type=c!=undefined?c:THREE.LineStrip};THREE.LineStrip=0;THREE.LinePieces=1;THREE.Line.prototype=new THREE.Object3D;THREE.Line.prototype.constructor=THREE.Line;
|
|
|
+THREE.RGBAFormat=18;THREE.LuminanceFormat=19;THREE.LuminanceAlphaFormat=20;THREE.Particle=function(b){THREE.Object3D.call(this);this.materials=b instanceof Array?b:[b]};THREE.Particle.prototype=new THREE.Object3D;THREE.Particle.prototype.constructor=THREE.Particle;THREE.ParticleSystem=function(b,d){THREE.Object3D.call(this);this.geometry=b;this.materials=d instanceof Array?d:[d];this.sortParticles=!1};THREE.ParticleSystem.prototype=new THREE.Object3D;THREE.ParticleSystem.prototype.constructor=THREE.ParticleSystem;
|
|
|
+THREE.Line=function(b,d,c){THREE.Object3D.call(this);this.geometry=b;this.materials=d instanceof Array?d:[d];this.type=c!=undefined?c:THREE.LineStrip};THREE.LineStrip=0;THREE.LinePieces=1;THREE.Line.prototype=new THREE.Object3D;THREE.Line.prototype.constructor=THREE.Line;
|
|
|
THREE.Mesh=function(b,d){THREE.Object3D.call(this);this.geometry=b;this.materials=d&&d.length?d:[d];this.flipSided=!1;this.doubleSided=!1;this.overdraw=!1;if(this.geometry){this.geometry.boundingSphere||this.geometry.computeBoundingSphere();this.boundRadius=b.boundingSphere.radius;if(this.geometry.morphTargets.length){this.morphTargetBase=-1;this.morphTargetForcedOrder=[];this.morphTargetInfluences=[];this.morphTargetDictionary={};for(var c=0;c<this.geometry.morphTargets.length;c++){this.morphTargetInfluences.push(0);
|
|
|
this.morphTargetDictionary[this.geometry.morphTargets[c].name]=c}}}};THREE.Mesh.prototype=new THREE.Object3D;THREE.Mesh.prototype.constructor=THREE.Mesh;THREE.Mesh.prototype.supr=THREE.Object3D.prototype;THREE.Mesh.prototype.getMorphTargetIndexByName=function(b){if(this.morphTargetDictionary[b]!==undefined)return this.morphTargetDictionary[b];console.log("THREE.Mesh.getMorphTargetIndexByName: morph target "+b+" does not exist. Returning 0.");return 0};
|
|
|
THREE.Bone=function(b){THREE.Object3D.call(this);this.skin=b;this.skinMatrix=new THREE.Matrix4;this.hasNoneBoneChildren=!1};THREE.Bone.prototype=new THREE.Object3D;THREE.Bone.prototype.constructor=THREE.Bone;THREE.Bone.prototype.supr=THREE.Object3D.prototype;
|
|
@@ -147,7 +147,7 @@ pa=R.vertices;S=R.faces;R=R.faceVertexUvs;wa=0;for(ta=pa.length;wa<ta;wa++){j=b(
|
|
|
(ka.positionScreen.y-ca.positionScreen.y)-(Fa.positionScreen.y-ca.positionScreen.y)*(ka.positionScreen.x-ca.positionScreen.x)<0||(ka.positionScreen.x-ma.positionScreen.x)*(Fa.positionScreen.y-ma.positionScreen.y)-(ka.positionScreen.y-ma.positionScreen.y)*(Fa.positionScreen.x-ma.positionScreen.x)<0))){P=u[y]=u[y]||new THREE.RenderableFace4;y++;o=P;o.v1.copy(ca);o.v2.copy(ka);o.v3.copy(ma);o.v4.copy(Fa)}else continue}o.normalWorld.copy(ta.normal);Xa.multiplyVector3(o.normalWorld);o.centroidWorld.copy(ta.centroid);
|
|
|
Ja.multiplyVector3(o.centroidWorld);o.centroidScreen.copy(o.centroidWorld);M.multiplyVector3(o.centroidScreen);ma=ta.vertexNormals;ca=0;for(ka=ma.length;ca<ka;ca++){Fa=o.vertexNormalsWorld[ca];Fa.copy(ma[ca]);Xa.multiplyVector3(Fa)}ca=0;for(ka=R.length;ca<ka;ca++)if(P=R[ca][pa]){ma=0;for(Fa=P.length;ma<Fa;ma++)o.uvs[ca][ma]=P[ma]}o.meshMaterials=Za;o.faceMaterials=ta.materials;o.overdraw=Ta;o.z=o.centroidScreen.z;Da.push(o)}}else if(ga instanceof THREE.Line){va.multiply(M,Ja);pa=ga.geometry.vertices;
|
|
|
ca=b();ca.positionScreen.copy(pa[0].position);va.multiplyVector4(ca.positionScreen);wa=1;for(ta=pa.length;wa<ta;wa++){ca=b();ca.positionScreen.copy(pa[wa].position);va.multiplyVector4(ca.positionScreen);ka=m[k-2];qa.copy(ca.positionScreen);ea.copy(ka.positionScreen);if(c(qa,ea)){qa.multiplyScalar(1/qa.w);ea.multiplyScalar(1/ea.w);Ja=J[F]=J[F]||new THREE.RenderableLine;F++;A=Ja;A.v1.positionScreen.copy(qa);A.v2.positionScreen.copy(ea);A.z=Math.max(qa.z,ea.z);A.materials=ga.materials;Da.push(A)}}}else if(ga instanceof
|
|
|
-THREE.Particle){O.set(ga.position.x,ga.position.y,ga.position.z,1);M.multiplyVector4(O);O.z/=O.w;if(O.z>0&&O.z<1){Ja=D[W]=D[W]||new THREE.RenderableParticle;W++;B=Ja;B.x=O.x/O.w;B.y=O.y/O.w;B.z=O.z;B.rotation=ga.rotation.z;B.scale.x=ga.scale.x*Math.abs(B.x-(O.x+e.projectionMatrix.n11)/(O.w+e.projectionMatrix.n14));B.scale.y=ga.scale.y*Math.abs(B.y-(O.y+e.projectionMatrix.n22)/(O.w+e.projectionMatrix.n24));B.materials=ga.materials;Da.push(B)}}}}oa&&Da.sort(d);return Da}};
|
|
|
+THREE.Particle){O.set(ga.matrixWorld.n14,ga.matrixWorld.n24,ga.matrixWorld.n34,1);M.multiplyVector4(O);O.z/=O.w;if(O.z>0&&O.z<1){Ja=D[W]=D[W]||new THREE.RenderableParticle;W++;B=Ja;B.x=O.x/O.w;B.y=O.y/O.w;B.z=O.z;B.rotation=ga.rotation.z;B.scale.x=ga.scale.x*Math.abs(B.x-(O.x+e.projectionMatrix.n11)/(O.w+e.projectionMatrix.n14));B.scale.y=ga.scale.y*Math.abs(B.y-(O.y+e.projectionMatrix.n22)/(O.w+e.projectionMatrix.n24));B.materials=ga.materials;Da.push(B)}}}}oa&&Da.sort(d);return Da}};
|
|
|
THREE.DOMRenderer=function(){THREE.Renderer.call(this);var b=null,d=new THREE.Projector,c,f,g,h;this.domElement=document.createElement("div");this.setSize=function(j,k){c=j;f=k;g=c/2;h=f/2};this.render=function(j,k){var m,o,p,t,y,u,A,F;b=d.projectScene(j,k);m=0;for(o=b.length;m<o;m++){y=b[m];if(y instanceof THREE.RenderableParticle){A=y.x*g+g;F=y.y*h+h;p=0;for(t=y.material.length;p<t;p++){u=y.material[p];if(u instanceof THREE.ParticleDOMMaterial){u=u.domElement;u.style.left=A+"px";u.style.top=F+"px"}}}}}};
|
|
|
THREE.CanvasRenderer=function(){function b(Ga){if(A!=Ga)t.globalAlpha=A=Ga}function d(Ga){if(F!=Ga){switch(Ga){case THREE.NormalBlending:t.globalCompositeOperation="source-over";break;case THREE.AdditiveBlending:t.globalCompositeOperation="lighter";break;case THREE.SubtractiveBlending:t.globalCompositeOperation="darker"}F=Ga}}function c(Ga){if(J!=Ga)t.strokeStyle=J=Ga}var f=this,g=null,h=new THREE.Projector,j=document.createElement("canvas"),k,m,o,p,t=j.getContext("2d"),y=new THREE.Color(0),u=0,A=
|
|
|
1,F=0,J=null,B=null,W=null,D=null,U=null,O,M,va,la,qa=new THREE.RenderableVertex,ea=new THREE.RenderableVertex,ia,e,oa,Da,Aa,fa,da,wa,ta,pa,ca,ka,ma=new THREE.Color,Fa=new THREE.Color,ja=new THREE.Color,ga=new THREE.Color,Ja=new THREE.Color,Xa,Za,Ta,R,S,P,Ba,La,n,C,x=new THREE.Rectangle,v=new THREE.Rectangle,z=new THREE.Rectangle,Q=!1,K=new THREE.Color,G=new THREE.Color,T=new THREE.Color,H=new THREE.Color,I=new THREE.Vector3,L,Z,Y,ra,Ka,Ca,Ha=16;L=document.createElement("canvas");L.width=L.height=
|