|
@@ -2414,12 +2414,7 @@ THREE.GLTF2Loader = ( function () {
|
|
|
|
|
|
return _each( json.skins, function ( skin ) {
|
|
|
|
|
|
- var bindShapeMatrix = new THREE.Matrix4();
|
|
|
-
|
|
|
- if ( skin.bindShapeMatrix !== undefined ) bindShapeMatrix.fromArray( skin.bindShapeMatrix );
|
|
|
-
|
|
|
var _skin = {
|
|
|
- bindShapeMatrix: bindShapeMatrix,
|
|
|
joints: skin.joints,
|
|
|
inverseBindMatrices: dependencies.accessors[ skin.inverseBindMatrices ]
|
|
|
};
|
|
@@ -2746,32 +2741,7 @@ THREE.GLTF2Loader = ( function () {
|
|
|
|
|
|
}
|
|
|
|
|
|
- child.bind( new THREE.Skeleton( bones, boneInverses, false ), skinEntry.bindShapeMatrix );
|
|
|
-
|
|
|
- var buildBoneGraph = function ( parentJson, parentObject, property ) {
|
|
|
-
|
|
|
- var children = parentJson[ property ];
|
|
|
-
|
|
|
- if ( children === undefined ) return;
|
|
|
-
|
|
|
- for ( var i = 0, il = children.length; i < il; i ++ ) {
|
|
|
-
|
|
|
- var nodeId = children[ i ];
|
|
|
- var bone = __nodes[ nodeId ];
|
|
|
- var boneJson = json.nodes[ nodeId ];
|
|
|
-
|
|
|
- if ( bone !== undefined && bone.isBone === true && boneJson !== undefined ) {
|
|
|
-
|
|
|
- parentObject.add( bone );
|
|
|
- buildBoneGraph( boneJson, bone, 'children' );
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- };
|
|
|
-
|
|
|
- buildBoneGraph( node, child, 'skeletons' );
|
|
|
+ child.bind( new THREE.Skeleton( bones, boneInverses, false ), child.matrixWorld );
|
|
|
|
|
|
}
|
|
|
|