Auto-select the renderer: try WebGPU first (when the browser exposes it
and an adapter/device negotiates successfully), fall back to WebGL 2,
then to Canvas. await app.init() always resolves — a failed candidate
falls through to the next rather than rejecting.
The WebGPU attempt is a full backend initialization (support can only be
proven by negotiating a device), so on WebGPU-capable browsers init()
settles after the adapter handshake; browsers without navigator.gpu
skip straight to the synchronous WebGL probe.
Note: subsystems that require a GPU backend (Camera3d, Mesh,
ShaderEffect, Light2d, GPU tilemap) will silently stop working under
the terminal Canvas fallback — if your scene depends on any of those,
use WEBGL (or WEBGPU) so the failure surfaces at
startup instead of as a black canvas at runtime.
A specific backend can still be forced per-run with the #webgpu,
#webgl or #canvas URI fragments.
Auto-select the renderer: try WebGPU first (when the browser exposes it and an adapter/device negotiates successfully), fall back to WebGL 2, then to Canvas.
await app.init()always resolves — a failed candidate falls through to the next rather than rejecting.The WebGPU attempt is a full backend initialization (support can only be proven by negotiating a device), so on WebGPU-capable browsers
init()settles after the adapter handshake; browsers withoutnavigator.gpuskip straight to the synchronous WebGL probe.Note: subsystems that require a GPU backend (Camera3d, Mesh, ShaderEffect, Light2d, GPU tilemap) will silently stop working under the terminal Canvas fallback — if your scene depends on any of those, use WEBGL (or WEBGPU) so the failure surfaces at startup instead of as a black canvas at runtime.
A specific backend can still be forced per-run with the
#webgpu,#webglor#canvasURI fragments.