Skip to content

<BuildFrames />

<BuildFrames /> contributes build mode: the mode where you author a machine’s frames instead of watching them. Mounting it adds

  • the Build button to the workspace mode toggle,
  • the transform toolbar — translate / rotate / scale gizmos, snapping with per-axis increments, and local / world space,
  • a Frameless components folder in the world tree, listing the config’s components that have no frame yet. Selecting one offers to add its frame, and the new frame inherits the selection.
  • the Live updates paused banner, with undo / redo of staged frame edits and Cmd/Ctrl+S to save,
  • the build-mode keyboard shortcuts, dispatched by the visualizer while build mode is active: 0–3 for the transform mode, and = / - to add or remove a custom geometry.

While build mode is active the live frame and pose queries are paused, so staged edits aren’t overwritten by the machine.

<script lang="ts">
	import { Visualizer } from '@viamrobotics/visualization'
	import { BuildFrames } from '@viamrobotics/visualization/plugins'
</script>

<div class="h-screen w-screen">
	<Visualizer partID="my-part-id">
		<BuildFrames />
	</Visualizer>
</div>

Build mode exists only while this plugin is mounted. It declares itself with useEnvironmentMode, the same hook MoveFrame uses for move mode:

<script lang="ts">
	import { useEnvironmentMode } from '@viamrobotics/visualization'

	useEnvironmentMode('build')
</script>

useEnvironment().availableModes lists what is currently reachable, in registration order. The mode toggle reads it to hide itself entirely when there are fewer than two modes, so a viewer with no mode plugins shows no toggle at all.

  • A partID, and edit permissions on that part, for the frame-editing affordances.
  • Mount order is button order and fallback priority: mount <Monitor />, then <BuildFrames />, then <MoveFrame /> for the conventional monitor | build | move layout.