Skip to content

Layouts

A layout says where the lights physically are: it maps each light's index to an (x, y, z) position, the shape an effect draws onto and a driver sends out.

The Layouts container holds one or more layouts and composes them into one coordinate space, which a Layer renders over. The container itself takes no controls.

Each card's emoji are its tags, as the tag emoji legend explains.

CarLights 馃挮 路 2D

CarLights preview

A pair of car headlights: concentric rings of lights placed like a car's front lamps. Nested rings of 1, 8, 12, 16 and 24 lights form each lamp, with a ring of 32 more on the outer two. Side strips join them, in a fixed arrangement drawn with Ring geometry.

  • scale: The overall size: the spacing out from each lamp's center.

Attribution: Eric Marciniak, Polar coordinates

Source

Cube 馃挮 路 3D

Cube preview

A solid 3D cube of lights, wired through the volume in the axis order you choose. Every point of a width 脳 height 脳 depth box holds a light. The strip's path is yours to set: which axis it runs along first, which way each axis counts, and which axes snake back and forth. It is the 3D form of Panel.

  • width: The cube's extent on x.
  • height: The cube's extent on y.
  • depth: Its extent on z.
  • wiringOrder: The axis order the strip follows, fastest first.
  • X++: Whether x counts up rather than down.
  • Y++: Whether y counts up.
  • Z++: Whether z counts up.
  • snakeX: Whether x snakes, reversing on alternate passes.
  • snakeY: Whether y snakes.
  • snakeZ: Whether z snakes.

Attribution: Boustrophedon

Source

Grid 馃挮 路 3D

Grid preview

A dense grid of lights in 1D, 2D or 3D: every position holds a light, wired row by row. The wiring runs x fastest, then y, then z, and a strip that snakes back and forth runs every other row in reverse.

  • width: The grid's extent on x.
  • height: Its extent on y.
  • depth: Its extent on z, 1 for a flat panel.
  • serpentine: Every other row runs in reverse, for a snaked strip.

Attribution: Boustrophedon

Source 路 Tests

GridBlacks 馃挮 路 3D

GridBlacks preview

A grid with dark columns held black in every row, for a sealed panel that must stay dark down a strip, or a slat wall. A dark column is still a wire position the driver clocks, so data flows through the unlit lights to the lit columns beyond. The lit columns keep their true positions, so an effect maps straight across the gap. Without dark columns it is a Grid.

  • width: The grid's extent on x.
  • height: Its extent on y.
  • depth: Its extent on z.
  • serpentine: Every other row runs in reverse, matching a snaked strip.
  • blackCount: How many dark columns; none renders exactly like a Grid.
  • blackStart: The first dark column.

Attribution: Boustrophedon

Source 路 Tests

HumanSizedCube 馃挮 路 3D

HumanSizedCube preview

A walk-in cube of five LED curtains: front, back, top, left and right, open at the bottom. Each face is a curtain the size of the box's side, for a room-scale cube a person stands inside.

  • width: The cube's extent on x.
  • height: The cube's extent on y.
  • depth: Its extent on z.

Attribution: troyhacks

Source

MoonLive 馃摑

MoonLive preview

Where the lights physically are, written as text on the running device. A layout is the one part of the pipeline that differs for every build: a ring, a spiral staircase, a costume sewn last night. A script means the person who hung the lights describes where they went, and sees it at once. Everything the script declares appears as a real control. The language is MoonLive.

  • script: Which .mll script runs, picked from the library and edited here.

Source 路 Tests

Panel 馃挮 路 2D

Panel preview

A 2D matrix panel with full wiring control: the axis order, the direction per axis, and serpentine. The general matrix layout, of which Grid is the simple case.

  • panelWidth: The panel's width in lights.
  • panelHeight: The panel's height in lights.
  • wiringOrder: Rows first or columns first.
  • X++: Whether x counts up rather than down.
  • Y++: Whether y counts up.
  • snake: Serpentine wiring: alternate lines run in reverse.

Attribution: Boustrophedon

Source

Panels 馃挮 路 2D

Panels preview

An M 脳 N grid of matrix panels, tiled into one large display for a video wall. The wiring is two walks, each set on its own: an outer one over the panel grid and an inner one over each panel's lights, as Panel wires one.

  • horizontalPanels: How many panels across.
  • verticalPanels: How many panels down.
  • wiringOrderP: Which axis the panel grid walks first.
  • X++P: Whether the panel grid's x counts up.
  • Y++P: Whether its y counts up.
  • snakeP: Serpentine across the panel grid: alternate panel rows run in reverse.
  • panelWidth: Each panel's width in lights.
  • panelHeight: Each panel's height in lights.
  • wiringOrder: Which axis a panel walks first.
  • X++: Whether a panel's x counts up.
  • Y++: Whether its y counts up.
  • snake: Serpentine inside each panel: alternate lines run in reverse.

Attribution: Boustrophedon

Source

Ring 馃挮 路 2D

Ring preview

A ring of lights evenly spaced around a circle, or an arc of one. The lights start at angleFirst and span rotation degrees, a full turn drawing the whole circle. A center of its own places the ring anywhere, which is how CarLights and Rings241 build their lamps and discs from rings.

  • nrOfLEDs: How many lights go around the ring.
  • angleFirst: The angle the first light sits at, in degrees.
  • rotation: The arc spanned in degrees, less than a full turn a partial ring.
  • clockwise: Whether the lights run clockwise.
  • scale: The spacing out from the center.
  • centerX: The center's x before scaling; 0 places the ring by its size.
  • centerY: The center's y before scaling; 0 places the ring by its size.

Attribution: Polar coordinates

Source

Rings241 馃挮 路 2D

Rings241 preview

The classic 241-light disc: nine concentric rings of 1, 8, 12, 16, 24, 32, 40, 48 and 60 lights sharing a center.

  • scale: The size: scales the ring radii and the shared center.
  • outside in: Light 0 on the outer ring, wired inward rather than outward.
  • angleFirst: The angle light 0 of each ring sits at, in degrees.

Attribution: Polar coordinates

Source 路 Tests

SingleColumn 馃挮 路 1D

SingleColumn preview

A vertical line of lights at a fixed x, the 1D column.

  • starting Y: The row the column starts at.
  • height: How many lights the column holds.
  • X position: The column's x.
  • reversed order: Wire it top to bottom rather than bottom to top.

Attribution: Limpkin

Source 路 Tests

SingleRow 馃挮 路 1D

SingleRow preview

A horizontal line of lights at a fixed y: the 1D row, a bare strip laid straight.

  • starting X: The column the row starts at.
  • width: How many lights the row holds.
  • Y position: The row's y.
  • reversed order: Wire it right to left rather than left to right.

Attribution: Limpkin

Source

Sphere 馃挮 路 3D

Sphere preview

Lights on the surface of a hollow sphere: a shell one light thick, nothing inside.

  • radius: The shell's radius, in lights.

Source 路 Tests

Spiral 馃挮 路 3D

Spiral preview

A conical spiral: lights winding up a cone from a wide base to a point.

  • ledCount: How many lights wind up the spiral.
  • bottomRadius: The radius at the base, in light-units.
  • height: The vertical rise from base to tip.

Attribution: Conical spiral

Source

TorontoBarGourds 馃挮 路 3D

TorontoBarGourds preview

A bar's installation of 24 decorative gourds, each lit at one of three granularities: one light per gourd, per side, or per LED.

  • granularity: How finely each gourd is lit.
  • nrOfLightsPerGourd: Lights per gourd when one gourd is one light.

Attribution: troyhacks

Source

Tubes 馃挮 路 2D

Tubes preview

Parallel vertical tubes, each a column of lights, standing side by side.

  • nrOfTubes: How many tubes stand side by side.
  • ledsPerTube: How many lights each tube carries.
  • tubeDistance: The spacing between tubes, in light-units.
  • reversed: Wire each tube from its top.

Source

Wheel 馃挮 路 2D

Wheel preview

A bicycle wheel: spokes radiating from a center hub, each a straight row of lights.

  • spokes: How many spokes radiate from the hub.
  • ledsPerSpoke: How many lights each spoke carries.

Attribution: Polar coordinates

Source 路 Tests

MoonLive, details

How the light count is known

The Layer sizes its buffer from the light count before it asks for any position, so the script runs twice: the first pass counts addLight calls, the second emits positions. Nothing is stored between passes, which saves 48 KB at 16,384 lights. A random16 loop bound makes the passes disagree on the count.

What a layout script is given

addLight(x, y, z) places the next light, in call order. t is always 0 and width, height and depth read 0, since a layout is upstream of the grid. Name your own size controls, such as cols and rows. The MoonLive guide lists the vocabulary.