Well Three.js is amazing:

Just adapted the black and white shape image to this Particle Shape Tween. Which basically replaces the shape with particles.
kibotu