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.

In the sketch, the animated magic hat slowly runs away from the mouse cursor. For leg movement I used generative animation logic from some earlier experiments, although of course it took a lot of work to fit it all in three paragraphs’ worth of code.

I am happy that I participated in JS1k before the organizers announced its closure – it felt great to be featured alongside some fairly well-known programmers!