fix: visualizer mode background and fullscreen color extraction

This commit is contained in:
Julien Maille 2026-01-30 13:21:13 +01:00
parent 95e8509b65
commit fcc7ff6145
3 changed files with 15 additions and 1 deletions

View file

@ -665,6 +665,7 @@ export class UIRenderer {
if (image.src !== coverUrl) {
image.src = coverUrl;
overlay.style.setProperty('--bg-image', `url('${coverUrl}')`);
this.extractAndApplyColor(coverUrl);
}
const qualityBadge = createQualityBadgeHTML(track);

View file

@ -16,12 +16,18 @@ export class ParticlesPreset {
draw(ctx, canvas, analyser, dataArray, params) {
const { width, height } = canvas;
const { kick, intensity, primaryColor } = params;
const { kick, intensity, primaryColor, mode } = params;
const sensitivity = params.sensitivity || 1.0;
const isDark = document.documentElement.getAttribute('data-theme') !== 'light';
// Clear background
ctx.clearRect(0, 0, width, height);
if (mode !== 'blended') {
ctx.fillStyle = isDark ? '#050505' : '#e6e6e6';
ctx.fillRect(0, 0, width, height);
}
// Manage particle count
if (this.particles.length !== this.particleCount) {
this.particles = [];

View file

@ -88,7 +88,14 @@ export class UnknownPleasuresPreset {
}
const { width, height } = canvas;
const { mode } = params;
const isDark = document.documentElement.getAttribute('data-theme') !== 'light';
ctx.clearRect(0, 0, width, height);
if (mode !== 'blended') {
ctx.fillStyle = isDark ? '#050505' : '#e6e6e6';
ctx.fillRect(0, 0, width, height);
}
const size = Math.hypot(width, height) * 1.42;