mirror of
https://gitlab.com/lecarore/breakout71.git
synced 2025-04-24 14:06:16 -04:00
Automatic deploy 29002301
This commit is contained in:
parent
2c35062762
commit
6962495e59
5 changed files with 12 additions and 6 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue