|
@@ -2230,24 +2230,26 @@ THREE.GLTFLoader = ( function () {
|
|
|
|
|
|
// Nothing in the node definition indicates whether it is a Bone or an
|
|
|
// Object3D. Use the skins' joint references to mark bones.
|
|
|
- skins.forEach( function ( skin ) {
|
|
|
+ for ( var skinIndex in skins ) {
|
|
|
|
|
|
- skin.joints.forEach( function ( id ) {
|
|
|
+ for ( var jointIndex in skins[ skinIndex ].joints ) {
|
|
|
|
|
|
- nodes[ id ].isBone = true;
|
|
|
+ nodes[ jointIndex ].isBone = true;
|
|
|
|
|
|
- } );
|
|
|
+ }
|
|
|
|
|
|
- } );
|
|
|
+ }
|
|
|
|
|
|
// Meshes can (and should) be reused by multiple nodes in a glTF asset. To
|
|
|
// avoid having more than one THREE.Mesh with the same name, count
|
|
|
// references and rename instances below.
|
|
|
//
|
|
|
// Example: CesiumMilkTruck sample model reuses "Wheel" meshes.
|
|
|
- nodes.forEach( function ( nodeDef ) {
|
|
|
+ for ( var nodeIndex in nodes ) {
|
|
|
|
|
|
- if ( nodeDef.mesh ) {
|
|
|
+ var nodeDef = nodes[ nodeIndex ];
|
|
|
+
|
|
|
+ if ( nodeDef.mesh !== undefined ) {
|
|
|
|
|
|
if ( meshReferences[ nodeDef.mesh ] === undefined ) {
|
|
|
|
|
@@ -2259,7 +2261,7 @@ THREE.GLTFLoader = ( function () {
|
|
|
|
|
|
}
|
|
|
|
|
|
- } );
|
|
|
+ }
|
|
|
|
|
|
return scope._withDependencies( [
|
|
|
|