GithubHelp home page GithubHelp logo

andrey-1988-dev / snowfall-js Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 1.0 20 KB

Snowfall.js is a JavaScript library that allows you to create and animate realistic snowflakes on your web page.

License: GNU General Public License v3.0

JavaScript 55.85% HTML 44.15%

snowfall-js's Introduction

Snowfall.js

Snowfall.js is a JavaScript library for creating and animating snowflakes on a web page using HTML5 canvas and JavaScript classes. You can customize the number, size, speed, color and text of the snowflakes, and enjoy the beautiful snow falling effect on your website or app. Snowfall.js is easy to use and compatible with most browsers and devices. Try it now and add some winter magic to your project.

Installation

To use Snowfall.js, you need to download the file snowfall.js from [this repository] and include it in your HTML page using the script tag:

<script src="snowfall.js?v=1.0.0"></script>

Usage

To create and animate snowflakes on your page, you need to create an object of the class Snowfall and pass it options as an object. For example:

let snowfall = new Snowfall({
    count: 100, // number of snowflakes
    minRadius: 10, // minimum radius of a snowflake in pixels
    maxRadius: 30, // maximum radius of a snowflake in pixels
    minSpeed: 3, // minimum speed of a snowflake in pixels per frame
    maxSpeed: 10, // maximum speed of a snowflake in pixels per frame
    text: "\u2744", // text for a snowflake (can be any symbol or text)
    color: "#ffffff", // color of a snowflake in HEX format
    zIndex: "1000" // z-index for the snowflakes canvas
});

All options are optional and have default values, which you can see in the file snowfall.js. You can create multiple objects of Snowfall with different options for different effects.

License

This project is distributed under the GNU GPL v3.0 license. You can freely use, modify and distribute this code, but you must keep the authorship of the original code and indicate the license. You must also share your changes under the same license. You can read more about the license in the file LICENSE.

Authors

This project was created by Andrey Yurkevich. If you have any questions or suggestions about this project, please feel free to contact me.

snowfall-js's People

Contributors

andrey-1988-dev avatar

Stargazers

Marina Yurkevich avatar  avatar Thiago Sales avatar

Watchers

 avatar

Forkers

jorishr

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.