This commit is contained in:
Renan LE CARO 2025-03-14 11:59:49 +01:00
parent b0d8827e09
commit 4fb4c97734
15 changed files with 4190 additions and 3754 deletions

View file

@ -1,8 +1,6 @@
import {
gameZoneWidthRoundedUp,
gameState,
isSettingOn,
offsetX,
offsetXRoundedDown,
} from "./game";
export const sounds = {
@ -160,7 +158,7 @@ function createExplosionSound(pan = 0.5) {
function pixelsToPan(pan: number) {
return Math.max(
0,
Math.min(1, (pan - offsetXRoundedDown) / gameZoneWidthRoundedUp),
Math.min(1, (pan - gameState.offsetXRoundedDown) / gameState.gameZoneWidthRoundedUp),
);
}