Configuration - Maingron/snow.js GitHub Wiki
Snow.js Configuration
snow.js has a configurable configuration. It can be configured within snow.config
.
snowChars
: Defines the characters used as snow. Supports UTF-8 - That means you can paste Emojis into the configurationtickTime
: Defines the minimum time between frames in milliseconds. If the user's computer is too slow, each frame will take longer. Values below ~50 also depend on the browsermaxSnow
: Defines the amount of snowflakes spawnedjitterAmount
: Defines how jittery the snowflakes are (x-coordinate)gravityAmount
: Defines how fast the snowflakes fall down (y-coordinate)initialYSpacing
: Defines how far apart the snowflakes are spawned initially. Negative values will spawn into the active viewport, positive values will spawn above the screentopBorder
: Defines the top border for snowflakes. They won't go higher than that. Also used to respawn snowflakes when they go below the bottom borderbottomBorder
: Defines the bottom border for snowflakes. They won't go lower than that. Also used to respawn snowflakes to the top border when they hit the bottom bordersnowSizes
: Defines the possible font size for each individual snowflakesnowColors
: Defines the possible font color for each individual snowflakesnowFont
: Defines the font used for all snowflakes. Works like in font-family in CSS - If the first font is not available, the second one will be used
Advanced Settings
snowContainer
: Container in which snowflakes will be spawned - Recommended value:document.body
cssTransition
: Applies a CSS transition to snowflakes - Recommended value:0
autoFixScriptTag
: Makes sure that snow.js is included correctly on the website. If true, make sure that the snow.js file is called snow.js or snow.min.js. Might not have a big effect - Recommended value:true
maxDecimalLength
: Defines how precise calculations are. Best to use a low value - Recommended value:1
snowflakeTagName
: Defines the html-tag used for each snowflake - Recommended value:i
snowflakeClassName
: Defines the html-class used for each snowflake - Recommended value:s