API

Class WebXREnterExitUI

UI to allow the user to enter/exit XR mode

Implements

Index
activeButtonChangedObservable: Observable<Nullable<WebXREnterExitUIButton>> = ...

Fired every time the active button is changed.

When xr is entered via a button that launches xr that button will be the callback parameter

When exiting xr the callback parameter will be null)

version of the options passed to this UI

overlay: HTMLDivElement

The HTML Div Element to which buttons are added.

  • Set the helper to be used with this UI component. The UI is bound to an experience helper. If not provided the UI can still be used but the events should be registered by the developer.

    Parameters

    • helper: WebXRExperienceHelper

      the experience helper to attach

    • OptionalrenderTarget: WebXRRenderTarget<WebGLRenderingContext, XRWebGLLayer>

      an optional render target (in case it is created outside of the helper scope)

    Returns Promise<void>

    a promise that resolves when the ui is ready