Bläddra i källkod

Merge pull request #6300 from benaadams/patch-1

Pass texture in onUpdate
Ricardo Cabello 10 år sedan
förälder
incheckning
0fb2e1c466
1 ändrade filer med 2 tillägg och 2 borttagningar
  1. 2 2
      src/renderers/WebGLRenderer.js

+ 2 - 2
src/renderers/WebGLRenderer.js

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