bevy/examples/animation
RobWalt aa8793f6b4
Add ways to configure EasingFunction::Steps via new StepConfig (#17752)
# Objective

- In #17743, attention was raised to the fact that we supported an
unusual kind of step easing function. The author of the fix kindly
provided some links to standards used in CSS. It would be desirable to
support generally agreed upon standards so this PR here tries to
implement an extra configuration option of the step easing function
- Resolve #17744

## Solution

- Introduce `StepConfig`
- `StepConfig` can configure both the number of steps and the jumping
behavior of the function
- `StepConfig` replaces the raw `usize` parameter of the
`EasingFunction::Steps(usize)` construct.
- `StepConfig`s default jumping behavior is `end`, so in that way it
follows #17743

## Testing

- I added a new test per `JumpAt` jumping behavior. These tests
replicate the visuals that can be found at
https://developer.mozilla.org/en-US/docs/Web/CSS/easing-function/steps#description

## Migration Guide

- `EasingFunction::Steps` now uses a `StepConfig` instead of a raw
`usize`. You can replicate the previous behavior by replaceing
`EasingFunction::Steps(10)` with
`EasingFunction::Steps(StepConfig::new(10))`.

---------

Co-authored-by: François Mockers <francois.mockers@vleue.com>
Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
2025-02-11 22:19:01 +00:00
..
animated_mesh_control.rs Rename animated fox examples to better communicate their purpose (#17239) 2025-01-08 18:59:17 +00:00
animated_mesh_events.rs Rename animated fox examples to better communicate their purpose (#17239) 2025-01-08 18:59:17 +00:00
animated_mesh.rs Make the animated_mesh example more intuitive (#17421) 2025-01-20 21:12:06 +00:00
animated_transform.rs Introduce support for mixed lighting by allowing lights to opt out of contributing diffuse light to lightmapped objects. (#16761) 2024-12-16 23:48:33 +00:00
animated_ui.rs Relationships (non-fragmenting, one-to-many) (#17398) 2025-01-18 22:20:30 +00:00
animation_events.rs AnimationEvent -> Event and other improvements (#16440) 2024-11-22 00:16:04 +00:00
animation_graph.rs Introduce support for mixed lighting by allowing lights to opt out of contributing diffuse light to lightmapped objects. (#16761) 2024-12-16 23:48:33 +00:00
animation_masks.rs Relationships (non-fragmenting, one-to-many) (#17398) 2025-01-18 22:20:30 +00:00
color_animation.rs ✏️ Fix typos across bevy (#16702) 2024-12-08 01:18:39 +00:00
custom_skinned_mesh.rs Fix a few typos (#17292) 2025-01-10 22:48:30 +00:00
eased_motion.rs AnimatedField and Rework Evaluators (#16484) 2024-11-27 22:19:55 +00:00
easing_functions.rs Add ways to configure EasingFunction::Steps via new StepConfig (#17752) 2025-02-11 22:19:01 +00:00
gltf_skinned_mesh.rs Parent -> ChildOf (#17427) 2025-01-20 22:13:29 +00:00
morph_targets.rs Fix println in morph_targets example (#15851) 2024-10-11 15:35:22 +00:00