소스 검색

Pass texture in onUpdate

So generic onupdate function can be used, pass in texture as parameter
Ben Adams 10 년 전
부모
커밋
bbf4c70823
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      src/renderers/WebGLRenderer.js

+ 2 - 2
src/renderers/WebGLRenderer.js

@@ -5588,7 +5588,7 @@ THREE.WebGLRenderer = function ( parameters ) {
 
 		texture.needsUpdate = false;
 
-		if ( texture.onUpdate ) texture.onUpdate();
+		if ( texture.onUpdate ) texture.onUpdate( texture );
 
 	};
 
@@ -5735,7 +5735,7 @@ THREE.WebGLRenderer = function ( parameters ) {
 
 				texture.needsUpdate = false;
 
-				if ( texture.onUpdate ) texture.onUpdate();
+				if ( texture.onUpdate ) texture.onUpdate( texture );
 
 			} else {