XR · interface
XrRun
Explained in XR.
interface XrRunimport type { XrRun } from '@driftengine/xr';Properties
| Name | Type | Description |
|---|---|---|
sessionreadonly | XrSession | |
referenceSpacereadonly | unknown | |
referenceSpaceTypereadonly | string | |
layerreadonly | XrLayer | |
backendreadonly | LayerBackend | |
frameSourcereadonly | FrameSource | Hand this to startLoop and the engine runs on the session's clock. |
Methods
end
end(): Promise<void>Ends the session. Safe to call twice.
onEnd
onEnd(listener: () => void): voidRuns when the session ends, however it ends, including the user taking the headset off.
| Parameter | Type | Description |
|---|---|---|
listener | () => void |