Scroll effect with offset and segment looping

In cases where you would like the animation to loop from a specific frame to a specific frame, you can add an additional object to actions in which you can specify the frames. 

<script>
LottieInteractivity.create({
    player: "#firstLottie",
    mode:"scroll",
    actions: [
        {
            visibility:[0, 0.2],
            type: "stop",
            frames: [0]
        },
        {
            visibility:[0.2,0.45],
            type: "seek",
            frames: [0, 45]
        },
        {
            visibility:[0.45,1.0],
            type: "loop",
            frames: [45, 60]
        }
    ]
});
</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.