Skip to content

Type Alias: XROptions

XROptions = object

Defined in: packages/core/src/init/xr.ts:79

Options for launching an XR session.

Properties

features?

optional features: XRFeatureOptions

Defined in: packages/core/src/init/xr.ts:85

Structured feature flags; avoids raw string arrays.


referenceSpace?

optional referenceSpace: ReferenceSpaceSpec

Defined in: packages/core/src/init/xr.ts:83

Reference space policy (preferred + fallback).


restoreCameraOnExit?

optional restoreCameraOnExit: boolean

Defined in: packages/core/src/init/xr.ts:95

Auto-restore world.camera to its pre-XR local transform and projection when the session ends. Without this, WebGLRenderer.xr leaves the camera at the last head pose and the 2D fallback view is inside-the-head until the user re-applies a camera setup. Restore is deferred one rAF so WebXRManager finishes tearing down on the end-tick before the camera is overwritten.

Default Value

ts
true

sessionMode?

optional sessionMode: SessionMode

Defined in: packages/core/src/init/xr.ts:81

Session mode to request.

Default Value

ts
SessionMode.ImmersiveVR

Privacy | Terms