phaser 3 image code example
Example 1: phaser add image
create() {
// x and y are the image's center coordinates
// so e.g. for a background you probably want to use
// gameWidth / 2, gameHeight / 2
const background = this.add.image(100, 100, 'background');
}
Example 2: phaser3 background
this.cameras.main.backgroundColor = Phaser.Display.Color.HexStringToColor("#3498db");