Skip to main content

Overview

The SlabNode represents a floor slab (floor surface) within a level. Slabs are defined by a polygon boundary in 2D space with an elevation value. They can also have holes cut out (e.g., for stairs or atriums). Key features:
  • Polygon-based floor definition
  • Support for holes (voids in the floor)
  • Configurable elevation for multi-level floors

Type Signature

Source: /home/daytona/workspace/source/packages/core/src/schema/nodes/slab.ts

Fields

Inherited from BaseNode

string
required
Unique slab identifier.Format: slab_{randomString}Example: "slab_a1b2c3d4e5f6g7h8"
string
required
Always set to "slab".Default: "slab"
string
Optional name for the slab.Example: "Main Floor", "Living Room Floor"
string | null
required
Reference to the parent level’s ID.Example: "level_abc123"Default: null
boolean
Controls slab visibility.Default: true
CameraSchema
Optional camera viewpoint for the slab.
any
Custom metadata for the slab.Default: {}

Slab-Specific Fields

Array<[number, number]>
required
Array of 2D points defining the slab boundary.Format: Array of [x, z] coordinates in metersExample:
The polygon should be closed (the renderer will automatically connect the last point to the first). Points are defined in the level coordinate system.
Array<Array<[number, number]>>
Array of polygons defining holes (voids) in the slab.Default: []Format: Array of polygons, where each polygon is an array of [x, z] coordinatesExample:
Holes are used for features like:
  • Stairwells
  • Elevator shafts
  • Atriums
  • Floor openings
number
required
Elevation of the slab surface in meters.Default: 0.05 (5cm above level datum)Example: 0.0 (at level datum), 0.1 (10cm raised floor)The elevation is relative to the level’s base elevation. Use this for:
  • Slightly raised finished floors
  • Stepped floor sections
  • Platform areas

Example

Usage

Creating a Simple Rectangular Slab

Creating an L-Shaped Slab

Creating a Slab with a Hole

Creating a Slab with Multiple Holes

Raised Platform Area

Slab Geometry

The slab is rendered as a flat surface:
  • Shape: Defined by the polygon boundary
  • Voids: Defined by the holes array
  • Vertical position: Determined by level elevation + slab elevation

Coordinate System

Slabs use 2D coordinates in the level’s XZ plane:
  • X axis: horizontal (left-right)
  • Z axis: horizontal (front-back)
  • Y axis: vertical (determined by level elevation + slab elevation)

Use Cases

  • Floor surfaces for rooms and spaces
  • Platform areas with different elevations
  • Outdoor terraces and balconies
  • Multi-level floors with steps
  • Complex floor plans with cutouts for stairs, elevators, or atriums
  • BaseNode - Inherited base fields
  • LevelNode - Parent node containing slabs
  • ZoneNode - Zones that define room boundaries (similar polygon structure)