PlayCanvas Events
This section describes the events fired by 8th Wall in a PlayCanvas environment.
You can listen for these events in your web application.
Events Emitted
Event Emitted | Description |
---|---|
xr:camerastatuschange | This event is emitted when the status of the camera changes. See onCameraStatusChange from XR8.addCameraPipelineModule() for more information on the possible status. |
xr:realityerror | This event is emitted when an error has occured when initializing 8th Wall Web. This is the recommended time at which any error messages should be displayed. The XR8.XrDevice() API can help with determining what type of error messaging should be displayed. |
xr:realityready | This event is emitted when 8th Wall Web has initialized and at least one frame has been successfully processed. This is the recommended time at which any loading elements should be hidden. |
xr:screenshoterror | This event is emitted in response to the screenshotrequest resulting in an error. |
xr:screenshotready | This event is emitted in response to the screenshotrequest event being being completed successfully. The JPEG compressed image of the AFrame canvas will be provided. |
XR8.XrController Events Emitted
When XR8.XrController.pipelineModule()
is added by passing it in extraModules
to XR8.PlayCanvas.run()
these events are emitted:
Event Emitted | Description |
---|---|
xr:imageloading | This event is emitted when detection image loading begins. |
xr:imagescanning | This event is emitted when all detection images have been loaded and scanning has begun. |
xr:imagefound | This event is emitted when an image target is first found. |
xr:imageupdated | This event is emitted when an image target changes position, rotation or scale. |
xr:imagelost | This event is emitted when an image target is no longer being tracked. |
xr:meshfound | This event is emitted when a mesh is first found either after start or after a recenter(). |
xr:meshupdated | This event is emitted when the first mesh found changes position or rotation. |
xr:meshlost | This event is emitted when recenter() is called. |
xr:projectwayspotscanning | This event is emitted when all Project Locations have been loaded for scanning. |
xr:projectwayspotfound | This event is emitted when a Project Location is first found. |
xr:projectwayspotupdated | This event is emitted when a Project Location changes position or rotation. |
xr:projectwayspotlost | This event is emitted when a Project Location is no longer being tracked. |
XR8.LayersController Events Emitted
When XR8.LayersController.pipelineModule()
is added by passing it in extraModules
to XR8.PlayCanvas.run()
these events are emitted:
Event Emitted | Description |
---|---|
xr:layerloading | Fires when loading begins for additional layer segmentation resources. |
xr:layerscanning | Fires when all layer segmentation resources have been loaded and scanning has begun. One event is dispatched per layer being scanned. |
xr:layerfound | Fires when a layer is first found. |
XR8.FaceController Events Emitted
When XR8.FaceController.pipelineModule()
is added by passing it in extraModules
to XR8.PlayCanvas.run()
these events are emitted:
Event Emitted | Description |
---|---|
xr:faceloading | Fires when loading begins for additional face AR resources. |
xr:facescanning | Fires when all face AR resources have been loaded and scanning has begun. |
xr:facefound | Fires when a face is first found. |
xr:faceupdated | Fires when a face is subsequently found. |
xr:facelost | Fires when a face is no longer being tracked. |
XR8.HandController Events Emitted
When XR8.HandController.pipelineModule()
is added by passing it in extraModules
to XR8.PlayCanvas.run()
these events are emitted:
Event Emitted | Description |
---|---|
xr:handloading | Fires when loading begins for additional hand AR resources. |
xr:handscanning | Fires when all hand AR resources have been loaded and scanning has begun. |
xr:handfound | Fires when a hand is first found. |
xr:handupdated | Fires when a hand is subsequently found. |
xr:handlost | Fires when a hand is no longer being tracked. |