some fixes

This commit is contained in:
MLH
2024-11-29 23:31:13 +01:00
parent 8f61b05c62
commit 36296698cb

View File

@@ -1,9 +1,9 @@
const fireworks = true; // enable/disable fireworks const fireworks = true; // enable/disable fireworks
const scrollFireworks = true; // enable fireworks to scroll with page content const scrollFireworks = true; // enable fireworks to scroll with page content
const particlesPerFirework = 50; // count of particles per firework const particlesPerFirework = 50; // count of particles per firework
const minFireworks = 5; // minimum number of simultaneous fireworks const minFireworks = 3; // minimum number of simultaneous fireworks
const maxFireworks = 7; // maximum number of simultaneous fireworks const maxFireworks = 6; // maximum number of simultaneous fireworks
const fireworksInterval = 2800; // interval for the fireworks in milliseconds const intervalOfFireworks = 2800; // interval for the fireworks in milliseconds
// array of color palettes for the fireworks // array of color palettes for the fireworks
const colorPalettes = [ const colorPalettes = [
@@ -18,6 +18,7 @@ const colorPalettes = [
]; ];
let msgPrinted = false; // flag to prevent multiple console messages let msgPrinted = false; // flag to prevent multiple console messages
let spacing = 0; // spacing between fireworks
// function to check and control fireworks // function to check and control fireworks
function toggleFirework() { function toggleFirework() {
@@ -140,7 +141,7 @@ function startFireworks() {
for (let i = 0; i < randomCount; i++) { for (let i = 0; i < randomCount; i++) {
launchFirework(); launchFirework();
} }
}, fireworksInterval); // Interval between fireworks }, intervalOfFireworks); // Interval between fireworks
} }
// Initialize fireworks and add random fireworks after the DOM is loaded // Initialize fireworks and add random fireworks after the DOM is loaded