Skip to content

Commit

Permalink
[fbx2gltf] Animation export add startTime offset
Browse files Browse the repository at this point in the history
  • Loading branch information
pissang committed Jan 23, 2018
1 parent 941ba5c commit 8bd2576
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/animation/Animator.js
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ Animator.prototype = {
return this;
},
/**
* @param {number} time Keyframe elapsed time since last keyframe
* @param {number} time During time since last keyframe
* @param {Object} props A key-value object. Value can be number, 1d and 2d array
* @param {string|Function} [easing]
* @return {clay.animation.Animator}
Expand Down
5 changes: 3 additions & 2 deletions tools/fbx2gltf.py
Original file line number Diff line number Diff line change
Expand Up @@ -1070,8 +1070,9 @@ def ConvertNodeAnimation(pGLTFAnimation, pAnimLayer, pNode, pSampleRate, pStartT
lQuaternion = lTransform.GetQ()
lScale = lTransform.GetS()

#Convert quaternion to axis angle
lTimeChannel.append(lSecondDouble)
# Convert quaternion to axis angle
# PENDING. minus pStartTime or lStartTimeDouble?
lTimeChannel.append(lSecondDouble - pStartTime)

if lHaveRotation:
lRotationChannel.append(list(lQuaternion))
Expand Down

0 comments on commit 8bd2576

Please sign in to comment.