Advanced / Scene · guide
Scene backgrounds
Current Apexify.js 6.0.0 documentation for Scene backgrounds.
The root background (and each surface’s background) uses the same shape as CanvasConfig minus the required width / height on the scene object — those come from SceneRenderInput.width/height or from placement.width/height for surfaces.
Painting is done by CanvasCreator.composeCanvasForScene → paintConfiguredCanvasSurface (gradients, bgLayers, patternBg, noiseBg, clip, zoom, shadow, stroke, videoBg if extraction is wired, etc.). Deep behaviour: Canvas backgrounds, bg-layers, transparent base.
Variant: flat color
Transparent “letterbox” feel
Combine with transparentBase: true and bgLayers if you need a stacked transparent stack (see transparent base).
Variant: linear gradient (sketch)
(Match your gradient type from Gradients / canvas docs.)
Variant: full-screen image
Inherit image dimensions (root scene)
If customBg.inherit: true, CanvasCreator can set width/height from the image — you may omit width/height on SceneRenderInput only when that resolution path runs successfully; otherwise set explicit width/height.
Variant: bgLayers stack (tint over image)
Only layers, no primary fill
Variant: pattern + noise
Variant: border, shadow, zoom (card-style root)
Note: For root scene, width/height on SceneRenderInput are still the full bitmap size; x,y,width,height on background define the clipped rounded rect inside that bitmap (same as createCanvas).
videoBg caveat
CanvasConfig.videoBg requires CanvasCreator.setExtractVideoFrame to be set (typically from video stack wiring). If unset, videoBg may not size or paint. Prefer customBg with a still frame you extracted yourself if you need reliability without that hook.