Minimalist Falling Snow Effect with Pure JavaScript – Snow.js

Category: Animation , Javascript | November 18, 2018
Author: kurisubrooks
Views Total: 5,357
Official Page: Go to website
Last Update: November 18, 2018
License: MIT

Preview:

Minimalist Falling Snow Effect with Pure JavaScript – Snow.js

Description:

Just another pure JavaScript implementation of simple snowfall effect that uses pure HTML/CSS for snowflakes.

How to use:

Just put the snow.js JavaScript library into the html document and we’re done.

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

Customize the snowfall effect directly in the JavaScript.

// Amount of Snowflakes
var snowMax = 35;

// Snowflake Colours
var snowColor = ["#DDD", "#EEE"];

// Snow Entity
var snowEntity = "&#x2022;";

// Falling Velocity
var snowSpeed = 0.75;

// Minimum Flake Size
var snowMinSize = 8;

// Maximum Flake Size
var snowMaxSize = 24;

// Refresh Rate (in milliseconds)
var snowRefresh = 50;

// Additional Styles
var snowStyles = "cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; -o-user-select: none; user-select: none;";

Changelog:

11/18/2018

  • JS update

You Might Be Interested In:

Leave a Reply