How to do full screen with fixed resolution(1080*1920) or keeping same aspect ratio in playcanvas

Hie everyone ,
I am facing one issue while doing full screen and I am using this api = true

it makes my game visible in full screen and Ui gets strecthed so I dont want this result
Actually I want to make my game full screen but with only fixed resolution(1080*1920)
and same output I get only when I press f12,
So please can anyone help how to do fullscreen with same aspect ratio or fixed resolution(1080 * 1920)

then delete “ = true” and it will be “auto resolution”

but I want to hide address bar too

what do you mean? by

I mean like I want to hide Url
Actually I want same output for my game in full screen mode when we press f12

can you post a link to play the game because i didn’t get what you meant

He wants full screen, the canvas covering the full screen, but at the same time, limit the ratio of the canvas to 1:1.77

@PlaycanvasDeveloper , yes, you can, and actually pretty easily. This is a CSS problem, not playCanvas. Google something like “css set ratio canvas” and “center canvas”

1 Like

right @dadiaar

if you know how css work in playcanvas then you can fix it because i don’t know how to use Html & Css in playcanvas

even I am also new learner in playcanvas

Sure I will try and thanks

The documentation is very helpful
check this links:
and this:

1 Like

Sure and Thanks

1 Like

You’re welcome


hie everyone
I dont know how to do full screen mode in runtime in playcanvas like when we press f11 in runtime for my game ,
here is attached screenshot

Check this.

The demo here.

Once you have disable the fullscreen options in the settings, what you want to achieve is not specific to PlayCanvas, which means is easier to find the solution.

1 Like