Repository navigation
layout: interleaved = cannon row over a projector row (zipper); hide Grace tabs - #153
Conversation
…cell (zipper) Row 0 holds every cannon, row 1 every projector, shifted stagger (default 0.5) cells right so each projector sits between two cannons and one finger can zigzag across the show. Example routing labels C1-C12 / P1-P12.
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
|
Review complete. 🟡 1 medium 📍 Findings outside the diff (1) — 🟡 1 medium — defects on lines GitHub can't attach comments to🟡 Medium — Persisted interleaved specs silently reinterpret stagger and flip kinds · generators.ts:130–152 · // packages/layout/src/generators.ts
130 export function interleavedLayout({ cols, rows, stagger = 0.5, first = 'cannon', id, name }: InterleavedParams): Layout {
131 if (cols < 1 || rows < 1) throw new Error('interleavedLayout requires cols >= 1 and rows >= 1');
132 if (!Number.isFinite(stagger) || stagger < 0 || stagger >= 1) {
133 throw new Error(`interleavedLayout stagger must be 0 <= stagger < 1, got ${String(stagger)}`);
134 }
135 if (first !== 'cannon' && first !== 'projector') {
136 throw new Error(`interleavedLayout first must be "cannon" or "projector", got ${String(first)}`);
137 }
138 const other: FixtureKind = first === 'cannon' ? 'projector' : 'cannon';
139 const cx = (cols - 1 + (rows > 1 ? stagger : 0)) / 2;
140 const cy = (rows - 1) / 2;
141 const raw: RawFixture[] = [];
The change replaces the column-parity interleaved layout with a row-parity zipper scheme: cannons on even rows, projectors on odd rows, each odd row shifted right by
Not reviewed: none — all eight changed files were covered. One verified finding on silent backward-compatibility of persisted interleaved specs is reported below. Reviewed commit: 749a419 |
Summary
interleaved-12x2was built as two rows that each alternated cannon/projector. The real rig is one row of 12 cannons and one row of 12 projectors, the projector row shifted half a step so they zipper together.interleavedLayout({ cols, rows, stagger = 0.5, first = 'cannon' }): even rows are allfirst, odd rows the other kind and shiftedstaggercells right. Indices are row-major: cannons 0–11, projectors 12–23, with projector i sitting between cannon i and i+1. It now throws on an unknownfirst.examples/routing-interleaved-12x2.jsonregenerated with labels C1–C12 / P1–P12.SHOWN_TABSis nowpaint, pool, gradient. Grace and GracePaint are hidden; their code stays.Link to Devin session: https://app.devin.ai/sessions/e6939c79261649988b8277ba34725160
Open in Devin Desktop: https://app.devin.ai/desktop/session/e6939c79261649988b8277ba34725160?variant=devin
Requested by: @pyramation