Overview
TheZoneNode represents a room, space, or designated zone within a level. Zones are defined by a polygon boundary and include visual styling (color) for rendering. They’re used for space planning, room identification, and area calculations.
Key features:
- Polygon-based zone definition
- Named spaces for organization
- Color-coded visual representation
- Custom metadata support
Type Signature
/home/daytona/workspace/source/packages/core/src/schema/nodes/zone.ts
Fields
Inherited from BaseNode
Unique zone identifier.Format:
zone_{randomString}Example: "zone_a1b2c3d4e5f6g7h8"Always set to
"zone".Default: "zone"Reference to the parent level’s ID.Example:
"level_abc123"Default: nullControls zone visibility.Default:
trueOptional camera viewpoint for the zone.
Zone-Specific Fields
Name of the zone/room.Required for ZoneNode (overrides optional name in BaseNode)Examples:
"Living Room""Master Bedroom""Kitchen""Conference Room A""Storage Area"
Array of 2D points defining the zone boundary.Format: Array of The polygon defines the room boundary in the level coordinate system. The renderer will automatically close the polygon by connecting the last point to the first.
[x, z] coordinates in metersExample:Hex color code for visual styling of the zone.Default:
"#3b82f6" (blue)Format: Hex color string (e.g., "#FF0000", "#3b82f6")Examples:"#3b82f6"- Blue (default)"#10b981"- Green"#f59e0b"- Orange"#ef4444"- Red"#8b5cf6"- Purple
Custom metadata for the zone.Default:
{}Common use cases:- Room area calculations
- Space type classification
- Occupancy information
- HVAC zone assignments
- Custom properties
Example
Usage
Creating a Simple Zone
Creating Zones with Different Colors
Creating an L-Shaped Zone
Creating Zones with Metadata
Creating Multiple Zones for a Floor Plan
Zone Visualization
Zones are typically rendered in the 3D scene as:- Colored overlay on the floor
- Semi-transparent fill with the specified color
- Labels showing the zone name
- Boundary outlines
Coordinate System
Zones use 2D coordinates in the level’s XZ plane:- X axis: horizontal (left-right)
- Z axis: horizontal (front-back)
- Y axis: implied by level elevation (zones are at floor level)
Use Cases
- Room definitions for residential and commercial spaces
- Space planning and area allocation
- Color-coded floor plans for different room types
- Area calculations for real estate and construction
- Functional zones (public, private, service areas)
- HVAC and building systems zone assignment
- Occupancy tracking and space management