AI agents: fetch the documentation index at llms.txt. Markdown versions are available by appending .md to any page URL, including this page's markdown.
WebGPU
Browser requirements, the WASM renderer, and the Canvas 2D fallback.
React Vello prefers WebGPU. The WASM Vello renderer is bundled with the package.
Requirements
- Use a browser with WebGPU enabled (current Chromium-based browsers are the most reliable path).
- Serve your page over a secure context (
httpsorlocalhost).
If navigator.gpu is missing, the root still mounts. Rendering falls back to a Canvas 2D software path so the scene stays visible while you develop without GPU support.
How the root chooses a backend
createVelloRoot checks for WebGPU at creation time:
- WebGPU available — load WASM, create the GPU renderer, and call
onReadywhen the driver is ready. - WebGPU init fails — disable the GPU driver, switch
backendto"canvas", and callonErrorthenonReady. - No WebGPU — skip WASM init and call
onReadyon a microtask withbackend: "canvas".
Inspect the active path with root.getContext().backend ("webgpu" | "canvas").
No extra WASM setup
You do not need to configure wasm-pack, copy assets by hand, or register a separate loader for the published package. The renderer ships inside react-vello and loads through the package's WASM bridge.
Tips
- Prefer Chromium for demos and stress tests that exercise the GPU path.
- Pass
onErrortocreateVelloRootif you want to surface GPU init failures in your UI. - Pass
debug: truewhen you need per-stage frame timings viagetContext().getStats().