=== Glopzi Studio ===
Contributors: glopzi
Tags: animations, gsap, scroll animations, webgl, effects
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 0.6.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Builder-agnostic animation and object injection layer. Connects to the Glopzi cloud to deliver the animation runtime and editor.

== Description ==

Glopzi Studio adds rich animations to any WordPress site without requiring a specific page builder. The editor runs in-browser; the runtime is served from the Glopzi CDN and cached on your own WordPress host for reliability.

**External service notice:** This plugin connects to `qspgtjlwcmfjhnesvczg.supabase.co` (license validation + config storage), `studio.glopzi.com` (editor), and `pub-cc1141a64746464aa2ce7ab8b4c36d13.r2.dev` (runtime + effect bundles). See the Privacy section below.

== Installation ==

1. Install and activate the plugin.
2. Go to **Glopzi Studio** in the admin menu.
3. Get a free license key at https://dashboard.glopzi.com.
4. Paste it on the Glopzi Studio admin screen.
4. Start editing.

== Frequently Asked Questions ==

= Why do I need an internet connection? =

Glopzi Studio validates your license and downloads the animation runtime from a secure CDN on first activation. Intranet-only WordPress installs are not supported.

= My security plugin is blocking Glopzi. What do I do? =

Allowlist these domains during the initial cache warm: `qspgtjlwcmfjhnesvczg.supabase.co`, `studio.glopzi.com`, `pub-cc1141a64746464aa2ce7ab8b4c36d13.r2.dev`. Once the cache is populated, public-facing visitors receive the runtime from your own `wp-content/uploads/glopzi-cache/` directory and no external requests are made for them.

= Where are my animations stored? =

In the Glopzi cloud (Supabase). Existing sites that previously stored configs in `wp_options` are migrated automatically on first activation and the legacy rows remain readable for 7 days as a safety net before being cleaned up.

== Privacy ==

Glopzi Studio connects to external services only when a licensed administrator opens the editor or saves a configuration. No visitor data is transmitted to Glopzi servers; the runtime served on public pages does not send telemetry. Full policy: https://glopzi.com/privacy

== Changelog ==

= 0.7.8 =
* Fix: The WordPress admin footer ("Thank you for creating with WordPress.") no longer overlays the editor's bottom controls. Previously it sat on top of the timeline resize handle and the "Pick element to animate" button, making both hard to click. Now hidden on the Glopzi admin screen only.

= 0.7.7 =
* Feature: New admin notice for Free plan users surfaces the 5,000 views/month cap and a one-click path to upgrade and remove the watermark. Shown on Glopzi admin screens only when the license status is `free`.

= 0.7.6 =
* Improvement: Editor session token now lasts 4 hours instead of 15 minutes. Long editing sessions no longer hit a silent expiry that surfaced as a cryptic "Retry" on the Save button. For sessions exceeding 4 hours, the editor now shows a clear "Your editor session expired. Reload to continue?" prompt instead of failing silently.

= 0.7.5 =
* Feature: 3D Object Time mode click and hover triggers now fire on the model itself instead of the picked anchor element. The anchor still anchors the model spatially (centers it on the picked element, follows scroll); only the trigger surface moves to the visible 3D mesh. Cursor turns to a pointer when over the model. Anchor is now optional for click and hover (only "On enter view" still requires one). Cancelling the picker on Time-mode entry now creates the animation with no anchor (was previously a no-op). Cache-bust required: this version forces the editor preview to fetch the new edit-mode runtime bundle.

= 0.7.4 =
* Fix: 3D Object models no longer flicker translucent when tweaking properties in the editor. Each property change destroyed + remounted the model and the production-only fade-in reveal kept retriggering, making the preview look perpetually transparent. The fade-in is now skipped in edit mode (production page loads still get the polished reveal).
* Change: Contact shadow now defaults OFF for new 3D Object animations (both Time and Scroll). Was previously ON which often clashed with the page's existing visual treatment. Existing animations keep their current setting and can be toggled in the Look section.

= 0.7.3 =
* Fix: 3D Object Time mode now interpolates smoothly between checkpoints. Previously each checkpoint produced a fixed 0.5s tween at its position with dead time in between, so a 3-checkpoint scale animation (0.5 -> 1 -> 1.5) jumped to the wrong starting value mid-segment instead of growing continuously across the full duration. Now each property channel builds proper segments between consecutive defining checkpoints; inherited middle checkpoints no longer interrupt the channel.
* Fix: Animations no longer snap back to the initial state at end-of-timeline. The new segment model holds the final value after the last keyframe.

= 0.7.2 =
* Fix: Preview button on 3D Object Time mode now actually plays the animation. Previously the button rendered but had no handler wired, so clicking it did nothing. Click Preview to restart the timeline at any time, regardless of the configured trigger (load, click, hover, inview).
* Fix: Editor selection overlay (green outline) now tracks anchor changes when you re-pick via the Anchor section. Previously the highlight stayed on the initial pick.

= 0.7.1 =
* Fix: 3D Object Time mode "Anchor element" picker is now wired end-to-end. Previously the Pick button activated the picker but the result was never written back to the animation, so the model never anchored to the chosen element. Now picking an element updates the anchor in real time and the model centers on it.
* Fix: Editor highlight overlay (green outline) now tracks the picked anchor element for 3D Time animations, matching the visual feedback users get for any other widget type.

= 0.7.0 =
* New: 3D Object Time mode now has full property keyframing (Position X/Y/Z, Rotate X/Y/Z, Scale, Opacity), a Preview button, configurable triggers (load, click, hover, on-enter-view), delay, duration, loop and yoyo, an easing curve editor, and group sync with the multi-track timeline. Reaches functional parity with the existing Time animation widget for any other element type.
* New: Anchor element picker for 3D Time mode. The model centers spatially on the picked element and triggers fire from it. Leave blank to use literal Position X/Y/Z and the load trigger only.
* Improvement: Built-in GLB clip toggle now disables visibly with a hint when property keyframes are active, so users see why the clip stops looping.

= 0.6.2 =
* Fix: Editor in wp-admin no longer black-screens intermittently on first load. Replaced the iframe.load-driven bootstrap with a bidirectional handshake: the editor pings the parent when its React listener is registered, and the parent replies with the bootstrap on demand. Robust against any mount order between the iframe and the editor.

= 0.6.1 =
* Fix: The same-origin cache bundle URL now includes a `?v=` cache-buster tied to the plugin's CACHE_VERSION_OPTION. Saving an animation from the editor used to leave returning visitors stuck on the previous compile because their browsers cached the bundle URL forever. New saves now reach every visitor on their next page load.
* Fix: The loader URL itself now uses the plugin version as its cache-buster instead of the cache timestamp, so plugin upgrades reliably refresh the loader script even when the cache hasn't been re-warmed.

= 0.6.0 =
* Improvement: 3D Object widget overhaul. The model now lives in a fullscreen invisible canvas instead of a fixed 400x400 widget anchored top-right. Models no longer get clipped by the wrapper, and they appear correctly across all viewport sizes.
* Improvement: Properties panel for 3D animations now routes everything to the actual Three.js model (position, rotation, scale, opacity). Previously translate/scale/opacity affected the wrapper CSS and rotation affected the model, which produced a confusing split.
* Improvement: Position Z exposed in Properties for moving the model toward / away from the camera (cinematic zoom-in/out effects).
* Improvement: Time mode now anchors the model spatially to the picked element. The model follows the element when the page scrolls or resizes (ResizeObserver + scroll listeners).
* Improvement: Scroll mode no longer requires picking a DOM element. Markers cover the trigger role; the picker is shown only for Time mode.
* Cleanup: Properties chips for inject-3d trimmed to options that have a direct 3D analogue (removed blur, brightness, contrast, saturate, grayscale, color, bgColor, borderRadius, perspective, width, height, clipPath, skewX, skewY).
* Internal: schema bumped to v10; existing inject-3d animations are migrated transparently. Legacy `placement` and `transform` fields are stripped on load.

= 0.5.0 =
* New: 3D Object widget with scroll keyframes. Drop a .glb model on any element, animate rotation/position/scale across scroll checkpoints, with smart routing that uses real Three.js rotations for the rotate family.
* New: WordPress media library now accepts .glb and .gltf uploads via upload_mimes filter.
* Fix: ScrollTrigger plugin is registered before binding the inject-3d timeline. Without this, the timeline would silently autoplay as if it were a time animation.
* Fix: built-in GLB clip mixer is skipped when scroll checkpoints drive the animation, so the user-defined keyframes take over without interference from the baked clip.
* Fix: editor preview now renders marker overlay lines for inject-3d Scroll mode, matching the scroll-animate experience.
* Internal: schema bumped to v9; existing inject-3d animations are migrated transparently with an empty checkpoints array (no behavior change for old configs).

= 0.4.6 =
* Fix: editor admin iframe now passes the cached license status, can_save flag, and tier to the editor on bootstrap. Without this, trial users saw the editor without the trial banner and the Save button degraded to a generic "Retry" instead of the locked "Save (Activate to publish)" state with the upgrade modal CTA.

= 0.4.5 =
* Fix: editor preview iframe no longer blocked on sites that set X-Frame-Options: SAMEORIGIN (default for many security plugins and Apache/nginx configs). When ?glopzi-edit=1 is detected, the plugin emits CSP frame-ancestors whitelisting studio.glopzi.com.

= 0.4.4 =
* Fix: license screen now accepts trial license keys (6-segment GLPZ-TRIAL-... format) in addition to standard 5-segment keys. Previously the HTML5 pattern and PHP validator rejected trial keys silently.
* Updated installation copy to direct users to dashboard.glopzi.com for a free license.

= 0.4.3 =
* Refreshed plugin description, admin menu icon, and admin bar entry. No functional changes.

= 0.4.2 =
* New: in-admin auto-updates. Future plugin releases will appear in your Plugins page like any standard WordPress plugin update. No more manual ZIP downloads. (One-time manual upgrade from 0.4.1 required to bootstrap.)

= 0.4.0 =
* Save-gate model: trial users can edit but must activate a plan to publish animations to visitors.
* Status-aware admin banners (trial, expired, revoked) shown on Glopzi admin pages.
* Backwards compatible with all existing licenses (beta cohort preserved via is_beta_cohort flag).

= 0.3.0 =
* SECURITY: Editor requests now require authenticated session + signed requests from the plugin. Closes a cross-tenant edit hole where anyone knowing api_key + domain (both public) could edit any Glopzi site.
* New: Plugin stores a per-site secret received from the Glopzi API during license validation; secret never leaves the WordPress server.
* New: REST endpoints (admin-only) proxy save/load requests to Glopzi API with HMAC-SHA256 signatures.
* Refactor: Editor iframe now talks to the plugin's wp-json proxy instead of calling Supabase directly.

= 0.2.6 =
* Fix: cache-warm now validates the R2 package version against the save that triggered it. Before this fix, if R2 happened to still serve the previous compile when the bridge checked, the site would show stale animations until the next save or the weekly cron. The plugin now refuses any warmed package older than the save's config version and keeps retrying until compile catches up.

= 0.2.5 =
* Editor URL migrated to `studio.glopzi.com` (canonical Glopzi subdomain). The previous Vercel hostname stays live for existing installations during the transition.

= 0.2.4 =
* Fix: cache-warm now retries after save. The Supabase compile step is async, so the first warm attempt usually raced R2 and left the site without its compiled animations; subsequent refreshes only recovered via the weekly cron. The bridge retries up to 5 times with 1.5s backoff.

= 0.2.3 =
* Fix: edit-mode bundle is now actually injected in the preview iframe. The wp_head add_action was registered at a priority that had already fired, so the script tag was silently dropped. Now uses priority 99 to match the cache-loader path.
* Cleanup: transient 0.2.2 debug marker removed.

= 0.2.1 =
* Fix: editor now loads correctly on external sites (config-load contract aligned with cloud adapter).
* Fix: element picker works in the live preview iframe (edit-mode bundle injected when ?glopzi-edit=1).

= 0.2.0 =
* Architecture: plugin is now a thin loader. Runtime and editor served from the Glopzi cloud.
* License: paste-key activation replaces the legacy open-tier.
* Resilience: cached assets served same-origin from /wp-content/uploads/glopzi-cache/.
* Migration: existing wp_options configs are uploaded to Supabase automatically with a 7-day legacy fallback window.
* WebGL backgrounds ported to the unified runtime.

= 0.1.0 =
* Initial release.
