feat(layout): concentric ring layouts — hollow centres, symmetric discs, per-project shorthand - #91
Merged
Merged
Conversation
…cs, per-project shorthand
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
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.
Summary
Round rigs stop being "a grid with a circular mask" and become concentric rings, so a 25-light rig can be mapped as a hollow ring, a symmetric disc, or an explicit ring list — per project, as configuration.
New generator, plus an
annulusshorthand that picks the rings for you:annulusderives the ring count from the area per fixture (spacing = sqrt(area/count)), spaces rings evenly across the band, then splitscountproportional to each circumference — so along-ring spacing ≈ ring-to-ring spacing, and every ring is exactly even (no distance-tie lopsidedness likefilledRing's 3/4/6/6/4/2). Alternate rings are staggered by half a step so fixtures interleave instead of lining up radially. Fixtures are emitted outermost ring first, clockwise from 12 o'clock, so shard slices and light maps stay contiguous per ring;ringindexes from the inside out (0= centre),perimeteris the outer ring, and there are no grid coords (cols/rows = 0).filledRingis untouched — the grid-masked disc is still there for rigs that really are a grid.Config surface, one string anywhere a layout is chosen (
parseLayoutSpec):rings:12,8,4,1spaces radii evenly and treats a trailing1as the centre fixture. Wired intowavegrid projects config set layout,wavegrid init, and the desktop create-project wizard + config editor (new "Ring w/ hole" and "Concentric rings" shapes). New presets:ring-25-hollow,disc-25.Two fixes fell out of it:
resolveLayoutnow prefers an explicitkindoverpreset— the default config carrieslayout.preset = 'grid-7x7', which was merged under a project's custom shape and silently won, so every kind-based spec (including the pre-existinggrid:/ring:ones from the desktop editor) resolved as a 7×7 grid.ringCounterClockwise(each ring wired the other way from 12 o'clock) andringsInnerFirst(wiring starts at the centre).Verified end-to-end through the store:
projects config set layout annulus:25@0.5→25-cannon annulus (rings, 25 cannons),rings:16,9→25-cannon rings (16+9). No server, receiver, socket or OSC protocol changes — the layout is resolved once and broadcast as before.Link to Devin session: https://app.devin.ai/sessions/972698f89f494b86828010666a002b8f
Requested by: @pyramation