Construction parameters for DistanceMeasurementTool.

interface DistanceMeasurementToolParams {
    container?: HTMLElement;
    defaultColor?: string;
    picker?: PickStrategy;
    view: View;
    visible?: boolean;
}

Properties

container?: HTMLElement

Optional override for the parent of the overlay DOM. Defaults to the View canvas's parent element so the overlay shares its stacking context (and any letterboxing applied to the canvas doesn't shift the wires off-axis).

defaultColor?: string

Default DistanceMeasurementParams.color for measurements created without an explicit color.

picker?: PickStrategy

Picker used by MouseDistanceMeasurementsControl to turn canvas clicks into world-space anchors, including snap-to-vertex / snap-to-edge when supported. If omitted the tool builds a BVH-only picker from the View's Scene — supply a RoutingPickStrategy to get snap.

view: View

The View the tool paints into. The widget mounts an absolutely-positioned overlay over the View's canvas.

visible?: boolean

Initial visibility. When false, all measurements stay loaded but the entire overlay is hidden. Default true.