浏览代码

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 {