Build 29033878

This commit is contained in:
Renan LE CARO 2025-03-15 10:58:37 +01:00
parent a2db3004ef
commit 20534eaa8f
13 changed files with 30 additions and 24 deletions

View file

@ -11,8 +11,8 @@ android {
applicationId = "me.lecaro.breakout" applicationId = "me.lecaro.breakout"
minSdk = 21 minSdk = 21
targetSdk = 34 targetSdk = 34
versionCode = 29033855 versionCode = 29033878
versionName = "29033855" versionName = "29033878"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables { vectorDrawables {
useSupportLibrary = true useSupportLibrary = true

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

2
dist/index.html vendored

File diff suppressed because one or more lines are too long

2
dist/sw-b71.js vendored
View file

@ -1,2 +1,2 @@
function e(e,t,n,r,a,i,c){try{var o=e[i](c),u=o.value}catch(e){n(e);return}o.done?t(u):Promise.resolve(u).then(r,a)}function t(t){return function(){var n=this,r=arguments;return new Promise(function(a,i){var c=t.apply(n,r);function o(t){e(c,a,i,o,u,"next",t)}function u(t){e(c,a,i,o,u,"throw",t)}o(void 0)})}}function n(e,t){var n,r,a,i,c={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function o(i){return function(o){return function(i){if(n)throw TypeError("Generator is already executing.");for(;c;)try{if(n=1,r&&(a=2&i[0]?r.return:i[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,i[1])).done)return a;switch(r=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return c.label++,{value:i[1],done:!1};case 5:c.label++,r=i[1],i=[0];continue;case 7:i=c.ops.pop(),c.trys.pop();continue;default:if(!(a=(a=c.trys).length>0&&a[a.length-1])&&(6===i[0]||2===i[0])){c=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]<a[3])){c.label=i[1];break}if(6===i[0]&&c.label<a[1]){c.label=a[1],a=i;break}if(a&&c.label<a[2]){c.label=a[2],c.ops.push(i);break}a[2]&&c.ops.pop(),c.trys.pop();continue}i=t.call(e,c)}catch(e){i=[6,e],r=0}finally{n=a=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,o])}}}var r="breakout-71-".concat("29033855"),a=["/"];self.addEventListener("install",function(e){e.waitUntil(t(function(){return n(this,function(e){switch(e.label){case 0:return[4,caches.open(r)];case 1:return e.sent().addAll(a),[2]}})})())}),self.addEventListener("activate",function(e){e.waitUntil(t(function(){return n(this,function(e){switch(e.label){case 0:return[4,caches.keys()];case 1:return[4,Promise.all(e.sent().map(function(e){if(e!==r)return caches.delete(e)}))];case 2:return e.sent(),[4,clients.claim()];case 3:return e.sent(),[2]}})})())}),self.addEventListener("fetch",function(e){if("navigate"===e.request.mode&&e.request.url.endsWith("/index.html?isPWA=true")){e.respondWith(caches.match("/"));return}}); function e(e,t,n,r,a,i,c){try{var o=e[i](c),u=o.value}catch(e){n(e);return}o.done?t(u):Promise.resolve(u).then(r,a)}function t(t){return function(){var n=this,r=arguments;return new Promise(function(a,i){var c=t.apply(n,r);function o(t){e(c,a,i,o,u,"next",t)}function u(t){e(c,a,i,o,u,"throw",t)}o(void 0)})}}function n(e,t){var n,r,a,i,c={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function o(i){return function(o){return function(i){if(n)throw TypeError("Generator is already executing.");for(;c;)try{if(n=1,r&&(a=2&i[0]?r.return:i[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,i[1])).done)return a;switch(r=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return c.label++,{value:i[1],done:!1};case 5:c.label++,r=i[1],i=[0];continue;case 7:i=c.ops.pop(),c.trys.pop();continue;default:if(!(a=(a=c.trys).length>0&&a[a.length-1])&&(6===i[0]||2===i[0])){c=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]<a[3])){c.label=i[1];break}if(6===i[0]&&c.label<a[1]){c.label=a[1],a=i;break}if(a&&c.label<a[2]){c.label=a[2],c.ops.push(i);break}a[2]&&c.ops.pop(),c.trys.pop();continue}i=t.call(e,c)}catch(e){i=[6,e],r=0}finally{n=a=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,o])}}}var r="breakout-71-".concat("29033878"),a=["/"];self.addEventListener("install",function(e){e.waitUntil(t(function(){return n(this,function(e){switch(e.label){case 0:return[4,caches.open(r)];case 1:return e.sent().addAll(a),[2]}})})())}),self.addEventListener("activate",function(e){e.waitUntil(t(function(){return n(this,function(e){switch(e.label){case 0:return[4,caches.keys()];case 1:return[4,Promise.all(e.sent().map(function(e){if(e!==r)return caches.delete(e)}))];case 2:return e.sent(),[4,clients.claim()];case 3:return e.sent(),[2]}})})())}),self.addEventListener("fetch",function(e){if("navigate"===e.request.mode&&e.request.url.endsWith("/index.html?isPWA=true")){e.respondWith(caches.match("/"));return}});
//# sourceMappingURL=sw-b71.js.map //# sourceMappingURL=sw-b71.js.map

2
dist/sw-b71.js.map vendored

File diff suppressed because one or more lines are too long

View file

@ -55,15 +55,16 @@ body {
#score { #score {
right: 0; right: 0;
color: rgba(255, 255, 255, 0.3);
transition: color 0.3s;
&.active {
color: gold;
transition: color 0.01s;
}
} }
#menu { #menu {
left: 0; left: 0;
@media screen and (orientation: portrait) {
& > span {
display: none;
}
}
} }
.popup { .popup {

View file

@ -57,6 +57,7 @@ export function pause(playerAskedForPause: boolean) {
pauseRecording(); pauseRecording();
gameState.pauseTimeout = null; gameState.pauseTimeout = null;
document.body.className = gameState.running ? " running " : " paused "; document.body.className = gameState.running ? " running " : " paused ";
scoreDisplay.className = "";
}, },
Math.min(Math.max(0, gameState.pauseUsesDuringRun - 5) * 50, 500), Math.min(Math.max(0, gameState.pauseUsesDuringRun - 5) * 50, 500),
); );
@ -1624,13 +1625,15 @@ export function render() {
const { width, height } = gameCanvas; const { width, height } = gameCanvas;
if (!width || !height) return; if (!width || !height) return;
scoreDisplay.innerText = `L${gameState.currentLevel + 1}/${max_levels()} $${gameState.score}`; if (gameState.currentLevel || gameState.levelTime) {
Object.assign( menuLabel.innerText = `L${gameState.currentLevel + 1}/${max_levels()}`;
scoreDisplay.style, } else {
gameState.lastScoreIncrease < gameState.levelTime - 30 menuLabel.innerText = "menu";
? { color: "gold", fontWeight: "bold", opacity: 1 } }
: { opacity: 0.5, fontWeight: "normal", color: "white" }, scoreDisplay.innerText = `$${gameState.score}`;
);
scoreDisplay.className =
gameState.lastScoreIncrease > gameState.levelTime - 500 ? "active" : "";
// Clear // Clear
if (!isSettingOn("basic") && !level.color && level.svg) { if (!isSettingOn("basic") && !level.color && level.svg) {
@ -2315,6 +2318,7 @@ window.addEventListener("visibilitychange", () => {
}); });
const scoreDisplay = document.getElementById("score") as HTMLButtonElement; const scoreDisplay = document.getElementById("score") as HTMLButtonElement;
const menuLabel = document.getElementById("menuLabel") as HTMLButtonElement;
let alertsOpen = 0, let alertsOpen = 0,
closeModal: null | (() => void) = null; closeModal: null | (() => void) = null;
@ -2616,6 +2620,7 @@ async function openSettingsPanel() {
if ( if (
await asyncAlert({ await asyncAlert({
title: "Reset", title: "Reset",
text: "You will loose all progress you made in the game, are you sure ? ",
actions: [ actions: [
{ {
text: "Yes", text: "Yes",

View file

@ -23,7 +23,7 @@
/> />
</head> </head>
<body> <body>
<button id="menu"><span> menu</span></button> <button id="menu"> <span id="menuLabel">menu</span></button>
<button id="score"></button> <button id="score"></button>
<canvas id="game"></canvas> <canvas id="game"></canvas>
<script type="module"> <script type="module">

View file

@ -41,7 +41,7 @@
{ {
"name": "Dots", "name": "Dots",
"size": 9, "size": 9,
"bricks": "b_t_a_c____________b_t_a_c__________P_b_t_a_c__________P_b_t_a____________P_b_t_a", "bricks": "b_t_a_c_c__________b_t_a_c__________P_b_t_a_c__________P_b_t_a__________P_P_b_t_a",
"svg": null "svg": null
}, },
{ {

View file

@ -1,5 +1,5 @@
// The version of the cache. // The version of the cache.
const VERSION = "29033855"; const VERSION = "29033878";
// The name of the cache // The name of the cache
const CACHE_NAME = `breakout-71-${VERSION}`; const CACHE_NAME = `breakout-71-${VERSION}`;

View file

@ -1 +1 @@
"29033855" "29033878"