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.

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.

More optionsFewer options

Color

One color, by speed, or slowly shifting colors.

Each particle leaves a fading streak.

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.

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 GitHub

What it is

The full explanation is in README.md.

Good for

  • Hero effects
  • Data art
  • Launch pages

Avoid on

  • Behind text
  • Low-power devices