adjust colors, attempt to fix offset calculation

This commit is contained in:
Zsolt Zitting
2023-11-09 01:06:26 -08:00
parent 3add3e88aa
commit 4e5e66db74
2 changed files with 8 additions and 7 deletions
+1 -1
View File
@@ -9,7 +9,7 @@
<style>.long-audio audio {width:1000px}</style>
<style>
.bgm,.bgm *{opacity:1 !important}
.bgm{display:flex;height:40px;line-height:40px;background:rgba(30,30,30,0.7);width:300px;text-align:center}
.bgm{display:flex;height:40px;line-height:40px;background:rgba(30,30,30,0.7);width:500px;text-align:center}
.bgm svg{fill:currentColor}
.bgm *:hover>svg{fill:#48a0f7}
.bgm *:hover:active>svg{fill:#2d89e6}
+7 -6
View File
@@ -593,10 +593,10 @@ function render(now) {
ctx.arc(centerX, centerY, maxR, 0, Math.PI * 2)
ctx.stroke()
if (enableBga) {
ctx.fillStyle = 'rgba(0,0,0,0.8)'
ctx.fillStyle = 'rgba(80,80,80,0.4)'
ctx.fill()
} else {
ctx.fillStyle = 'rgba(32,32,32,0.8)'
ctx.fillStyle = 'rgba(128,128,128,0.4)'
ctx.fill()
}
@@ -628,7 +628,7 @@ function render(now) {
if (chartHeader.OFFSET) {
const offset = parseFloat(chartHeader.OFFSET)
if (!isNaN(offset)) {
startTs -= offset * 1000
startTs += offset * 1000
}
}
updateLaneOnState(-1, currentTs)
@@ -657,9 +657,9 @@ function render(now) {
updateLaneOnState(previousTs, currentTs)
// black out "off" lanes
const laneBgGradient = ctx.createRadialGradient(centerX, centerY, 0, centerX, centerY, maxR)
laneBgGradient.addColorStop(0, 'rgba(255,255,255,0)');
laneBgGradient.addColorStop(0.2, 'rgba(255,255,255,0.1)');
laneBgGradient.addColorStop(1, enableBga ? 'rgba(255,255,255,0.2)' : 'rgba(255,255,255,0.4)');
laneBgGradient.addColorStop(0, 'rgba(0,0,0,0.3)');
laneBgGradient.addColorStop(0.2, 'rgba(0,0,0,0.4)');
laneBgGradient.addColorStop(1, enableBga ? 'rgba(0,0,0,0.5)' : 'rgba(0,0,0,0.7)');
ctx.fillStyle = laneBgGradient
ctx.beginPath()
for (let i = 0; i < 60 * laneEffectMul; i++) {
@@ -1037,6 +1037,7 @@ function render(now) {
ctx.stroke()
}
// circle mask
{
ctx.globalCompositeOperation = 'destination-in'
ctx.beginPath();