This commit is contained in:
Renan LE CARO 2025-04-22 13:41:39 +02:00
parent 3d3e7805d6
commit 16911620c0
16 changed files with 55 additions and 95 deletions

View file

@ -271,7 +271,10 @@ export function render(gameState: GameState) {
ctx.globalAlpha = 1;
ctx.globalCompositeOperation = "source-over";
const lastExplosionDelay = gameState.levelTime - gameState.lastExplosion + 5;
const shaked = lastExplosionDelay < 200 && !isOptionOn("basic");
const shaked = lastExplosionDelay < 200 && !isOptionOn("basic") &&
// Otherwise, if you pause after an explosion, moving the mouses shakes the picture
gameState.running;
if (shaked) {
const amplitude =
((gameState.perks.bigger_explosions + 1) * 50) / lastExplosionDelay;