=== Driftfall – Seasonal Effects ===
Contributors: nodeandco
Tags: snow, snowfall, christmas, seasonal effects, falling leaves
Requires at least: 5.8
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Featherweight snowfall and seasonal effects on one canvas. Christmas, Halloween, rain, hearts, confetti or your own images. Every feature free.

== Description ==

Driftfall adds falling snow, leaves, petals, rain, hearts, confetti and more to your site without weighing it down. Everything runs on a single canvas with pre-rendered sprites and one animation loop. There is no premium version: every feature below is in the plugin you install.

= Occasions =

* **Auto (by date)** – switches itself: Halloween, Thanksgiving week, Christmas, New Year and Valentine's, with the seasons in between. Northern, southern and tropical calendars.
* **Christmas** – balls, bells, candy canes, gifts, snowmen and snowflakes (pick any mix), or snowfall only with three snowflake styles.
* **Winter, Autumn, Spring, Summer, Rain**
* **Halloween** – pumpkins, flapping bats, ghosts, candy corn
* **Thanksgiving** – leaves, acorns, feathers
* **Valentine's Day** – hearts and rose petals
* **New Year** – confetti, gold stars, streamers
* **Birthday** – confetti, stars and rising balloons
* **Custom images** – up to 10 of your own graphics, alone or mixed with any occasion

= Motion and interaction =

* Size range, particle count, fall speed and per-particle speed variation
* Wind direction and strength
* Side-to-side sway, rotation, tumbling and flutter
* Particles scatter away from the cursor
* Scroll parallax: larger particles react more, giving depth
* Bottom accumulation: snow, gifts or leaves pile up along the bottom of the screen

= Control =

* Live preview on the settings screen, plus one-click "Preview on site"
* Auto-stop after a set number of seconds, with a soft fade-out
* Start and end dates
* Homepage only, or exclude by page/post ID or by post type (products included)
* Hide on WooCommerce cart, checkout and account pages
* Full, reduced or no effect on phones
* Respects the visitor's "reduce motion" setting
* Adjustable z-index

= Performance =

* One deferred script (≈8 KB gzipped), no jQuery, no front-end CSS
* Nothing loads on pages where the effect is off or excluded
* Sprites are drawn once and reused; one canvas, one requestAnimationFrame loop
* Pauses automatically in background tabs
* Pixel density capped at 1.5× to save GPU fill on high-DPI screens
* Never blocks clicks: the canvas ignores pointer events

== Installation ==

1. Upload the `driftfall` folder to `/wp-content/plugins/`, or install the zip via Plugins → Add New → Upload.
2. Activate Driftfall.
3. Open **Driftfall** in the admin menu, pick an occasion and save.

== Frequently Asked Questions ==

= Will it slow my site down? =

The script is deferred, so it never blocks rendering, and it is only printed on pages where the effect is shown. Even with several hundred particles the loop is a handful of drawImage calls per frame.

= Does it work with page caching? =

Yes. The "Auto" occasion and the start/end dates are also checked in the browser, so a cached page still shows the right effect on the right day.

= Can visitors still click links under the effect? =

Yes. The canvas has `pointer-events: none`.

= Do animated GIFs animate? =

No. Canvas draws the first frame of a GIF. Use PNG with transparency for best results.

= The effect covers my sticky header or a popup. =

Lower the z-index under "Where it shows".

= Developer hooks =

* `driftfall_is_excluded` (bool $excluded, array $settings) – hide the effect on any request.
* `driftfall_config` (array $config, array $settings) – change what is sent to the browser.
* `window.Driftfall.create(settings, element, { preview: true })` – run the engine inside any element.

== Screenshots ==

1. Settings screen with live preview.
2. Christmas items with bottom accumulation.
3. Every occasion side by side.

== Changelog ==

= 1.0.0 =
* First release.
