Loading...
Searching...
No Matches
Tweeny

Tweeny is an inbetweening library designed for the creation of complex animations for games and other beautiful interactive software. It leverages features of modern C++ to empower developers with an intuitive API for declaring tweenings of any type of value, as long as they support arithmetic operations.

This document contains Tweeny's API reference. The most interesting parts are:

- The Fine Tweeny Manual
- The tweeny::from global function, to start a new tween.
- The tweeny::tween class itself, that has all the interesting methods for a tween.
- The modules page has a list of type of easings.

This is how the API looks like:

#include "tweeny.h"
using tweeny::easing;
int main() {
// steps 1% each iteration
auto tween = tweeny::from(0).to(100).during(100).via(easing::linear);
while (tween.progress() < 1.0f) tween.step(0.01f);
// a tween with multiple values
auto tween2 = tweeny::from(0, 1.0f).to(1200, 7.0f).during(1000).via(easing::backInOut, easing::linear);
// a tween with multiple points, different easings and durations
auto tween3 = tweeny::from(0, 0)
.to(100, 100).during(100).via(easing::backOut, easing::backOut)
.to(200, 200).during(500).via(easing::linear);
return 0;
}
tweeny::easing
The easing class holds all the bundled easings.
Definition easing.h:120
tweeny::from
tween< Ts... > from(Ts... vs)
Creates a tween starting from the values defined in the arguments.

Examples

- Check tweeny-demos repository to see demonstration code

Useful links and references

- Tim Groleau's easing function generator (requires flash)
- Easing cheat sheet (contains graphics!)