![]() |
Lysa
0.0
Lysa 3D Engine
|
Global Tween registry and factory.
Public Member Functions | |
| virtual | ~Tweens () |
| void | cleanup () |
| std::shared_ptr< Tween > | registerTween (const std::shared_ptr< Tween > &tween) |
| std::shared_ptr< TweenSequence > | sequence (std::vector< std::shared_ptr< Tween >> tweens, const Tween::Callback &callback=nullptr) |
| template<typename T , typename O > | |
| std::shared_ptr< Tween > | property (O *obj, void (O::*set)(const T &), T initial, T final, const float duration, const TransitionType ttype=TransitionType::LINEAR, const Tween::Callback &callback=nullptr) |
| void | update (double deltaTime) |
|
virtual |
Kills every Tween still registered.
| void cleanup | ( | ) |
|
inline |
Creates a PropertyTween that interpolates a property on an Object, registers it, and returns it. The target object must outlive the Tween.
| obj | The target object. |
| set | Member setter to call on the target object. |
| initial | Starting value applied at time 0. |
| final | Target value reached at the end of the duration. |
| duration | Animation duration in seconds (must be > 0). |
| ttype | Interpolation curve to use (default: LINEAR). |
| callback | Optional function invoked when the Tween completes. |
Registers a Tween for automatic update each physics ticks
| std::shared_ptr<TweenSequence> sequence | ( | std::vector< std::shared_ptr< Tween >> | tweens, |
| const Tween::Callback & | callback = nullptr |
||
| ) |
Creates a TweenSequence, registers it, and returns it.
| void update | ( | double | deltaTime | ) |
Advances all registered Tweens and removes completed ones.