Messing with Lottie for playing animations on the web. The documentation seems fairly straightforward to get going but I can't find any documentation/examples of a very basic workflow in javascript: show pre-animation state => animate => detect animation complete => show post-anim state
. Here's an example of what I'm doing with a liking system:
Unliked Post:
1: Display default state thumb graphic
2: User clicks thumb, play thumb animation
3: Animation completes, display liked state thumb graphic
Liked Post:
4: If user clicks already liked thumb...play reverse animation
5: Reverse animation complete, display default thumb graphic
Any help is much appreciated!