bevy/crates
robtfm 650e7c9eb4
apply finished animations (#14743)
# Objective

fix #14742

## Solution

the issue arises because "finished" animations (where current time >=
last keyframe time) are not applied at all.
when transitioning from a finished animation to another later-indexed
anim, the transition kind-of works because the finished anim is skipped,
then the new anim is applied with a lower weight (weight / total_weight)
when transitioning from a finished animation to another earlier-indexed
anim, the transition is instant as the new anim is applied with 1.0 (as
weight == total_weight for the first applied), then the finished
animation is skipped.

to fix this we can always apply every animation based on the nearest 2
keyframes, and clamp the interpolation between them to [0,1].

pros:
- finished animations can be transitioned out of correctly
- blended animations where some curves have a last-keyframe before the
end of the animation will blend properly
- animations will actually finish on their last keyframe, rather than a
fraction of a render-frame before the end

cons:
- we have to re-apply finished animations every frame whether it's
necessary or not. i can't see a way to avoid this.
2024-09-05 21:35:40 +02:00
..
bevy_a11y Release 0.14.1 2024-08-02 20:35:38 +02:00
bevy_animation apply finished animations (#14743) 2024-09-05 21:35:40 +02:00
bevy_app Release 0.14.1 2024-08-02 20:35:38 +02:00
bevy_asset Release 0.14.1 2024-08-02 20:35:38 +02:00
bevy_audio Release 0.14.1 2024-08-02 20:35:38 +02:00
bevy_color Fix hue mixing for Lcha and Oklcha (#14468) 2024-09-05 21:34:05 +02:00
bevy_core Release 0.14.1 2024-08-02 20:35:38 +02:00
bevy_core_pipeline Fix TAA on camera with viewport (#14582) 2024-09-05 21:35:40 +02:00
bevy_derive Release 0.14.1 2024-08-02 20:35:38 +02:00
bevy_dev_tools Release 0.14.1 2024-08-02 20:35:38 +02:00
bevy_diagnostic Release 0.14.1 2024-08-02 20:35:38 +02:00
bevy_dylib Release 0.14.1 2024-08-02 20:35:38 +02:00
bevy_dynamic_plugin Release 0.14.1 2024-08-02 20:35:38 +02:00
bevy_ecs Release 0.14.1 2024-08-02 20:35:38 +02:00
bevy_encase_derive Release 0.14.1 2024-08-02 20:35:38 +02:00
bevy_gilrs Release 0.14.1 2024-08-02 20:35:38 +02:00
bevy_gizmos Fix 3D Gizmo webgpu rendering (#14653) 2024-09-05 21:35:40 +02:00
bevy_gltf Release 0.14.1 2024-08-02 20:35:38 +02:00
bevy_hierarchy Release 0.14.1 2024-08-02 20:35:38 +02:00
bevy_input Release 0.14.1 2024-08-02 20:35:38 +02:00
bevy_internal Release 0.14.1 2024-08-02 20:35:38 +02:00
bevy_log Release 0.14.1 2024-08-02 20:35:38 +02:00
bevy_macro_utils Release 0.14.1 2024-08-02 20:35:38 +02:00
bevy_math Release 0.14.1 2024-08-02 20:35:38 +02:00
bevy_mikktspace Release 0.14.1 2024-08-02 20:35:38 +02:00
bevy_pbr Don’t prepare lights (and shadow map textures) for 2D cameras (#14574) 2024-09-05 21:34:05 +02:00
bevy_ptr Release 0.14.1 2024-08-02 20:35:38 +02:00
bevy_reflect Making DynamicEnum::is_dynamic() return true (#14732) 2024-09-05 21:35:40 +02:00
bevy_render Release 0.14.1 2024-08-02 20:35:38 +02:00
bevy_scene Release 0.14.1 2024-08-02 20:35:38 +02:00
bevy_sprite Release 0.14.1 2024-08-02 20:35:38 +02:00
bevy_state Release 0.14.1 2024-08-02 20:35:38 +02:00
bevy_tasks Release 0.14.1 2024-08-02 20:35:38 +02:00
bevy_text Release 0.14.1 2024-08-02 20:35:38 +02:00
bevy_time Release 0.14.1 2024-08-02 20:35:38 +02:00
bevy_transform Release 0.14.1 2024-08-02 20:35:38 +02:00
bevy_ui Explicitly order CameraUpdateSystem before UiSystem::Prepare (#14609) 2024-09-05 21:35:36 +02:00
bevy_utils Release 0.14.1 2024-08-02 20:35:38 +02:00
bevy_window Release 0.14.1 2024-08-02 20:35:38 +02:00
bevy_winit Release 0.14.1 2024-08-02 20:35:38 +02:00