class
AnimatableProperty
Transitions a numeric property over a configurable duration.
This can be used while rendering canvas frames to create an animation effect.
- Properties
- value
- Methods
- constructor, abortTransition, completeTransition, setTransition, step
Properties
Methods
- constructor(initialValue, easing=LINEAR)
- Parameters:
-
-
number
initialValueinitial value (not animated)
-
(x: number) => number
easingeasing function, defaults to identity (same rate from start to finish).
-
- abortTransition()
- Return type:
void
- completeTransition()
- Return type:
void
- setTransition(time0, dst)
Applies the new transition specifications.
Each time this is called, the previous transition is replaced.
- Parameters:
-
-
undefined | number
time0 – -
number
dst –
-
- Return type:
void
- step(time)
Advance the transition with respect to the advancement in wallclock time.
- Parameters:
-
-
number
time –
-
- Return type:
boolean