Skip to content

feat(pocket-widget): chorus diorama widget — a drag-orbit dream corridor#136

Draft
doodlewind wants to merge 2 commits into
mainfrom
topaz-trust
Draft

feat(pocket-widget): chorus diorama widget — a drag-orbit dream corridor#136
doodlewind wants to merge 2 commits into
mainfrom
topaz-trust

Conversation

@doodlewind

Copy link
Copy Markdown
Collaborator

What

A third pocket-widget runtime shape beside the handheld (#128) and the note (#129): examples/chorus, a scene-only WidgetGame — no guest, no EmbeddedUi — that recreates the airbrush-chrome record-sleeve look (Mildlife's Chorus) as a living desktop diorama you can peer into.

A framed tunnel-book box recedes wing by wing — cut-metal curtains carrying faces in profile, a red/green striped wall, a red-lit brick room with a purple cube, orange dunes — to a starburst deep inside. Fog spills out of the frame onto the desktop, and a chrome-lidded eye watches from below.

How

  • Geometry (diorama.rs): non-uniform Catmull-Rom face profiles extruded as thick cutout slabs; the front-face columns are offset curves packed toward the free edge so the gradient bands hug the silhouette, with a bright-lip rim along every cut. The box has a cream exterior shell, so orbiting shows a tunnel book from the side, not culled backfaces.
  • Painting (paint.rs): all textures procedural at load — multi-stop smoothstepped ramps (the airbrush look lives in the easing), deterministic LCG grain, per-wall painters (ember grid, pixel city, glow wall, stripe registers). Every instance is lit = 0, so the painted shading is exactly what renders.
  • Light (main.rs): the starburst is Beam spikes + additive sprites breathing on two sine phases; the fog is drifting additive puffs.

Interactions

Drag through the frame opening to orbit (drag the frame itself to move the window — one through_opening ray decides), scroll to dolly, double-click to dive between home/close framings, arrows nudge, R recenters, Esc quits.

Verification

  • --screenshot/--yaw/--pitch/--dist render headless 2× composites whose alpha is the real window transparency (front / 24° orbit / interior views checked against the reference sleeve).
  • Governor receipt honored: animated run 181 ticks / 164 frames; --still run 181 ticks / 2 frames — a settled art widget renders nothing.
  • cargo clippy -p chorus clean; cargo fmt applied.

🤖 Generated with Claude Code

doodlewind and others added 2 commits July 20, 2026 16:04
A third pocket-widget runtime shape: a scene-only WidgetGame (no guest,
no EmbeddedUi) recreating the airbrush-chrome record-sleeve look as a
living diorama. A framed tunnel-book box recedes wing by wing — cut-metal
curtains carrying faces in profile, a striped wall, a red-lit brick room
with a purple cube, orange dunes — to a starburst deep inside, with fog
spilling out over the desktop and a chrome-lidded eye below the frame.

Everything is procedural at load time: geometry in `diorama` (non-uniform
Catmull-Rom face profiles extruded as thick cutout slabs whose gradient
bands hug the silhouette), painting in `paint` (multi-stop smoothstepped
ramps + deterministic LCG grain), all instances unlit so the airbrush
shading is exactly what was painted. The starburst is beams + additive
sprites; the fog is drifting additive puffs.

Interactions: drag through the frame opening to orbit (the frame itself
moves the window), scroll to dolly, double-click to dive inside, arrows
nudge, R recenters. `--screenshot/--yaw/--pitch/--dist` render headless
composites; `--still` freezes the star and fog, and the governor receipt
then shows 2 rendered frames over a 3 s windowed run (vs 164 animated).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…en apps

A widget launched from a fullscreen terminal opened on the desktop Space
and appeared to not exist — macOS never switches Spaces for a CLI-spawned
window, and normal windows can't join a fullscreen Space at all.

Set NSWindow.collectionBehavior to CanJoinAllSpaces | Stationary |
IgnoresCycle | FullScreenAuxiliary on the shell's window (winit exposes
no API for this, so it goes through the raw AppKit handle; objc2 is
already in the tree via winit). On by default for both widget shapes as
`WidgetConfig::all_spaces` — a desktop widget that vanishes when you
switch Spaces isn't ambient — and a no-op off macOS.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant