ドロンで連打や風船が表示されるバグの修正

This commit is contained in:
yuuki
2024-12-09 12:55:23 +09:00
parent 85553da9e3
commit 43185bab5f

View File

@@ -1631,6 +1631,8 @@
var drumroll = 0 var drumroll = 0
var endX = 0 var endX = 0
const doron = localStorage.getItem("doron") ?? "false";
if(!circlePos){ if(!circlePos){
circlePos = { circlePos = {
x: this.slotPos.x + this.msToPos(circleMs - ms + this.controller.videoLatency, speed), x: this.slotPos.x + this.msToPos(circleMs - ms + this.controller.videoLatency, speed),
@@ -1676,6 +1678,7 @@
}else if(ms > endTime + this.controller.audioLatency){ }else if(ms > endTime + this.controller.audioLatency){
circlePos.x = this.slotPos.x + this.msToPos(endTime - ms + this.controller.audioLatency, speed) circlePos.x = this.slotPos.x + this.msToPos(endTime - ms + this.controller.audioLatency, speed)
} }
if (doron !== "true") {
ctx.drawImage(assets.image["balloon"], ctx.drawImage(assets.image["balloon"],
circlePos.x + size - 4, circlePos.x + size - 4,
circlePos.y - h / 2 + 2, circlePos.y - h / 2 + 2,
@@ -1683,6 +1686,7 @@
h h
) )
} }
}
}else if(type === "drumroll" || type === "daiDrumroll"){ }else if(type === "drumroll" || type === "daiDrumroll"){
fill = "#f3b500" fill = "#f3b500"
if(type == "drumroll"){ if(type == "drumroll"){
@@ -1695,6 +1699,7 @@
endX = this.msToPos(endTime - circleMs, speed) endX = this.msToPos(endTime - circleMs, speed)
drumroll = endX > 50 ? 2 : 1 drumroll = endX > 50 ? 2 : 1
if (doron !== "true") {
ctx.fillStyle = fill ctx.fillStyle = fill
ctx.strokeStyle = "#000" ctx.strokeStyle = "#000"
ctx.lineWidth = 3 ctx.lineWidth = 3
@@ -1705,8 +1710,7 @@
ctx.fill() ctx.fill()
ctx.stroke() ctx.stroke()
} }
}
const doron = localStorage.getItem("doron") ?? "false";
if((!fade || fade < 1) && doron !== "true"){ if((!fade || fade < 1) && doron !== "true"){
// Main circle // Main circle