Skip to content

Function: createCanvas() ​

ts
function createCanvas(width, height): CompatCanvas;

Defined in: packages/minerender/src/canvas/CanvasCompat.ts:13

Creates a browser or Node canvas through the active environment provider, sized in pixels.

Parameters ​

ParameterType
widthnumber
heightnumber

Returns ​

CompatCanvas