I had hand-done mine on https://kurnell.ai - its really cool to see that I could have computationally done this instead :)
I used rive.app to encode the frames and create a state machine to move between the states. Perhaps I can simplify this even more.