Skip to main content

Module orbs

Module orbs 

Source
Expand description

Thinking orbs — dotted loading indicators for AI & agent UIs, ported from gpui-thinking-orbs (MIT), itself a port of Jakub Antalik’s thinking-orbs.

Twelve hand-tuned animated states, four size presets, monochrome ink on a transparent canvas. The animation engine is pure Rust; only the paint path talks to gpui.

cx.new(|_| Orb::new().state(OrbState::Searching).size(OrbSize::Avatar))

Style flows through the environment like the rest of bezel: OrbTheme::Auto resolves ink against the installed theme::Appearance at paint time. The engine is the public engine module below — the “advanced” tier for custom paint loops.

Modules§

engine
Backend-agnostic animation engine (ported from thinking-orbs).

Structs§

Orb
Animated thinking-orb status indicator for AI / agent UIs.
Resolved
Fully resolved draw options for a (state, size) pair.

Enums§

ModeKey
Internal mode keys — one painter per key. Grows in lockstep with OrbState, hence #[non_exhaustive].
OrbSize
Rendered size in logical pixels. Four tuned presets ship: inline (20), avatar (64), large (96), and hero (128). Larger sizes add detail gradually instead of merely stretching the 64 px artwork.
OrbState
The twelve shipped states — each a hand-tuned animation.
OrbTheme
Theme mode for monochrome ink on transparent canvas.

Constants§

DEFAULT_TARGET_FPS
Frames per second the orb redraws at when no explicit rate is set.

Functions§

orb_element
Paint one frame of an orb at animation time t (seconds, unbounded) — the pure, host-ticked form of Orb. Build it inside any render that runs on a clock of its own; the reduced-motion convention is t = 0.6.
resolve_preset
Resolve a (state, size) pair to its mode + fully-scaled draw options.