Flexible tweening plugin for Bevy.
The main motivation or goal for this tweening crate is that the previous existing tweening crates is not flexible enough. The differences will be explained below.
Differences to bevy_tweening
or bevy_easings
:
- Tweening is not tied to a certain entity. You can create an entity specifically for tweening any where in the world.
- Complex animation, such as sequential or parallel tweening, are solved using
child-parent hierarchy:
- Solved the issue of modifying animation at runtime presents in the previous crates.
- Everything exists in the ECS world with no hidden structure, everything can be freely accessed.
- Makes a very extendable system, thanks Bevy's ECS!
- User of this crate are free to decide if they want to only use generic, only trait object, or even both for tweening! They both came with their pros and cons which will be explained in the documentation.
"span_tween"
, enabled by default.
Tween for a range of time."bevy_asset"
, enabled by default.
enable"bevy/bevy_asset"
, add tweening systems for asset."bevy_render"
, enabled by default.
enable"bevy/bevy_render"
, add nothing but required by the"bevy_sprite"
feature."bevy_sprite"
, enabled by default.
enable"bevy/bevy_sprite"
, add some built-in interpolator related to sprite.
cargo run --example demo_follow -F bevy/bevy_winit
cargo run --example demo_click -F bevy/bevy_winit
cargo run --example demo_hold -F bevy/bevy_winit
bevy |
bevy_tween |
---|---|
0.13 | 0.2 |
-
The first crate I discovered and tried to do tweening with in Bevy. I like the idea of
Lens
of theirs. I've renamed this toInterpolator
in this crate. -
Godot's tween make it simple to animate something which is part of the idea for this crate. The Godot's node child-parent hierarchy system and that the engine utilizes this to define behavior, powerful stuff!
Licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.