Browse Source

ObjectLoader: Refactor shape creation

Mugen87 7 years ago
parent
commit
e157bb349e
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/loaders/ObjectLoader.js

+ 2 - 2
src/loaders/ObjectLoader.js

@@ -342,9 +342,9 @@ Object.assign( ObjectLoader.prototype, {
 
 						for ( var i = 0, l = data.shapes.length; i < l; i ++ ) {
 
-							var shape = data.shapes[ i ];
+							var shape = new Shape().fromJSON( data.shapes[ i ] );
 
-							shapes.push( new Shape().fromJSON( shape ) );
+							shapes.push( shape );
 
 						}