Browse Source

ImageUtils.loadTexture: Enable 'onError' callback

Corey Farwell 11 years ago
parent
commit
e03a93173f
1 changed files with 4 additions and 0 deletions
  1. 4 0
      src/extras/ImageUtils.js

+ 4 - 0
src/extras/ImageUtils.js

@@ -20,6 +20,10 @@ THREE.ImageUtils = {
 
 
 			if ( onLoad ) onLoad( texture );
 			if ( onLoad ) onLoad( texture );
 
 
+		}, undefined, function ( event ) {
+
+			if ( onError ) onError( event );
+
 		} );
 		} );
 
 
 		texture.image = image;
 		texture.image = image;