Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1807,13 +1807,10 @@ THREE.GLTFLoader = ( function () { | |
|
||
] ).then( function ( dependencies ) { | ||
|
||
return _each( json.meshes, function ( meshDef ) { | ||
return _each( json.meshes, function ( meshDef, meshIndex ) { | ||
|
||
var group = new THREE.Group(); | ||
|
||
if ( meshDef.name !== undefined ) group.name = meshDef.name; | ||
if ( meshDef.extras ) group.userData = meshDef.extras; | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
donmccurdy
Author
Collaborator
|
||
|
||
var primitives = meshDef.primitives || []; | ||
|
||
return scope.loadGeometries( primitives ).then( function ( geometries ) { | ||
|
@@ -1896,7 +1893,8 @@ THREE.GLTFLoader = ( function () { | |
|
||
} | ||
|
||
mesh.name = group.name + ( i > 0 ? ( '_' + i ) : '' ); | ||
mesh.name = meshDef.name || ( 'mesh_' + meshIndex ); | ||
mesh.name += i > 0 ? ( '_' + i ) : ''; | ||
|
||
if ( primitive.targets !== undefined ) { | ||
|
||
|
@donmccurdy
Why did you removed
if ( meshDef.extras ) group.userData = meshDef.extras;
? I did need this code to get the extras...@twittmann
here it happened...