I made a title screen where a user can click an icon which will toggle making the game fullscreen.
When I click it, the game window becomes fullscreen, but the canvas does not scale up.
As far as I can see, everything behaves as expected when not in fullscreen.
I found this thread on Phaserās GitHub, so Iām wondering if a bug might be to blame here.
Anyone know if this can be avoided with a different fullscreen implementation? Also how often are new releases of Phaser made?
Is there an implementation that avoids this bug? Iāve posted about this issue before, but it seems that the implementation that uses window['game']['canvas'][game.device.fullscreen.request](); crashes more than just my browser, so I am really stumped for solutions
After installing phaser 3.18.1 and writing code you provided at the beginning - I got an error.
The same error as I got when tried code provided by the link
Issue: [ScaleManager] TypeError: thisā¦
But when changes were applied binding this, errors gone both for you code and in the āIssue: [Scaleā¦ā
I dunno what to do in this case. I have everything run perfectly.
I checked again whether I applied the fix to the right lines in that section of code and I did. Tested it again and I didnāt get the errorā¦ but the game is still not scaling to fill the whole screen and stays bound within its dimensions
This is my entire game.js file with the configs. Do you reckon there are other issues there Iām not seeing?
I also found that I had 2 <body> tags in my index.html file, but removing the extra one didnāt help the issue.
Iāve now tested this on other browsers and the issue persists across all of the ones that support Phaser 3
This helped somewhat. The canvas on startup appears bigger and when I click the fullscreen button I get a fullscreen image.Itās not in the middle thoughā¦
Ah! a lot of my object alignment uses config.height and config.width, so I just changed them all to config.scale.height and config.scale.width respectively.