fix wrong variable declaration
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
const snowfall = true; // enable/disable snowfall
|
||||
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 = 3; // speed of snowfall (recommended values: 0-5)
|
||||
|
||||
@@ -127,6 +127,7 @@ function initializeSnowfall() {
|
||||
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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user