diff --git a/packages/window-dom/src/hooks/window.js b/packages/window-dom/src/hooks/window.js index c042f912..5bc17772 100644 --- a/packages/window-dom/src/hooks/window.js +++ b/packages/window-dom/src/hooks/window.js @@ -36,11 +36,6 @@ export function openWindow(entity, world) { * @param {Window} window */ function syncWindowSize(canvas, window) { - canvas.width = window.getWidth() - canvas.height = window.getHeight() - canvas.style.width = `${canvas.width}px` - canvas.style.height = `${canvas.height}px` - const rect = canvas.getBoundingClientRect() const width = Math.round(rect.width) || canvas.width const height = Math.round(rect.height) || canvas.height diff --git a/packages/window-dom/src/systems/index.js b/packages/window-dom/src/systems/index.js index 2b6827c9..6b9e2101 100644 --- a/packages/window-dom/src/systems/index.js +++ b/packages/window-dom/src/systems/index.js @@ -22,7 +22,7 @@ export function resizeWindow(world) { const rect = canvas.getBoundingClientRect() - if (rect.width === window.getWidth() || rect.height === window.getHeight()) { + if (rect.width === window.getWidth() && rect.height === window.getHeight()) { return }