From 43185bab5fd741a1e472b09d49ff30e9745374d3 Mon Sep 17 00:00:00 2001 From: yuuki <> Date: Mon, 9 Dec 2024 12:55:23 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=89=E3=83=AD=E3=83=B3=E3=81=A7=E9=80=A3?= =?UTF-8?q?=E6=89=93=E3=82=84=E9=A2=A8=E8=88=B9=E3=81=8C=E8=A1=A8=E7=A4=BA?= =?UTF-8?q?=E3=81=95=E3=82=8C=E3=82=8B=E3=83=90=E3=82=B0=E3=81=AE=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/src/js/view.js | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/public/src/js/view.js b/public/src/js/view.js index baa29d1..8d87e36 100644 --- a/public/src/js/view.js +++ b/public/src/js/view.js @@ -1631,6 +1631,8 @@ var drumroll = 0 var endX = 0 + const doron = localStorage.getItem("doron") ?? "false"; + if(!circlePos){ circlePos = { x: this.slotPos.x + this.msToPos(circleMs - ms + this.controller.videoLatency, speed), @@ -1676,12 +1678,14 @@ }else if(ms > endTime + this.controller.audioLatency){ circlePos.x = this.slotPos.x + this.msToPos(endTime - ms + this.controller.audioLatency, speed) } - ctx.drawImage(assets.image["balloon"], - circlePos.x + size - 4, - circlePos.y - h / 2 + 2, - h / 61 * 115, - h - ) + if (doron !== "true") { + ctx.drawImage(assets.image["balloon"], + circlePos.x + size - 4, + circlePos.y - h / 2 + 2, + h / 61 * 115, + h + ) + } } }else if(type === "drumroll" || type === "daiDrumroll"){ fill = "#f3b500" @@ -1695,19 +1699,19 @@ endX = this.msToPos(endTime - circleMs, speed) drumroll = endX > 50 ? 2 : 1 - ctx.fillStyle = fill - ctx.strokeStyle = "#000" - ctx.lineWidth = 3 - ctx.beginPath() - ctx.moveTo(circlePos.x, circlePos.y - size + 1.5) - ctx.arc(circlePos.x + endX, circlePos.y, size - 1.5, Math.PI / -2, Math.PI / 2) - ctx.lineTo(circlePos.x, circlePos.y + size - 1.5) - ctx.fill() - ctx.stroke() + if (doron !== "true") { + ctx.fillStyle = fill + ctx.strokeStyle = "#000" + ctx.lineWidth = 3 + ctx.beginPath() + ctx.moveTo(circlePos.x, circlePos.y - size + 1.5) + ctx.arc(circlePos.x + endX, circlePos.y, size - 1.5, Math.PI / -2, Math.PI / 2) + ctx.lineTo(circlePos.x, circlePos.y + size - 1.5) + ctx.fill() + ctx.stroke() + } } - const doron = localStorage.getItem("doron") ?? "false"; - if((!fade || fade < 1) && doron !== "true"){ // Main circle ctx.fillStyle = fill