Get the canvas that graphics functions render to. This is separate from the display canvas; it is not visibly exposed but rather copied each frame.
Are we fullscreen?
Get a unified canvas info object.
Sometimes you want a screen rect!
Get the apparent (in-game) canvas size.
Does the canvas have focus?
Set fullscreen.
Set the game's apparent resolution, fullscreen, etc.
'native' modeKeeps the canvas pixel resolution the same as the physical pixel resolution of the device.
[width, height]The canvas will use prescaling to keep your pixel games looking sharp, but without the uneven pixels caused by the naive approach.
'native' for native mode, otherwise [width, height]
optional options.
A manager for the HTML canvas element, similar to
love.window.Controls game size / scaling -- both native and pixelart mode via Canvas.setMode, as well as fullscreen functions.
The canvas keeps two canvases: render and display. Each frame, it copies render to display before the canvas is presented. This allows for pixel-accurate scaling.