Create the Babylon Lite engine bound to canvas. Acquires the GPU adapter + device,
configures the canvas's WebGPU context, and returns an EngineContext that is also
the primary SurfaceContext — i.e. the returned engine is itself the surface for the
given canvas. Additional canvases can be attached afterwards via
createSurface(engine, otherCanvas, ...); they share device-scoped GPU resources
(textures, meshes, pipelines, bind groups) with the engine and with each other.
Accepts either a DOM canvas (main thread) or an OffscreenCanvas (e.g. transferred
to a Web Worker) — see RenderCanvas.
Create the Babylon Lite engine bound to
canvas. Acquires the GPU adapter + device, configures the canvas's WebGPU context, and returns anEngineContextthat is also the primarySurfaceContext— i.e. the returned engine is itself the surface for the given canvas. Additional canvases can be attached afterwards viacreateSurface(engine, otherCanvas, ...); they share device-scoped GPU resources (textures, meshes, pipelines, bind groups) with the engine and with each other.Accepts either a DOM canvas (main thread) or an
OffscreenCanvas(e.g. transferred to a Web Worker) — see RenderCanvas.