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

    Interface MeasureOptions

    interface MeasureOptions {
        color?: ColorRepresentation;
        displayUnit?: string;
        format?: (distance: number, delta: Vector3) => string;
        labelClassName?: string;
        snapPixels?: number;
    }
    Index

    Properties

    Marker + line color. Default yellow.

    displayUnit?: string

    The model's unit (pass data.modelunits). The scene is in meters, so the default formatter converts and labels in this unit — e.g. a mm model reads "25.0 mm", not "0.025 m". Defaults to meters. Ignored when a custom format is supplied.

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

    Format the measurement → label text. Receives the straight-line distance and the per-axis delta (|b − a| on each axis), both in meters. May return multi-line text or HTML; the default renders the total plus a Δx/Δy/Δz breakdown in displayUnit. Overrides displayUnit.

    labelClassName?: string

    CSS class applied to the distance label, for styling.

    snapPixels?: number

    Snap to a vertex when the cursor is within this many screen pixels of it. Default 12.