pure-snow.js

Snowfall effect written in pure JavaScript. No additional libraries, no dependencies. Works in every modern browser.

MIT License

Downloads
933
Stars
38
Committers
1

Bot releases are hidden (Show)

pure-snow.js - v2.1.0 Latest Release

Published by hyperstown 12 months ago

Another year, another version!

This time it's a smaller update which focus is on improving variable naming and adds window resizing support!

Important note: We no longer use count attribute to set snow count. Instead now we use data-count which is valid HTML data attribute. Additional info. Thanks @designconcepts for reporting this #8.

Changes

  • count attribute has been deprecated. Please use data-count,
  • Add support for window resizing. (Especially useful on mobile where user can easy change screen orientation)
pure-snow.js - v2.0.0

Published by hyperstown almost 2 years ago

Version 2.0 is officially here!

Changes

  • Added option to specify the number of snowflakes using the count attribute on the snow div element.
  • Added support for installation via npm.
  • Added option to specify custom CSS styles as a global const, BASE_CSS.
  • Followed more conventional naming scheme for functions, variables and project itself.
  • total variable will no longer work, please use count attribute or SNOWFLAKES_COUNT const that will work just like total before.
  • Function toggleSnow has been replaced with showSnow that takes boolean value as argument.
  • Small fixes and improvements in code readability.

Happy winter holidays and happy coding!

pure-snow.js - v1.2.1

Published by hyperstown almost 2 years ago

Cleanup update:

  • improved snow generator
  • run code formatter
  • minor changes
pure-snow.js - v1.2.0

Published by hyperstown almost 3 years ago

Enhancement update:

  • add support for unfixed page height
  • dynamic snow fall duration
  • small fixes
pure-snow.js - v1.1.0

Published by hyperstown almost 3 years ago

Important update to fit JavaScript naming scheme:

  • all variables now use camelCase
pure-snow.js - v1.0.0

Published by hyperstown almost 3 years ago

Initial release.
Just drop scripts into the project!