I managed to get Magnum to run in wasm on the web. Have some basics working like mouse click drag to pan camera and right click to rotate, etc with a simple cube. Works well. But, how do I handle resize? I can get the canvas to resize on the css/js side but when I resize the window, the contents of the 3d scene change (shrink/grow depending on if I'm making window larger or smaller, etc).
What's the basic approach I need to take to keep the magnum contents stay the same size and only reveal more or less of the 3d scene as the browser window changes dimension?
Thanks
I managed to get Magnum to run in wasm on the web. Have some basics working like mouse click drag to pan camera and right click to rotate, etc with a simple cube. Works well. But, how do I handle resize? I can get the canvas to resize on the css/js side but when I resize the window, the contents of the 3d scene change (shrink/grow depending on if I'm making window larger or smaller, etc).
What's the basic approach I need to take to keep the magnum contents stay the same size and only reveal more or less of the 3d scene as the browser window changes dimension?
Thanks