DailyJS

JavaScript Particle System

2009-12-22 00:00:00 +0000 by Alex R. Young

After yesterday's Processing.js
article
I discovered this
post about creating a particle system with JavaScript and a canvas:
Parcycle: A Particle System with HTML5 canvas.

You can view the effect in action in this demo:
Parcycle

I found the use of
globalCompositeOperation very interesting in this code. It allowed the author to make particles
appear lighter when they overlap by using a drawing mode rather than
detecting the colour on the canvas.