Skip to main content

PlayCanvas Event Listeners

This section describes the events that are listened for by 8th Wall Web in a PlayCanvas environment.

You can fire these events in your web application to perform various actions:

Event ListenerDescription
xr:hidecamerafeedHides the camera feed. Tracking does not stop.
xr:recenterRecenters the camera feed to its origin. If a new origin is provided as an argument, the camera's origin will be reset to that, then it will recenter.
xr:screenshotrequestEmits a request to the engine to capture a screenshot of the PlayCanvas canvas. The engine will emit a xr:screenshotready event with the JPEG compressed image or xr:screenshoterror if an error has occured.
xr:showcamerafeedShows the camera feed.
xr:stopxrStop the current XR session. While stopped, the camera feed is stopped and device motion is not tracked.