Announcing Tweeny, an interpolation library


I am sending this to let you know about a new library called Tweeny. Its
purpose is to provide tweening of values (i.e, interpolation between two
values), to aid in animations of screen objects.

Tweening is commonly used when animating user interfaces to make them feel
natural and neat. Things like fading in, size and rotation changes and many
other effects are produced using some sort of tweening (start noticing how
the UI of many AAA games are animated and you’ll see).

Tweeny can also be used to create sprite animations with multi points and
values: you can use the same tween to animate sets of values that can even
be of different types (for instance, control sprite frame, position and
rotation in the same tween).

This is a little example:

auto tween = tweeny::from(0).to(10).during(100);
tween.onStep([](int frame) { sprite.frame = frame; return false; });
while (tween.progress() < 1.0f) { tween.step(dt); }

See the examples folder in source for more samples.

Tweeny is a header-only library, which makes it easy to use. Just point
your include path to it and #include “tweeny.h”.


Feedback is very much welcome. I hope this is useful to you.

Thanks for your attention!