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

seasonal-animation

v1.0.0

Published

A customizable npm package for seasonal animations (snow, rain, falling leaves) that covers the entire screen

Readme

Seasonal Animation

A lightweight, customizable npm package for creating beautiful seasonal animations (snow, rain, and falling leaves) that cover the entire screen. Perfect for adding atmospheric effects to your web applications.

Features

  • ❄️ Winter Mode: Animated snowflakes with realistic swaying motion
  • 🌧️ Rainy Mode: Dynamic rain drops with customizable angles
  • 🍂 Fall Mode: Beautiful falling leaves with multiple leaf shapes
  • 🎨 Fully Customizable: Control quantity, angle, speed, size, and colors
  • 📱 Responsive: Automatically adapts to screen size
  • 🚀 Lightweight: No external dependencies
  • 🎯 Easy to Use: Simple API with sensible defaults

Installation

npm install seasonal-animation

Quick Start

Basic Usage

import SeasonalAnimation from 'seasonal-animation';

// Create a winter snow effect
const animation = new SeasonalAnimation({
  season: 'winter',
  quantity: 50
});

animation.start();

CommonJS

const SeasonalAnimation = require('seasonal-animation');

const animation = new SeasonalAnimation({
  season: 'winter',
  quantity: 50
});

animation.start();

Browser (CDN)

<script src="path/to/seasonal-animation/src/index.js"></script>
<script>
  const animation = new SeasonalAnimation({
    season: 'winter',
    quantity: 50
  });
  animation.start();
</script>

Configuration Options

| Option | Type | Default | Description | |--------|------|---------|-------------| | season | string | 'winter' | Season type: 'winter', 'rainy', or 'fall' | | quantity | number | 50 | Number of particles to render | | angle | number | 0 | Angle in degrees (0 = straight down, 45 = diagonal) | | speed | number | 1 | Speed multiplier (1 = normal, 2 = double speed) | | size | number | 10 | Base size of particles (overrides season defaults) | | color | string | null | Custom color (null = season default) | | container | Element\|string | document.body | Container element or selector | | zIndex | number | 1000 | CSS z-index of the canvas |

Examples

Winter Snow

const snow = new SeasonalAnimation({
  season: 'winter',
  quantity: 100,
  speed: 1.5,
  angle: 0 // Straight down
});

snow.start();

Rain with Angle

const rain = new SeasonalAnimation({
  season: 'rainy',
  quantity: 200,
  angle: 15, // Slight angle
  speed: 2,
  color: '#4A90E2' // Custom blue
});

rain.start();

Fall Leaves

const leaves = new SeasonalAnimation({
  season: 'fall',
  quantity: 75,
  angle: 5, // Gentle angle
  speed: 1.2,
  color: '#FF6347' // Tomato red
});

leaves.start();

Custom Container

const animation = new SeasonalAnimation({
  season: 'winter',
  container: '#my-container', // CSS selector
  quantity: 50
});

animation.start();

Update Options Dynamically

const animation = new SeasonalAnimation({
  season: 'winter',
  quantity: 50
});

animation.start();

// Later, update the animation
animation.updateOptions({
  quantity: 100,
  speed: 2
});

API Methods

start()

Starts the animation.

animation.start();

stop()

Stops the animation.

animation.stop();

destroy()

Removes the animation canvas and cleans up resources.

animation.destroy();

updateOptions(newOptions)

Updates the animation options and restarts with new settings.

animation.updateOptions({
  quantity: 100,
  speed: 2,
  angle: 15
});

Season-Specific Features

Winter ('winter')

  • Snowflake shapes with 6 arms
  • Natural swaying motion
  • Default color: White (#FFFFFF)
  • Size range: 2-8px

Rainy ('rainy')

  • Line-based rain drops
  • Straight or angled fall
  • Default color: Sky Blue (#87CEEB)
  • Size range: 1-2px

Fall ('fall')

  • Multiple leaf shapes (maple, oval, simple)
  • Rotating and swaying motion
  • Default color: Dark Orange (#FF8C00)
  • Size range: 8-20px

Important Notes

  • Full Screen Coverage: The animation always starts from the top and covers the entire screen/viewport, regardless of the angle setting.
  • Performance: Adjust the quantity based on your needs. Higher quantities (200+) may impact performance on slower devices.
  • Container: The canvas is positioned as fixed and covers the entire viewport by default.
  • Responsive: The animation automatically resizes when the window is resized.

Browser Support

Works in all modern browsers that support:

  • HTML5 Canvas
  • requestAnimationFrame
  • ES6+ JavaScript

License

ISC

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Issues

If you encounter any issues, please report them on the GitHub Issues page.