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

◆ during()

template<typename T , typename... Ts>
template<typename... Ds>
tween< T, Ts... > & during ( Ds... ds)

Specifies the easing function for the last added point, accepting an enumeration.

This will specify the easing between the last tween point added by to and its previous step. You can use a value from the tweeny::easing::enumerated enum. You can then have an enumeration of your own poiting to this enumerated enums, or use it directly. You can mix-and-match enumerated easings, functions and easing names.

Example:

auto tween1 = tweeny::from(0).to(100).via(tweeny::easing::enumerated::linear);
auto tween2 = tweeny::from(0.0f, 100.0f).to(100.0f, 0.0f).via(tweeny::easing::linear, "backOut");
@param fs The functions
@returns *this
/
template<typename... Fs> tween<T, Ts...> & via(easing::enumerated enumerated, Fs... fs);
template<typename... Fs> tween<T, Ts...> & via(const std::string & easing, Fs... fs);
template<typename... Fs> tween<T, Ts...> & via(const char * easing, Fs... fs);
template<typename... Fs> tween<T, Ts...> & via(int index, Fs... fs);
enumerated
Enumerates all easings to aid in runtime when adding easins to a tween using tween::via.
Definition easing.h:138
The easing class holds all the bundled easings.
Definition easing.h:130
tween< T, Ts... > & via(Fs... fs)
Specifies the easing function for the last added point.
The tween class is the core class of tweeny. It controls the interpolation steps, easings and duratio...
Definition tweentraits.h:37
tween< Ts... > from(Ts... vs)
Creates a tween starting from the values defined in the arguments.
Parameters
dsDuration values
Returns
*this