The main exposed object. This is the entry point into the application

const canvas = document.getElementById( 'babylon-canvas' );
const viewer = Viewer( canvas, '/path/to/index.json' );

The class does nothing on its own and needs to bootstrap

Hierarchy

Constructors

Properties

canvas: HTMLCanvasElement
eventEmitter: EventEmitter<string | symbol, any>
version: string = buildInfo.version

Accessors

  • get cloneMaterialsOnMutation(): boolean
  • Gets the cloneMaterialsOnMutation flag, as defined in the spec

    Returns boolean

Methods

  • Enables the Babylon.js Inspector.
    Due to the additional size of the inspector, this function is only available in "development" builds!

    Returns

    Signalizes if inspector could be loaded

    Parameters

    • Optional options: IInspectorOptions

    Returns Promise<boolean>

  • Checks whether the browser is capable of handling XR.

    Returns Promise<boolean>

  • Show world coordinate system with given dimension (for debugging purpose).

    Parameters

    • dimension: number

    Returns void

Generated using TypeDoc