mirror of
https://gitlab.com/lecarore/breakout71.git
synced 2025-04-25 06:26: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);
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -25,6 +25,7 @@ body {
|
|||
top: 0;
|
||||
left: 0;
|
||||
height: 100vh;
|
||||
height: calc(var(--vh, 1vh) * 100);
|
||||
width: 100vw;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue