Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/quentinroy/snow
Simple snow animation
https://github.com/quentinroy/snow
Last synced: 5 days ago
JSON representation
Simple snow animation
- Host: GitHub
- URL: https://github.com/quentinroy/snow
- Owner: QuentinRoy
- Created: 2020-11-30T18:07:21.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2020-11-30T20:07:27.000Z (almost 4 years ago)
- Last Synced: 2024-10-30T00:53:30.502Z (16 days ago)
- Language: TypeScript
- Size: 43 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# Snow
A small utility to simulate snow.
## Usage
```html
```
```js
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()
```