Thinking UI

ASCII OrbPRO

A spinning donut, globe or rippling pool rendered in ASCII with a luminance ramp.

Code

1 file · 327 lines of TypeScriptPRO

ASCII Orb is part of Pro

Get its source, the one-paste agent prompt and all 113 components, for a one-time $99.

Motion notes

  • Real 3D, then quantised: surface points are rotated, perspective-projected and z-buffered into a character grid, and Blinn-Phong lighting picks a glyph from ' .:-=+*#%@'. Every surface cell gets at least '.', so silhouettes stay whole.
  • Capped at 30fps on purpose: the slight step reads as a terminal redraw, not a video. It only runs while on screen, and reduced motion shows one still frame.
  • Built for inline sizes: the default 22×11 grid is square at any width because a mono cell is twice as tall as it is wide. Drop to 12×6 or 14×7 for 24–40px icons.
  • No React state per frame. Sample points are precomputed into typed arrays once per shape and grid, and each frame writes one string to the <pre>'s textContent (about 0.05ms).

Usage

Example
<AsciiOrb shape="torus" size={96} />

  <StatusPill icon={<AsciiOrb shape="sphere" size={30} cols={12} rows={6} />} label="Thinking" />

Props

PropTypeDefaultDescription
shape"torus" | "sphere" | "wave""torus"torus: the classic spinning donut. sphere: a banded globe on a tilted axis. wave: a rippling pool seen from above.
sizenumber64Width in px. Font size is derived from it, and height from the grid.
colsnumber22Characters per row.
rowsnumber11Rows. Half of cols gives a square.
rampstring" .:-=+*#%@"Luminance ramp, darkest to brightest. The first character is the background.
speednumber1Playback multiplier.
classNamestring—Classes for the <pre>. Color comes from text-fg by default.