06.13 · 3D & Advanced
GPGPU Particle System
Tens of thousands of particles flow on the graphics chip. Best for hero effects.
Watch it
It moves by itself. Pause it to look closely, or turn on slow motion to see each part of the movement.
Inside, every particle lives as one pixel of the small square, its place stored as a color. The graphics chip moves them all at once, each the way the arrows point.
About 4,000 and 65,000 follow the same rule at the same speed; only the count differs. The graphics chip moves every particle at once, so even the bigger count stays smooth.
Try it
Change a setting and see the difference as it moves.
Movement
The rule every particle follows.
Number of particles
Phones start with 16,000; more can be slow there.
Speed
How hard the rule pushes the particles.
Copy the prompt
Paste it into an AI assistant such as ChatGPT, Claude or Cursor to build this in your own project.
Add a GPU particle system to [the section you want it in]. Keep every particle's position and speed in a floating-point texture, one pixel per particle, and move them all at once in a shader that reads one texture and writes the other, swapping them after each pass, one pass per 60th of a second so it runs at the same speed on every screen. Then draw each particle as a tiny point, following a flowing field, a swirl, a pull to the middle or an orbit. That keeps tens of thousands of particles smooth. Start with far fewer on phones, and show a clear message where WebGL 2 is missing. If the visitor has reduced motion turned on, show one still frame. Match the settings listed below.
Your settings
Replace the words in brackets with your own element. Your settings are added at the end.
Free and open source. If this helped, a star on GitHub helps other people find it.
Star on GitHubWhat it is
The full explanation is in README.md.