How to use the @aws-amplify/xr.enterVR function in @aws-amplify/xr

To help you get started, we’ve selected a few @aws-amplify/xr examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github aws-amplify / amplify-js / packages / amplify-ui-components / src / components / amplify-scene / amplify-scene.tsx View on Github external
toggleVRPresentation() {
    try {
      if (this.isVRPresentationActive) {
        XR.exitVR(this.sceneName);
      } else {
        XR.enterVR(this.sceneName);
      }
    } catch (e) {
      // logger.error('Unable to start/stop WebVR System: ' + e.message);
      return;
    }
    this.isVRPresentationActive = !this.isVRPresentationActive;
  }
github aws-amplify / amplify-js / packages / aws-amplify-react / src / XR / SumerianScene.tsx View on Github external
toggleVRPresentation() {
    try {
      if (this.state.isVRPresentationActive) {
        XR.exitVR(this.props.sceneName);
      } else {
        XR.enterVR(this.props.sceneName);
      }
    } catch(e) {
      logger.error('Unable to start/stop WebVR System: ' + e.message);
      return;
    }
    this.setState({isVRPresentationActive: !this.state.isVRPresentationActive});
  }
github aws-amplify / amplify-js / packages / aws-amplify-react / src / XR / SumerianScene.jsx View on Github external
toggleVRPresentation() {
    try {
      if (this.state.isVRPresentationActive) {
        XR.exitVR(this.props.sceneName);
      } else {
        XR.enterVR(this.props.sceneName);
      }
    } catch(e) {
      logger.error('Unable to start/stop WebVR System: ' + e.message);
      return;
    }
    this.setState({isVRPresentationActive: !this.state.isVRPresentationActive});
  }