Selva Compute API Reference - v2.1.0
    Preparing search index...

    Type Alias MeasureConfig

    Two-click distance measurement tool. See createMeasureTool.

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

    Properties

    Marker + line color. Default yellow.

    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.