Преглед на файлове

SpritePlugin: Updated to modelMatrixView.

Mr.doob преди 10 години
родител
ревизия
fa8c551973
променени са 1 файла, в които са добавени 3 реда и са изтрити 3 реда
  1. 3 3
      src/renderers/webgl/plugins/SpritePlugin.js

+ 3 - 3
src/renderers/webgl/plugins/SpritePlugin.js

@@ -160,8 +160,8 @@ THREE.SpritePlugin = function ( renderer, sprites ) {
 
 
 			var sprite = sprites[ i ];
 			var sprite = sprites[ i ];
 
 
-			sprite._modelViewMatrix.multiplyMatrices( camera.matrixWorldInverse, sprite.matrixWorld );
-			sprite.z = - sprite._modelViewMatrix.elements[ 14 ];
+			sprite.modelViewMatrix.multiplyMatrices( camera.matrixWorldInverse, sprite.matrixWorld );
+			sprite.z = - sprite.modelViewMatrix.elements[ 14 ];
 
 
 		}
 		}
 
 
@@ -177,7 +177,7 @@ THREE.SpritePlugin = function ( renderer, sprites ) {
 			var material = sprite.material;
 			var material = sprite.material;
 
 
 			gl.uniform1f( uniforms.alphaTest, material.alphaTest );
 			gl.uniform1f( uniforms.alphaTest, material.alphaTest );
-			gl.uniformMatrix4fv( uniforms.modelViewMatrix, false, sprite._modelViewMatrix.elements );
+			gl.uniformMatrix4fv( uniforms.modelViewMatrix, false, sprite.modelViewMatrix.elements );
 
 
 			sprite.matrixWorld.decompose( spritePosition, spriteRotation, spriteScale );
 			sprite.matrixWorld.decompose( spritePosition, spriteRotation, spriteScale );