Skip to main content

Import

storeyTilingError

Storeys must tile their segment exactly; return the mismatch (0 when they do).

resolveAreaKind

Explicit kind → parking use → parking; a storey whose top is at or below the site grade (world Y) → basement; otherwise gross.

AREA_KINDS

What a storey’s plate counts as.

massQuantities

Quantities of a stacked-prism mass, where options.grade is the world Y of the site grade (default 0) and a storey whose top is at or below it is a basement.

massBuildingCommand

The add-building command for a new building with one mass, from an outline drawn in site XZ metres.

toBuildingUse

Coerce a BuildingModel use string to a BuildingUse (custom: prefix for anything unknown).

irMassToMassLike

The MassLike view of an BmBuilding with a mass: segments with their storeys resolved from building.storeys by id (in storeyIds order).

massToShell

Build the shell of mass as an BmBuilding.

BUILDING_USES

MASS_COLORS_BY_USE

The colour of a mass part by its use, when neither the part nor its mass has a color.

massSegmentColorCommand

The replace-mass command that gives one part of a saved mass the colour color (#rrggbb), or takes its own colour away when color is undefined; undefined when the part already has that colour.

Types

MassBuildingOptions

What massBuildingCommand needs besides the outline.
number
required
Floor-to-floor height of every storey, in metres; above 0.
number
required
How many storeys the mass has; an integer of 1 or more.
string
Use of the segment and of its storeys, for example office.
string
Name of the new building.
number
World Y of the bottom of the mass. Defaults to the site grade, or 0 without a site.

MassStorey

string
required
string
number
required
Floor-to-floor height, metres.
BuildingUse
Overrides the owning segment’s use for this storey (a retail ground floor under offices).
AreaKind
Explicit area classification. Derived when absent — see resolveAreaKind.

AreaKind

What a storey’s plate counts as.

MassLike

The structural shape massQuantities needs — a Building’s config, an BmMass, or a plain object.
string
required
string
number
required
World Y of the bottom face of segments[0].
MassSegment[]
required

ShellOptions

number
Default 0.3 m.
number
Default 0.25 m.
number
Default 0.25 m.
WallMaterial | string
BmColor
Last modified on October 13, 2026