Hi everybody!
In order to have a consistent behaviour of resize of Canvas/Engine I'm needing to add some lines before the call to Engine.resize():
//resize
window.addEventListener("resize",function(){
Canvas.style.height="100%";
Canvas.style.width="100%";
Canvas.height=Canvas.innerHeight;
Canvas.width=Canvas.innerWidth;
//
Engine.resize();
});
Well I know that the Canvas is on the side of HTML5 specification and BabylonJS has nothing to do there but, honestly, I find it odd there is not mention of these added four lines (bold ones) in the documents.
Maybe I'm misunderstanding something?