☑ OnAspectRatio camera change event?

Hi Im wondering what would be the correct methodology to capture the event of change of aspect ratio in the camera specially when using mobile devices) in order to programatically alter the gui components and adjust the elemtnts to fit propperly in the viewport…

There is an event that is fired when canvas element is resized, that should be automatically handled by engine.
That includes window resizes, orientation changes, etc.

this.app.graphicsDevice.on('resizecanvas', function(width, height) {
    console.log('canvas resized', width, height);
});
2 Likes