return to index

Constellations Effect

I've seen this effect a few times on websites that want to appear high-tech. I don't know the real name for it, so I call it "constellations" as it looks like stars connected to form abstract shapes. For a better impression open the demo in full screen view.

My first attempt at replicating it was quite innefficient, (although I did use techniquies such as keeping the stars in a grid that limited the number of neighbouring stars they had to each loop through) so over time I made a few improvements and learnt a few quirks of Canvas 2d drawing along the way:

Of course, all of these changes are rather inconsequential against what could be the biggest improvement: rewriting the rendering to use webGL instead of canvas operations. At the moment, however, I'm happy to let it stay as it is.