File size: 1,120 Bytes
80d8c84
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
import confetti from 'canvas-confetti';

export function fireSuccessConfetti() {
  // Two bursts from the sides
  const defaults = {
    spread: 60,
    ticks: 100,
    gravity: 0.8,
    decay: 0.94,
    startVelocity: 30,
    colors: ['#6366f1', '#10b981', '#3b82f6', '#f59e0b', '#34d399'],
  };

  confetti({
    ...defaults,
    particleCount: 50,
    origin: { x: 0.2, y: 0.6 },
    angle: 60,
  });
  confetti({
    ...defaults,
    particleCount: 50,
    origin: { x: 0.8, y: 0.6 },
    angle: 120,
  });

  // Center burst after a brief delay
  setTimeout(() => {
    confetti({
      particleCount: 80,
      spread: 100,
      origin: { y: 0.55 },
      colors: ['#6366f1', '#818cf8', '#10b981', '#34d399', '#f59e0b'],
      ticks: 120,
      gravity: 0.7,
    });
  }, 300);
}

export function fireGavelConfetti() {
  // Small focused burst from the judge area (center-top)
  confetti({
    particleCount: 30,
    spread: 40,
    origin: { x: 0.5, y: 0.3 },
    colors: ['#f59e0b', '#fbbf24', '#d97706'],
    ticks: 60,
    gravity: 1.2,
    startVelocity: 15,
    shapes: ['circle'],
    scalar: 0.8,
  });
}