Capítulo 619 de 859

Chapter 619: VRButton

Core Idea

A utility class for creating a button that allows to initiate immersive VR sessions based on WebXR. The button can be created with a factory method and then appended ot the website's DOM.

Key Concepts

  • xrSessionIsGranted : boolean: Whether a XR session has been granted or not.

Code Examples

document.body.appendChild( VRButton.createButton( renderer ) );
  • What it demonstrates: Typical usage of VRButton.

Reference Tables

Properties

PropertyDescription
.xrSessionIsGranted : booleanWhether a XR session has been granted or not.

Key Takeaways

  1. Most relevant properties: xrSessionIsGranted.

Connects To