Rengine / docsProject documentation

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[];
};
Runtime tree node. Snapshots contain the information needed by the inspector without giving React ownership of engine mutation.
snapshot⁡:EngineState→Tree\operatorname{snapshot}: EngineState \rightarrow Tree
Snapshot function. The inspector is a pure projection of current engine state.

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.