Screen helpers · function

bakeOverlay

Paint an overlay into a transparent canvas of exactly the frame's size.

Explained in Recording and clips.

function bakeOverlay(overlay: FrameOverlay, width: number, height: number): HTMLCanvasElement | null
import { bakeOverlay } from '@driftengine/core';

Parameters

ParameterTypeDescription
overlayFrameOverlay
widthnumber
heightnumber

In depth

Returns null when there is nothing to draw, so a caller can skip the composite entirely rather than blending a blank layer over every frame.