JS1k entry: Magic Hat

I participated in the JS1k 2017 contest: the goal was to fit an interactive Web sketch inside 1024 bytes of Javascript. This is my entry: http://js1k.com/2017-magic/demo/2827. It was a fun challenge, echoing the old days of limited computer graphics and demoscene contests.

In the sketch, the animated magic hat with tiny rabbit feet slowly runs away from the mouse cursor. To animate the legs and feet I used generative walk cycle logic from earlier code experiments, although of course it took a lot of work to fit it all in three paragraphs’ worth of code.