slingchilders Posted January 23, 2018 Share Posted January 23, 2018 How would I handle resizing the canvas? I try doing this on window resize, but the game is stretched very weirdly. I don't want to scale the game, just show more of it when the window and the game area becomes bigger/smaller? this.game.width = this.canvasWidth; this.game.height = this.canvasHeight; this.game.canvas.width = this.canvasWidth; this.game.canvas.height = this.canvasHeight; this.game.renderer.resize(this.canvasWidth , this.canvasHeight); this.game.scale.refresh(); // If i leave just this the game behaves as expected when resizing from bigger view to smaller, but when the game is loaded in a small window, and then resized to a bigger one, the canvas has margins set to never exceed the initial size, how can I fix it? this.game.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL; Link to comment Share on other sites More sharing options...
samme Posted January 23, 2018 Share Posted January 23, 2018 Link to comment Share on other sites More sharing options...
Recommended Posts