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);

View file

@ -8,16 +8,16 @@
/>
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>Breakout 71</title>
<link rel="stylesheet" href="style.css?v=29002295" />
<link rel="stylesheet" href="style.css?v=29002301" />
<link rel="icon" href="./icon.svg" />
</head>
<body>
<button id="menu"><span> menu</span></button>
<button id="score"></button>
<canvas id="game"></canvas>
<script>window.appVersion="?v=29002295".slice(3)</script>
<script>window.appVersion="?v=29002301".slice(3)</script>
<script src="gif.js"></script>
<script src="levels.js?v=29002295"></script>
<script src="game.js?v=29002295"></script>
<script src="levels.js?v=29002301"></script>
<script src="game.js?v=29002301"></script>
</body>
</html>

View file

@ -25,6 +25,7 @@ body {
top: 0;
left: 0;
height: 100vh;
height: calc(var(--vh, 1vh) * 100);
width: 100vw;
}