Multirious / bevy_tween

Flexible tweening plugin library for Bevy.
Apache License 2.0
87 stars 2 forks source link
animation animator bevy bevy-plugin rust tween tweener tweening tweening-library

Crates.io Version Crates.io License Docs.rs

bevy_tween

Bevy procedural and keyframe animation library.

This is a young plugin and APIs are to be fleshed out. Breaking changes are to be expected!

See changelog here.

Features

See demos

Goals:

Differences and how it works

This crate chose a different approach to storing tween data/input to solve flexibility issues present in bevy_tweening or bevy_easings, like difficulty tweening in parallel or sequence of multiple types.

This approach offers:

How it works:

  1. By building on top of bevy_time_runner, an animator is a tree of entities.
  2. The parent is TimeRunner. This entity handles all the timing and progress of its children.
  3. The children can be any combination of any components, such as tweens by this crate.
  4. Systems are then run in a pipeline, communicating through various dependency-injected components.

Feature gates

Bevy Version Support

bevy bevy_tween
0.14 0.6
0.13 0.2–0.5

Credits

Contributions

Contributions are welcome!

License

Licensed under either of

at your option.

Your contributions

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Demos

cargo run --example follow -F bevy/bevy_winit
A square will follow your circle with configurable animation.

https://github.com/Multirious/bevy_tween/assets/77918086/d582c2de-0f54-4b22-be03-e3bff3348deb


cargo run --example click -F bevy/bevy_winit
Click left to spawn a circle. Hold right click to repetitively spawn a circle every frame.

https://github.com/Multirious/bevy_tween/assets/77918086/fd0fe9d3-13a2-4261-880c-cc2609b875ba


cargo run --example hold -F bevy/bevy_winit
Hold left click to increase the effect intensitiy.

https://github.com/Multirious/bevy_tween/assets/77918086/33a297a6-19f2-4146-a906-1a88ff037ab3


cargo run --example event -F bevy/bevy_winit
Showcasing the tween event feature.

https://github.com/Multirious/bevy_tween/assets/77918086/9507c467-6428-4aed-bd00-511f05e6e951


cargo run --example sprite_sheet -F bevy/bevy_winit
Sprite Sheet animation.

https://github.com/Multirious/bevy_tween/assets/77918086/e3997b06-38e6-4add-85f5-a885b69c6687