Overview
TheBaseNode schema defines the core fields shared by all node types in the Pascal Editor SDK. Every node in the scene graph (Site, Building, Level, Wall, Slab, Zone, Item) extends this base schema.
Type Signature
Fields
string
required
Always set to
"node". This field identifies the object type.Default: "node"string
required
Unique identifier for the node. Generated using the
generateId() function with a type-specific prefix.Format: {type}_{randomString}Examples:site_a1b2c3d4e5f6g7h8building_x9y8z7w6v5u4t3s2wall_m1n2o3p4q5r6s7t8
0123456789abcdefghijklmnopqrstuvwxyz.string
required
The node type discriminator. This field is used to distinguish between different node types in discriminated unions.Valid values:
"site", "building", "level", "wall", "slab", "zone", "item", etc.Default: "node" (overridden by specific node types)string
Optional human-readable name for the node.Example:
"Main Building", "Ground Floor", "Living Room"string | null
required
Reference to the parent node’s ID in the scene graph hierarchy.Default:
null (for root nodes like Site)Example: "building_abc123" (for a Level node inside a Building)boolean
Controls the visibility of the node in the 3D scene.Default:
trueCameraSchema
Optional camera configuration associated with this node. Used for viewpoint navigation.See the Camera Schema documentation for details.
any
Arbitrary JSON data for storing custom properties.Default:
{}Example:ID Generation
The SDK provides utility functions for generating type-safe IDs:/home/daytona/workspace/source/packages/core/src/schema/base.ts:12-18
Type Discriminator Pattern
Thetype field is used as a discriminator in Zod’s discriminatedUnion to enable type-safe parsing:
type field value.
Usage
TheBaseNode schema is not used directly. Instead, specific node types extend it: