Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

PieceOptions

What definePiece takes beside every prefab option.

Property Type Default value Description
footprint? readonly [number, number] [1, 1] Cells along x and z at rest; a wall’s cells along its edge, and 1.
grounded? boolean false Stands on the ground under its footprint, its lowest point there, rather than on its cell’s floor: a decoration on ground that rises and falls.
height? number 1 Cells it fills upward.
slot? PieceSlot PieceSlot.Inside Where in a cell it sits.
variants? Readonly<Record<string, string>> none Named tints a placement picks from, such as a roof’s colours, each a CSS colour; each copy draws in its own.