Skip to content

ScrollModifier

ScrollModifier is a coordinate modifier that shifts the layer buffer over time along one or more axes, wrapping at the region edges. It is the reference dynamic modifier: because its offset changes every frame, DriverLayer cannot bake a static table and falls back to per-pixel per-frame modifier-chain evaluation.

Purpose

Scrolling is a common LED effect primitive (marquee text, moving patterns). As a modifier it is applied on top of any effect without the effect needing to know about scrolling.

Controls

Key UI type Min Max Default Description
speedX slider -99 99 0 Scroll speed along X (pixels per second; 0 = static)
speedY slider -99 99 0 Scroll speed along Y
speedZ slider -99 99 0 Scroll speed along Z
enabled toggle true When false the modifier is bypassed

Wiring

Add as a child of an EffectsLayer:

{ "type": "ScrollModifier", "id": "scroll1", "parent_id": "effects1",
  "props": { "speedX": 20 } }

Behaviour

  • Dynamic (isStatic() == false when any speed is non-zero): the offset advances each frame, so DriverLayer must call applyModifiers() per pixel per frame rather than using a baked table.
  • Does not change buffer dimensions: modifyDims() is a no-op.
  • Offset wraps at the region boundary (modulo), so the effect tiles seamlessly.
  • At speedX = speedY = speedZ = 0 the modifier is effectively static (no movement), but isStatic() still returns false to keep the implementation simple.

Test coverage

See Modifiers — dynamic-chain flag, per-frame offset advance, wrap-around continuity.

Source