In Phaser, is it possible to fill the remaining part of the Browser window with the game's (clipped) content, and still keep the aspect ratio of the game intact?
For example, I have a game which is 490x844px, and all of the elements in the game are positioned according to those coordinates and size. I also use the following scaling properties on the game
However, I still have some game elements exceeding the game area, and are clipped off. I want to display this content if we have some space left in the Browser window. Is this possible?
I tried to use
game.scale.setGameSize(1600, 1200); and then change the camera's viewport to center the game again (e.g.
cameras.main.setViewport(offsetX, offsetY, this.scale.width, this.scale.height).) It does work, but only makes the "clipped" content on right side of the game appear. The left side of the game is still clipped and not visible. I want to make the left side AND the right side of the game's content to appear on screen, not just the right part.