Skip to content

Commit

Permalink
Arreglar altura de fondo cuando se scrollea en mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
Facu committed Feb 27, 2024
1 parent 44bfcaa commit c0685b6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/SmokeBackground.astro
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit c0685b6

Please sign in to comment.