If no parameters are passed then a new canvas will be created and appended to <body>
Reference to an html <canvas>
or <div>
element, if a <div>
element is passed, then a canvas will be created and appended
Passing a width will overwrite previously defined canvas width
Passing a height will overwrite previously defined canvas height
Reference to the bound <canvas>
element
Drawing that is currently being rendered or paused
Reference to the created OffscreenCanvas used as hit-maps (if not supported, another <canvas>
will be created)
Removes the Canvas and cleans-up any listeners
Stops rendering current drawing (see Canvas.currDrawing) (if any) and starts the one passed as argument
A Drawing
object, which will be rendered by this canvas
Resumes rendering the current Drawing (if any)
Stops rendering current Drawing
The Canvas object holds an HTMLCanvasElement reference and its 2d context, registers resize observers and can initiate render of Drawing