Skip to main content

Overview

The BuildingNode represents a building structure within a site. It defines the building’s position and rotation in the site coordinate system and contains references to level nodes. Key features:
  • Positioned and rotated within the site
  • Contains multiple levels (floors)
  • Each level contains walls, slabs, zones, and other elements

Type Signature

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

Fields

Inherited from BaseNode

string
required
Unique building identifier.Format: building_{randomString}Example: "building_x9y8z7w6v5u4t3s2"
string
required
Always set to "building".Default: "building"
string
Optional name for the building.Example: "North Tower", "Main Building"
string | null
required
Reference to the parent site’s ID.Example: "site_abc123"Default: null
boolean
Controls building visibility.Default: true
CameraSchema
Optional camera viewpoint for the building.
any
Custom metadata for the building.Default: {}

Building-Specific Fields

[number, number, number]
required
Position of the building in the site coordinate system.Format: [x, y, z] in metersDefault: [0, 0, 0]Example: [10.5, 0, -5.2]The position is typically set with y=0 (ground level), with x and z defining the horizontal placement within the site.
[number, number, number]
required
Rotation of the building in the site coordinate system.Format: [x, y, z] in radians (Euler angles)Default: [0, 0, 0]Example: [0, Math.PI / 4, 0] (45-degree rotation around Y axis)Most commonly, only the Y rotation is used to orient the building on the site.
Array<string>
required
Array of level node IDs belonging to this building.Default: []Example: ["level_aaa111", "level_bbb222", "level_ccc333"]Each level ID references a LevelNode that contains the walls, slabs, and zones for that floor.

Example

Usage

Creating a Building

Positioning a Building

Adding Levels

Coordinate System

The building defines its own local coordinate system:
  • Origin is at the building’s position
  • Axes are rotated according to the rotation field
  • Child levels use this coordinate system for their elements

Hierarchy