Skip to content

feat(ui): Grace tab — slow rotating gradient looks (16 palettes × 14 shapes) for the 28-laser window - #136

Merged
pyramation merged 1 commit into
mainfrom
feat/grace-tab
Sep 21, 2026
Merged

pyramation merged 1 commit into
mainfrom
feat/grace-tab

Conversation

@pyramation

Copy link
Copy Markdown
Contributor

Summary

The Grace tab already existed (ring-pair colours + Shapes / Droplets & Chases). This adds the thing Dan asked for — slowly rotating colour gradients for the 28-laser window — as a second family in the same tab, and makes the existing looks understand the new grace-28 inner ring of four.

New: Gradients. GRADIENTS (16 palettes: Dawn, Stained Glass, Ocean, Ember, Moonlight, Aurora, Rose Gold, Twilight, Forest, Candlelit, Violet Hour, Coral Reef, Sunset, Spectrum, Ice Fire, Sage) × graceGradients(g) (14 looks: Wheel, Counter, Sweep, Spiral, Petals, Rings, Tide, Pendulum, Drift, Glow, Breathe, Embers, Bloom, Still) = 224 combinations. Each look maps a fixture to a point on the gradient loop from its angle/radius and drifts it with time:

var LAP = 60;                       // seconds per full lap at 1x (header speed slider scales ctx.t)
grad(u)  -> [hue, sat]              // shortest-way hue lerp between STOPS, last stop loops to first
Wheel:   paint(i, pos(i) - t/LAP)   // gradient wrapped round the window, turning
Counter: outer turns one way, inner rings the other
Sweep:   u = r·cos(angle - a)       // a straight band rotating across the window
Drift:   outer 1×, inner 1.37×, centre 0.61×  never repeats

They compile to evalPattern sources like the existing looks (no new protocol, run server-side, previewed with MiniGridPreview). Picking a new palette while a gradient look is running re-sends it recoloured, same as ring pairs do.

Fix for grace-28: CENTRE_MAX 0.15 → 0.45, so the four inner cannons (radius 0.25) are treated as "centre" like the single centre cannon of grace-cathedral. Before, they fell into the inner-twelve bucket, which also broke slot()/ringCount() on that ring (16 fixtures instead of 12).

Tests: grace-rings.test.ts now runs on both grace-cathedral and grace-28; every palette × look is checked for in-range HSB on both layouts; Wheel lap = 60 s and moves < 12° per second; Counter rings move in opposite directions; Sweep opposite sides differ; Still is static; inner four read as centre in Core.

Not verified against physical BEYOND output.

Link to Devin session: https://app.devin.ai/sessions/c4872c2982734093bdee80d04a7d5ceb
Open in Devin Desktop: https://app.devin.ai/desktop/session/c4872c2982734093bdee80d04a7d5ceb?variant=devin
Requested by: @pyramation

@devin-ai-integration

Copy link
Copy Markdown
Contributor

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@tenki-reviewer

tenki-reviewer Bot commented Sep 21, 2026

Copy link
Copy Markdown

Review complete. No issues found — approved ✅.


This PR introduces the Grace rings effect for the Wavegrid desktop UI. It adds packages/ui/src/lib/grace-rings.ts, which generates dynamic laser/JS patterns (handling fixture geometry, ring splitting, and HSB color interpolation with hue wraparound and CSS conic-gradient rendering), a new grace-tab.tsx component wiring the effect into the tab UI, and a grace-rings.test.ts suite exercising the new logic.

Files Change
packages/ui/src/lib/grace-rings.ts New library synthesizing ring patterns and conic-gradient palettes with HSB interpolation.
packages/ui/src/components/grace-tab.tsx New tab component integrating the Grace rings effect into the UI.
packages/ui/__tests__/grace-rings.test.ts Unit tests covering the new pattern and color logic.

Reviewed commit: 3754878

@pyramation
pyramation merged commit 5ad111b into main Sep 21, 2026
5 of 6 checks passed
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