File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -1693,15 +1693,15 @@ THREE.GLTFExporter.prototype = {
16931693
16941694 var joints = [ ] ;
16951695 var inverseBindMatrices = new Float32Array ( skeleton . bones . length * 16 ) ;
1696- var temporaryBoneInverse = new THREE . Matrix4 ;
1696+ var temporaryBoneInverse = new THREE . Matrix4 ( ) ;
16971697
16981698 for ( var i = 0 ; i < skeleton . bones . length ; ++ i ) {
16991699
17001700 joints . push ( nodeMap . get ( skeleton . bones [ i ] ) ) ;
17011701
1702- temporaryBoneInverse . copy ( skeleton . boneInverses [ i ] ) ;
1702+ temporaryBoneInverse . copy ( skeleton . boneInverses [ i ] ) ;
17031703
1704- temporaryBoneInverse . multiply ( object . bindMatrix ) . toArray ( inverseBindMatrices , i * 16 ) ;
1704+ temporaryBoneInverse . multiply ( object . bindMatrix ) . toArray ( inverseBindMatrices , i * 16 ) ;
17051705
17061706 }
17071707
Original file line number Diff line number Diff line change @@ -1716,12 +1716,15 @@ GLTFExporter.prototype = {
17161716
17171717 var joints = [ ] ;
17181718 var inverseBindMatrices = new Float32Array ( skeleton . bones . length * 16 ) ;
1719+ var temporaryBoneInverse = new THREE . Matrix4 ( ) ;
17191720
17201721 for ( var i = 0 ; i < skeleton . bones . length ; ++ i ) {
17211722
17221723 joints . push ( nodeMap . get ( skeleton . bones [ i ] ) ) ;
17231724
1724- skeleton . boneInverses [ i ] . toArray ( inverseBindMatrices , i * 16 ) ;
1725+ temporaryBoneInverse . copy ( skeleton . boneInverses [ i ] ) ;
1726+
1727+ temporaryBoneInverse . multiply ( object . bindMatrix ) . toArray ( inverseBindMatrices , i * 16 ) ;
17251728
17261729 }
17271730
You can’t perform that action at this time.
0 commit comments