Captures the current viewer canvas.
The screenshot data is opaque; Babylon Lite forces alpha to 255 when reading back the presented canvas.
Stops rendering and disposes the active scene and engine.
A disposed viewer cannot be initialized again.
Returns animation groups loaded with the active model.
Returns the current viewer lifecycle state.
Initializes the WebGPU engine, scene, light, and camera.
If options.source is provided, the model is loaded before the promise
resolves. Rendering starts automatically unless options.autoStart is false.
Handles for the initialized viewer, canvas, engine, scene, and camera.
Loads a glTF/GLB model from a URL, Blob, or ArrayBuffer.
When another model is already loaded, the current scene is disposed and a
fresh scene is created first. This keeps only one model active at a time.
The loaded model is framed automatically before onLoaded runs.
Remote URL, application-hosted URL, uploaded file Blob, or model ArrayBuffer.
Pauses all animation groups loaded with the active model.
Updates the scene clear color.
The value is also used for future replacement scenes created by loadModel.
Starts the Babylon Lite render loop.
This is called automatically by initialize unless autoStart is false.
Stops the Babylon Lite render loop.
Stops all animation groups loaded with the active model.
Minimal Babylon Lite model viewer for a single canvas.
The viewer owns a WebGPU engine, an active scene, and an ArcRotate camera. It loads one model scene at a time: loading a new model disposes the previous scene before creating the next one. Loaded models are framed automatically. No environment settings to keep everything minimal as possible. One default light with controlled intensity. ClearColor with alpha channel (use alphaMode: "premultiplied" for transparency).