Browse Source

Update ObjectLoader.js

LebedenkoN 8 years ago
parent
commit
ce7778609d
1 changed files with 4 additions and 2 deletions
  1. 4 2
      src/loaders/ObjectLoader.js

+ 4 - 2
src/loaders/ObjectLoader.js

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