Skip to content

Latest commit

 

History

History
63 lines (47 loc) · 2.27 KB

API.md

File metadata and controls

63 lines (47 loc) · 2.27 KB

Print ⇐ Animation

Animation that simulates text typing.

Kind: global class
Extends: Animation
Since: 1.0.0

new Print(options)

Creates Print animation instance.

Param Type Description
options Object Options object

Example

Print.create({
  duration: 5000
}).animate(someShapeInstance);

print.animate(shape) ⇒ Promise

Main method that calls when shape need to be animated.

Kind: instance method of Print
Fulfil: Shape When animation is done, fulfils with the Shape instance

Param Type
shape Shape

print.animateProperty(options) ⇒ Promise

Helper method that animates property in object. On each animation tick it calls onTick method with shape, property and newValue arguments.

Kind: instance method of Print
Returns: Promise - Returns Promise, that fulfills with shape instance which has been animated
Fulfil: Shape When animation is done, fulfils Shape instance

Param Type Description
options Object Options object
options.shape Object Shape where property is need to be animated
options.property String Property name that need to be animated
options.startValue String Start value for animation
options.endValue String End value for animation
[options.byValue] Number Step value for easing, by default it calculates automatically
[options.duration] Number Duration of the animation in ms, by default it takes from Animation options
[options.easing] String Easing that need to apply to animation, by default it takes from Animation options