Skip to main content

abstract Measurement<T, U>

Abstract class that gives the core elements to create any measurement component. 📘 API.

Extends​

  • Component

Extended by​

Type parameters​

Type parameterValue
T extends Record<string, any>Record<string, any>
U extends keyof MeasureToUnitMapkeyof MeasureToUnitMap

Implements​

  • Createable
  • Hideable
  • Disposable_2

Properties​

cameraStopDelay​

cameraStopDelay: number = 80

Idle window after the last wheel pulse before picks resume. Wheel zoom doesn't fire controlstart / controlend, so we debounce on the canvas-level wheel event. Drag suspension is gated by the user-input pair directly and resumes the moment controlend fires (no debounce, no waiting on damping inertia).


pickMode​

pickMode: MeasurementPickMode = MeasurementPickMode.MOUSE_MOVE

When to run the snap pick that drives the preview marker. See MeasurementPickMode. Defaults to MOUSE_MOVE (pick on every animation frame the cursor is moving). On big models you may want MOUSE_STOP (pick once after the cursor settles for delay ms): the per-pick cost is the same, but you pay it once per intentional stop rather than once per frame, and the marker only appears where the user is actually about to click. The onPointerStop event still fires in both modes; in MOUSE_STOP we just align the pick to that same moment.

Accessors​

lineType​

get lineType(): MeasurementLineType

The line rendering style. See MeasurementLineType. Defaults to Basic. Switching at runtime rebuilds existing measurement lines so it applies live.

Returns​

MeasurementLineType


lineWidth​

get lineWidth(): number

Width of measurement lines in screen pixels. Only has a visible effect when lineType is Fat; WebGL ignores width on the basic material.

Returns​

number


linesMaterial​

set linesMaterial(value): void

The active lines material for the current lineType: a THREE.LineBasicMaterial in Basic mode, a LineMaterial (fat line) in Fat mode. Setting it replaces the material matching its type.

Parameters​

ParameterType
valueLineMaterial | LineBasicMaterial

pickerMode​

get pickerMode(): GraphicVertexPickerMode

Deprecated​

Sync mode is gone — picks are fast enough through the unified GPU-pick path that the synchronous workaround is no longer needed. Reading still returns the underlying picker mode for compatibility, but setting it has no functional effect.

set pickerMode(value): void

Deprecated​

See the getter.

Parameters​

ParameterType
valueGraphicVertexPickerMode

Returns​

GraphicVertexPickerMode