Rendering graphics is a heavy work, especially for fancy effects cases like this one, so WebGL needs to be used(for web applications). three.js and PixiJS are two famous WebGL wrappers. Let's get started The smallest unit of this effect is the particle, it should take responsibility for initializing the graphic it linked with and provide an update method to be called in application's rendering loop, use Pixi.js as an example.