Quantcast
Channel: Tech Support
Viewing all articles
Browse latest Browse all 1759

Scaling the displayed game to fit the browser window while preserving aspect ratio

$
0
0
I'm targeting HTML5 and would like the game to fill the browser window.
  • 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

Viewing all articles
Browse latest Browse all 1759

Trending Articles