From 69c16647cfd8095e5a53d2af1cdd4d3e2d2878c7 Mon Sep 17 00:00:00 2001 From: adrien Date: Mon, 23 Sep 2024 22:02:57 +0200 Subject: [PATCH] accordeon buttons --- app.js | 12 +++++++----- index.html | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/app.js b/app.js index 97331ff..9d8bcb5 100644 --- a/app.js +++ b/app.js @@ -116,7 +116,8 @@ class Sprite { class Cannon extends Sprite { constructor(canvasCtx, note) { let sharp = [1, 3, 6, 8, 10].includes(note % 12) - super(canvasCtx, "cannon.png", 34 * (note - FIRST_NOTE) + 66, sharp? 418:424, 11, 26, 4) + //super(canvasCtx, "cannon.png", 34 * (note - FIRST_NOTE) + 66, sharp? 418:424, 11, 26, 4) + super(canvasCtx, "cannon.png", 34 * (note - FIRST_NOTE) + 66, 424 - 8*(note % 3), 11, 26, 4) this.note = note this.key = keyMap[note - FIRST_NOTE]?.toUpperCase() || "" this.impactHeight = 9 @@ -260,7 +261,7 @@ canvasCtx.imageSmoothingEnabled = false canvasCtx.font = '12px "Press Start 2P"' canvasCtx.textAlign = "center" -let consoleSprite = new Sprite(canvasCtx, "console.png", canvas.width/2, 554, 482, 86) +let consoleSprite = new Sprite(canvasCtx, "console.png", canvas.width/2, 554, 482, 104) let syntheSprite = new Sprite(canvasCtx, "synthe.png", canvas.width/2, 546, 110, 80) let cannonSprites = [] for (let note=FIRST_NOTE; note + placeholder="ccddeffggaabccddeffggaabc" value="wsexdrcftvgybhunji,ko;lp:"/>