Class · aurore
aurore::Animatable
On this page
#include <aurore/core/animation.hpp>
class aurore::Animatable : public aurore::FiniteTickingConstructors 1
Creates an animatable with the given initial value.
animation.hpp:47Functions 9
Returns the current animatable value.
animation.hpp:52Stops and resets the animation, going back to the given initial value. All steps are removed. If an animation was already ongoing for that animatable, its end callback will be called.
animation.hpp:60Stops and resets the animation. The value will stay where it's at. All steps are removed. If an animation was already ongoing for that animatable, its end callback will be called.
animation.hpp:68void addStep( float targetValue,int32_t duration,EasingFunction easing = EasingFunction::linear)Adds an animation step to the target value, lasting the specified duration in milliseconds.
An animation can have multiple steps. Target value can be greater and lower than the previous step (it can go forwards or backwards). Easing function is optional, default is EasingFunction::linear.
Duration is int32_t due to internal limitations, so a step cannot last for longer than 2 147 483 647ms. The sum of the duration of all steps cannot exceed 71582min.
animation.hpp:79Returns the progress of the animation between 0.0f and 1.0f.
animation.hpp:84Also the functions of aurore::FiniteTicking (2), aurore::Ticking (5).
Protected functions 3
virtual bool onUpdate(Time delta) override Executed every frame while the ticking lives. Delta is the time difference in ms between the last frame and the current one. Must return false if the ticking is finished and should be removed from the list of active tickings. The end callback will automatically be called then.
Overrides aurore::Ticking::onUpdate
Read from Aurore's headers by Doxygen at each build · library/include