Jump to content

Manually changing canvas width/height


gnoof
 Share

Recommended Posts

Hello!

I'm trying to scale my game using custom CSS rather than ScaleManager (I have some specific dynamic scaling I'd like to do depending on the browser size and aspect ratio and it's just easier to do it using custom CSS).

The problem is that even in NO_SCALE mode, when the browser is resized, the canvas inline style width/height values are always overridden with the game's default width and height.

I can't seem to find a way to turn this off so that I can customize the canvas width/height myself.

Any ideas?

Link to comment
Share on other sites

I solved this. Not sure if it's the best way to go about it but I set the scale mode to EXACT_FIT and then just adjust the CSS of the parent div.

That way I don't need to touch the canvas at all.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...