Factory to create WebXR buttons for AR, VR, Quicklook and Send to Quest
The buttons are created as HTMLButtonElements and can be added to the DOM.
The buttons will automatically hide when a XR session is started and show again when the session ends.

Constructors

Accessors

Methods

  • get or create the WebXR AR button

    Parameters

    • Optionalinit: XRSessionInit

      optional session init options Behaviour of the button:

      • if the device supports AR, the button will be visible and clickable
      • if the device does not support AR, the button will be hidden
      • if the device changes and now supports AR, the button will be visible

    Returns HTMLButtonElement

  • Returns HTMLButtonElement

    please use ButtonsFactory.getOrCreate().createQRCode(). This method will be removed in a future update

  • get or create the quicklook button Behaviour of the button:

    • if the button is clicked a USDZExporter component will be searched for in the scene and if found, it will be used to export the scene to USDZ / Quicklook

    Returns HTMLButtonElement

  • get or create the Send To Quest button Behaviour of the button:

    • if the button is clicked, the current URL will be sent to the Oculus Browser on the Quest

    Returns HTMLButtonElement

  • get or create the WebXR VR button

    Parameters

    • Optionalinit: XRSessionInit

      optional session init options Behaviour of the button:

      • if the device supports VR, the button will be visible and clickable
      • if the device does not support VR, the button will be hidden
      • if the device changes and now supports VR, the button will be visible

    Returns HTMLButtonElement