Particle OrbPro
A sphere of glowing dust simulated on the GPU with three.js TSL. Hundreds of thousands of particles swirl inside orbital rings, scatter into streaks under the cursor and drift back with real momentum.
Preview
Open the component on its own page in a new tab ↗Usage
Drop it anywhere. It fills the width it is given and keeps a square shape. The canvas is transparent, so place it over a dark background: the particles add light, and on white they disappear.
import { ParticleOrb } from "@/components/ui/particle-orb"
export function Hero() {
return (
<section className="bg-black">
<ParticleOrb className="mx-auto max-w-xl" />
</section>
)
}It runs on three.js WebGPURenderer with TSL compute shaders, and falls back to WebGL 2 in browsers
without WebGPU. Every particle keeps its own position and velocity on the GPU: a spring pulls it
home to the sphere, a noise flow stirs it, and the cursor pushes it with real momentum, so it
overshoots and settles instead of snapping back. A bloom pass gives the dust its glow.
The default of 200,000 particles is comfortable on most laptops. Lower count for small orbs or
older phones; changing it is instant, since the buffers are sized for up to 500,000.
Label
Pass label to show a small HUD callout beside the orb, with a thin leader line pointing at it,
like a project name in a portfolio scene.
<ParticleOrb label="Orbit Studio" />Color
Each particle takes one of the two colors, white and
silver by default, so the surface glitters instead of glowing flat. shine makes every particle
brighter, tightens its centre into a sharper glint and strengthens the bloom.
<ParticleOrb count={15000} colors={["#fff1d6", "#d4a85a"]} shine={1.6} turbulence={0.4} />What moves
- A flow field slides the particles across the surface in slow swirls, while the sphere breathes and ripples underneath.
- A key light from the upper left and a bright rim light up the front, while the back half falls into shadow so the orb reads as round. Each particle twinkles on its own rhythm.
- Two rings of particles orbit the orb on tilted planes in opposite directions. The half
behind it dims as it passes. Hide them with
rings={false}and those particles rejoin the sphere. - Moving the cursor churns the dust, like a hand sweeping through it. Particles are dragged
along the sweep, swirled around the cursor and kicked off in their own directions, so
neighbors separate into long streaks instead of moving as one sheet. Faster sweeps reach
further, moving particles flare to the
accentcolor, and everything drifts back into the sphere once the cursor leaves. Turn it off withinteractive={false}.
Performance
- Every particle is simulated in a compute shader, and particles out of the cursor's reach skip the cursor maths.
- Nothing is simulated or drawn while the orb is scrolled out of view.
- The pixel ratio is capped at 1.5, since hundreds of thousands of additive sprites are limited by fill rate rather than geometry.
With prefers-reduced-motion, a single still frame is drawn instead.
Props
| Prop | Type | Default | Notes |
|---|---|---|---|
count | number | 200000 | Number of particles, up to 500,000 without rebuilding. |
colors | [string, string] | ["#ffffff", "#c0c7d2"] | The two particle tones, mixed across the orb. |
shine | number | 1 | Brightness, sparkle and bloom. Higher values give sharper glints. |
label | string | — | HUD caption beside the orb, with a leader line pointing at it. |
accent | string | "#7fe9ff" | Color fast-moving particles flare to, and the color of the rings. |
rings | boolean | true | Show the two orbital rings. |
size | number | 1 | Particle size multiplier. |
speed | number | 1 | Animation speed multiplier, including the spin. |
turbulence | number | 1 | How much the surface churns. 0 is a calm sphere. |
interactive | boolean | true | Let the cursor churn the dust. |
className | string | — | Classes for the square wrapper. |