XR · interface

XrRun

Explained in XR.

interface XrRun
import type { XrRun } from '@driftengine/xr';

Properties

NameTypeDescription
sessionreadonlyXrSession
referenceSpacereadonlyunknown
referenceSpaceTypereadonlystring
layerreadonlyXrLayer
backendreadonlyLayerBackend
frameSourcereadonlyFrameSourceHand 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): void

Runs when the session ends, however it ends, including the user taking the headset off.

ParameterTypeDescription
listener() => void