Simple wrapper for creating and managing a canvas element. Supports full-screen or container-relative sizing.
initialises a new instance of Canvas.
Optional
Optional HTML element to inject the canvas into.
The underlying HTMLCanvasElement.
Optional callback fired when the canvas resizes.
Completely removes the canvas element and cleans up its observers.
Resizes the canvas to match its container or window dimensions.
Optional parent element to match size with.
Simple wrapper for creating and managing a canvas element. Supports full-screen or container-relative sizing.