Skip to content

Commit

Permalink
Merge pull request #1 from LebedenkoN/mrdoob#11432-IE-An-extra-object…
Browse files Browse the repository at this point in the history
…-in-data.children-in-ObjectLoader.parseObject

Updated Objectoader.parseObject. Changed the way of iterating over data.children array mrdoob#11432
  • Loading branch information
LebedenkoN authored Jun 2, 2017
2 parents 4971c0d + 337d786 commit f6ddf18
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/loaders/ObjectLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -765,11 +765,10 @@ Object.assign( ObjectLoader.prototype, {

if ( data.children !== undefined ) {

for ( var child in data.children ) {

object.add( this.parseObject( data.children[ child ], geometries, materials ) );

}
var that = this;
data.children.forEach(function(index, child){
object.add( that.parseObject( data.children[ child ], geometries, materials ) );
});

}

Expand Down

0 comments on commit f6ddf18

Please sign in to comment.