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

Updated builds.

上级 b2398124
......@@ -32894,6 +32894,8 @@ THREE.SpritePlugin = function ( renderer, sprites ) {
var sprite = sprites[ i ];
var material = sprite.material;
if ( material.visible === false ) continue;
gl.uniform1f( uniforms.alphaTest, material.alphaTest );
gl.uniformMatrix4fv( uniforms.modelViewMatrix, false, sprite.modelViewMatrix.elements );
......@@ -33069,7 +33071,7 @@ THREE.SpritePlugin = function ( renderer, sprites ) {
}
function painterSortStable ( a, b ) {
if ( a.renderOrder !== b.renderOrder ) {
return a.renderOrder - b.renderOrder;
......
......@@ -778,8 +778,8 @@ w.shaderSource(O,["precision "+a.getPrecision()+" float;","uniform vec3 color;\n
w.compileShader(M);w.compileShader(O);w.attachShader(H,M);w.attachShader(H,O);w.linkProgram(H);B=H;t=w.getAttribLocation(B,"position");u=w.getAttribLocation(B,"uv");c=w.getUniformLocation(B,"uvOffset");d=w.getUniformLocation(B,"uvScale");e=w.getUniformLocation(B,"rotation");f=w.getUniformLocation(B,"scale");g=w.getUniformLocation(B,"color");h=w.getUniformLocation(B,"map");k=w.getUniformLocation(B,"opacity");l=w.getUniformLocation(B,"modelViewMatrix");m=w.getUniformLocation(B,"projectionMatrix");p=
w.getUniformLocation(B,"fogType");n=w.getUniformLocation(B,"fogDensity");q=w.getUniformLocation(B,"fogNear");r=w.getUniformLocation(B,"fogFar");s=w.getUniformLocation(B,"fogColor");v=w.getUniformLocation(B,"alphaTest");H=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");H.width=8;H.height=8;M=H.getContext("2d");M.fillStyle="white";M.fillRect(0,0,8,8);F=new THREE.Texture(H);F.needsUpdate=!0}w.useProgram(B);E.initAttributes();E.enableAttribute(t);E.enableAttribute(u);E.disableUnusedAttributes();
E.disable(w.CULL_FACE);E.enable(w.BLEND);w.bindBuffer(w.ARRAY_BUFFER,y);w.vertexAttribPointer(t,2,w.FLOAT,!1,16,0);w.vertexAttribPointer(u,2,w.FLOAT,!1,16,8);w.bindBuffer(w.ELEMENT_ARRAY_BUFFER,z);w.uniformMatrix4fv(m,!1,K.projectionMatrix.elements);E.activeTexture(w.TEXTURE0);w.uniform1i(h,0);M=H=0;(O=P.fog)?(w.uniform3f(s,O.color.r,O.color.g,O.color.b),O instanceof THREE.Fog?(w.uniform1f(q,O.near),w.uniform1f(r,O.far),w.uniform1i(p,1),M=H=1):O instanceof THREE.FogExp2&&(w.uniform1f(n,O.density),
w.uniform1i(p,2),M=H=2)):(w.uniform1i(p,0),M=H=0);for(var O=0,N=b.length;O<N;O++){var Q=b[O];Q.modelViewMatrix.multiplyMatrices(K.matrixWorldInverse,Q.matrixWorld);Q.z=-Q.modelViewMatrix.elements[14]}b.sort(C);for(var L=[],O=0,N=b.length;O<N;O++){var Q=b[O],D=Q.material;w.uniform1f(v,D.alphaTest);w.uniformMatrix4fv(l,!1,Q.modelViewMatrix.elements);Q.matrixWorld.decompose(A,G,J);L[0]=J.x;L[1]=J.y;Q=0;P.fog&&D.fog&&(Q=M);H!==Q&&(w.uniform1i(p,Q),H=Q);null!==D.map?(w.uniform2f(c,D.map.offset.x,D.map.offset.y),
w.uniform2f(d,D.map.repeat.x,D.map.repeat.y)):(w.uniform2f(c,0,0),w.uniform2f(d,1,1));w.uniform1f(k,D.opacity);w.uniform3f(g,D.color.r,D.color.g,D.color.b);w.uniform1f(e,D.rotation);w.uniform2fv(f,L);E.setBlending(D.blending,D.blendEquation,D.blendSrc,D.blendDst);E.setDepthTest(D.depthTest);E.setDepthWrite(D.depthWrite);D.map?a.setTexture2D(D.map,0):a.setTexture2D(F,0);w.drawElements(w.TRIANGLES,6,w.UNSIGNED_SHORT,0)}E.enable(w.CULL_FACE);a.resetGLState()}}};
w.uniform1i(p,2),M=H=2)):(w.uniform1i(p,0),M=H=0);for(var O=0,N=b.length;O<N;O++){var Q=b[O];Q.modelViewMatrix.multiplyMatrices(K.matrixWorldInverse,Q.matrixWorld);Q.z=-Q.modelViewMatrix.elements[14]}b.sort(C);for(var L=[],O=0,N=b.length;O<N;O++){var Q=b[O],D=Q.material;!1!==D.visible&&(w.uniform1f(v,D.alphaTest),w.uniformMatrix4fv(l,!1,Q.modelViewMatrix.elements),Q.matrixWorld.decompose(A,G,J),L[0]=J.x,L[1]=J.y,Q=0,P.fog&&D.fog&&(Q=M),H!==Q&&(w.uniform1i(p,Q),H=Q),null!==D.map?(w.uniform2f(c,D.map.offset.x,
D.map.offset.y),w.uniform2f(d,D.map.repeat.x,D.map.repeat.y)):(w.uniform2f(c,0,0),w.uniform2f(d,1,1)),w.uniform1f(k,D.opacity),w.uniform3f(g,D.color.r,D.color.g,D.color.b),w.uniform1f(e,D.rotation),w.uniform2fv(f,L),E.setBlending(D.blending,D.blendEquation,D.blendSrc,D.blendDst),E.setDepthTest(D.depthTest),E.setDepthWrite(D.depthWrite),D.map?a.setTexture2D(D.map,0):a.setTexture2D(F,0),w.drawElements(w.TRIANGLES,6,w.UNSIGNED_SHORT,0))}E.enable(w.CULL_FACE);a.resetGLState()}}};
Object.assign(THREE,{Face4:function(a,b,c,d,e,f,g){console.warn("THREE.Face4 has been removed. A THREE.Face3 will be created instead.");return new THREE.Face3(a,b,c,e,f,g)},LineStrip:0,LinePieces:1,MeshFaceMaterial:THREE.MultiMaterial,PointCloud:function(a,b){console.warn("THREE.PointCloud has been renamed to THREE.Points.");return new THREE.Points(a,b)},Particle:THREE.Sprite,ParticleSystem:function(a,b){console.warn("THREE.ParticleSystem has been renamed to THREE.Points.");return new THREE.Points(a,
b)},PointCloudMaterial:function(a){console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial.");return new THREE.PointsMaterial(a)},ParticleBasicMaterial:function(a){console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial.");return new THREE.PointsMaterial(a)},ParticleSystemMaterial:function(a){console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial.");return new THREE.PointsMaterial(a)},Vertex:function(a,b,c){console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead.");
return new THREE.Vector3(a,b,c)}});Object.assign(THREE.Box2.prototype,{empty:function(){console.warn("THREE.Box2: .empty() has been renamed to .isEmpty().");return this.isEmpty()},isIntersectionBox:function(a){console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox().");return this.intersectsBox(a)}});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册