LottieFiles / lottie-react

lottie web player as a react component
https://lottiefiles.com
MIT License
725 stars 80 forks source link

Add loop event/bugfix complete event #25

Closed hieu-lai closed 3 years ago

hieu-lai commented 3 years ago

Reference Issue / PR

None

What does this implement/fix? Explain your changes.

I've added the loop event which will get triggered when the animation loops. I also noticed that if loop=false, the animation would reset back to frame 0. I think it should remain on the final frame otherwise, we're technically looping it. Thus, I've removed setting the seek back to 0 on complete.

Any other comments?

No