Add dynamic WebGL background with audio reactivity

- WebGL shader background with flowing waves, radial pulse, and frequency ring arcs
- Reacts to captured audio data (frequency bands + bass) when visualizer is active
- Uses page accent color; adapts to dark/light theme via bg-primary blending
- Toggle button in header toolbar, state persisted in localStorage
- Cached uniform locations and color values to avoid per-frame getComputedStyle calls
- i18n support for EN/RU locales

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-19 01:07:46 +03:00
parent 0eca8292cb
commit be48318212
7 changed files with 354 additions and 1 deletions

View File

@@ -99,6 +99,8 @@ function setTheme(theme) {
if (metaThemeColor) {
metaThemeColor.setAttribute('content', theme === 'light' ? '#ffffff' : '#121212');
}
if (typeof updateBackgroundColors === 'function') updateBackgroundColors();
}
function toggleTheme() {
@@ -147,6 +149,7 @@ function applyAccentColor(color, hover) {
localStorage.setItem('accentColor', color);
const dot = document.getElementById('accentDot');
if (dot) dot.style.background = color;
if (typeof updateBackgroundColors === 'function') updateBackgroundColors();
}
function renderAccentSwatches() {