How to hide Babylon canvas and show it again

Try visibility hidden or hide with z-index instead if setting display is not working for you.

EDIT: or try engine.resize() aftr you display the div. I believe renderHeight is set to 0, because your display:none-d div/canvas can be acceseed via the DOM but has a height of 0 and BabylonJS sets it’s renderingHeight to zero. engine.resize() will refit it’s rendering boundaries. I am just guessing here but give it a try :vulcan_salute:

4 Likes