Animation that animates sliding of the shapes.
Kind: global class
Extends: Animation
Since: 1.0.0
- Slide ⇐
Animation- new Slide([options])
- .getDirection() ⇒
String - .setDirection(direction) ⇒
Slide - .animate(shape) ⇒
Promise - .toObject() ⇒
Object
Create Slide animation instance.
| Param | Type | Description |
|---|---|---|
| [options] | Object |
Options object |
| [options.direction] | String |
Direction of the animation |
Example
Slide.create({
direction: 'inLeft'
}).animate(someShapeInstance);Get direction of the animation.
Kind: instance method of Slide
slide.setDirection(direction) ⇒ Slide
Set new direction of the animation.
Kind: instance method of Slide
| Param | Type |
|---|---|
| direction | String |
Main method that calls when shape need to be animated.
Kind: instance method of Slide
Fulfil: Shape When animation is done, fulfils with the Shape instance
| Param | Type |
|---|---|
| shape | Shape |
Serializes animation to Object representation.
Kind: instance method of Slide