KyryloKuzyk/PrimeTween

[Feature Request] Expose access to `StandardEasing.Evaluate`

Closed this issue · 3 comments

noio commented

Sometimes I'm doing some manual easing, and it would be great if I could recycle the ease functions from PrimeTween (instead of having to copy or install another library with the same easing functions)

I.e. if I could call var progress = StandardEasing.Evaluate(t, Ease.InOutQuad) and use the results in my code.

Hey! This feature is available, but it’s currently experimental. Please see this answer: https://forum.unity.com/posts/9644069/

Can you please show an example where you need this feature?

noio commented

Wow thanks for the quick reply!

Sometimes I'm manually managing some kind of tweening, often when it's in parallel to something else. I'd be tracking the time value anyways (e.g in Update), and want to just quickly smooth out some motion.

Often I've included something like this: https://gist.github.com/Fonserbc/3d31a25e87fdaa541ddf

But actually in this case I've just replaced it with running a Tween.Custom() in parallel, which works fine too.

Lastly just wanted to compliment you on the great library! Love the API, really well built.

Huge thanks for kind words!

But actually in this case I've just replaced it with running a Tween.Custom() in parallel, which works fine too.

Yeah, exactly my thoughts. In the majority of cases, Tween.Custom() can be used instead of Easing.Evaluate(). This is the reason why Easing.Evaluate() is currently experimental.