The camera used to position the anchors. If viewer
is defined, then the projection view matrix of the viewer will be used.
The distance between start
and end
in real world units. Value will be undefined if the start and end positions are undefined, or if the measurement is invalid.
The world position of the ending anchor.
The world position of the ending anchor, as a JSON string. The JSON string can be an array or object representation in the format of [x, y, z]
or {"x": 0, "y": 0, "z": 0}
.
The number of fraction digits to display.
A property that reflects which anchor is currently being interacted with.
Indicates if the measurement is invalid. A measurement is invalid if either the start or end position are not on the surface of the model.
An optional formatter that can be used to format the display of a distance. The formatting function is passed a calculated real-world distance and is expected to return a string.
The length of the caps at each end of the distance measurement.
The measurement model that will be updated when this measurement changes. You can pass this to a
A mode that specifies how the measurement component should behave.
When unset, the component will not respond to interactions with the handles.
When edit
, the measurement anchors are interactive and the user is able to reposition them.
When replace
, anytime the user clicks on the canvas, a new measurement will be created and replace any existing measurement. After a measurement is created, the measurement will be editable.
Enables the display of axis reference lines between the start and end point.
The distance, in pixels, between the mouse and nearest snappable edge. A value of 0 disables snapping.
The world position of the starting anchor.
The world position of the starting anchor, as a JSON string. The JSON string can be an array or object representation in the format of [x, y, z]
or {"x": 0, "y": 0, "z": 0}
.
The unit of measurement.
The viewer to connect to this measurement. The measurement will redraw any time the viewer redraws the scene.
An event that is dispatched anytime the user begins editing the measurement.
An event that is dispatched when the user has finished editing the measurement.
The distance from an anchor to its label.