diff --git a/index.php b/index.php index fdb5f29..dc662e1 100644 --- a/index.php +++ b/index.php @@ -732,6 +732,8 @@ $facebook_link = "https://www.facebook.com/profile.php?id=61587890927489"; let animationId; let bars = []; + const barPalette = [190, 140, 330, 45]; // Cian, Lima, Rosa, Oro + class ColorBar { constructor() { this.reset(); @@ -750,8 +752,9 @@ $facebook_link = "https://www.facebook.com/profile.php?id=61587890927489"; this.width = 3 + Math.random() * 5; this.height = 40 + Math.random() * 60; // Mucho más largas, como barras reales this.speed = 1 + Math.random() * 2; - this.hue = Math.random() * 360; - this.opacity = 0.1 + Math.random() * 0.3; + // Selecciona un color específico de la paleta + this.hue = barPalette[Math.floor(Math.random() * barPalette.length)]; + this.opacity = 0.15 + Math.random() * 0.35; // Un poco más visibles this.angle = Math.PI / 2.8; // Más pronunciada (aprox 64 grados) } @@ -760,7 +763,7 @@ $facebook_link = "https://www.facebook.com/profile.php?id=61587890927489"; this.x += Math.cos(this.angle) * s; this.y += Math.sin(this.angle) * s; - this.hue = (this.hue + 1) % 360; + // Ya no cambiamos el hue constantemente para mantener el color específico if (this.y > canvas.height + 100 || this.x > canvas.width + 100) { this.reset();