Selva Compute API Reference - v3.0.1
    Preparing search index...

    Type Alias MeasureConfig

    Two-click distance measurement tool. See createMeasureTool.

    type MeasureConfig = {
        color?: ColorRepresentation;
        displayUnit?: string;
        enabled?: boolean;
        format?: (distance: number, delta: Vector3) => string;
        labelClassName?: string;
        snapPixels?: number;
    }
    Index

    Properties

    Marker + line color. Default yellow.

    displayUnit?: string

    Model unit (pass the response's modelunits). The scene is in meters, so the default label is converted to this unit — a mm model reads "25.0 mm". Defaults to meters. Ignored if format is set.

    enabled?: boolean

    Create the measurement tool. Default false. Note: this only builds the tool (and its label overlay); start measuring by calling measureTool.setEnabled(true) on the init result.

    format?: (distance: number, delta: Vector3) => string

    Format the measurement → label text. Receives the straight-line distance and per-axis delta. Default renders the total plus a Δx/Δy/Δz breakdown.

    labelClassName?: string

    CSS class for the distance label.

    snapPixels?: number

    Snap to a vertex within this many screen px. Default 12.