SHOWCASE / TEXTURES
Give particles a surface.
Chrome, ink, neon, and glass. Explore how every surface catches the light.
LIVE FORMATION
Move through the swarm. Watch the reflections follow the light.
40 OBJECTS / CHROME
THE DEFINITION
One surface. A different feeling.
The object defines the silhouette. Its material defines how the surface reflects, glows, or bends light.
Copy this definition into your React app. The default dot renderer stays available when particle is omitted.
import { DotSwarm, type ParticleObject } from "dots-swarm";
const particle: ParticleObject = {
"size": 48,
"variation": 0.12,
"seed": 7,
"rotation": {
"mode": "fixed",
"speed": 18
},
"material": {
"kind": "metal",
"roughness": 0.15,
"chromatic": 0.35,
"flow": 0.7,
"light": -35,
"intensity": 1
},
"kind": "shape",
"shape": "square"
};
export function ParticleStudy() {
return <DotSwarm
shape="cloud"
count={40}
color="#eff6ff"
particle={particle}
interactive={true}
style={{ height: 520 }}
/>;
}