Skip to content

nijeesh4all/snowfall

Repository files navigation

SnowFall

Simple library to make snowfall on your browser

Documenatation

https://nijeesh4all.github.io/snowfall/classes/src_snowflake.snowflake.html

Demo

https://unruffled-jepsen-423d54.netlify.app/

Installing

load the script like you would load any external libraries

<script src='./snow-flake.js'></script>

Using

Browser

creating a single snow flake

<script>
  const { SnowFlake } = window.SnowFlake
  
  # This is optional, if not provided default values will be used
  # check documentation for more info
  options = { color: 'red', max_z_index: 100 }
  
  flake = new SnowFlake(options)
  flake.animate()
  
</script>

creating a single snow fall

<script>
  const { SnowFlake, SnowFall } = window.SnowFlake
  
  # This is optional, if not provided default values will be used
  # check documentation for more info
  options = { color: 'red', max_z_index: 100 }
  SnowFlake.configure(options)
  
  const flake_count = 100;
  const fall = new SnowFall(flake_count)
  fall.start()
</script>

About

Simple library to make snowfall on your browser

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published