I have a page with several 3D models on different canvases. I was originally creating multiple engine/scenes, but this blows up on mobile, so I found the multiple canvas feature. I want to have buttons on each canvas to turn them into fullscreen (so obviously one canvas/scene at a time). But when I try to call engine.enterFullscreen(); I get an error. Bad stack trace:
babylon.js:16 Uncaught (in promise) TypeError: fullscreen error
at Function.t._RequestFullscreen (babylon.js:16)
at t.enterFullscreen (babylon.js:16)
I’m not sure if calling it even makes sense, since the engine’s _renderingCanvas isn’t the actual rendering canvas and there’s no meaningful way to make it be.
I can work around by calling requestFullscreen on the canvas directly, but here’s the bug report anyway.
But calling this.engine.resize() works. Will it behave correctly if called on fullscreen enter/leave?