From c0685b64d55dc0baf075eb209769df333d6be684 Mon Sep 17 00:00:00 2001 From: Facu Date: Tue, 27 Feb 2024 17:19:38 -0300 Subject: [PATCH] Arreglar altura de fondo cuando se scrollea en mobile --- src/components/SmokeBackground.astro | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/SmokeBackground.astro b/src/components/SmokeBackground.astro index a2c49b257..601c5db54 100644 --- a/src/components/SmokeBackground.astro +++ b/src/components/SmokeBackground.astro @@ -6,7 +6,7 @@ const $bkg = document.getElementById("smoke-bkg") let w = window.innerWidth - let h = window.innerHeight + let h = window.screen.height const THEME = { dark: { @@ -88,7 +88,7 @@ }) function resize() { - h = window.innerHeight + h = window.screen.height w = window.innerWidth camera.aspect = w / h camera.updateProjectionMatrix() // este metodo lo tenéis que ejecutar siempre que cambiais los parámetros de la cámara