To loop certain segments on hover, ensure that the Lottie is already at the frame you want to start the on hover loop from (Check the javascript code to find out how). Once that's done you can use the library's "hover" action to loop the segment.
<script> LottieInteractivity.create({ player: "#firstLottie", mode:"cursor", actions: [ { position: { x: [0, 1], y: [0, 1] }, type: "loop", frames: [45, 60] }, { position: { x: -1, y: -1 }, type: 'stop', frames: [0], } ] }); </script>
Comments
0 comments
Please sign in to leave a comment.