I am very new at Phaser. I want my Game to be as big as the Website is. Following code scaled the Phaser Gamefield to the websites height and width:
width = window.innerWidth * window.devicePixelRatio;
height = window.innerHeight * window.devicePixelRatio;
var config = {
type: Phaser.AUTO,
width: width,
height: height,
scene: [mainMenu]
};
Now the canvas is scaled to the Screen, but the objects are not. Funny thing: When I resize the Website to 80%, then everything fits perfectly in. But when its on 100%, then the Background-Image is not complete and test is not where I placed it.
Now I searched for ways to perfectly resize the Phaser Gamefield, but found nothing. At this time my understanding of Phaser is too small to Do this on my own. I hope somebody can explain how I can scale my Game in Phaser.