How to use the troika-core.ParentFacade function in troika-core

To help you get started, we’ve selected a few troika-core 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 / XRInputSourceManager.js View on Github external
constructor(parent) {
    super(parent)
    this._sourcesDirty = true

    // Required props:
    this.xrSession = null
    this.xrReferenceSpace = null

    // Separate subtree for the XRInputSourceFacade instances:
    this._xrInputSourceSubtree = new ParentFacade(this)

    this._onInputSourcesChange = e => {
      this._sourcesDirty = true
      this.afterUpdate()
    }
  }