Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411595 Posts in 69386 Topics- by 58445 Members - Latest Member: YomiKu_0

May 07, 2024, 07:35:21 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)Tweeny: A modern C++ inbetweening library. Comments?
Pages: [1]
Print
Author Topic: Tweeny: A modern C++ inbetweening library. Comments?  (Read 792 times)
mobius3
TIGBaby
*


View Profile
« on: January 09, 2017, 06:36:02 PM »

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:

Code:
auto tween = tweeny::from(0).to(100);

It also supports heterogeneous tweens (with multiple values of different types):

Code:
auto tween = tweeny::from(0, 'a').to(100, 'z');

You can have multiple tween points and different easings and durations for each of them:

Code:
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:

Code:
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):

Code:
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!
Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic