FIX: visualizer kick/shake

This commit is contained in:
Julien Maille 2026-01-31 10:17:06 +01:00
parent f0fd8c8c9e
commit fd7bae6b80
2 changed files with 3 additions and 3 deletions

View file

@ -149,7 +149,7 @@ export class Visualizer {
let bass = let bass =
((this.dataArray[0] + this.dataArray[1] + this.dataArray[2] + this.dataArray[3]) * 0.000980392) / volume; ((this.dataArray[0] + this.dataArray[1] + this.dataArray[2] + this.dataArray[3]) * 0.000980392) / volume;
const intensity = bass * bass; const intensity = bass * bass * 10;
const stats = this.stats; const stats = this.stats;
stats.energyAverage = stats.energyAverage * 0.99 + intensity * 0.01; stats.energyAverage = stats.energyAverage * 0.99 + intensity * 0.01;

View file

@ -219,8 +219,8 @@ export class LCDPreset {
ctx.translate(-centerX, -centerY); ctx.translate(-centerX, -centerY);
// Shake on kick // Shake on kick
if (!this.disableShake && kick > 0.3) { if (!this.disableShake && kick > 0.1) {
const shake = kick * 15; const shake = kick * 8;
ctx.translate((Math.random() - 0.5) * 2 * shake, (Math.random() - 0.5) * shake); ctx.translate((Math.random() - 0.5) * 2 * shake, (Math.random() - 0.5) * shake);
} }