For the complete documentation index, see llms.txt. Markdown variants are available by appending .md to any URL or sending an Accept: text/markdown header. An agent skill is available at /.well-known/agent-skills/site-skill.md.
/
0
Sponsor

ORB-20

a water film rushing down the ball, fountain-style

Installation

$ pnpm dlx shadcn@latest add https://shadercn.vercel.app/r/orb-20.json

Usage

import { Orb20 } from "@/components/orbs/orb-20";
<Orb20 size={280} state="idle" />

Props

Component Props

PropTypeDefaultDescription
state"idle" | "thinking" | "speaking""idle"Drive preset the orb eases toward
sizenumber280Rendered size in CSS pixels
paramsPartial<Record<string, number>>-Shader param overrides, see Shader Props
colorsPartial<Record<string, string>>-Shader colour overrides as hex strings
statePresetsPartial<Record<OrbState, Record<string, number>>>-Replace the built-in per-state param presets
stateColorsPartial<Record<OrbState, Record<string, string>>>-Replace the built-in per-state colours
stateVolumesPartial<Record<OrbState, { input?: number; output?: number }>>-Pin the drive volumes a state settles on
volumes{ input?: number; output?: number }-Drive the orb directly, bypassing synthesis
pausedbooleanfalseFreeze the frame loop
pauseOffscreenbooleantrueStop rendering while scrolled out of view
maxDprnumber2Upper bound on the device pixel ratio
classNamestring-Class on the wrapper element
styleCSSProperties-Inline style on the wrapper element
ariaLabelstring-Accessible name for the canvas

Shader Props

Pass any of these through params; each is a single f32 uniform read by the shader.

ParamLabelRangeStepDefault
speedRipple speed0.015100.050.5
flowFall rush0200.13
camDistCamera distance1500.37
focalLens0.15150.12.25
tiltFlow tilt040.020.15
stretchFall stretch0.0330.0150.3
foamFoam030.0150.3
wallFilm sharpness0.15200.13
stepScaleStep scale0.0151.50.010.2
hueScaleHue banding030.0150.85
envRadiusEnvelope radius0.15150.12.6
envCoreEnvelope core0.31.020.011
fillBody fill01000.30.4
stepClampStep clamp0.33001.520
scatterDiffusion00.50.0030.01
exposureExposure1.515001022
contrastContrast0.15150.11.15
saturationSaturation040.021.55
alphaGainAlpha gain0.05150.12
edgeEdge sharpness010.011
edgeFadeHalo falloff0.130.0150.98

Colours are passed through colors as hex strings.

ColourLabelDefault
tintTint#ffffff

Credits

Shader by XorDev, ported from orbkit (WebGL/GLSL) to WebGPU/WGSL.