Butterflies - Place butterflies and see them fly

A small web toy about placing butterflies on screen and watching them fly.

After discovering worm on f-droid and showing it around, I received a suggestion to do the same thing but to draw butterflies instead of worms.

That's now a thing; you can simply open butterflies.lecaro.me on any device, tap once to go fullscreen, then start drawing butterflies.

The source code of the app is available by simply doing a right click/view source, as there's no build step involved in this tiny project.

I reused some of the tricks used in B71 to get good performance on mobile. The app loads a sprite sheet of 9 butterflies species, just one half of each insect. Then for each orientation, species, and animation frame, a cached canvas is generated on first use.

This means the first render is a bit laggier, but it is usually not noticeable, and the next render of the same combination is nearly instant.