Prechádzať zdrojové kódy

Pass texture in onUpdate

So generic onupdate function can be used, pass in texture as parameter
Ben Adams 10 rokov pred
rodič
commit
bbf4c70823
1 zmenil súbory, kde vykonal 2 pridanie a 2 odobranie
  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 {