Support running an animation N times (#19)
Remove `TweeningType` and split its functionalities between a new `RepeatCount` controlling the number of repeats of an animation on one hand, and `RepeatStrategy` controlling the way an animation restarts after a loop ended on the other hand. This allows more granular control on the type of playback. Remove the `tweening_type` parameter from `Tween<T>::new()` and replace it with builder methods `with_repeat_count()` and `with_repeat_strategy()`. Remove `is_looping()` from all tweenables, which was not implemented for most of them anyway.
Showing
- CHANGELOG.md 14 additions, 6 deletionsCHANGELOG.md
- examples/colormaterial_color.rs 3 additions, 2 deletionsexamples/colormaterial_color.rs
- examples/menu.rs 0 additions, 1 deletionexamples/menu.rs
- examples/sequence.rs 27 additions, 16 deletionsexamples/sequence.rs
- examples/sprite_color.rs 3 additions, 2 deletionsexamples/sprite_color.rs
- examples/text_color.rs 3 additions, 2 deletionsexamples/text_color.rs
- examples/transform_rotation.rs 3 additions, 2 deletionsexamples/transform_rotation.rs
- examples/transform_translation.rs 3 additions, 2 deletionsexamples/transform_translation.rs
- examples/ui_position.rs 3 additions, 2 deletionsexamples/ui_position.rs
- src/lib.rs 57 additions, 55 deletionssrc/lib.rs
- src/tweenable.rs 176 additions, 162 deletionssrc/tweenable.rs
Loading