crucıble

Filings

An iron-filing field: a grid of short segments aligning to a slow magnetic-dipole field when idle and bending toward the cursor, brightening from silver to white. Original OGL fragment shader, one draw call, offscreen-paused and reduced-motion-safe.

oglfree

Installation

CLI

npx shadcn@latest add @crucible/filings

Manual — install dependencies, then copy the source

npm install ogl

Props

PropTypeDefaultDescription
colors[string, string]Two tones: [cool, warm]. cool is the resting silver of aligned filings; warm is the brighter white they glow near the cursor. Any hex string.
densitynumber22Grid density (cells across the short axis), clamped 8–40.
speednumber1Idle-field animation speed multiplier. 1 = default.
intensitynumber1Stroke brightness / glow. 1 = default.
pausedbooleanFreeze the animation, holding the current frame.
classNamestringExtra classes for the wrapper. Positioned absolute inset-0 -z-10.

Honors prefers-reduced-motion with a designed static fallback, pauses offscreen and on hidden tabs, and passes className through.