Build 29035871

This commit is contained in:
Renan LE CARO 2025-03-16 20:11:27 +01:00
parent bdfe5408b9
commit d74d3be97e
9 changed files with 14 additions and 3699 deletions

View file

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

View file

@ -1 +1 @@
"29035764"
"29035871"

View file

@ -84,7 +84,7 @@ export function pause(playerAskedForPause: boolean) {
gameState.pauseTimeout = null;
document.body.className = gameState.running ? " running " : " paused ";
scoreDisplay.className = "";
gameState.needsRender=true
gameState.needsRender = true;
},
Math.min(Math.max(0, gameState.pauseUsesDuringRun - 5) * 50, 500),
);
@ -456,11 +456,11 @@ export function tick() {
gameState.runStatistics.runTime += timeDeltaMs;
gameStateTick(gameState, frames);
}
if(gameState.running || gameState.needsRender){
gameState.needsRender=false
if (gameState.running || gameState.needsRender) {
gameState.needsRender = false;
render(gameState);
}
if(gameState.running){
if (gameState.running) {
recordOneFrame(gameState);
}
requestAnimationFrame(tick);
@ -690,7 +690,7 @@ async function openSettingsPanel() {
});
if (cb) {
cb();
gameState.needsRender=true
gameState.needsRender = true;
}
}

View file

@ -35,7 +35,7 @@ import { isOptionOn } from "./options";
export function setMousePos(gameState: GameState, x: number) {
// Sets the puck position, and updates the ball position if they are supposed to follow it
gameState.puckPosition = x;
gameState.needsRender=true
gameState.needsRender = true;
}
function getBallDefaultVx(gameState: GameState) {