Interpolation
The interpolator registry, keyed by value type. Linear interpolation ships for number, Vector2,
Vector3, CFrame, Color3, UDim, UDim2, NumberRange, and Rect. Any other type is stepped: the
earlier keyframe's value holds until the next keyframe.
A custom value type registers its interpolator here:
Flow.Interpolation.Register("NumberSequence", function(a, b, alpha)
-- ...
end)
Types
Interpolator
type Interpolator = (a: any,b: any,alpha: number) → any
Returns the value alpha of the way from a to b. alpha is usually 0-1, but an overshooting keyframe
curve can pass values outside that range.
Functions
Register
Registers the interpolator for a typeof name, replacing any existing one.
Get
RegisterComponents
Interpolation.RegisterComponents(typeName: string,components: {string},blend: (a: any,b: any,alphas: {[string]: number}) → any) → ()
Registers a blender that takes a separate alpha per named component, so a keyframe curve can address
each component on its own. components lists them in display order.
GetComponentBlender
Interpolation.GetComponentBlender(typeName: string) → ComponentBlender?Returns the component blender registered for typeName, if any.
IsInterpolatable
Interpolation.IsInterpolatable(value: any) → booleanWhether value's type has a registered interpolator.
Interpolate
Interpolation.Interpolate(a: any,b: any,alpha: number) → any
Interpolates between two values. Types without a registered interpolator are stepped: a holds until
alpha reaches 1.