API

Class WebXRDefaultExperienceOptions

Options for the default xr helper

Index
disableDefaultUI?: boolean

Enable or disable default UI to enter XR

disableHandTracking?: boolean

Should hand tracking be disabled. Defaults to false.

disableNearInteraction?: boolean

Should nearInteraction not initialize. Defaults to false.

disablePointerSelection?: boolean

Should pointer selection not initialize. Note that disabling pointer selection also disables teleportation. Defaults to false.

disableTeleportation?: boolean

Should teleportation not initialize. Defaults to false.

floorMeshes?: AbstractMesh[]

Floor meshes that will be used for teleport

handSupportOptions?: Partial<IWebXRHandTrackingOptions>

optional configuration for hand tracking

ignoreNativeCameraTransformation?: boolean

If set to true, the first frame will not be used to reset position The first frame is mainly used when copying transformation from the old camera Mainly used in AR

inputOptions?: Partial<IWebXRInputOptions>

Optional configuration for the XR input object

nearInteractionOptions?: Partial<IWebXRNearInteractionOptions>

optional configuration for near interaction

optionalFeatures?: boolean | string[]

A list of optional features to init the session with If set to true, all features we support will be added

outputCanvasOptions?: WebXRManagedOutputCanvasOptions

optional configuration for the output canvas

pointerSelectionOptions?: Partial<IWebXRControllerPointerSelectionOptions>

optional configuration for pointer selection

renderingGroupId?: number

An optional rendering group id that will be set globally for teleportation, pointer selection and default controller meshes

teleportationOptions?: Partial<IWebXRTeleportationOptions>

optional configuration for teleportation

uiOptions?: Partial<WebXREnterExitUIOptions>

Options for the default enter/exit UI, including session mode and reference space type. Set onError here to receive XR entry failures (including WebGPU session negotiation failures) when the default button is used. The application can then notify the user or create a new WebGL engine and scene; Babylon.js cannot switch an existing scene's rendering backend. When disableDefaultUI is true, handle rejections from baseExperience.enterXRAsync() instead.

useStablePlugins?: boolean

When loading teleportation and pointer select, use stable versions instead of latest.