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