veins - a weird visual toy



I call this particular bit of code "veins" because it ... sorta looks like veins.
Put less creepily, it's a bit like an old Windows screensaver (the one with all the random tubes) crossed with a Jackson Pollock painting. But less elegant.

It's a pretty simple toy - I just get the pixel color of wherever the user is clicking, then I send our four "pix" objects that carry that color in random directions, creating random lines at 90-degree angles to each other. It's kind of neat on its own, but clicking many times in a single location / holding the mouse button down also creates an interesting corruption-style effect, or a wavelike effect if the mouse is dragged.

For performance considerations, I stop the "pix" objects after 500 steps, so I can rapidly click/hold the mouse button down without bogging down the browser.

https://github.com/b-bolles/veins

Comments

Popular posts from this blog

Stupid Triangle Thing

Squeezy Circle