API

Type Alias RenderCanvas

RenderCanvas: HTMLCanvasElement | OffscreenCanvas

A surface Babylon Lite can render into. Either a DOM canvas (main thread) or an OffscreenCanvas (e.g. one transferred to a Web Worker via transferControlToOffscreen()). Both expose getContext("webgpu") plus a read/write backing-store width/height; only the DOM canvas exposes layout (clientWidth/clientHeight) and attributes (setAttribute).