Package Exports
- fallingjs
- fallingjs/lib/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (fallingjs) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
SnowyJS
SnowyJS will help you use the beautiful snowing effect very simply!example: https://neulhan.github.io/snowyjs/
Preview
Get Started
<div class="snow-area"></div>
<!-- download snowy.js in github/dist -->
<script src="js/snowy.js"></script>
<script>
const snowjs = new SnowJS({
el: ".snow-area",
});
snowjs.start();
</script>Config Props
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
el |
String |
Snowy effect area by qureySelector | Yes | |
frequency |
Number |
How often snowflake elements are added to the area | No | 20 ms |
speedRange |
Array |
Set speed range of snowflakes | No | [0.5, 3] |
radiusRange |
Array |
Set radius range of snowflakes | No | [0.5, 3] |
angleRange |
Array |
Set angle range of snowflakes (-1 ~ 1 recommended) | No | [-0.1, 0.1] |
colors |
Array |
Color palette array for snowflakes | No | ["#FFF"] |
Future Updates
- Add config props
imageto custom snowflake image - Add event hooks
- Angle range fix
- Refactoring frequency process to
requestAnimationFrame