|
@@ -48,15 +48,17 @@ THREE.ObjectLoader.prototype = {
|
|
|
|
|
|
var geometries = this.parseGeometries( json.geometries );
|
|
|
|
|
|
- var images = this.parseImages( json.images, function () {
|
|
|
-
|
|
|
- if ( onLoad !== undefined ) onLoad( object );
|
|
|
-
|
|
|
- } );
|
|
|
+ var images = this.parseImages( json.images, onLoad );
|
|
|
var textures = this.parseTextures( json.textures, images );
|
|
|
var materials = this.parseMaterials( json.materials, textures );
|
|
|
var object = this.parseObject( json.object, geometries, materials );
|
|
|
|
|
|
+ if ( json.images === undefined || json.images.length === 0 ) {
|
|
|
+
|
|
|
+ if ( onLoad !== undefined ) onLoad( object );
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
return object;
|
|
|
|
|
|
},
|
|
@@ -314,10 +316,6 @@ THREE.ObjectLoader.prototype = {
|
|
|
|
|
|
}
|
|
|
|
|
|
- } else {
|
|
|
-
|
|
|
- if ( onLoad !== undefined ) onLoad();
|
|
|
-
|
|
|
}
|
|
|
|
|
|
return images;
|