mirror of
https://github.com/ivabus/gui
synced 2025-04-23 14:07:14 +03:00
confetti colors (#665)
This commit is contained in:
parent
fa590e7985
commit
e9b5253e3e
1 changed files with 9 additions and 1 deletions
|
@ -12,6 +12,8 @@
|
|||
|
||||
$: isAnimating = false;
|
||||
|
||||
const colors = ["#00FFD0", "#2675F5", "#8000FF"];
|
||||
|
||||
const playConfetti = async () => {
|
||||
if (isAnimating) {
|
||||
return;
|
||||
|
@ -27,7 +29,13 @@
|
|||
root.appendChild(canvas);
|
||||
|
||||
const myConfetti = confetti.create(canvas, { resize: true });
|
||||
await myConfetti({ particleCount: 500, spread: 360, startVelocity: 20, gravity: 0.5 });
|
||||
await myConfetti({
|
||||
particleCount: 500,
|
||||
spread: 360,
|
||||
startVelocity: 20,
|
||||
gravity: 0.5,
|
||||
colors
|
||||
});
|
||||
|
||||
root?.removeChild(canvas);
|
||||
isAnimating = false;
|
||||
|
|
Loading…
Reference in a new issue