=== Animation Kit – Animated Backgrounds & WebGL Effects ===
Contributors: WPXERO
Donate link: https://wpxero.com/plugins/wpxero-animation-kit/pricing
Tags: animated-background, particles, hero-section, webgl, gutenberg
Requires at least: 6.0
Tested up to: 7.0
Stable tag: 0.2.2
Requires PHP: 7.4
License: GPL3
License URI: http://www.gnu.org/licenses/gpl-3.0.html

Add animated WebGL backgrounds to any WordPress page — 13 effects including Particles, Aurora, Plasma, Prism. Lazy-loaded, no code needed.

== Description ==

Animation Kit lets you add a moving WebGL background to any WordPress page — a particle field, an aurora wash, a sweeping radar pulse — from a single admin screen. No theme editing, no shortcodes, no CSS. Pick an effect, tune the colors and motion, save, and your visitors see a smooth canvas layer behind your content.

The plugin is **builder-agnostic**: it renders at the document level, so it cooperates with classic themes, block themes, Elementor, Bricks, WPBakery, and Gutenberg page builds without needing a per-builder integration.

== How it works ==

You get a dedicated **Background Animation** screen inside the WP admin. From there:

1. Pick one of 13 free effects (full list below).
2. Adjust the live controls — colors, speed, density, opacity, z-index, position.
3. Toggle the background on. The canvas appears site-wide.

The free tier targets the whole website (single configuration). Pro adds multiple stacked configurations and per-page placement rules.

== Effects included in the free version ==

* **Antigravity** — Magnetic particle field that reacts to pointer movement. Good for tech, SaaS, and sci-fi-style hero sections.
* **Aurora** — Flowing color washes. Suits portfolios, night-mode brands, and creative agencies.
* **Color Bends** — Multi-stop color gradient with noise warp and slow rotation. Works as a brand backdrop.
* **Grid Scan** — Animated grid with a sweep line. Tech, cyber, and dashboard aesthetics.
* **Line Waves** — Concentric line waves with color cycling. Graphic, poster-like.
* **Liquid Ether** — Fluid simulation that ripples and bends with cursor movement. Most "wow" of the set.
* **Particles** — Drifting particle systems with configurable count, color, and spread.
* **Pixel Blast** — Animated pixel patterns (square, circle, triangle) with optional click-ripples. Retro and game-style.
* **Plasma** — Classic plasma shader with direction, scale, and color. Soft demoscene feel.
* **Prism** — Rotating 3D prism with bloom. Crystalline, futuristic.
* **Radar** — Sweep-style radar visualization with ring and spoke controls.
* **Soft Aurora** — Lower-intensity aurora with two-color gradient. Easier on small-screen viewers.
* **Light Pillar** — Vertical light column with adjustable glow, width, height, and rotation. Good for landing-page focal points.

Each effect has its own controls; you only ship the code for the effect you enable (lazy-loaded chunk per effect, not a single fat bundle).

== Use cases ==

* Hero sections that need motion without an animated video.
* Landing pages where you want a moving backdrop behind a CTA.
* Portfolios and agency sites that want a signature visual.
* Conference, course, and event sites that want a "live" feel.
* Dark-mode marketing pages where Aurora or Light Pillar adds depth.

== Performance and Core Web Vitals ==

Animation Kit is built around lazy loading. The frontend script only ships when a background is enabled; the heavy rendering code (Three.js, OGL, the per-effect shader) is split into separate chunks loaded on demand after `DOMContentLoaded`. On mobile, particle counts and pixel ratios are clamped automatically.

Compatibility filters are registered for **WP Rocket**, **LiteSpeed Cache**, **Autoptimize**, **W3 Total Cache**, and **WP Fastest Cache** so their delay-JS / combine-JS / minify rules don't break the lazy chunks.

== Accessibility ==

* The canvas wrapper is `aria-hidden="true"` and `pointer-events: none` — assistive tech ignores it, and visitors can still click links, forms, and menus through it.
* `prefers-reduced-motion: reduce` is honored: when the user's OS preference is set, the WebGL mount is skipped entirely. If the preference is toggled off during a session, the animation mounts at that point.

== Animation Kit Pro ==

When the free tier stops fitting, Pro adds:

* **Multiple background configurations** stacked or rotated on the same site.
* **Per-page placement rules** — specific pages, CSS selectors, or HTML element targets.
* Premium roadmap access and priority support.

Pricing and details: https://wpxero.com/plugins/wpxero-animation-kit/pricing

== Frequently Asked Questions ==

= How do I add an animated background to a WordPress page without coding? =

Install and activate Animation Kit, open **Animation Kit → Background Animation** in the admin, pick an effect, tweak the controls, and turn it on. There's no shortcode to paste, no widget to drop in, no template to edit.

= Does this work with Elementor, Gutenberg, Bricks, and WPBakery? =

Yes — the background renders at the document body, so it sits behind anything any of those builders output. There is currently no Elementor widget or Gutenberg block; the background is global rather than per-section in the free tier. Per-section targeting (via CSS selector) is a Pro feature.

= Will animated backgrounds slow down my page or hurt PageSpeed? =

The frontend script only loads when a background is enabled. The heavy rendering code is code-split and lazy-loaded after the page is interactive. On mobile, particle counts and pixel ratios are reduced automatically. Like any WebGL animation, very high particle counts on weak devices will still cost GPU time — tune density and speed per project.

= Will it break with my caching plugin? =

Compatibility filters ship for WP Rocket, LiteSpeed, Autoptimize, W3 Total Cache, and WP Fastest Cache. The scripts are excluded from delay/combine/minify rules so the lazy chunks resolve correctly. If you use a different cache plugin, exclude `wpxero-animation-kit/build/` from optimization manually.

= Can I limit the animation to one page or one section? =

Per-page and CSS-selector placement is a Pro feature. The free tier applies one configuration site-wide. You can disable the background per page by toggling it off in the admin (a Pro-only feature lets you keep multiple configurations active at once).

= Does the canvas block clicks, focus, or scroll? =

No. `pointer-events: none` is set on the wrapper, so clicks pass through to your content. The wrapper is also `aria-hidden="true"` for screen readers.

= Does it respect prefers-reduced-motion? =

Yes. When the visitor's OS-level reduced-motion preference is on, the WebGL mount is skipped. If they toggle the preference off mid-session, the animation mounts at that point.

= How do I uninstall cleanly? =

Plugin settings are stored under two options (`animation_kit_settings` and `animation_kit_background_settings`). Deactivating preserves them so you don't lose configuration; **deleting** the plugin from the Plugins screen runs `uninstall.php`, which removes both options and any transients across all sites (multisite-aware).

= What's the difference between Free and Pro? =

Free: 13 effects, full per-effect tuning, single site-wide configuration.
Pro: multiple stacked configurations, per-page placement (specific pages, CSS selectors, HTML targets), priority support.

== Screenshots ==

1. Aurora background behind a hero section — landing-page mockup showing the flowing color wash with overlaid headline and CTA.
2. The Background Animation admin workspace — live controls, effect picker, and per-effect tuning panel inside WordPress.
3. Effect picker showing the 13 free effects.
4. Antigravity — close-up of the magnetic particle field with pointer interaction.
5. Light Pillar on a SaaS hero — vertical light column behind a product mockup.
6. Mobile view — same configuration on a phone, showing the responsive density reduction.

== Installation ==

1. Search "Animation Kit" in **Plugins → Add New** and install, or upload the ZIP from wordpress.org/plugins/wpxero-animation-kit.
2. Activate.
3. Open **Animation Kit → Background Animation** in the WordPress admin.
4. Pick an effect, tune the controls, enable, save.
5. Visit the front of your site in a private window to confirm.

== Changelog ==

= 0.2.2 — June 10, 2026 =
* Added: 8 new free background effects — Color Bends, Grid Scan, Line Waves, Liquid Ether, Pixel Blast, Plasma, Prism, Soft Aurora (13 total).
* Added: Honors `prefers-reduced-motion: reduce`. When the visitor's OS-level reduced-motion preference is on, the WebGL mount is skipped; re-mounts automatically if they toggle the preference off mid-session.
* Added: Optional one-time review-request notice — shown to administrators only after 7+ days of installation and at least one saved background configuration. Three explicit choices: leave review, snooze 14 days, dismiss forever. Never blocks UI.
* Security: REST settings endpoints now validate every incoming field against a strict per-field schema; unknown keys are dropped and string fields are length-capped. Defense-in-depth on top of the existing capability gate.
* Fixed: Premium gate referenced a stale class name; the fallback branch checking for the Pro plugin is now correct.
* Fixed: An invalid CSS selector in one background configuration no longer aborts renderer initialization for every other configuration.
* Improved: `$_SERVER['REQUEST_URI']` and `$_REQUEST['action']` are now properly unslashed and sanitized.
* Improved: WordPress.org listing copy rewritten for clarity and search relevance (no functional change).
* Removed: Dead promotional dashboard widget that had been commented out since 0.2.1.

= 0.2.1 — May 16, 2026 =
* Improved: Multiple Backgrounds editor — Animation / Display sub-tabs and aligned color controls.
* Improved: Configuration name field validation and editor guidance.
* Fixed: Apply Configuration now persists immediately so saved configurations are not lost.

= 0.2.0 — May 14, 2026 =
* Added: Radar effect.
* Improved: Particles effect — renderer and admin controls.
* Improved: Background admin editor (shared controls, layout, styles).
* Fixed: Display-rule conditional logic.
* Added: Translation template (POT) and JSON catalogs for localization.

= 0.1.0 — April 14, 2026 =
* Added: Aurora effect.

= 0.0.1 — April 3, 2026 =
* Initial release with Antigravity and Light Pillar effects and the Background Animation admin screen.
