EasyAR tracks environment features. It needs to find and confirm a ground position on the floor first to enable the feature tracking.
See EasyAR documentation: https://developer.apple.com/documentation/EasyAR
Extends
Members
active :boolean
- Inherited From:
Is the tracker active or not.
Type:
- boolean
groundConfirmed :boolean
- Inherited From:
Is the ground position already confirmed.
Type:
- boolean
name :string
- Inherited From:
Name of the tracker.
Type:
- string
options :EasyAROptions
Current tracking options.
Type:
- EasyAROptions
scanVolume :ScanVolume
Get the current settings for the scan volume override.
Type:
- ScanVolume
scanning :boolean
mesh scan status
Type:
- boolean
sensorStatus :EasyARTracker#SensorStatus
Get the current sensor status. Is automatically updated.
Type:
targets :Array.<TrackingTarget>
- Inherited From:
The list of tracking targets.
Type:
- Array.<TrackingTarget>
tracking :boolean
- Inherited From:
Current target tracking status.
Type:
- boolean
Methods
(async) activate()
- Inherited From:
Activate the tracker. Disables all other currently active trackers.
(async) colorizeMesh() → {Promise}
Colorize the scanned mesh. Starts the skinning process.
Returns:
resolved when done.
- Type
- Promise
(async) confirmGroundPosition()
- Inherited From:
Confirms ground position to start feature tracking.
(async) deactivate()
- Inherited From:
Deactivate the tracker.
(async) fillMeshHoles() → {Promise}
Fills any holes in the scanned mesh, creating a closed body.
Returns:
resolved when done.
- Type
- Promise
(async) getMeshList() → {Promise.<Array.<Mesh>>}
Retrieves the list of stored meshes.
Returns:
resolved when done.
- Type
- Promise.<Array.<Mesh>>
(async) getTrackingQuality() → {Promise.<string>}
Retrieves current quality of tracking. Quality declines in environments with a lot of sunlight.
Returns:
resolves with string describing quality
- Type
- Promise.<string>
isActive() → {boolean}
- Inherited From:
Is the tracker currently active.
Returns:
True if active.
- Type
- boolean
off(eventName, eventHandler)
- Inherited From:
Parameters:
Name | Type | Description |
---|---|---|
eventName |
string | |
eventHandler |
function |
on(eventName, eventHandler)
- Inherited From:
Parameters:
Name | Type | Description |
---|---|---|
eventName |
string | |
eventHandler |
function |
once(eventName, eventHandler)
- Inherited From:
Parameters:
Name | Type | Description |
---|---|---|
eventName |
string | |
eventHandler |
function |
(async) reset()
- Inherited From:
Reset the tracker. Shorthand function for Tracker#deactivate and Tracker#activate.
(async) resetMeshScan() → {Promise}
Resets mesh scan. Previously scanned mesh is lost.
Returns:
resolved when done.
- Type
- Promise
setOptions(newOptions)
Set the tracker's (optional) options.
Parameters:
Name | Type | Description |
---|---|---|
newOptions |
EasyAROptions |
(async) setScanVolume(newScanInfo, resetTracking) → {Promise}
Override the default settings for the scan volume for the scanning progress. It's also possible to override just one
value of the scan volume (e.g. resolution).
Parameters:
Name | Type | Description |
---|---|---|
newScanInfo |
EasyARTracker#ScanVolume | The scan volume parameters. |
resetTracking |
boolean | should the tracker reset after updating the values. |
Returns:
Resolved when done.
- Type
- Promise
(async) setTrackingTargets(newTargets)
- Inherited From:
Update the tracking target config. This will override existing targets and remove already learned targets.
Parameters:
Name | Type | Description |
---|---|---|
newTargets |
Array.<TargetConfig> |
(async) startMeshScan() → {Promise}
Starts mesh scan.
Returns:
resolved when done.
- Type
- Promise
(async) stopMeshScan() → {Promise}
Stops mesh scan.
Returns:
resolved when done.
- Type
- Promise
Type Definitions
EasyAROptions
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
autoConfirmGroundPosition |
boolean |
<nullable> |
automatically confirm ground position when target is found. |
Options how the tracker should behave.
Type:
- Object
EasyAROptions
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
autoConfirmGroundPosition |
boolean |
<nullable> |
automatically confirm ground position when target is found. |
Options how the tracker should behave.
Type:
- Object
ScanVolume
The scan volume of the tracker. The tracker will scan only inside this area.
Type:
- Object
SensorStatus
The last updated sensor status.
Type:
- Object
Events
holeFillFinished
Fired when the hole filling has finished.
holeFillProgressUpdate
Sends the progress update from the hole filling from 0 to 100.
Parameters:
Name | Type | Description |
---|---|---|
progress |
int | in percent from 0 to 100. |
skinningFinished
Fired when the skinning has finished.
skinningProgressUpdate
Sends the progress update from the skinning from 0 to 100.
Parameters:
Name | Type | Description |
---|---|---|
progress |
int | in percent from 0 to 100. |
trackingBatteryNeedsCharging
Fired when the battery status of the sensor is too low.
Parameters:
Name | Type | Description |
---|---|---|
target |
TrackingTarget |
trackingBatteryNeedsNoCharging
Fired when the battery status of the sensor is back to normal.
Parameters:
Name | Type | Description |
---|---|---|
target |
TrackingTarget |
trackingSensorConnected
Fired when the sensor is connected to the device.
Parameters:
Name | Type | Description |
---|---|---|
target |
TrackingTarget |
trackingSensorDisconnected
Fired when the sensor is disconnected from the device.
Parameters:
Name | Type | Description |
---|---|---|
target |
TrackingTarget |
trackingSpeedHigh
Fired when the user looks around too fast.
Parameters:
Name | Type | Description |
---|---|---|
target |
TrackingTarget |
trackingSpeedNormal
Fired when the user looks around in an acceptable speed again.
Parameters:
Name | Type | Description |
---|---|---|
target |
TrackingTarget |
trackingStatusChanged
- Inherited From:
Fired when a tracking target is found or lost.
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
info |
object |
Properties
|
trackingTargetNew
- Inherited From:
Fired when an unregistered tracking target is found.
Parameters:
Name | Type | Description |
---|---|---|
target |
TrackingTarget |
trackingTargetStatusChanged
- Inherited From:
Fired when a tracking target is found or lost.
Parameters:
Name | Type | Description |
---|---|---|
target |
TrackingTarget |