Creates a Canvas controller instance.
The main HTMLMicrioElement instance.
Readonly
elementThe main WebGL rendering <canvas>
element.
Readonly
isWritable Svelte store indicating if the client is likely a mobile device.
Readonly
viewportObject containing current viewport dimensions, position, and ratios.
Getter for the current value of the isMobile store.
Gets the appropriate device pixel ratio for rendering.
Clamped between 1 and 2, disabled on iOS and if noRetina
setting is true.
Optional image settings object to check for noRetina
.
The calculated device pixel ratio.
Manages the HTML
<canvas>
element used for WebGL rendering, handles resizing, and provides viewport information. Accessed viamicrio.canvas
.