This is the entry point into the application.
Create an instance to set up the viewer on your canvas.

const canvas = document.getElementById('babylon-canvas');
const viewer = Viewer(canvas, viewerSettings, defaultSceneSettings);

Use "manager" sub classes for interacting with the Babylon.js engine. (e.g. modelManager for loading models into the scene)

Hierarchy

  • Viewer

Constructors

Properties

canvas?: HTMLCanvasElement
version: string = buildInfo.version

Accessors

  • get engine(): AbstractEngine
  • Returns AbstractEngine

Methods

  • Destroys this viewer instance and disposes Babylon.js engine and all scene content

    Returns void

  • Pause rendering can be useful when doing internal scene processings that should not be visible to the user, e.g. cloning meshes for gltf export

    Returns void

Generated using TypeDoc