docs / atmospheres / loimu
Loimu
light arrives from something enormous and off-frame, drawn into long parallel streamers that decay to nothing before the edge. it expects a scrim over it, keeping one diagonal wedge and cutting the rest: the scrim does that work, never the atmosphere.
intensity · roomrsc · client
provenance
authored in usvalayer
atmospheresintensity
room · the whole environment. nothing competes with itcomposition
the ground of a hero or a full page, with the page's own scrim on topcontent goes in as children, above the sheet in normal flownever unmasked full-frame: without the scrim it lies about where the light livesnot inside a Card or a panel. it is the room, one per pagea11y
the canvas isaria-hidden · reduced motion paints one static developed frame · without WebGL2 the canvas never mountsjest-axedependencies
ogl · atmospheres-core from the same packagelive demo · try it out
light from off-frame
the scrim keeps one diagonal wedge and destroys the rest
customize
speedflow and fold rate
opacitysheet strength, 0 to 1
interactivestreamers bend toward the pointer
modeauto reads the ground, or force emit / stain
scrimthe three-layer CSS mask on top
bodythe sheet, reads accent
deepwhere the light is oldest
edgethe leading lines
advanced27
focalcamera focal length, larger flattens
sheetDisteye to sheet plane along its normal
sheetSpanhalf depth of the marched neighbourhood
sigmagaussian thickness of the sheet
foldhow far the low fold bends it out of plane
foldScalespatial frequency of that fold
normal · xsheet plane normal, x
normal · ysheet plane normal, y
normal · zsheet plane normal, z
flow · xflow axis projected onto the plane, x
flow · yflow axis projected onto the plane, y
flow · zflow axis projected onto the plane, z
source · xemission source, half-height units, x
source · yemission source, half-height units, y
noiseFreqbase frequency of the streamer noise
stretchdomain stretch along flow, below 4 loses aurora
curlScalespatial scale of the curl field
curlAmtstrength of the curl advection
flowSpeedbase advection speed along the flow
omegastrength of the pointer vortex
thresholdcutoff below which the sheet is void
sharpencontrast on the streamer edges
falloffinverse-square arrival, higher decays sooner
gainoverall emission gain
edgeweight of the thin leading line
edgeBandshow many leading lines per streamer
flowLengthdistance over which the hue completes
usage
import { Loimu } from "@usva-ui/react/atmospheres/loimu";
<Loimu
speed={1}
opacity={1}
interactive={true}
>
<div aria-hidden className="pointer-events-none absolute inset-0" style={{ backgroundImage: SCRIM }} />
<Hero />
</Loimu>props
| prop | type | default | notes |
|---|---|---|---|
| children | ReactNode | — | rendered above the sheet, in normal flow. |
| speed | number | 1 | flow and fold rate multiplier. |
| interactive | boolean | true | the streamers bend toward your cursor from a distance, following it with a lag. |
| opacity | number | 1 | overall opacity of the sheet, 0 to 1. |
| mode | "emissive" | "absorptive" | — | forces the blend. by default a dark ground emits and a light ground stains, which is the only way this survives a light theme. |
| colors | { body?; deep?; edge? } | — | the hue along the flow: body reads accent, deep reads accent-2 where the light is oldest, edge reads accent-alt on the leading lines. omitted stops read their token. |
| params | Partial<LoimuParams> | — | escape hatch for the field: source, sigma, fold, curlAmt, omega, edge and the rest. the defaults are the tuned sheet. |
get it
bun add @usva-ui/reactusage
import { Loimu } from "@usva-ui/react/atmospheres/loimu";
<Loimu className="relative min-h-svh">
<div aria-hidden className="pointer-events-none absolute inset-0" style={{ backgroundImage: SCRIM }} />
<Hero className="relative" />
</Loimu>