GithubHelp home page GithubHelp logo

nicholas-c / snowstorm Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 59 KB

Do you want to build a snowman? Winter is coming... Prepare yourself for a snow storm.

CSS 1.44% JavaScript 94.42% HTML 4.14%

snowstorm's Introduction

Snow Storm v0.8.1

Snow Storm is a vanilla JS Library which adds snow to any page. Options are documented below, however allow configuration to choose which element to attach to, and which pages to inialise on.

Open to all, and any PR to improve functionality or code.

Now with more babel

TODO:

  • Create base structure with ES6
  • Method to create "Canvas" Element
  • Snowflakes as seperate class to enable extension
  • Draw on canvas and snow elements
  • Limit FPS
  • Clear memory stack when it all gets a bit too much
  • Multiple snowstorm elements
  • Destory method (Remove everything and flush memory and commit suicide)
  • Page specific triggers and initialisation
  • Move elements into the config array and have default element (Body)
  • Config to be passed in and merged with default values (Color, speed, direction)
  • Enable extra features such as mouse control (Features undecided)
  • Enable backwards compatibility and use task runners to make Babel nice-ness

Installation

Plan on making this an NPM and Yarn package, watch this space.

For now, file goes in a folder and compiled and class called with new constructor

Initalisation

For now (See todo) only a single element can be passed in, such as the body tag

WARNING: Body tag doesn't get it's height properly, so avoid body and use a page wrap or the likes.

var element = document.querySelector('.selector');

var snowstorm = new SnowStorm(element, {});

Options

No real options yet, expect for element as outlined above... Watch this space!

snowstorm's People

Watchers

James Cloos avatar

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.