mobius3 / tweeny

A modern C++ tweening library
http://mobius3.github.io/tweeny
MIT License
742 stars 53 forks source link

multiple enumeration support #33

Open GeTechG opened 2 years ago

GeTechG commented 2 years ago

I would like to set everything via enumeration, but alas it can only be done with the first parameter.

auto tween = tweeny::from(0.f, 0.f).to(1.f, 1.f).during(5000).via(tweeny::easing::enumerated::backIn, tweeny::easing::enumerated::bounceIn);

I get an error

tweeny.h(1016,23): error C2679: binary '=': no operator found which takes a right-hand operand of type 'F1' (or there is no acceptable conversion)
1>        with
1>        [
1>            F1=tweeny::easing::enumerated
1>        ]
mobius3 commented 2 years ago

I'm aware of this problem, just hadn't the time to fix this (and others) yet. Thanks for the issue.

wumiliu commented 1 year ago

Can the following methods be used?
auto tween = tweeny::from(0.f, 0.f).to(1.f, 1.f).during(5000). via(tweeny::easing::backIn, tweeny::easing::bounceIn);