diff --git a/Readme.md b/Readme.md index 91d43a6..49b5d0e 100644 --- a/Readme.md +++ b/Readme.md @@ -76,6 +76,7 @@ There's also an easy mode for kids (slower ball) and a color-blind mode (no colo - lights shadows - keyboard support - Offline mode web for iphone +- controller support on web/mobile - webgl rendering - enable export of gameplay capture in webview diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 6275ee3..5aa63d6 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -11,8 +11,8 @@ android { applicationId = "me.lecaro.breakout" minSdk = 21 targetSdk = 34 - versionCode = 29002295 - versionName = "29002295" + versionCode = 29002301 + versionName = "29002301" testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" vectorDrawables { useSupportLibrary = true diff --git a/app/src/main/assets/game.js b/app/src/main/assets/game.js index 7cf6b49..c84ba08 100644 --- a/app/src/main/assets/game.js +++ b/app/src/main/assets/game.js @@ -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); diff --git a/app/src/main/assets/index.html b/app/src/main/assets/index.html index 70d16c1..c5df9be 100644 --- a/app/src/main/assets/index.html +++ b/app/src/main/assets/index.html @@ -8,16 +8,16 @@ />