Remove spectrum visualizer
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
134d09c93f
commit
60a8190bd7
1 changed files with 2 additions and 51 deletions
|
|
@ -107,24 +107,7 @@ html, body {
|
|||
/* ============================================================
|
||||
SPECTRUM VISUALIZER (behind character)
|
||||
============================================================ */
|
||||
.spectrum {
|
||||
position: absolute;
|
||||
bottom: 32%;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
gap: 3px;
|
||||
pointer-events: none;
|
||||
opacity: 0;
|
||||
transition: opacity 0.8s;
|
||||
mix-blend-mode: screen;
|
||||
}
|
||||
.spec-bar {
|
||||
width: 6px;
|
||||
border-radius: 3px 3px 0 0;
|
||||
height: 3px;
|
||||
transition: height 0.05s linear;
|
||||
.spec-bar-unused {
|
||||
}
|
||||
|
||||
/* ============================================================
|
||||
|
|
@ -762,9 +745,6 @@ html, body {
|
|||
<!-- Horizon glow -->
|
||||
<div class="horizon"></div>
|
||||
|
||||
<!-- Spectrum visualizer (behind character) -->
|
||||
<div class="spectrum" id="spectrum"></div>
|
||||
|
||||
<!-- ===================== ROBOT ===================== -->
|
||||
<div class="robot-wrap">
|
||||
<div class="beat-wrap">
|
||||
|
|
@ -918,29 +898,6 @@ window.addEventListener('resize', resizeFloor);
|
|||
resizeFloor();
|
||||
requestAnimationFrame(drawFloor);
|
||||
|
||||
/* ============================================================
|
||||
SPECTRUM VISUALIZER
|
||||
============================================================ */
|
||||
const SPEC_COUNT = 48;
|
||||
const specEl = document.getElementById('spectrum');
|
||||
const specBars = [];
|
||||
const SPEC_PALETTE = [
|
||||
'#ff0099','#ff00cc','#cc00ff','#9900ff','#6600ff',
|
||||
'#0033ff','#0066ff','#0099ff','#00ccff','#00ffff',
|
||||
'#00ffcc','#00ff99','#00ff66','#00ff33',
|
||||
'#33ff00','#66ff00','#99ff00','#ccff00',
|
||||
'#ffff00','#ffcc00','#ff9900','#ff6600','#ff3300','#ff0000',
|
||||
];
|
||||
|
||||
for (let i = 0; i < SPEC_COUNT; i++) {
|
||||
const b = document.createElement('div');
|
||||
b.className = 'spec-bar';
|
||||
const c = SPEC_PALETTE[Math.round(i / SPEC_COUNT * (SPEC_PALETTE.length - 1))];
|
||||
b.style.background = c;
|
||||
b.style.boxShadow = `0 0 6px ${c}`;
|
||||
specEl.appendChild(b);
|
||||
specBars.push(b);
|
||||
}
|
||||
|
||||
/* ============================================================
|
||||
METEORS
|
||||
|
|
@ -1047,12 +1004,7 @@ function updateBars(raw) {
|
|||
bar.style.opacity = 0.3 + 0.7 * (v / 100);
|
||||
});
|
||||
|
||||
// Spectrum (mid-to-high frequencies, remapped to SPEC_COUNT bars)
|
||||
specBars.forEach((bar, i) => {
|
||||
const srcIdx = Math.round(4 + (i / SPEC_COUNT) * (vals.length - 5));
|
||||
const v = vals[srcIdx] || 0;
|
||||
bar.style.height = Math.max(3, (v / 100) * window.innerHeight * 0.55) + 'px';
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/* ============================================================
|
||||
|
|
@ -1131,7 +1083,6 @@ function updateMusic(artist, title) {
|
|||
isPlaying = playing;
|
||||
document.querySelector('.robot-wrap').style.opacity = playing ? '1' : '0';
|
||||
document.querySelector('.music-ticker').style.opacity = playing ? '1' : '0';
|
||||
specEl.style.opacity = playing ? '0.45' : '0';
|
||||
if (!playing) vuBars.forEach(b => { b.style.height = '3px'; b.style.opacity = '0.15'; });
|
||||
if (playing) fetchTheme();
|
||||
if (el.textContent === text) return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue