Animation that simulates text typing.
Kind: global class
Extends: Animation
Since: 1.0.0
- Print ⇐
Animation
- new Print(options)
- .animate(shape) ⇒
Promise
- .animateProperty(options) ⇒
Promise
Creates Print animation instance.
Param | Type | Description |
---|---|---|
options | Object |
Options object |
Example
Print.create({
duration: 5000
}).animate(someShapeInstance);
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 |
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 |