typo
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
const snowstorm = true; // enable/disable snowstorm
|
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 snowflakesCountMobile = 250; // count of snowflakes on mobile devices
|
||||||
const snowFallSpeed = 6; // speed of snowfall (recommended values: 4-8)
|
const snowFallSpeed = 6; // speed of snowfall (recommended values: 4-8)
|
||||||
const horizontalWind = 4; // horizontal wind speed (recommended value: 4)
|
const horizontalWind = 4; // horizontal wind speed (recommended value: 4)
|
||||||
@@ -131,6 +131,7 @@ function initializeSnowstorm() {
|
|||||||
if (container) {
|
if (container) {
|
||||||
const screenWidth = window.innerWidth; // get the screen width to detect mobile devices
|
const screenWidth = window.innerWidth; // get the screen width to detect mobile devices
|
||||||
if (screenWidth < 768) { // lower count of snowflakes on mobile devices
|
if (screenWidth < 768) { // lower count of snowflakes on mobile devices
|
||||||
|
console.log('Mobile device detected. Reducing snowflakes count.');
|
||||||
snowflakesCount = snowflakesCountMobile;
|
snowflakesCount = snowflakesCountMobile;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user