new Animation(options)
Name | Type | Description | ||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options | object | Animation options Properties
|
- Source
Members
ease
A variety of built in ease functions to use for animations
See easings.net for animation types. All animation types except elastic and bounce are implemented.
Name | Type | Description |
---|---|---|
ease.linear | function | |
ease.in.sine | function | |
ease.in.quadratic | function | |
ease.in.cubic | function | |
ease.in.quartic | function | |
ease.in.quintic | function | |
ease.in.exponential | function | |
ease.in.circular | function | |
ease.in.back | function | |
ease.out.sine | function | |
ease.out.quadratic | function | |
ease.out.cubic | function | |
ease.out.quartic | function | |
ease.out.quintic | function | |
ease.out.exponential | function | |
ease.out.circular | function | |
ease.out.back | function | |
ease.inOut.sine | function | |
ease.inOut.quadratic | function | |
ease.inOut.cubic | function | |
ease.inOut.quartic | function | |
ease.inOut.quintic | function | |
ease.inOut.exponential | function | |
ease.inOut.circular | function | |
ease.inOut.back | function |
- Source
Animation.ease.in.cubic // access the cubic ease in function
Methods
isRunning() → {boolean}
Gets if the animation is currently running. Running includes any delay that the animation may have.
- Source
If the animation is running
- Type:
- boolean
run() → {Promise}
Starts the animation
- Source
Resolves when the animation completes. Resolves to true if the animation finished, false if it was stopped before it finished.
- Type:
- Promise
stop()
Stops the animation before it finishes. Triggers onstop
and resolves promises to false
.
- Source