Scale Game Window To Fill Entire Device Screen?

Hi,

First day using Phaser 3.
How would I scale game window to fill entire device screen?
(I mean on Android/iOS mobile smartphones and tablets)

Code is below:
https://bitbucket.org/jesseleepalser/phaser-engine/src/master/

Demo is below:

Jesse

Hi,

Thanks, but already doing that here.

I wish to scale screen to device resolution fully not keeping aspect ratio.
(so full screen is covered with no black borders)

Thanks!

Jesse

Hi,

View below photo of game running on an Android mobile device.
There are black borders and the screen is not completely filled.
(need “stretch”)

Jesse

Hi,

I got it working, thanks!

Jesse

var config = {
    type: Phaser.AUTO,
    width: 800,
    height: 600,
    physics: {
        default: 'arcade',
        arcade: {
            gravity: { y: 300 },
            debug: false
        }
    },scale: {
            mode: Phaser.Scale.FIT,
            autoCenter: Phaser.Scale.CENTER_BOTH,
            width: window.innerWidth,
            height: window.innerHeight
            // ...
        },
    scene: {
        preload: preload,
        create: create,
        update: update
    }
};

Hi, updated the source which can be viewed here, Jesse