Skip to content

Layouts

Every layout, one block each: what it does and what each control means — together. A layout maps light indices to physical (x, y, z) positions — it defines the shape an effect draws onto and a driver sends out. The Layouts container holds one or more layout children and composes them into one coordinate space; a Layer renders over that combined space. (For how this page maps to the source/asset folders, see the folder-structure decision.)

MoonLight layouts

Name Preview Controls Links
Car Lights
A pair of concentric-ring "headlight" clusters (nested rings of 1/8/12/16/24 LEDs) positioned to mimic a car's front lights — a fixed arrangement composed from Ring geometry.
Car Lights layout preview scaleoverall size scale (1–10). Technical
Eric Marciniak (Discord) — custom car-lights fixture
Cube
A 3D cube volume, width×height×depth, wired in a configurable axis order with optional per-axis serpentine — the 3D generalisation of Panel.
width / height / depthcube extent per axis (1–128).wiringOrderthe axis nesting order the strip follows.X++ / Y++ / Z++count up (vs down) along that axis.snakeX / snakeY / snakeZserpentine (alternate rows/columns reverse) on that axis. Technical
MoonLight · via MoonLight
Human-Sized Cube
A hollow walk-in cube built from five LED-curtain faces (front, back, top, left, right), each a width×height×depth curtain — for large/room-scale cube installations.
width / height / depthcube extent per axis (1–20). Technical
MoonLight · via MoonLight
Panel
A 2D matrix panel with full wiring control: choose the axis order, per-axis direction, and serpentine — the general matrix layout (Grid is the simple case).
panelWidth / panelHeightpanel size in lights (1–512).wiringOrderXY (rows) or YX (columns) nesting.X++ / Y++count up vs down along that axis.snakeserpentine wiring (alternate lines reverse). Technical
MoonLight · via MoonLight
Panels
Tiles an M×N grid of full matrix panels into one large display: an outer walk over the panel grid plus an inner walk over each panel's lights, both independently wired — for multi-panel video walls.
horizontalPanels / verticalPanelspanel-grid size (1–32 each).wiringOrderP / X++P / Y++P / snakePthe panel-to-panel wiring (order, direction, serpentine).panelWidth / panelHeighteach panel's size (1–512).wiringOrder / X++ / Y++ / snakethe per-panel light wiring. Technical
MoonLight · via MoonLight
Ring
A single ring of LEDs evenly spaced around a circle — nrOfLEDs points, starting at angleFirst, spanning rotation degrees.
nrOfLEDsLEDs around the ring (1–255).angleFirststarting angle in degrees.rotationarc spanned (360 = full circle).clockwisedirection of travel.scalespacing/radius scale. Technical
MoonLight · via MoonLight
Rings 241
The classic 241-LED concentric-ring disc: nested rings of 1, 8, 12, 16, 24, 32, 40, 48, 60 LEDs sharing a centre.
scaleoverall radius scale (1–10). Technical
MoonLight · via MoonLight
Single Column
A vertical line of LEDs at a fixed X — the 1D column primitive.
starting Ythe column's start row.heightLEDs in the column (1–1000).X positionthe column's x.reversed orderwire top-to-bottom instead of bottom-to-top. Technical
MoonLight · via MoonLight
Single Row
A horizontal line of LEDs at a fixed Y — the 1D row primitive.
starting Xthe row's start column.widthLEDs in the row (1–1000).Y positionthe row's y.reversed orderwire right-to-left instead of left-to-right. Technical
MoonLight · via MoonLight
Spiral
A conical spiral: ledCount LEDs winding up a cone from bottomRadius to a point over height.
ledCountLEDs along the spiral (1–2048).bottomRadiusradius at the base.heightspiral height. Technical
MoonLight · via MoonLight
Toronto Bar Gourds
Maps a set of decorative "gourd" objects (a specific bar installation), each rendered at one of three granularities — one light per gourd, per side, or per LED.
Toronto Bar Gourds layout preview granularityOne Gourd One Light, One Side One Light, or One LED One Light.nrOfLightsPerGourdLEDs per gourd in the coarsest mode (1–128). Technical
troyhacks — custom Toronto bar gourd installation
Tubes
Parallel vertical tubes: nrOfTubes columns of ledsPerTube LEDs, spaced tubeDistance apart.
nrOfTubesnumber of tubes (1–64).ledsPerTubeLEDs per tube (1–255).tubeDistancespacing between tubes.reversedreverse the wiring order. Technical
MoonLight · via MoonLight

projectMM-native layouts

Name Preview Controls Links
Grid
A dense 3D grid, row-major (x fastest, then y, then z); every position maps to a light.
width / height / depthgrid extent on each axis in lights (1–512).serpentineboustrophedon-wire alternate rows (every other row runs in reverse, matching a snaked strip). Tests
Technical
MoonLight · via MoonLight
GridBlacks
A Grid with mid-strand dark columns (a spacer). Columns [blackStart, blackStart+blackCount) are held black in every row, for a sealed/continuous panel that must stay dark down a strip, or a slat wall. A dark column is still a physical wire position the driver clocks, so WS2812 data flows through the unlit LEDs to reach the lit columns beyond; the lit columns keep their true positions (the picture is holed, not squeezed), so an effect maps straight across the gap. Use plain Grid when you need no dark columns.
width / height / depthgrid extent on each axis in lights (1–512).serpentineboustrophedon-wire alternate rows.blackCountnumber of dark columns; 0 (the default) means no gap, so it renders exactly like a Grid.blackStartfirst dark column (shown only once blackCount is set). Tests
Technical
projectMM
Sphere
Lights on the surface of a hollow sphere — a one-light-thick shell inside a (2·radius+1)³ box, no interior lights.
radiussurface radius in light-units (1–64); the shell is every cell whose distance from the centre rounds to radius. Tests
Technical
MoonLight · via MoonLight
Wheel
A bicycle-wheel: spokes straight rows radiate from a centre hub, each carrying ledsPerSpoke LEDs spaced one unit apart outward. The Layouts container itself takes no controls — see its page for coordinate iteration, reordering, and rebuild propagation.
spokesnumber of spokes radiating from the hub (2–64).ledsPerSpokeLEDs along each spoke, spaced one unit apart from the centre outward. Tests
Technical
MoonLight · via MoonLight