Skip to content
MotionLab

Particle Swirl

60k GPU particles swirl in a galaxy; click to blast them outward by depth.

★ showcaseR3FGLSL

How it works

All motion happens in the vertex shader from uTime; the click “blast” is a single uniform animated with a spring-like decay.

Performance

Renders through the single shared <Canvas> via drei <View> — no extra WebGL context, and the render loop only runs while a view is mounted. Zero per-particle CPU work. Count drops to 15k on low tier.

Accessibility & reduced motion

In reduced mode the scene renders on demand only: a static, fully lit frame with no idle motion.

Playgroundshader
Export
uniform float uSpeed; // 0.6
uniform float uSpread; // 1
uniform float uSize; // 4
uniform vec3 uColorA; // #ff6ec7
uniform vec3 uColorB; // #5b8cff