Classes
Methods
resize(w, h)
Resizes the canvas, the world, and centers the camera.
Visually the canvas will shrink or extend to the new size. Sprites
will not change position.
If you would prefer to keep the camera focused on the same area,
then you must manually adjust the camera position after calling
this function.
Parameters:
| Name | Type | Description |
|---|---|---|
w |
Number
|
the new width of the canvas |
h |
Number
|
the new height of the canvas |