crucıble

Plasma

A classic 90s demoscene plasma background: layered sine/cosine fields over space and time sum into a scalar that indexes a smooth looping palette, so flowing color bands both deform and palette-cycle — organic, hypnotic, seamless. The pointer subtly warps the field. Tasteful cool duotone-to-tritone by default, full psychedelia via the colors knob. Original OGL fragment shader, tone-mapped, dithered, DPR-clamped, offscreen-paused, reduced-motion-safe.

oglfree

Installation

CLI

npx shadcn@latest add @crucible/plasma

Manual — install dependencies, then copy the source

npm install ogl

Props

PropTypeDefaultDescription
colors[string, string, string]a cool indigo → sky → periwinkle gradient. Warm alt: ["#2a0f3d", "#f97316", "#fbbf24"]Three palette stops the plasma cycles through as a seamless loop (A → B → C → A). Keep one stop dark for elegant flowing bands, or push all three to saturated hues for full 90s psychedelia.
speednumber1Flow speed multiplier. 1 = default, 2 = twice as fast, 0 = frozen field.
intensitynumber1Band richness, 0–2. Scales spatial frequency (how many color bands fill the frame) and vividness. 1 = calm and tasteful; higher packs denser, more saturated psychedelic bands.
pausedbooleanFreeze the animation at its current frame.
Also accepts all props of React.ComponentPropsWithoutRef<"div">they pass through to the underlying element.

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