Browse Source

Merge pull request #7276 from makc/patch-1

ObjectLoader continues to be broken with cached images
Mr.doob 9 years ago
parent
commit
1976f579c9
1 changed files with 8 additions and 0 deletions
  1. 8 0
      src/loaders/ImageLoader.js

+ 8 - 0
src/loaders/ImageLoader.js

@@ -20,14 +20,22 @@ THREE.ImageLoader.prototype = {
 
 
 		if ( cached !== undefined ) {
 		if ( cached !== undefined ) {
 
 
+			scope.manager.itemStart( url );
+
 			if ( onLoad ) {
 			if ( onLoad ) {
 
 
 				setTimeout( function () {
 				setTimeout( function () {
 
 
 					onLoad( cached );
 					onLoad( cached );
 
 
+					scope.manager.itemEnd( url );
+
 				}, 0 );
 				}, 0 );
 
 
+			} else {
+
+				scope.manager.itemEnd( url );
+
 			}
 			}
 
 
 			return cached;
 			return cached;