소스 검색

Mirror: Inlined updateTextureMatrix() in onBeforeRender().

Mr.doob 8 년 전
부모
커밋
3084dc9441
1개의 변경된 파일2개의 추가작업 그리고 6개의 파일을 삭제
  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;