Interpolate

Home

Interpolate is a static class that provides a way to interpolate between a range of values with different easing functions.

Constants

Interpolate.EASE = 0 The non-explicit value used to represent the ease-in-out interpolation function.
Interpolate.EASE_IN = 1 The non-explicit value used to represent the ease-in interpolation function.
Interpolate.EASE_OUT = 2 The non-explicit value used to represent the ease-out interpolation function.
Interpolate.LINEAR = 3 The non-explicit value used to represent the linear interpolation function.

Static Functions

Interpolate.range(t: number, start: number, end: number, type?: number): number Returns a value within the range [start, end] relative to the value of t and the type of function requested. t should be within the range [0, 1] and type should be one of the following: (Interpolate.EASE, Interpolate.EASE_IN, Interpolate.EASE_OUT, Interpolate.LINEAR). If type is not provided, Interpolate.LINEAR is used. Note: if the value of t is less than 0, the value of start will be returned. Similarly, if the value of t is greater than 0, the value of end will be returned.

Home

Copyright © 2020 Trevor Richard