Import
XRButton is an addon, and must be imported explicitly, see Installation#Addons.
import { XRButton } from 'three/addons/webxr/XRButton.js';
Static Methods
.createButton( renderer : WebGLRenderer | WebGPURenderer, sessionInit : XRSessionInit ) : HTMLElement
Constructs a new XR button.
| renderer |
The renderer. |
| sessionInit |
The a configuration object for the AR session. |
- Returns: The button or an error message if WebXR isn't supported.