If you’re interested in how this works or would like to try it out you can also checkout the blog post I wrote about the system:
https://blog.veitheller.de/Introducing_anima.html
Please note that you have to have Carp and SDL2 (including SDL_image) installed.