<MeasureTool />
<MeasureTool /> adds a ruler button to the visualizer dashboard. When active, clicking two points in the scene draws a line between them and displays the distance in meters. A settings popover lets you constrain measurement to any combination of the X, Y, and Z axes — useful for measuring along a single axis without snapping perfectly to it.
Mount <MeasureTool /> anywhere inside <Visualizer />:
Interaction
Section titled “Interaction”- Click the ruler button to enter measure mode (sets
interactionModetomeasure). - Click a first point on any geometry or point-cloud surface.
- Click a second point — the distance label appears at the midpoint.
- Click again to clear and start over.
Measurement state also clears whenever the focused entity changes or the tool is toggled off.
Axis constraints
Section titled “Axis constraints”Open the filter popover next to the ruler button to lock the second point to a subset of axes. Disabling an axis pins that coordinate to the first point’s value, so you can measure pure horizontal distance, pure vertical distance, or any combination.