-
Notifications
You must be signed in to change notification settings - Fork 2k
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
[WIP] Feature: NewGenAnim #9331
Conversation
* The default ExitCondition should be 1.0 * Do correct graph eval
Fix single frame exit condition behaviours; Fix pose -> subgraph behaviours
* Temp * Flat whole layer statemachine * Add test for test reset triggers * Allow self transition * Self transition test
Reviewer notesThis PR is in pretty early stage and may varies a lot. However, to reduce reviewing stress, I made this PR for now. Unless stated in later comments(and it'd be definitely covered before this PR can be merged), you should only review, discuss and suggest to the design, concepts or structure of this PR. You shall not care the trivial details about for example:
|
weights[weights.length - 1] = 1; | ||
} else { | ||
let iUpper = 0; | ||
for (let iThresholds = 1; iThresholds < thresholds.length; ++iThresholds) { |
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.
TODO: Binary search
private _currentTransitionPath: TransitionEval[] = []; | ||
private _transitionProgress = 0; | ||
private declare _triggerReset: TriggerResetFn; | ||
private _fromWeight = 0.0; |
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.
fromWeight 和 toWeight 是什么概念
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 nComponents = components.length; | ||
for (let iComponent = 0; iComponent < nComponents; ++iComponent) { | ||
const component = components[iComponent]; | ||
if (component.onEnter !== DEFAULT_ENTER_METHOD) { |
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.
这个判断的目的是优化性能?感觉这个判断都能进啊
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.
是的,优化性能,如果它没复写基类方法(也就是没自定义组件方法),就不调用了,我个人觉得这比现有的 Node 生命周期方法的实现好点。
* modify aniamtion graph template data * add animation graph component template
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.
LGTM
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.
LGTM
* NewGenAnim * Fix/Optimize simple directional blending * Class transition by type (#29) * Transition & Gradient transition (#30) * The default ExitCondition should be 1.0 * Do correct graph eval * Fix PoseSubgraph connect() signature order (#31) * Graph defaults test (#32) * Conditions (#33) * Trigger (#34) * Transition should only be considered when satemachine exited (#35) * Add layer.name (#36) * Fix some behaviours; add API to query poses and transition (#37) Fix single frame exit condition behaviours; Fix pose -> subgraph behaviours * Support self transition; refactor sub state machine implementation (#38) * Temp * Flat whole layer statemachine * Add test for test reset triggers * Allow self transition * Self transition test * Fix deserialize (#39) * update animgraph template (#40) * The inheritance of any state (#41) * StateMachine events (#42) * Fix state machine events; Allow multiple transitions between two nodes (#43) * Transition priority test (#44) * Optimize variable bind (#45) * Fix variable bind errors (#46) * Expose blend algorithm to editor (#47) * Cont (#48) * update animgraph template (#49) * update animgraph template * update animgraph template * Pose speed (#50) * blend tree add EditorExtendable data (#51) * Correct pose blend duration (#52) * Export some types (#53) * animation pose EditorExtendable (#54) (cherry picked from commit d5dd5f3) * Implement clone() (#55) * Fix trigger condition serialization (#56) * Add variable type: integer (#57) * Optimize 0 weight case (#58) * Relative duration (#59) * update_hdr_skybox (#9230) * Rename.. (#60) * Optimize animation blend item export (#61) * Fix Type (#62) * modify aniamtion graph template data (#63) * modify aniamtion graph template data * add animation graph component template * Fix serialize issue (#64) * Optimize (#65) * Remove MotionState.startRatio, loop (#66) * Update (#67) * Fix circular reference (#68) * CR (#69) * Fix exit time greater than 1 (#70) Co-authored-by: 黄森斌 <arsen2010@126.com> Co-authored-by: linshunjun <49218738+linshunjun@users.noreply.github.com>
Re: cocos-creator/3d-tasks#
Internal discussion: https://github.com/cocos-creator/3d-tasks/discussions/8771
Internal issue: https://github.com/cocos-creator/3d-tasks/issues/5845
Internal editor requirements and info tracks: https://github.com/cocos-creator/3d-tasks/issues/8520
Changelog:
*