How to use the @aws-amplify/xr.isSceneLoaded 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
render() {
    let muteButton;
    let enterOrExitVRButton;
    let screenSizeButton;

    if (XR.isSceneLoaded(this.sceneName)) {
      if (this.showEnableAudio) {
        muteButton = (
           this.setMuted(false)}
            autoShowTooltip
          />
        );
      } else if (XR.isMuted(this.sceneName)) {
        muteButton =  this.setMuted(false)} />;
      } else {
        muteButton =  this.setMuted(true)} />;
      }

      if (XR.isVRCapable(this.sceneName)) {
github aws-amplify / amplify-js / packages / aws-amplify-react / src / XR / SumerianScene.jsx View on Github external
render() {
    let muteButton;
    let enterOrExitVRButton;
    let screenSizeButton;

    if (XR.isSceneLoaded(this.props.sceneName)) {
      if (this.state.showEnableAudio) {
        muteButton =  this.setMuted(false)} autoShowTooltip />
      } else if (XR.isMuted(this.props.sceneName)) {
        muteButton =  this.setMuted(false)} />
      } else {
        muteButton =  this.setMuted(true)} />
      }

      if (XR.isVRCapable(this.props.sceneName)) {
        if (this.state.isVRPresentationActive) {
          logger.info('VR Presentation Active');
          enterOrExitVRButton =  this.toggleVRPresentation()} />
        } else {
          logger.info('VR Presentation Inactive');
          enterOrExitVRButton =  this.toggleVRPresentation()} />
        }
github aws-amplify / amplify-js / packages / aws-amplify-react / src / XR / SumerianScene.tsx View on Github external
render() {
    let muteButton;
    let enterOrExitVRButton;
    let screenSizeButton;

    if (XR.isSceneLoaded(this.props.sceneName)) {
      if (this.state.showEnableAudio) {
        muteButton =  this.setMuted(false)} autoShowTooltip />
      } else if (XR.isMuted(this.props.sceneName)) {
        muteButton =  this.setMuted(false)} />
      } else {
        muteButton =  this.setMuted(true)} />
      }

      if (XR.isVRCapable(this.props.sceneName)) {
        if (this.state.isVRPresentationActive) {
          logger.info('VR Presentation Active');
          enterOrExitVRButton =  this.toggleVRPresentation()} />
        } else {
          logger.info('VR Presentation Inactive');
          enterOrExitVRButton =  this.toggleVRPresentation()} />
        }