aSocket Snow enables individuals to easily add a seasonal effect to any web page.
Simply download snow.js and include the following line in your HTML file:
<script src="snow.js"></script>The snow effect can be easily customized via the configuration object.
{
'LIMIT': 20, // The maximum number of snowflakes to create.
'BLUR': 1, // The filter blur value.
'FALL_RATE': 5, // The rate at which snowflakes fall.
'SWAY_RATE': 1, // The rate at which snowflakes sway.
},An unlimited amount of layers can be added to the configuration.
The snow effect can be controlled by executing the command aSocketSnow.command(cmd).
(This can be utilized via a user preferences menu, toggle button, etc.)
The following can be passed as arguments to the command, enacting the corresponding effects:
clear - Clear all snowflakes from the DOM and controller.
spawn - Spawn a new snowflake.
start - Start the snowflake controller animation/creation flow if not already active.
stop - Stop the snowflake controller animation/creation flow.