Skip to main content
Documentation

Overview

Compare the current and classic Dnalogel measurement plugins and choose the right integration.

Tip

The Measure plugin is used to measure distances and areas within a Realsee VR space, helping users get an intuitive sense of the size of the space.

Two measure plugins are currently available:

Choosing a plugin

Data dependencies

ComparisonMeasurePlugin (new)PanoMeasurePlugin (classic)
Server-side dataNot requiredSupports loading data from the /open/v3/ruler/search API
Data format{ points: Vector3[] }[]MeasurePluginServerData (polyline JSON)
Data persistenceMust be implemented yourselfSupports load() / toJson() serialization

Feature comparison

FeatureMeasurePlugin (new)PanoMeasurePlugin (classic)
Distance measurement
Area measurement✅ (requires the Util for calculation)✅ (built-in calculation and display)
Automatic polygon closing
Right-triangle helper lines
Endpoint drag-to-reposition✅ (long-press and drag)
Magnifier✅ (built-in PointSelector)✅ (configurable parameters)
Built-in UI controller✅ (supports desktop / mobile)
Guided hints✅ (GuideController)
Keyboard shortcut support
Unit switching✅ (setUnit)✅ (changeConfigs)
Precision settings✅ (setPrecision)Fixed at 2 decimal places

Modes and states

ComparisonMeasurePlugin (new)PanoMeasurePlugin (classic)
Working modeSingle modeFour modes: Watch / Edit / Mixed / View
Desktop defaultStarts measuring directlyWatch mode (viewing existing data)
Mobile supportGeneralMixed mode (specifically optimized)
Mode switchingNot requiredchangeMode() / edit() / save()

Event system

ComparisonMeasurePlugin (new)PanoMeasurePlugin (classic)
Core eventsmeasureEnd (returns the end reason + point coordinates)A variety of fine-grained events
Editing eventsundoeditedPolylineChange, editedDashedLineChange, revoke, complete, etc.
State eventsenable, disable, modeChange, measureTypeChange
Point-selection events❌ (obtained via measureEnd)pointsChange, anchorChange, getStartPoint, getEndPoint
Interaction eventsselectedChange, wantsDragLine, readyComplete

API design

MeasurePlugin (new) — streamlined API:

// Core methods
measure()           // Start measuring
endMeasure()        // End measuring
undo()              // Undo the last step
cancel()            // Cancel the current measurement
clear()             // Clear all measurements
dispose()           // Destroy the plugin

// Configuration methods
setUnit(unit)       // Switch units
setPrecision(n)     // Set precision
setLengthEnable(b)  // Show / hide length labels
load(data)          // Load data

PanoMeasurePlugin (classic) — full API:

// Lifecycle
enable({ mode })    // Enable the plugin
disable()           // Disable the plugin
dispose()           // Destroy the plugin

// Mode control
changeMode(mode)    // Switch mode (Watch/Edit/Mixed/View)
edit(measureType)   // Enter edit mode
save({ mode })      // Save the edit

// Data operations
load(data)          // Load data
toJson()            // Export data
clear()             // Clear data

// Edit operations
revoke()            // Undo
changeMeasureType() // Switch measurement type (line/area)
removePolyline()    // Remove a polyline
removeArea()        // Remove an area

// Interaction control
highlightLine()     // Highlight a line segment
clearHighlightLines() // Clear highlights
setCustomText()     // Set line-segment text
changeConfigs()     // Change configuration

Use cases

ScenarioRecommended plugin
Quickly integrate standard measurement functionalityPanoMeasurePlugin
Need to load / save server-side measurement dataPanoMeasurePlugin
Need built-in UI and guided hintsPanoMeasurePlugin
Specifically optimized mobile experiencePanoMeasurePlugin
Need fine-grained control over the editing flow and statePanoMeasurePlugin
Custom measurement UIMeasurePlugin
Need to obtain measurement point coordinates for custom calculationsMeasurePlugin
Need to listen for the measurement-end eventMeasurePlugin
Need to dynamically adjust precisionMeasurePlugin
Endpoint drag-to-reposition functionalityMeasurePlugin
Right-triangle helper linesMeasurePlugin
Lightweight integration with minimal dependenciesMeasurePlugin

Recommendations

  • Choose PanoMeasurePlugin if you need full measurement functionality, built-in UI, data persistence, or a specifically optimized mobile experience.
  • Choose MeasurePlugin if you need a custom UI, want to listen for measurement events to obtain point coordinates, or need to perform custom area or length calculations.