Interface XrSessionContext
interface XrSessionContext {
binding: XrGpuBinding;
cameras: readonly XrCamera[];
colorFormat: GPUTextureFormat;
depthFormat: GPUTextureFormat | null;
engine: EngineContext;
input: XrInputManager | null;
layer: XRProjectionLayer;
mode: XrSessionMode;
referenceSpace: XRReferenceSpace;
scene: SceneContext;
session: XRSession;
}
binding: XrGpuBinding;
cameras: readonly XrCamera[];
colorFormat: GPUTextureFormat;
depthFormat: GPUTextureFormat | null;
engine: EngineContext;
input: XrInputManager | null;
layer: XRProjectionLayer;
mode: XrSessionMode;
referenceSpace: XRReferenceSpace;
scene: SceneContext;
session: XRSession;
}
Properties
Readonlybinding
Readonlycameras
Per-eye cameras, in XRViewerPose.views order. Populated on the first frame.
Readonlycolor Format
colorFormat: GPUTextureFormat
Readonlydepth Format
depthFormat: GPUTextureFormat | null
Readonlyengine
Readonlyinput
Input manager, or null when input tracking is disabled.
Readonlylayer
layer: XRProjectionLayer
Readonlymode
Readonlyreference Space
referenceSpace: XRReferenceSpace
Active reference space the session renders + tracks input against. Teleportation swaps this for an offset space to move the viewer.
Readonlyscene
Readonlysession
session: XRSession
Handle to an active WebGPU XR session. Pure state; drive lifecycle with exitXr.