How to use the babylonjs-gui.AdvancedDynamicTexture function in babylonjs-gui

To help you get started, we’ve selected a few babylonjs-gui examples, based on popular ways it is used in public projects.

github brianzinn / react-babylonjs / src / AdvancedDynamicTexture.ts View on Github external
create(scene: Scene): BabylonAdvancedDynamicTexture {
    this.advancedDynamicTexture =
      this.props.createForParentMesh === true
        ? BabylonAdvancedDynamicTexture.CreateForMesh(
            this.props.container.babylonObject,
            this.props.width,
            this.props.height,
            this.props.supportPointerMove,
            this.props.onlyAlphaTesting
          )
        : new BabylonAdvancedDynamicTexture(
            this.props.name,
            this.props.width,
            this.props.height,
            scene,
            this.props.generateMipMaps,
            this.props.samplingMode
          )

    return this.advancedDynamicTexture
  }