浏览代码

ImageUtils.loadTexture: Enable 'onError' callback

Corey Farwell 11 年之前
父节点
当前提交
e03a93173f
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      src/extras/ImageUtils.js

+ 4 - 0
src/extras/ImageUtils.js

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