Expand description
§Using The Crate
-
First, you should add
BevyTweenHelpersPlugin
, to which you can add a logging function of your choice. -
Then, register each of the following plugins for each interpolator type you wish to apply them to:
AnimationParentDestroyerGenericPlugin
- Automatically despawns animation parents if it has no children left, for example a parent with no tweens
TweenTargetRemover
- Automatically removes entities from tween targets when their
AnimationTarget
component is removed - Listens to target removal tween requests and triggers
- Combining it with
AnimationParentDestroyerGenericPlugin
results in automatic tween and parent clearing
- Automatically removes entities from tween targets when their
TweenPriorityHandler
- Handles
TweenPriorityToOthersOfType
, when tweens or parents have this component, fight against other tweens of that type. The ones with the highest priority will survive. - If you’re not sure what the previous bullet means, read
TweenPriorityToOthersOfType
’s description
- Handles
-
I also added my tween combinators, feel free to open PRs requesting to add your own!
§Example
An example for registering the plugins into your app would be:
app.add_plugins((
DefaultTweenPlugins, //from bevy_tween
BevyTweenHelpersPlugin::default(),
TweenTargetRemover::<MyGloriousInterpolator>::default(),
TweenPriorityHandler::<MyGloriousInterpolator>::default(),
AnimationParentDestroyerGenericPlugin::<MyGloriousInterpolator>::default(),
))
.add_tween_systems(component_tween_system::<MyGloriousInterpolator>()); //from bevy_tween
Modules§
- animation_
parent_ destoryer - bevy_
tween_ helpers_ plugin - custom_
combinators - macros
- prelude
- target_
extractor - tween_
priority - tween_
request - tween_
target_ remover - utilities