This repository has been archived by the owner on May 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
confetti.js
89 lines (89 loc) · 1.94 KB
/
confetti.js
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
tsParticles.load("tsparticles", {
fpsLimit: 60,
particles: {
number: {
value: 0
},
color: {
value: ["#00FFFC", "#FC00FF", "#fffc00"]
},
shape: {
type: "confetti",
options: {
confetti: {
type: ["circle", "square"]
}
}
},
opacity: {
value: 1,
animation: {
enable: true,
minimumValue: 0,
speed: 2,
startValue: "max",
destroy: "min"
}
},
size: {
value: 7,
random: {
enable: true,
minimumValue: 3
}
},
links: {
enable: false
},
life: {
duration: {
sync: true,
value: 5
},
count: 1
},
move: {
enable: true,
gravity: {
enable: true,
acceleration: 20
},
speed: 20,
decay: 0.1,
direction: "none",
random: false,
straight: false,
outModes: {
default: "destroy",
top: "none"
}
}
},
interactivity: {
detectsOn: "window",
events: {
resize: true
}
},
detectRetina: true,
background: {
// color: "#E6F4F2",
CanvasGradient: "linear-gradient( -45deg, rgba(236, 190, 176, 0.8), rgba(178, 219, 235, 0.8), rgba(189, 235, 224, 0.8))"
},
emitters: {
direction: "none",
life: {
count: 0,
duration: 0.1,
delay: 0.4
},
rate: {
delay: 0.1,
quantity: 100
},
size: {
width: 0,
height: 0
}
}
});