Automatic deploy 29002301

This commit is contained in:
Renan LE CARO 2025-02-21 12:41:30 +01:00
parent 2c35062762
commit 6962495e59
5 changed files with 12 additions and 6 deletions

View file

@ -131,6 +131,8 @@ background.addEventListener("load", () => {
needsRender = true
})
const fitSize = () => {
const {width, height} = canvas.getBoundingClientRect();
canvas.width = width;
@ -154,6 +156,8 @@ const fitSize = () => {
flashes = [];
pause()
putBallsAtPuck();
// For safari mobile https://css-tricks.com/the-trick-to-viewport-units-on-mobile/
document.documentElement.style.setProperty('--vh', `${window.innerHeight * 0.01}px`);
};
window.addEventListener("resize", fitSize);