Replace loudness pulse with onset tracking and add liquid artwork visuals

The bass meter sat at full scale through every dubstep drop, so the glow froze.
features.ts now tracks band levels against their recent range, kick and snare
onsets from spectral flux, wobble in the mids, and drops, and the pulse follows
the kicks.

The playing card's artwork becomes a WebGL2 liquid drop that moves with those
features; tempo, tags and key set its character. Falls back to the plain artwork
without WebGL2, with reduced motion, or with visuals set to simple (v).
?debug=audio shows what the tracker hears.
This commit is contained in:
nvrl committed 2026-11-01 14:15:26 +01:00
1 parent f6c505907a
commit 856ccb3b9a
11 files changed
+901 -43

No files matched your search

+24 -1
View File
@@ -226,7 +226,8 @@ button.danger:not(.link) { background: var(--accent); border: none; color: #fff;
position: relative;
width: min(16rem, 42vh, 70vw);
aspect-ratio: 1;
border-radius: 14px;
/* Round, so the static artwork matches the liquid drop (blob/) it turns into. */
border-radius: 50%;
background: #222 center / cover no-repeat;
box-shadow:
0 20px 60px #000a,
@@ -240,6 +241,28 @@ button.danger:not(.link) { background: var(--accent); border: none; color: #fff;
}
.initial { font-size: 4rem; font-weight: 700; color: #fff6; }
/* The liquid drop spills past the art slot; taps go through it to the card. */
.liquid-canvas {
position: absolute;
inset: -25%;
width: 150%;
height: 150%;
pointer-events: none;
}
.card.liquid .art { background-image: none !important; background-color: transparent; box-shadow: none; scale: 1; }
.card.liquid .initial { display: none; }
.paused-badge, .spinner { z-index: 1; }
.audio-debug {
position: fixed;
left: 0.7rem;
bottom: 0.7rem;
z-index: 30;
border-radius: var(--radius-s);
background: #000b;
pointer-events: none;
}
.card.paused .art { transform: scale(0.96); filter: brightness(0.7); }
.paused-badge {
position: absolute;