For responsive applications, you might need to handle canvas resizing when the window dimensions change:

window.addEventListener('resize', function() {
    engine.resize();
});

This ensures your 3D scene maintains the correct aspect ratio and fills the available space when the browser window is resized.