TWEEN ANIMATION
Controls
Controls a running animation.
method | description | example |
play | play a new motion or continue to play paused motion | anim.play() |
pause | pause the current motion | anim.pause() |
stop | stop the current motion | anim.stop() |
replay | stop current motion and play a new motion | anim.replay() |
CODE EXAMPLE
let anim = new TweenAnim({
keys: {
translateX: function (el, i) {
return 100 * (i + 1)
}
},
direction: 'alternate',
loop: true,
duration: 3000
}).targets('.el').play();