Function: createCanvas()
createCanvas(
id
,container
,width?
,height?
):HTMLCanvasElement
Defined in: rendering/utilities/create-canvas.ts:10
Creates a canvas element with the specified ID, dimensions, and appends it to the given container.
Parameters
id
string
The ID to assign to the canvas element.
container
HTMLElement
The HTML element to which the canvas will be appended.
width?
number
The width of the canvas (default: window.innerWidth).
height?
number
The height of the canvas (default: window.innerHeight).
Returns
HTMLCanvasElement
The created canvas element.