How to use the troika-3d.World3DFacade.prototype function in troika-3d

To help you get started, we’ve selected a few troika-3d 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 protectwise / troika / packages / troika-xr / src / facade / WorldXRFacade.js View on Github external
/**
   * @override to skip rendering HTML overlays when in immersive mode
   */
  _doRenderHtmlItems() {
    if (this._isImmersive()) {
      if (this.renderHtmlItems) {
        this.renderHtmlItems(emptyArray)
      }
    } else {
      super._doRenderHtmlItems()
    }
  }
}

WorldXRFacade.prototype._notifyWorldHandlers = Object.create(
  World3DFacade.prototype._notifyWorldHandlers,
  {
    // notification to end the XR session
    endXRSession: {
      value: function(source, data) {
        if (this.xrSession) {
          this.xrSession.end()
        }
      }
    }
  }
)

export default WorldXRFacade

troika-3d

Troika 3D

MIT
Latest version published 1 day ago

Package Health Score

73 / 100
Full package analysis

Similar packages