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

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 {