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.
/
163
Sponsor

ORB-31

Raymarched shell, volumetric godrays

Installation

$ pnpm dlx shadcn@latest add @shadercn/orb-31

Usage

import { Orb31 } from "@/components/orbs/orb-31";
<Orb31 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.015 – 100.051
sweepRateSweep rate0 – 60.020.5
radiusShell radius0.4 – 100.052.6
swellInput swell0 – 30.0150.18
warpWarp divisor0.3 – 100.050.9
warpFreqWarp frequency0.15 – 300.155.25
warpSwingWarp swing0 – 80.050
freqSwingFrequency swing0 – 150.050
smoothSwingSoftness swing0 – 20.0050
smoothKBlend softness0.015 – 40.020.42
rayGainGodray gain0 – 40.020.8
rayFalloffGodray falloff0.3 – 1000.510.5
surfaceLitSurface light0 – 30.0150.105
ambientAmbient0 – 10.0050
alphaGainAlpha gain0.05 – 150.13
edgeFadeHalo falloff0.1 – 30.0150.45
camDistCamera distance1.5 – 1000.512
fovLens0.3 – 200.13.5
stepScaleStep safety0.3 – 300.59
maxDistMax distance3 – 100122

Credits

Based on original work by XorDev.