Sync animation with cursor horizontal movement

To progress the animation as you move the cursor horizontally either on the Lottie or on a given container, you may use the "cursor" mode. This will make the Lottie interactivity based on the cursors movement. 
<script>
LottieInteractivity.create({
    player: '#firstLottie',
    mode: 'cursor',
    actions: [
        {
            position: { x: [0, 1], y: [-1, 2] },
            type: 'seek',
            frames: [0, 280],
        }
    ]
});
</script>
          



Updated

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request

Comments

0 comments

Article is closed for comments.