Skip to content

Commit

Permalink
Merge pull request #153 from Facug03/fix-scroll
Browse files Browse the repository at this point in the history
Arreglar altura de fondo cuando se scrollea en mobile
  • Loading branch information
midudev authored Feb 28, 2024
2 parents 3fcf9a1 + f653771 commit c6a87a8
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 @@ -9,7 +9,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 @@ -91,7 +91,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 c6a87a8

Please sign in to comment.