BabylonPress Lite Viewer - v0.1.0
    Preparing search index...

    Function createLiteViewerForCanvas

    • Creates and initializes a LiteViewer for an existing canvas element.

      This is the simplest entry point for applications that want a ready-to-use viewer in one call. The returned details object includes the viewer instance and the underlying Babylon Lite engine, scene, and camera.

      Parameters

      • canvas: HTMLCanvasElement

        Canvas element where the viewer should render.

      • Optionaloptions: LiteViewerOptions

        Optional startup settings, including an initial model source.

      Returns Promise<LiteViewerDetails>

      Initialized viewer details.

      const details = await createLiteViewerForCanvas(canvas, {
      source: "https://playground.babylonjs.com/scenes/BoomBox.glb",
      });