-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AnimationCurve #8409
AnimationCurve #8409
Conversation
72fda53
to
3967b18
Compare
f559776
to
0070b31
Compare
This PR tends to be in version 3.2+. Please do not merge it into 3.1. @holycanvas |
The concepts and design document can be found at here. |
75b803c
to
72d4ade
Compare
.interpMode -> .interpolationMode RealInterpMode -> RealInterpolationMode QuaternionInterpMode -> QuaternionInterpolationMode ExtrapMode -> ExtrapolationMode .preExtrap -> .preExtrapolation .postExtrap -> .postExtrapolation QuaternionCurve -> QuatCurve QuaternionKeyframeValue -> QuatKeyframeValue
const ratios: number[] = []; | ||
const eventGroups: IAnimationEventGroup[] = []; | ||
const events = this.events.sort((a, b) => a.frame - b.frame); | ||
for (const eventData of events) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
遗漏
result[joint] = new BoneGlobalTransform(); | ||
return result; | ||
}, {} as Record<string, BoneGlobalTransform>); | ||
for (const joint of Object.keys(skeletonFrames)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
遗漏
const parentJointName = joint.substring(0, parentJoint); | ||
const parentJointFrame = skeletonFrames[parentJointName]; | ||
if (!parentJointFrame) { | ||
warn(`Seems like we have animation for ${joint} but are missing its parent joint ${parentJointName} in animation?`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
遗漏
quatTrackEvalStatuses, | ||
} = compressedDataEvalStatus; | ||
|
||
for (const curves of this._curves) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for of
curves.evaluate(time, result); | ||
} | ||
|
||
for (const { target, curve } of quatTrackEvalStatuses) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for of
// trackConstructor: ColorTrack, | ||
// properties: [['r', 0], ['g', 1], ['b', 2], ['a', 3]], | ||
// } as ConvertMap<Color, ColorTrack>, | ||
// ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不需要的话就删除
|
||
set keys (value) { | ||
this._keys = value; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
无意义的 getter setter
return this._commonTargets; | ||
} | ||
|
||
set commonTargets (value) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
无意义的 getter setter
return track; | ||
}); | ||
|
||
for (const legacyCurve of legacyCurves) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for of
Re: cocos-creator/3d-tasks#
Changelog:
*