Hi Forum!
I've built
Tweeny, a header-only tweening library for modern C++ (C++11). It uses method chaining for defining tweens, it makes tween creation very semantic, e.g:
auto tween = tweeny::from(0).to(100);
It also supports heterogeneous tweens (with multiple values of different types):
auto tween = tweeny::from(0, 'a').to(100, 'z');
You can have multiple tween points and different easings and durations for each of them:
auto backOutTween = tweeny::from(0).to(100).via(tweeny::easing::backOut);
auto multiPointTween = tweeny::from(0).to(100).during(100).to(500).during(200);
And you can step, seek or jump tweens:
int val1 = tween.step(0.1f); // step by 10%
int val2 = tween.step(1); // step by '1' duration
std::tuple<int, float> values = tween.seek(0.5f); // seek to a middle of a int/float tween
It has callbacks for stepping and seeking (which can be lambdas):
tween.onStep([](int v) { printf("value now: %d\n", v); return false; });
It has many more examples and a
manual.
I hope you find it useful! Comments or any kind of feedback on it would be very important to me.
Thanks!