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-21

light diffusing through a cloud

Installation

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

Usage

import { Orb21 } from "@/components/orbs/orb-21";
<Orb21 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
speedAnim speed0.015100.0510
camDistCamera distance0.5400.24.4
focalLens0.3150.11.8
radiusCloud radius0.15100.052
scaleCloud scale0.1150.10.8
churnChurn050.030.3
thresholdClumping030.0150.075
edgeSoftEdge softness0.1100.050.8
densityDensity0.03200.13.2
absorbAbsorption0.03150.11.4
shadowAbsorbShadow depth0200.12.4
shadowLiftShadow lift050.030.55
anisoForward scatter-0.90.90.010.45
lightSpinLight orbit030.0150.12
powerLight power0.03400.21.9
ambientAmbient030.0150.12
exposureExposure0.03100.051
alphaGainAlpha gain0.05100.051.5

Colours are passed through colors as hex strings.

ColourLabelDefault
lightLight#ffd7a3
shadowShadow#3a4a8c

Credits

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