easy-confetti
Advanced tools
Comparing version 0.0.1 to 0.0.2
{ | ||
"name": "easy-confetti", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "EasyConfetti is designed to create confetti animations and provides flexible, customisable confetti animations that can be easily integrated into a web page to create visual effects.", | ||
@@ -5,0 +5,0 @@ "author": "ux-ui.pro", |
@@ -67,3 +67,3 @@ <br> | ||
easyConfetti.init(); | ||
easyConfetti.sprinkle(); | ||
``` | ||
@@ -76,7 +76,13 @@ <br> | ||
const sprinkleMultiple = (times, interval) => { | ||
Array.from({ length: times }).forEach((_, i) => { | ||
setTimeout(() => { | ||
easyConfetti.sprink(); | ||
}, i * interval); | ||
}); | ||
let count = 0; | ||
const intervalId = setInterval(() => { | ||
easyConfetti.sprinkle(); | ||
count++; | ||
if (count === times) { | ||
clearInterval(intervalId); | ||
} | ||
}, interval); | ||
}; | ||
@@ -83,0 +89,0 @@ ``` |
65500
107