Animation
animateTo():
I2Djs provides easy syntax to perform animation transitions of one or more elements from the current state to the target state in a given duration(ms).
Duration [optional] - The number of milliseconds animation takes place to complete. The default is 0.
Ease [optional] - The rate of the animation's change over time. Accepts the predefined values - 'easeOutQuad', 'easeInQuad', 'easeInOutQuad', 'easeInCubic', 'easeOutCubic', 'easeInOutCubic', 'easeInSin', 'easeOutSin', 'easeInOutSin' 'bounce', 'linear', 'elastic' and custom. Defaults to 'linear'.
Loop [optional] - The Number of times animation to be performed. Defaults to 1.
Direction [optional] - Animation direction can be controlled based on the following values - 'normal' (forward) , 'reverse' (backward) and 'alternate' (direction changes after every iteration)
attr [optional] - target attributes. Every attribute will be animated from the current state to the specified state in the specified duration. Object with attribute (key, value) pairs.
Style [optional] - The object to specify the target state of the Style properties. Every style property will be animated from the current state to the specified state in the specified duration. Object with attribute (key, value) pairs.
end [optional] - The specified function will be called on completion of the animation.
.animatePathTo()
API to perform Path Animations.
Examples: Path Animato
.morphTo()
I2Djs provides a special API to perform Path Morphing. This API is specific to the Path element. It accepts target 'd' attribute value.
Examples: Path Morph Animator
#.interrupt()
It interrupts the transition on the context node. Used in case if we need to kill the animation on a specific node. It's a method on Node as well as NodeCollection.
Last updated