Minimalist Falling Snow Effect with Pure JavaScript – Snow.js

Category: Animation , Javascript | November 18, 2018
Author:kurisubrooks
Views Total:49,985 views
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:


7 thoughts on “Minimalist Falling Snow Effect with Pure JavaScript – Snow.js

  1. groni3000

    If i set it for “body” tag i get problems:
    1) if body is tall then snow doesn’t reach bottom. Maybe my css files contra it.
    2) inputs in snow are not clickable…

    Reply

Leave a Reply