Skip to main content

Type Alias: CanvasInitFunction

type CanvasInitFunction = (context, size) => void;

Defined in: dom/src/canvas/animation.ts:37

Sets up what every frame shares. Called once, with the context and the size in CSS pixels, before the first frame; not again on a resize.

Parameters​

ParameterType
contextCanvasRenderingContext2D
size{ height: number; width: number; }
size.heightnumber
size.widthnumber

Returns​

void