I’m making an app where I want a barebones HTML to be first visible, then the Babylon canvas. However, if I go about it by simply changing display first to none and then to block it ends in a completely white screen without the canvas element in the inspector at all. How should I go about this?
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
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