@quentinroy/snow
TypeScript icon, indicating that this package has built-in type declarations

0.2.0 • Public • Published

Snow

A small utility to simulate snow.

Usage

<canvas id="snow-canvas" />
let canvas = document.querySelector("#snow-canvas")

// Optional argument. All options become mutable properties. Check sources
// for more information.
let options = {
  meanSize: 10,
  sdSize: 2,
  color: "rgba(255,255,255,0.9)",
  meanSpeed: 150,
  sdSpeed: 10,
  flow: 0.01,
  sdAngle: 5,
  isFpsShown: false,
}

// Create and start the snow animation.
let snow = new Snow(canvas, options)

// Stop the snow animation.
snow.stop()

// Resume the snow animation.
snow.resume()

Readme

Keywords

Package Sidebar

Install

npm i @quentinroy/snow

Weekly Downloads

0

Version

0.2.0

License

MIT

Unpacked Size

15.7 kB

Total Files

5

Last publish

Collaborators

  • quentinroy