I'm targeting HTML5 and would like the game to fill the browser window.
Scaling the displayed game to fit the browser window while preserving aspect ratio
- If the browser window is larger than the game size, it should scale up to fill the space.
- If the browser window is smaller (as happens on a mobile browser frequently) the game should scale down to fit.
- It should do both of these in a way that preserves aspect ratio.
- In particular, on mobile, if the user rotates the device, thus changing the size of the browser window, the game should react and resize...
Scaling the displayed game to fit the browser window while preserving aspect ratio