Closed luzhuang closed 3 weeks ago
[!CAUTION]
Review failed
The pull request is closed.
The changes in this pull request focus on enhancing the animation system within the Animator
class and related components. Key modifications include improvements to animation state transitions, playback timing, and the introduction of new methods for calculating clip start and end times. Adjustments were made to how frame time is handled during updates, and new test cases were added to validate the functionality of these changes.
File Path | Change Summary |
---|---|
packages/core/src/animation/Animator.ts |
- Updated exit time and clip duration calculations for transitions. - Modified _updatePlayingState to use _getClipActualEndTime() .- Refined cross-fade logic with playedTime adjustments.- Method signatures updated for play , crossFade , setParameterValue to include return types. |
packages/core/src/animation/AnimatorState.ts |
- Added _getClipActualStartTime and _getClipActualEndTime methods for precise timing calculations. |
packages/core/src/animation/internal/AnimatorStatePlayData.ts |
- Introduced offsetFrameTime property and updated reset method signature to accept it.- Modified update method to incorporate offsetFrameTime in frame time calculations. |
tests/src/core/Animator.test.ts |
- Added tests for animator transitions with offsets and for cross-fade behavior with clip start times. |
animation
In the world of hops and plays,
Animations dance through sunny rays.
With timing sharp and transitions smooth,
Our Animator finds its groove!
So let us cheer with joyful glee,
For smoother animations, wild and free! 🐇✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 69.49%. Comparing base (
396cb8e
) to head (c9be782
). Report is 14 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Please check if the PR fulfills these requirements
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
What is the current behavior? (You can also link to an open issue here)
What is the new behavior (if this is a feature change)?
Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
Other information:
Summary by CodeRabbit