Tweeny 3
A Tweening library for modern C++
Loading...
Searching...
No Matches

◆ step() [1/3]

template<typename T , typename... Ts>
const detail::tweentraits< T, Ts... >::valuesType & step ( float  dp,
bool  suppressCallbacks = false 
)

Steps the animation by the designated percentage amount.

You can use this function to step the tweening by a specified percentage delta.

Example:

// tween duration is 100ms
auto tween = tweeny::from(0).to(100).during(100);
// steps for 16ms
tween.step(0.001f);
tween< T, Ts... > & to(T t, Ts... vs)
Adds a new currentPoint in this tweening.
const detail::tweentraits< T, Ts... >::valuesType & step(int32_t dt, bool suppressCallbacks=false)
Steps the animation by the designated delta amount.
The tween class is the core class of tweeny. It controls the interpolation steps, easings and duratio...
Definition tween.h:48
tween< Ts... > from(Ts... vs)
Creates a tween starting from the values defined in the arguments.
Parameters
dpDelta percentage, between 0.0f and 1.0f
suppressCallbacks(Optional) Suppress callbacks registered with tween::onStep()
Returns
std::tuple<Ts...> with the current tween values.