ath.random() * 2 + 1;
    this.life = 100;
    this.r = r;
    this.g = g;
    this.b = b;
  }

  update() {
    this.x += this.sx;
    this.y += this.sy;
    this.life -= 1;
  }

  draw() {
    ctx.fillStyle = `rgba(${this.r}, ${this.g}, ${this.b}, ${this.life / 100})`;
    ctx.beginPath();
    ctx.arc(this.x, this.y, this.size, 0, Math.PI * 2);
    ctx.fill();
  }
}

const fireworks = [new Firework()];
const particles = [];

function animate() {
  ctx.fillStyle = "white";
  ctx.fillRect(0, 0, canvas.width