Make accent hue crossfade between songs last 2 to 4 seconds

This commit is contained in:
2026-09-23 21:40:22 +02:00
parent 55cc803708
commit bf19bb31f9
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -74,7 +74,7 @@
if (dh > 180) dh -= 360;
else if (dh < -180) dh += 360;
const start = performance.now();
const duration = 600;
const duration = 2000 + Math.random() * 2000;
const tick = (now: number) => {
const t = Math.min(1, (now - start) / duration);
const eased = 1 - Math.pow(1 - t, 3);