提交 eeb7000d 编写于 作者: M Mr.doob

FBXLoader2: Removed yet more GC.

上级 79321a61
......@@ -2985,6 +2985,9 @@
}
var euler = new THREE.Euler();
var quaternion = new THREE.Quaternion();
/**
* @param {THREE.Bone} bone
*/
......@@ -2997,11 +3000,7 @@
scl: bone.scale.toArray()
};
if ( animationNode === undefined ) {
return key;
}
if ( animationNode === undefined ) return key;
try {
......@@ -3016,8 +3015,9 @@
var rotationX = animationNode.R.curves.x.values[ frame ];
var rotationY = animationNode.R.curves.y.values[ frame ];
var rotationZ = animationNode.R.curves.z.values[ frame ];
var euler = new THREE.Euler( rotationX, rotationY, rotationZ, 'ZYX' );
key.rot = new THREE.Quaternion().setFromEuler( euler ).toArray();
quaternion.setFromEuler( euler.set( rotationX, rotationY, rotationZ, 'ZYX' ) );
key.rot = quaternion.toArray();
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册