Skip to content

aSocket/Snow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

☃️ aSocket Snow - Web Effect


aSocket Snow enables individuals to easily add a seasonal effect to any web page.

Setup

Simply download snow.js and include the following line in your HTML file:

<script src="snow.js"></script>

Modularity

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.

Control

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.