crucıble

Ember

A field of glowing embers rising from below in molten forge tones, each with its own phase, flicker, wind drift and color ramp; the cursor stirs a gentle updraft. Original OGL fragment shader, offscreen-paused and reduced-motion-safe.

oglfree

Installation

CLI

npx shadcn@latest add @crucible/ember

Manual — install dependencies, then copy the source

npm install ogl

Props

PropTypeDefaultDescription
colors[string, string]Two forge tones for the ember color ramp: [base, tip]. base is the color at the bottom where embers are born (ember red); tip is the color they carry as they rise (molten amber). Any hex string.
wind[number, number][0.25, 0] — a soft rightward draftHorizontal wind vector [x, y]. x drifts rising embers sideways (positive = rightward); y biases their rise speed. Roughly −1…1.
speednumber1Rise-speed multiplier. 1 = default.
densitynumber44Ember count / field density, clamped 8–64.
intensitynumber1Overall glow / bloom of the embers. 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.