Expose the algorithms for easing styles

Right now if I want to make something move in the same way as an engine-level tween or animation, I have to actually run one in order to extract the result of the easing style in real time. This is obviously stupid. There should be a page on the wiki that describes the algorithms used by easing styles.


Could you provide some examples of what you are trying to do?

If you don’t want to create a tween you can use GetValue to calculate the value of a given easing function at some point in time.

1 Like

I specifically don’t want GetValue because the Lua-C interop is way, way, way slower than just multiplying some numbers in pure lua.

A major use case is tweening tables. If I want to tween a value in a table I have to use a lua algorithm.

Another major use case is running a custom animation processor. Roblox animations aren’t sophisticated enough for a lot of uses - they have no IK, only a few global layering modes, a global blending multiplier. If I want to make really high-quality, dynamic animations then I need to process the keyframesequence manually, which I need easing styles to do.

Edit: Just did a test with Cubic; GetValue is about 0.1x the speed of just multiplying. Also, running a tween/animation and then reading its properties is faster than GetValue, which is why I used that as the example of a bad pattern in the OP.