Browse Source

fix ObjectLoader for cached images

makc 9 years ago
parent
commit
457f64b976
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;