Module easer
An object for modifying values over time.
An Easer starts advancing through time on the frame following its creation.
Easer extends BoundObject
Properties
| value | A value from 0 to 1 indicating the progress of the Easer,
with the easing curve applied. |
| time_scale | Coefficient of how the advance of time affects the progress of
the Easer. |
Class Methods
| Easer:new (length_ms) | Create a new Easer |
Hooks
| update (self) | Called every frame after value has updated. |
| finish (self) | Called when the Easer has completed. |
Properties
Properties. Significant fields on an instance.- value
-
A value from
0to1indicating the progress of theEaser, with the easing curve applied. - time_scale
-
Coefficient of how the advance of time affects the progress of
the
Easer.Default is
1
Class Methods
Class Methods. Must be called onClass, with a capital leading character.
e.g. Class:method("foo")
- Easer:new (length_ms)
-
Create a new
EaserParameters:
- length_ms
number
Duration of the
Easerin milliseconds.
- length_ms
number
Duration of the
Hooks
Hooks. Callbacks implemented in subclasses to customize behavior. Hooks are called on individual instances.- update (self)
-
Called every frame after value has updated.
Parameters:
- self
Easer
The
Easerinstance
- self
Easer
The
- finish (self)
-
Called when the
Easerhas completed.Parameters:
- self
Easer
The
Easerinstance
- self
Easer
The