Fullscreen in Phase 3

Phaser 3 also has the full support for fullscreen mode. Resizing a game to fullscreen is quite simple as shown in the code below. We are going to add a button to resize the game to fullscreen and then switch the button which will revert fullscreen mode to normal screen mode.

We have updated icons sprite as following

Changes from previous code is marked below

Check out the game in your browser window here. Try resizing it in your browser window to see scaling at work.

You can play the game here


Leave A Comment

Your email address will not be published. Required fields are marked *