Browse Source

Update ObjectLoader.js

Changed forEach function to for loop
LebedenkoN 8 years ago
parent
commit
00c9d68838
1 changed files with 5 additions and 3 deletions
  1. 5 3
      src/loaders/ObjectLoader.js

+ 5 - 3
src/loaders/ObjectLoader.js

@@ -765,9 +765,11 @@ Object.assign( ObjectLoader.prototype, {
 
 			if ( data.children !== undefined ) {
 				
-				data.children.forEach(function(child){
-					object.add( this.parseObject( child, geometries, materials ) );
-				}, this);
+				for( var i=0; i<data.children.length; i++){
+					
+					object.add( this.parseObject( data.children[i], geometries, materials );
+						   
+				}
 
 			}