Skip to content

Modifiers

A modifier sits between an effect and the output: it reshapes where the pixels land, or masks them, without changing what the effect draws.

Modifiers compose: a Layer folds its static modifiers in child order, each reshaping the result of the one below, into its mapping at rebuild. A dynamic modifier instead runs a pass every frame after all effects, on the logical buffer the static mapping then carries to the lights, whatever its place, and an animated one rebuilds its static fold on its own clock.

A modifier folds coordinates rather than drawing, so it uses little of the shared power functions. Each card's emoji are its tags, as the tag emoji legend explains.

Block 馃挮 路 static

Block preview

Expands a 1D effect into concentric square rings: its position along the strip becomes the ring, so a gradient draws nested squares. The square sibling of Circle, which draws round rings.

Attribution: Chebyshev distance

Source 路 Tests

Checkerboard 馃挮 路 static

Checkerboard preview

Masks the layer in a checkerboard: the lights on the "off" squares stay dark, the rest show the effect unchanged.

  • size: The edge of a checker square, in lights.
  • invert: Swap which squares show the effect and which stay dark.

Attribution: Brandon502

Source 路 Tests

Circle 馃挮 路 static

Circle preview

Expands a 1D effect into concentric circular rings: its position along the strip becomes the radius, so a gradient draws nested circles. The round sibling of Block, which draws square rings.

Attribution: Euclidean distance

Source 路 Tests

Mirror 馃挮 路 static

Mirror preview

Folds the far half of the box back onto the near half, mirroring the image across its center on each axis you choose. In 2D one quadrant shows in all four, in 3D one octant in all eight.

  • mirrorX: Mirror across the center along x.
  • mirrorY: Mirror across the center along y.
  • mirrorZ: Mirror across the center along z.

Source 路 Tests

MoonLive 馃摑 路 static

MoonLive preview

The coordinate transform written as text on the running device: mirror the pattern, shift it, swap its axes. A compiled modifier is a class and a reflash, where a script is a line of text applied as you type, and every control it declares appears on the card. The language is MoonLive.

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

Source 路 Tests

Multiply 馃挮 路 static

Multiply preview

Tiles the image across the box, a number of times per axis, and can mirror every other tile into a kaleidoscope. Two tiles with mirroring on is a plain mirror.

  • multiplyX: Tiles along x, one meaning none.
  • multiplyY: Tiles along y, one meaning none.
  • multiplyZ: Tiles along z, one meaning none.
  • mirrorX: Reflect every other tile along x.
  • mirrorY: Reflect every other tile along y.
  • mirrorZ: Reflect every other tile along z.

Source 路 Tests

Pinwheel 馃挮 路 static

Pinwheel preview

Remaps the grid into petals around the center, so a line or a 2D effect turns into a rotating flower or spokes. The angle to each light picks its petal, and the radius runs along it; swirl, symmetry and z-twist bend the pattern.

  • petals: How many petals radiate from the center.
  • swirl: How far a petal bends into a spiral, negative bending the other way.
  • reverse: Reverse the petal order.
  • symmetry: How many times the pattern repeats around the turn.
  • zTwist: How far the petals twist from one z layer to the next.

Attribution: Brandon502, Polar coordinates

Source 路 Tests

RandomMap 馃挮 路 animated

RandomMap preview

Moves every light to another, each one exactly once, and reshuffles on a beat: the arrangement scrambles while the content stays.

  • bpm: Reshuffles per minute, zero freezing the arrangement.

Attribution: Fisher-Yates shuffle

Source 路 Tests

Region 馃挮 路 static

Region preview

Crops the layer to a rectangle given in percentages of each axis, so it holds when the layout is resized; outside it is dark. Beyond 0 and 100 the window slides partly or wholly out of view.

  • startX: Where the region starts along x, in percent of the axis.
  • startY: Where it starts along y, in percent.
  • startZ: Where it starts along z, in percent.
  • endX: Where the region ends along x, in percent of the axis.
  • endY: Where it ends along y, in percent.
  • endZ: Where it ends along z, in percent.

Source 路 Tests

RippleXZ 馃挮 路 static

RippleXZ preview

Collapses an axis to a single plane, so an effect drawn along the other axes ripples across the whole box.

  • shrink: Collapse the chosen axes to a single plane.
  • towardsX: Collapse x, so each column shares one light.
  • towardsZ: Collapse z, so each x-y plane is shared across depth.

Attribution: troyhacks

Source 路 Tests

Rotate 馃挮 路 dynamic

Rotate preview

Turns the 2D image around its center, continuously, at the speed you set.

  • speed: How fast the image turns.

Attribution: Brandon502, Rotation matrix

Source 路 Tests

Transpose 馃挮 路 static

Transpose preview

Swaps a pair of axes and can flip each one, so the image rotates or mirrors without the effect redrawing.

  • XY: Swap x and y, rows becoming columns.
  • XZ: Swap x and z.
  • YZ: Swap y and z.
  • inverse X: Flip x after the swaps, so it reads back to front.
  • inverse Y: Flip y after the swaps.
  • inverse Z: Flip z after the swaps.

Attribution: Transpose

Source 路 Tests

MoonLive, details

One coordinate at a time

A script transforms one coordinate and needs no loop, because the Layer already calls it once per physical light while it builds the mapping.

setXYZ(x, y, z) writes the transformed position, as setRGB(index, r, g, b) writes a color: a mirror is void modifyLogical() { setXYZ(width - 1 - xPos, yPos, zPos); }.

Read the grid rather than assuming it

A mirror written against a fixed 255 sends every light of a 16-wide grid outside it, and the Layer drops each one: the fixture goes black with no error. Read width instead. A computed coordinate arrives at full width, so 767 - xPos is 767 on a 768-wide wall.

What a script can transform

A script drives the per-light hook, so a transform keeping the box its size works; one halving it, as the built-in Mirror does, needs the compiled modifier. A script that fails to compile shows the parse error, and coordinates pass through.