If true (default) canvas is cleared when a resize happens
Colour space to use. Defaults to sRGB.
By default, the helper emits pointer events from the canvas. Set this to true to disable.
Optional
draw?: ((ctx: CanvasRenderingContext2D, size: Rect, helper: CanvasHelper) => void)If specified, this function be called in an animation loop.
Drawing context
Viewport size
CanvasHelper instance
Logical height of canvas. This is used for establishing the desired aspect ratio.
Optional
onCallback when canvas is resized
By default the display DPI is used for scaling. If this is set, this will override.
Optional
resizeAutomatic canvas resizing logic.
If true, it won't add any position CSS
Logical width of canvas. This is used for establishing the desired aspect ratio.
If set, the z-index for this canvas. By default, fullscreen canvas will be given -1
CanvasHelper options