three.js - Photons: General purpose particle system by mkkellogg
Full source on GitHub