This commit is contained in:
MLH
2025-01-14 02:02:55 +01:00
parent 087e63adac
commit 326932486c

View File

@ -1,5 +1,5 @@
const snowstorm = true; // enable/disable snowstorm
const snowflakesCount = 500; // count of snowflakes (recommended values: 300-600)
let snowflakesCount = 500; // count of snowflakes (recommended values: 300-600)
const snowflakesCountMobile = 250; // count of snowflakes on mobile devices
const snowFallSpeed = 6; // speed of snowfall (recommended values: 4-8)
const horizontalWind = 4; // horizontal wind speed (recommended value: 4)
@ -131,6 +131,7 @@ function initializeSnowstorm() {
if (container) {
const screenWidth = window.innerWidth; // get the screen width to detect mobile devices
if (screenWidth < 768) { // lower count of snowflakes on mobile devices
console.log('Mobile device detected. Reducing snowflakes count.');
snowflakesCount = snowflakesCountMobile;
}