https://github.com/neulhan/fallingjs
Beautiful snowing effect very simply! Rust-WASM support too.
https://github.com/neulhan/fallingjs
canvas config-props opensource-library rust snow snowflake snowyjs wasm
Last synced: about 1 year ago
JSON representation
Beautiful snowing effect very simply! Rust-WASM support too.
- Host: GitHub
- URL: https://github.com/neulhan/fallingjs
- Owner: Neulhan
- License: mit
- Created: 2020-11-21T07:52:14.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-04-03T23:48:36.000Z (about 2 years ago)
- Last Synced: 2025-04-02T16:03:23.867Z (about 1 year ago)
- Topics: canvas, config-props, opensource-library, rust, snow, snowflake, snowyjs, wasm
- Language: JavaScript
- Homepage: https://neulhan.github.io/FallingJS/
- Size: 796 KB
- Stars: 9
- Watchers: 1
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# FallingJS
FallingJS will help you use the beautiful snowing effect very simply!
`examples`: https://neulhan.github.io/FallingJS/
## Preview

## Get Started
```html
const fallingjs = new FallingJS();
fallingjs.start();
```
## Config Props
| Name | Type | Description | Required | Default |
| ----------- | ---------- | ----------------------------------------------------- | -------- | ---------- |
| `el` | `string` | Falling effect area by css selector | No | `body` |
| `frequency` | `number` | Set falling object adding frequency to the area | No | `0.1` |
| `minSpeed` | `number` | Set min speed of falling objects | No | `0.5` |
| `maxSpeed` | `number` | Set max speed of falling objects | No | `2` |
| `minRadius` | `number` | Set min radius of falling objects | No | `1` |
| `maxRadius` | `number` | Set max radius of falling objects | No | `3` |
| `minAngle` | `number` | Set min angle of falling objects (-1 ~ 1 recommended) | No | `-0.2` |
| `maxAngle` | `number` | Set max angle of falling objects (-1 ~ 1 recommended) | No | `0.2` |
| `type` | `string` | Type of falling objects | No | `"Circle"` |
| `colors` | `string[]` | Color palette array for falling objects | No | `["#FFF"]` |
| `wasm` | `boolean` | Use rust-wasm version rendering | No | `false` |
## Future Updates
- Add config props `image` to custom snowflake image
- Add event hooks