This is the complete prop reference for FragCanvas — the main adapter entrypoint for using Motion GPU in Svelte, React, and Vue.
Import
Usage
Adapter-specific naming differences (class vs className vs canvasClass, style type, children/slots) are listed below.
Props
Required
Rendering
Color pipeline
color controls the private final presentation stage. It is not a composable render pass; it always runs after the base scene and after all post-scene render passes.
Khronos PBR Neutral is an SDR tone mapper: it consumes non-negative linear Rec.709 HDR color and returns linear Rec.709 in [0, 1]. Explicit dynamicRange: 'hdr' with toneMapping: 'khronos-pbr-neutral' is rejected because that combination asks for HDR presentation after an SDR tone mapper.
Post-processing
WebGPU configuration
Error handling
Error history behavior
- History is disabled when
errorHistoryLimit <= 0. - History stores the latest
Nreports whenerrorHistoryLimit > 0. - Consecutive identical reports are deduplicated (
phase/title/message/rawMessagekey). - Reducing
errorHistoryLimittrims existing history immediately.
Styling and children
Lifecycle
Canvas sizing
FragCanvas renders a <canvas> inside a container <div>. The canvas fills its container using width: 100%; height: 100% CSS. The container determines the effective canvas dimensions.
The physical size (GPU resolution) is containerSize × dpr.