1.0.1 • Published 3 years ago

@nijeesh4all/snowflake-js v1.0.1

Weekly downloads
85
License
MIT
Repository
github
Last release
3 years ago

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>
1.0.1

3 years ago

1.0.0

3 years ago