Forráskód Böngészése

Mirror: Inlined updateTextureMatrix() in onBeforeRender().

Mr.doob 8 éve
szülő
commit
3084dc9441
1 módosított fájl, 2 hozzáadás és 6 törlés
  1. 2 6
      examples/js/Mirror.js

+ 2 - 6
examples/js/Mirror.js

@@ -109,7 +109,7 @@ THREE.Mirror = function ( width, height, options ) {
 
 	scope.material = material;
 
-	function updateTextureMatrix( camera ) {
+	scope.onBeforeRender = function ( renderer, scene, camera ) {
 
 		scope.updateMatrixWorld();
 
@@ -181,11 +181,7 @@ THREE.Mirror = function ( width, height, options ) {
 		projectionMatrix.elements[ 10 ] = clipPlane.z + 1.0 - clipBias;
 		projectionMatrix.elements[ 14 ] = clipPlane.w;
 
-	}
-
-	scope.onBeforeRender = function ( renderer, scene, camera ) {
-
-		updateTextureMatrix( camera );
+		// Render
 
 		scope.visible = false;