<LLMSceneBuilder /> adds an LLM Scene Builder panel to the visualizer dashboard. You type a natural-language instruction (“Move the arm 200 mm forward along X”), the plugin calls your onInfer callback with the current frame state, and presents a diff of every proposed field change before anything is applied. The user confirms or cancels — no frame is mutated until confirmation.
The plugin is model-agnostic: you wire in whatever LLM backend you prefer via the onInfer prop.
A robot-outline button appears in the dashboard. Clicking it opens the LLM Scene Builder floating panel. Enter a prompt and press Submit (or Enter) — the panel shows a diff table while the LLM responds, then lets the user confirm or cancel.
updates — an array of FrameDelta objects describing changes (see below). Omit any field that should remain unchanged.
explanation — a human-readable summary shown above the diff table.
refusal — optional. When set, the plugin skips the diff and shows the message in its error state instead. Use it for requests the plugin cannot fulfil (e.g. adding a new component).
interface FrameDelta { componentName: string translation?: { x?: number; y?: number; z?: number } // mm, absolute orientation?: { roll?: number; pitch?: number; yaw?: number } // degrees, delta applied to current // resize (omit `type`), change shape (set `type`), or remove (`type: 'none'`); send only changed dims geometry?: { type?: 'none' | 'box' | 'sphere' | 'capsule' x?: number y?: number z?: number r?: number l?: number } parent?: string explanation?: string // per-component note shown in the diff}
The plugin validates every delta before showing the diff: unknown component names, self-referential parent assignments, non-finite numbers, and geometry with missing or non-positive dimensions are surfaced as errors without blocking the rest of the update batch.