Docs

Values

Static Values

LumiDSL accepts numbers, booleans, double-quoted strings, tuples, arrays, objects, and unquoted identifiers.

define count: 3
define enabled: true
define color: "#ff6b35"
define position: (320, 180)

imagine card
  opacity: 0.8
  fill: color
  position: position

create card

An unquoted identifier is a reference: the runtime resolves it against a define where the receiving property supports that. Quoted values are plain strings.

Durations

Animation durations take s or ms suffixes. A bare number means seconds. Parametric define duration names stay as references until the macro expands.

imagine dot
  animate opacity from 0 to 1 over 250ms

create dot

Percentages

A trailing % marks a relative length: a percentage of the nearest ancestor's local size. It works on position, size, width, and height. The x axis and width use the parent's width; the y axis and height use the parent's height. A root-level instance resolves against the root scene size when set, otherwise against the active player or canvas size.

imagine card
  shape: rectangle
  size: (50%, 25%)
  position: (10%, 20%)

create card

A scalar size percent applies to both axes (size: 50% → 50% × 50% of the parent); a scalar position percent is the x axis only, matching scalar position: N. Tuples can mix units: position: (10%, 40).

Parenting or unparenting an instance preserves its visual position and dimensions. Direct percentage values are recalculated against the destination parent while each axis keeps its authored unit. A scalar percentage may expand to a tuple when the destination has different axis proportions.

opacity also accepts a percent, as a fraction of 1: opacity: 50% is half opacity.

Percentages resolve to absolute pixels in the runtime before anything reads them, so expressions and animations see real numbers, and the editor can show both the authored percent and the resolved pixels. They are also valid inside expressions, where they combine with numbers into deferred lengths (width: 50% + 20 is 50% of the parent plus 20 pixels). See expressions.

A N% value used to parse as a broken modulo expression and resolve to nothing; it is now a percent literal. See compatibility.

Arrays and Objects

Arrays and objects are accepted and kept in the Scene. The compiler currently serializes arrays using tuple syntax, so they don't round-trip reliably yet. Use them where a runtime consumer explicitly supports them, such as path data.

imagine pathShape
  shape: path
  pathPoints: [(0, 0), (100, 100)]

create pathShape