As a Roblox developer, it is currently inconvenient to calculate custom animations to match a playing tween, especially with non-linear interpolation.
A simple API addition, a
:ToAlpha function on the
TweenInfo userdata object would make it really convenient to calculate the alpha position of a tween after some elapsed time, without having to write custom lerp functions to match the interpolation style from a tween.
This would take in a number (the amount of time elapsed since a tween using this TweenInfo is played), and return a number between 0 and 1 (the alpha, starting at 0, of this tween)
- Animating discrete-changing values (like the Enabled property on objects, introducing objects half-way into an animation, etc.)
- Animating anything in general outside of TweenService, without having to hardcode the method by which you are interpolating a custom non-tweened animation. An example would be a state machine bound to RenderStep/Heartbeat, which renders out an interpolated animation.
This also simplifies interpolation math in general without complicated code, and allow easily changing a non-TweenService animation by changing the TweenInfo used. Think of it like the convenient functions on the CFrame or Vector3 userdata objects; these aren’t 100% necessary for an adept scripter, but add a lot of quality of life in terms of manipulating linear algebra math.