Reference
Inspector Snapshot Semantics
Look up syntax, contracts, layouts, algorithms, and exact behavior.
The runtime tree is a snapshot of the current engine graph, not the graph itself. Each node stores identity, kind, component labels, local transform, world transform, color, and child snapshots. React inspection state stays separate from the mutable engine state used by the canvas loop.
type RuntimeTreeNode = {
id: string;
label: string;
kind: "entity" | "folder";
componentLabels: string[];
local: TransformSnapshot;
world: TransformSnapshot;
color?: string;
children: RuntimeTreeNode[];
};Collapsed-node state and local/world display preferences live outside the snapshot. When the scene changes, those UI sets are filtered against the new node IDs so stale inspector state cannot refer to removed nodes.