提交 e89c83ea 编写于 作者: M Mr.doob

Updated builds.

上级 f6e307f4
......@@ -8114,7 +8114,7 @@ THREE.Projector = function () {
_vector4.z *= invW;
if ( _vector4.z > 0 && _vector4.z < 1 ) {
if ( _vector4.z > -1 && _vector4.z < 1 ) {
_particle = getNextParticleInPool();
_particle.id = object.id;
......
......@@ -167,8 +167,8 @@ THREE.Mesh){ka=U.geometry;ea=ka.vertices;ta=ka.faces;ka=ka.faceVertexUvs;R.getNo
Z===THREE.DoubleSide||da===(Z===THREE.FrontSide)){if(p===t){var Da=new THREE.RenderableFace3;s.push(Da);t++;p++;l=Da}else l=s[p++];l.id=U.id;l.v1.copy(V);l.v2.copy(P);l.v3.copy(ia);l.normalModel.copy(M.normal);!1===da&&(Z===THREE.BackSide||Z===THREE.DoubleSide)&&l.normalModel.negate();l.normalModel.applyMatrix3(R).normalize();l.normalModelView.copy(l.normalModel).applyMatrix3(J);l.centroidModel.copy(M.centroid).applyMatrix4(v);ia=M.vertexNormals;V=0;for(P=Math.min(ia.length,3);V<P;V++)Da=l.vertexNormalsModel[V],
Da.copy(ia[V]),!1===da&&(Z===THREE.BackSide||Z===THREE.DoubleSide)&&Da.negate(),Da.applyMatrix3(R).normalize(),l.vertexNormalsModelView[V].copy(Da).applyMatrix3(J);l.vertexNormalsLength=ia.length;da=0;for(V=Math.min(ka.length,3);da<V;da++)if(ia=ka[da][ea],void 0!==ia){P=0;for(Z=ia.length;P<Z;P++)l.uvs[da][P]=ia[P]}l.color=M.color;l.material=fa;ba.copy(l.centroidModel).applyProjection(y);l.z=ba.z;x.elements.push(l)}}else if(U instanceof THREE.Line){G.multiplyMatrices(y,v);ea=U.geometry.vertices;V=
a();V.positionScreen.copy(ea[0]).applyMatrix4(G);ta=U.type===THREE.LinePieces?2:1;F=1;for(M=ea.length;F<M;F++)V=a(),V.positionScreen.copy(ea[F]).applyMatrix4(G),0<(F+1)%ta||(P=k[i-2],pa.copy(V.positionScreen),N.copy(P.positionScreen),!0===c(pa,N)&&(pa.multiplyScalar(1/pa.w),N.multiplyScalar(1/N.w),r===u?(ka=new THREE.RenderableLine,q.push(ka),u++,r++,n=ka):n=q[r++],n.id=U.id,n.v1.positionScreen.copy(pa),n.v2.positionScreen.copy(N),n.z=Math.max(pa.z,N.z),n.material=U.material,U.material.vertexColors===
THREE.VertexColors&&(n.vertexColors[0].copy(U.geometry.colors[F]),n.vertexColors[1].copy(U.geometry.colors[F-1])),x.elements.push(n)))}d=0;for(h=x.sprites.length;d<h;d++)U=x.sprites[d].object,v=U.matrixWorld,U instanceof THREE.Particle&&(A.set(v.elements[12],v.elements[13],v.elements[14],1),A.applyMatrix4(y),fa=1/A.w,A.z*=fa,0<A.z&&1>A.z&&(z===D?(ta=new THREE.RenderableParticle,B.push(ta),D++,z++,w=ta):w=B[z++],w.id=U.id,w.x=A.x*fa,w.y=A.y*fa,w.z=A.z,w.object=U,w.rotation=U.rotation.z,w.scale.x=U.scale.x*
Math.abs(w.x-(A.x+f.projectionMatrix.elements[0])/(A.w+f.projectionMatrix.elements[12])),w.scale.y=U.scale.y*Math.abs(w.y-(A.y+f.projectionMatrix.elements[5])/(A.w+f.projectionMatrix.elements[13])),w.material=U.material,x.elements.push(w)));!0===m&&x.elements.sort(b);return x}};THREE.Face3=function(a,b,c,d,e,f){this.a=a;this.b=b;this.c=c;this.normal=d instanceof THREE.Vector3?d:new THREE.Vector3;this.vertexNormals=d instanceof Array?d:[];this.color=e instanceof THREE.Color?e:new THREE.Color;this.vertexColors=e instanceof Array?e:[];this.vertexTangents=[];this.materialIndex=void 0!==f?f:0;this.centroid=new THREE.Vector3};
THREE.VertexColors&&(n.vertexColors[0].copy(U.geometry.colors[F]),n.vertexColors[1].copy(U.geometry.colors[F-1])),x.elements.push(n)))}d=0;for(h=x.sprites.length;d<h;d++)U=x.sprites[d].object,v=U.matrixWorld,U instanceof THREE.Particle&&(A.set(v.elements[12],v.elements[13],v.elements[14],1),A.applyMatrix4(y),fa=1/A.w,A.z*=fa,-1<A.z&&1>A.z&&(z===D?(ta=new THREE.RenderableParticle,B.push(ta),D++,z++,w=ta):w=B[z++],w.id=U.id,w.x=A.x*fa,w.y=A.y*fa,w.z=A.z,w.object=U,w.rotation=U.rotation.z,w.scale.x=
U.scale.x*Math.abs(w.x-(A.x+f.projectionMatrix.elements[0])/(A.w+f.projectionMatrix.elements[12])),w.scale.y=U.scale.y*Math.abs(w.y-(A.y+f.projectionMatrix.elements[5])/(A.w+f.projectionMatrix.elements[13])),w.material=U.material,x.elements.push(w)));!0===m&&x.elements.sort(b);return x}};THREE.Face3=function(a,b,c,d,e,f){this.a=a;this.b=b;this.c=c;this.normal=d instanceof THREE.Vector3?d:new THREE.Vector3;this.vertexNormals=d instanceof Array?d:[];this.color=e instanceof THREE.Color?e:new THREE.Color;this.vertexColors=e instanceof Array?e:[];this.vertexTangents=[];this.materialIndex=void 0!==f?f:0;this.centroid=new THREE.Vector3};
THREE.Face3.prototype={constructor:THREE.Face3,clone:function(){var a=new THREE.Face3(this.a,this.b,this.c);a.normal.copy(this.normal);a.color.copy(this.color);a.centroid.copy(this.centroid);a.materialIndex=this.materialIndex;var b,c;b=0;for(c=this.vertexNormals.length;b<c;b++)a.vertexNormals[b]=this.vertexNormals[b].clone();b=0;for(c=this.vertexColors.length;b<c;b++)a.vertexColors[b]=this.vertexColors[b].clone();b=0;for(c=this.vertexTangents.length;b<c;b++)a.vertexTangents[b]=this.vertexTangents[b].clone();
return a}};THREE.Face4=function(a,b,c,d,e,f,h){console.warn("THREE.Face4 has been removed. A THREE.Face3 will be created instead.");return new THREE.Face3(a,b,c,e,f,h)};THREE.Geometry=function(){this.id=THREE.GeometryIdCount++;this.uuid=THREE.Math.generateUUID();this.name="";this.vertices=[];this.colors=[];this.faces=[];this.faceVertexUvs=[[]];this.morphTargets=[];this.morphColors=[];this.morphNormals=[];this.skinWeights=[];this.skinIndices=[];this.lineDistances=[];this.boundingSphere=this.boundingBox=null;this.hasTangents=!1;this.dynamic=!0;this.buffersNeedUpdate=this.lineDistancesNeedUpdate=this.colorsNeedUpdate=this.tangentsNeedUpdate=this.normalsNeedUpdate=this.uvsNeedUpdate=
this.elementsNeedUpdate=this.verticesNeedUpdate=!1};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册