Skip to content

Latest commit

 

History

History
68 lines (48 loc) · 1.86 KB

API.md

File metadata and controls

68 lines (48 loc) · 1.86 KB

Slide ⇐ Animation

Animation that animates sliding of the shapes.

Kind: global class
Extends: Animation
Since: 1.0.0

new Slide([options])

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);

slide.getDirection() ⇒ String

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

slide.animate(shape) ⇒ Promise

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

slide.toObject() ⇒ Object

Serializes animation to Object representation.

Kind: instance method of Slide