Fullscreen Button

Can someone help me add a html fullscreen button?
Any suggestions?

1 Like

How could I add a full screen button bottom right with a .png image? like youtube full screen.

Cuz now it’s going full screen whenever I click.

fullscreen btn and HTML HUD | Babylon.js Playground (babylonjs.com)

Try this if you don’t mind build the HUD layer in HTML.


Hello, and I have been looking at this code on a mobile browser and find that it pops (resizes) after the first touch interaction. The window appears to be longer (height) than the screen by the height of the phone’s bottom bar, and adjusts to the correct size after the first touch.

Is there a workaround for this? I would like to work in fullscreen on mobile, but the UI readjustment is really clear after the page loads.


I don’t see any pops or resizes on mobile when I try.
What do you mean?

After I click the enlarge button the same button touches the bottom of the screen (without the padding) in fullscreen mode. When I click the page (anywhere), it resizes and the GUI snaps correctly into place.

I am on a Pixel 6, and using Chrome.

This is how it looks on my end. I don’t see any layout redrawing

I will look into whether there are window decorations enabled which may be the cause, but I am seeing the behaviour in any fullscreen experiences.

(and thanks)