feat(pocket-widget): chorus diorama widget — a drag-orbit dream corridor#136
Draft
doodlewind wants to merge 2 commits into
Draft
feat(pocket-widget): chorus diorama widget — a drag-orbit dream corridor#136doodlewind wants to merge 2 commits into
doodlewind wants to merge 2 commits into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
A third pocket-widget runtime shape beside the handheld (#128) and the note (#129):
examples/chorus, a scene-onlyWidgetGame— no guest, noEmbeddedUi— 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
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.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 islit = 0, so the painted shading is exactly what renders.main.rs): the starburst isBeamspikes + 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_openingray decides), scroll to dolly, double-click to dive between home/close framings, arrows nudge,Rrecenters, Esc quits.Verification
--screenshot/--yaw/--pitch/--distrender headless 2× composites whose alpha is the real window transparency (front / 24° orbit / interior views checked against the reference sleeve).--stillrun 181 ticks / 2 frames — a settled art widget renders nothing.cargo clippy -p chorusclean;cargo fmtapplied.🤖 Generated with Claude Code