bevy/crates
François 71adb77a2e
support all types of animation interpolation from gltf (#10755)
# Objective

- Support step and cubic spline interpolation from gltf

## Solution

- Support step and cubic spline interpolation from gltf

Tested with
https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0/InterpolationTest
expected: 

![](https://raw.githubusercontent.com/KhronosGroup/glTF-Sample-Models/master/2.0/InterpolationTest/screenshot/screenshot.gif)
result: 

![output](https://github.com/bevyengine/bevy/assets/8672791/e7f1afd5-20c9-4921-97d4-8d0c82203068)

---

## Migration Guide

When manually specifying an animation `VariableCurve`, the interpolation
type must be specified:

- Bevy 0.12
```rust
        VariableCurve {
            keyframe_timestamps: vec![0.0, 1.0, 2.0, 3.0, 4.0],
            keyframes: Keyframes::Rotation(vec![
                Quat::IDENTITY,
                Quat::from_axis_angle(Vec3::Y, PI / 2.),
                Quat::from_axis_angle(Vec3::Y, PI / 2. * 2.),
                Quat::from_axis_angle(Vec3::Y, PI / 2. * 3.),
                Quat::IDENTITY,
            ]),
        },
```

- Bevy 0.13
```rust
        VariableCurve {
            keyframe_timestamps: vec![0.0, 1.0, 2.0, 3.0, 4.0],
            keyframes: Keyframes::Rotation(vec![
                Quat::IDENTITY,
                Quat::from_axis_angle(Vec3::Y, PI / 2.),
                Quat::from_axis_angle(Vec3::Y, PI / 2. * 2.),
                Quat::from_axis_angle(Vec3::Y, PI / 2. * 3.),
                Quat::IDENTITY,
            ]),
            interpolation: Interpolation::Linear,
        },
```
2023-12-31 18:01:50 +00:00
..
bevy_a11y Add [lints] table, fix adding #![allow(clippy::type_complexity)] everywhere (#10011) 2023-11-18 20:58:48 +00:00
bevy_animation support all types of animation interpolation from gltf (#10755) 2023-12-31 18:01:50 +00:00
bevy_app Add insert_state to App. (#11043) 2023-12-21 14:09:24 +00:00
bevy_asset Reorder impl to be the same as the trait (#11076) 2023-12-24 17:43:55 +00:00
bevy_audio Reorder impl to be the same as the trait (#11076) 2023-12-24 17:43:55 +00:00
bevy_core Replace deprecated elements (#10999) 2023-12-16 23:24:49 +00:00
bevy_core_pipeline Keep track of when a texture is first cleared (#10325) 2023-12-31 00:37:37 +00:00
bevy_derive Reexport winit::platform::android::activity::* in bevy_winit (#11011) 2023-12-19 20:15:03 +00:00
bevy_diagnostic Update sysinfo version to 0.30.0 (#11071) 2023-12-23 17:33:15 +00:00
bevy_dylib Add [lints] table, fix adding #![allow(clippy::type_complexity)] everywhere (#10011) 2023-11-18 20:58:48 +00:00
bevy_dynamic_plugin Add [lints] table, fix adding #![allow(clippy::type_complexity)] everywhere (#10011) 2023-11-18 20:58:48 +00:00
bevy_ecs Fix ci xvfb (#11143) 2023-12-30 09:07:31 +00:00
bevy_ecs_compile_fail_tests Rename WorldQueryData & WorldQueryFilter to QueryData & QueryFilter (#10779) 2023-12-12 19:45:50 +00:00
bevy_encase_derive Add [lints] table, fix adding #![allow(clippy::type_complexity)] everywhere (#10011) 2023-11-18 20:58:48 +00:00
bevy_gilrs Remove unnecessary path prefixes (#10749) 2023-11-28 23:43:40 +00:00
bevy_gizmos Reorder impl to be the same as the trait (#11076) 2023-12-24 17:43:55 +00:00
bevy_gltf support all types of animation interpolation from gltf (#10755) 2023-12-31 18:01:50 +00:00
bevy_hierarchy Re-export smallvec crate from bevy_utils (#11006) 2023-12-24 15:35:09 +00:00
bevy_input Update winit dependency to 0.29 (#10702) 2023-12-21 07:40:47 +00:00
bevy_internal Remove unnecessary path prefixes (#10749) 2023-11-28 23:43:40 +00:00
bevy_log Add helper macro's for logging only once (#10808) 2023-12-05 01:56:40 +00:00
bevy_macro_utils Remove unnecessary parens (#11075) 2023-12-24 17:43:01 +00:00
bevy_macros_compile_fail_tests Standardize toml format with taplo (#10594) 2023-11-21 01:04:14 +00:00
bevy_math Introduce AspectRatio struct (#10368) 2023-12-17 02:01:26 +00:00
bevy_mikktspace Replace calculation with function call (#11077) 2023-12-23 17:32:26 +00:00
bevy_pbr Keep track of when a texture is first cleared (#10325) 2023-12-31 00:37:37 +00:00
bevy_ptr Simplify equality assertions (#10988) 2023-12-16 23:58:41 +00:00
bevy_reflect Fix ci xvfb (#11143) 2023-12-30 09:07:31 +00:00
bevy_reflect_compile_fail_tests Fix nested generics in Reflect derive (#10791) 2023-11-29 01:46:09 +00:00
bevy_render Keep track of when a texture is first cleared (#10325) 2023-12-31 00:37:37 +00:00
bevy_scene Reorder impl to be the same as the trait (#11076) 2023-12-24 17:43:55 +00:00
bevy_sprite Remove unnecessary parens (#11075) 2023-12-24 17:43:01 +00:00
bevy_tasks Update winit dependency to 0.29 (#10702) 2023-12-21 07:40:47 +00:00
bevy_text Replace deprecated elements (#10999) 2023-12-16 23:24:49 +00:00
bevy_time Update winit dependency to 0.29 (#10702) 2023-12-21 07:40:47 +00:00
bevy_transform Reorder impl to be the same as the trait (#11076) 2023-12-24 17:43:55 +00:00
bevy_ui Keep track of when a texture is first cleared (#10325) 2023-12-31 00:37:37 +00:00
bevy_utils Fix ci xvfb (#11143) 2023-12-30 09:07:31 +00:00
bevy_window Remove CanvasParentResizePlugin (#11057) 2023-12-21 20:01:22 +00:00
bevy_winit Use WindowBuilder::with_append() to append canvas (#11065) 2023-12-24 17:44:50 +00:00