GitHub


Features

  • 100-300 snowflakes falling with individual size and speed
  • Sliders: flake count (50-500), speed, wind intensity
  • Click anywhere to add wind bursts that drift particles
  • Seasonal colour modes: Winter (white/blue), Spring (green/pink), Random
  • Particles sway side to side for realistic motion
  • Responsive — fills the full viewport
  • Frame-rate independent movement using delta time
  • Dark theme with orange accent (#ff6b35)

How It Works

Each snowflake is an object with x, y, speed, size, opacity, and sway offset. On each frame, y += speed × dt, x += wind × dt + sin(sway) × 0.5. Wind is a global value adjustable via slider or click. When a flake falls below the viewport, it wraps around to the top. The particle count is dynamically adjustable without recreating the array.

Usage

  1. Open https://soumendrak.github.io/snowfall/ in any browser.
  2. No build step, no installation, no server required.
  3. Deploy anywhere — GitHub Pages, Netlify, or any static host.
git clone https://github.com/soumendrak/snowfall.git
# Open index.html directly

License

Licensed under the MIT License.


Built with ❤️ and zero dependencies

Read the original on github.com ↗