This little canvas demo grew from a random thought: I wonder how simple it would be to draw a crystal lattice in canvas? The key is I’m too lazy to look up any sort of mathematical property/formulae/anything at all that might help me understand how this stuff works. Instead, I guessed and eyeballed it. This is the result.
This is a little hypnotic: pristine white snowflakes drift across the screen, floating on invisible air currents. It’s easy to change the number of snowflakes, it doesn’t care about your screen size, and it runs smoothly at 60 frames per second.
I saw this really cool animated wallpaper on an Android device a while back. I was a little envious, and it got me thinking: I wonder if I could build something like that in canvas? Turns out, it’s not too tough!
Roughly 60 lines of JavasScript to create 200 beautiful particles. The result is something more than a little hypnotic. I love restarting it over and over again to see what different colors I end up with.