Define XrService interface.

Implements

Constructors

Accessors

Methods

Constructors

Accessors

Methods

  • Start VIVERSE XR session. NOTE: WebXR requires a user action (key press, click, or touch) to enter and cannot start automatically.

    Parameters

    Returns void

    // The VIVERSE VR system might not be ready when the script is loaded.
    button.active = false;
    button.on('click', () => {
    xrService.start(XrTypes.SessionTypes.Vr);
    });
    if(xrService.isVrReady){
    button.active = true;
    } else {
    xrService.on('vr:ready', () => {
    button.active = true;
    xrService.off('vr:ready');
    });
    }