assetflow/static/js/confettiHeader.js

13 lines
286 B
JavaScript
Raw Permalink Normal View History

2023-05-22 18:39:47 +02:00
function randomInRange(min, max) {
return Math.random() * (max - min) + min;
}
function doTheConfetti() {
confetti({
angle: randomInRange(90, 110),
2023-05-22 18:39:47 +02:00
spread: randomInRange(70, 120),
particleCount: randomInRange(100, 200),
origin: { y: 0.6, x: randomInRange(0.4, 0.8) },
2023-05-22 18:39:47 +02:00
});
}