Overview
TheItemNode represents a 3D object or item in the scene, such as furniture, fixtures, equipment, or decorative elements. Items reference 3D assets (GLB models) and can be positioned freely or attached to walls.
Key features:
- References 3D assets (GLB models)
- Position, rotation, and scale transforms
- Wall attachment support for doors, windows, etc.
- Hierarchical item nesting (parent-child relationships)
- Asset metadata (dimensions, attachment points, corrective transforms)
Type Signature
/home/daytona/workspace/source/packages/core/src/schema/nodes/item.ts
Fields
Inherited from BaseNode
Unique item identifier.Format:
item_{randomString}Example: "item_a1b2c3d4e5f6g7h8"Always set to
"item".Default: "item"Optional name for the item.Example:
"Office Chair", "Front Door"Reference to the parent node’s ID.Examples:
"level_abc123"- Item placed in a level"wall_xyz789"- Item attached to a wall"site_def456"- Site-level item"item_ghi789"- Nested item (child of another item)
nullControls item visibility.Default:
trueOptional camera viewpoint for the item.
Custom metadata for the item.Default:
{}Item Transform Fields
Position in the parent coordinate system.Format:
[x, y, z] in metersDefault: [0, 0, 0]Examples:[2.5, 0, 3.0]- Free-standing item position[0, 1.2, 0.1]- Wall-mounted item position (relative to wall attachment point)
Rotation in the parent coordinate system.Format:
[x, y, z] in radians (Euler angles)Default: [0, 0, 0]Example: [0, Math.PI / 2, 0] (90-degree rotation around Y axis)Scale multiplier applied to the asset.Format:
[x, y, z] scale factorsDefault: [1, 1, 1] (no scaling)Examples:[1.5, 1.5, 1.5]- 150% larger[0.5, 0.5, 0.5]- 50% smaller[1, 2, 1]- Stretched vertically
asset.dimensions * scale. Use getScaledDimensions() for calculations.Wall Attachment Fields
ID of the wall this item is attached to.Example:
"wall_abc123"Only used when asset.attachTo is "wall" or "wall-side".Parametric position along the wall (0-1).Range:
0.0 to 1.0Examples:0.0- Start of wall0.5- Center of wall1.0- End of wall0.25- Quarter way along wall
wallId is specified.Which side of the wall the item is attached to.Values:
"front"- Front side of wall"back"- Back side of wall
Item Hierarchy
Array of child item IDs.Default:
[]Example: ["item_chair1", "item_chair2", "item_vase"]Allows creating hierarchical relationships between items (e.g., chairs around a table, objects on a shelf).Asset Fields
Asset metadata and model reference.Structure: See Asset Schema below
Asset Schema
Theasset object contains metadata about the 3D model:
Unique asset identifier.Example:
"desk-modern-001"Asset category for organization.Examples:
"furniture", "doors", "windows", "lighting", "appliances"Display name for the asset.Example:
"Modern Desk", "Standard Door"URL to thumbnail image.Example:
"/thumbnails/desk-modern-001.jpg"URL to the 3D model file (GLB).Example:
"/models/furniture/desk-modern-001.glb"Base dimensions of the asset.Format:
[width, height, depth] in metersDefault: [1, 1, 1]Example: [1.2, 0.75, 0.6] (desk: 1.2m wide, 0.75m tall, 0.6m deep)Where the item can be attached.Values:
"wall"- Centered on wall surface (doors, windows)"wall-side"- On front or back side of wall (light switches, outlets)"ceiling"- Ceiling-mounted (lights, fans)
Tags for searching and filtering.Example:
["modern", "wood", "office"]Corrective position offset for the GLB model.Default:
[0, 0, 0]Purpose: Normalize model origin (e.g., if model origin is not at the base)Corrective rotation for the GLB model.Default:
[0, 0, 0]Purpose: Normalize model orientation (e.g., if model faces wrong direction)Corrective scale for the GLB model.Default:
[1, 1, 1]Purpose: Normalize model to correct dimensionsSurface height where objects can rest.Example:
{ height: 0.75 } (table surface at 75cm)Purpose: Allows automatic placement of items on surfaces (e.g., vase on table)If undefined, items cannot be placed on this item’s surface.Example
Usage
Creating a Free-Standing Item
Creating a Wall-Mounted Item (Door)
Creating a Wall-Side Item (Light Switch)
Creating Items with Children
Scaling Items
Helper Functions
getScaledDimensions()
Returns the effective world-space dimensions after applying scale:/home/daytona/workspace/source/packages/core/src/schema/nodes/item.ts:62-66
Example:
Transform Hierarchy
Item transforms are applied in this order:- Asset corrective transforms (asset.offset, asset.rotation, asset.scale)
- Item scale (item.scale)
- Item rotation (item.rotation)
- Item position (item.position)
- Parent transforms (if nested)
Use Cases
- Furniture placement in rooms
- Doors and windows on walls
- Light fixtures on ceilings and walls
- Electrical fixtures (switches, outlets)
- Decorative objects and accessories
- Equipment and appliances
- Site elements (vehicles, signage)
- Hierarchical assemblies (table with chairs, desk with lamp)