npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

easy-snowfall

v1.0.0

Published

🌨️ **Easy-Snowfall** is a lightweight JavaScript library for creating beautiful snowfall animations on web pages. Highly customizable, it allows users to create different snowflake styles effortlessly, adding a touch of winter magic to your website.

Downloads

4

Readme

Easy-Snowfall

🌨️ Easy-Snowfall is a lightweight JavaScript library for creating beautiful snowfall animations on web pages. Highly customizable, it allows users to create different snowflake styles effortlessly, adding a touch of winter magic to your website.

🌨️ Easy-Snowfall 是一个轻量级的 JavaScript 库,用于在网页中生成漂亮的雪花动画效果。它支持高度定制,用户可以通过简单的配置创建不同的雪花风格,为网站增添冬日氛围。


Features | 特性

  • 🎨 Highly Customizable: Adjust the number, size, opacity, speed, and swing amplitude of snowflakes.

  • 🎨 高度自定义:支持调整雪花数量、大小、透明度、速度、摆动幅度等参数。

  • 📱 Responsive Design: Automatically adapts to screen size changes, perfect for both desktop and mobile.

  • 📱 响应式设计:自动适配屏幕尺寸变化,适用于桌面和移动端。

  • Great Performance: Smooth animations using native Canvas, with low resource consumption.

  • 性能优异:使用原生 Canvas 实现,动画流畅,占用资源少。

  • 🚀 Easy to Use: Integrate into any webpage with just a few lines of code.

  • 🚀 开箱即用:只需几行代码即可快速集成到任意网页中。


Quick Start | 快速开始

Installation | 安装

Download the script directly or install via npm:

直接下载脚本或通过 npm 安装:

npm install easy-snowfall

Example | 示例

Add a <canvas> tag in your HTML file and initialize Snowfall:

在 HTML 文件中添加一个 <canvas> 标签,并初始化 Snowfall:

<canvas id="snow"></canvas>
<script type="module">
  import Snowfall from 'easy-snowfall'
  new Snowfall('#snow', {
    flakeCount: 100,            // Snowflake count | 雪花数量
    radiusRange: [2, 5],        // Radius range | 雪花半径范围
    opacityRange: [0.5, 1],     // Opacity range | 雪花透明度范围
    speed: 0.1,                 // Falling speed multiplier | 雪花下落速度倍数
    swingAmplitude: 0.1,          // Swing amplitude | 雪花左右摆动幅度
  });
</script>

Configuration | 配置参数

| Parameter | Type | Default | Description | |-----------------|-----------|---------------|-----------------------------------------| | 参数名称 | 类型 | 默认值 | 描述 | | flakeCount | number | 100 | Number of snowflakes | 雪花数量 | | radiusRange | Array | [2, 5] | Snowflake radius range | 雪花半径范围 | | opacityRange | Array | [0.5, 1] | Snowflake opacity range | 雪花透明度范围 | | speed | number | 1 | Falling speed multiplier | 雪花下落速度倍数 | | swingAmplitude| number | 0 | Swing amplitude | 雪花左右摆动幅度 |


Compatibility | 兼容性

  • Supports all major modern browsers (Chrome, Firefox, Edge, Safari).

  • 支持主流现代浏览器(Chrome、Firefox、Edge、Safari)。

  • Mobile-friendly, works well on iOS and Android devices.

  • 移动端友好,适配 iOS 和 Android 系统。


License | 许可证

This project is licensed under the AGPL-3.0 License. Contributions and forks are welcome!

本项目基于 AGPL-3.0 License 开源,欢迎贡献与分支!