VRButton Class
VRButton is a utility class for creating and managing buttons to enter and exit VR (Virtual Reality) sessions.
Static Methods
convertToVRButton
ts
static convertToVRButton(
button: HTMLButtonElement,
renderer: THREE.WebGLRenderer,
options: XRButtonOptions = {}
): voidConverts a standard HTML button into a button that manages VR sessions, using XRButtonOptions for configuration.
createButton
ts
static createButton(
renderer: THREE.WebGLRenderer,
options: XRButtonOptions = {}
): HTMLButtonElementCreates an HTML button that manages VR sessions, using XRButtonOptions for configuration.
registerSessionGrantedListener
ts
static registerSessionGrantedListener(): voidRegisters a listener to set a flag when an XR session is granted.