=== vitrine 3D Viewer ===
Contributors: hlorus
Tags: 3d, viewer, product, embed, woocommerce
Requires at least: 6.4
Tested up to: 6.9
Requires PHP: 8.0
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Embed interactive 3D product viewers in any page or post.

== Description ==

Add photorealistic, interactive 3D product viewers to your WordPress site. Upload a GLB model to [vitrine](https://vitrine3d.com), style it in the visual editor, and embed it with a single block — no coding required.

**Features:**

* Gutenberg block — search "vitrine" in the block inserter
* Configurable aspect ratio (4:3, 1:1, 16:9, 3:4)
* Responsive (fills container width)
* Loads the viewer script only on pages that use the block
* Works with the Site Editor (FSE) and classic themes
* WebGPU rendering with automatic WebGL2 fallback

The viewer runs entirely in the browser using WebAssembly. No server-side rendering, no iframes.

**How to get a Showcase ID:**

1. Go to [app.vitrine3d.com](https://app.vitrine3d.com)
2. Upload a GLB or GLTF model
3. Style the scene (lighting, camera, background)
4. Publish the showcase
5. Copy the Showcase ID from the embed panel

**External services**

This plugin connects to [vitrine](https://vitrine3d.com) to load the 3D viewer and resolve showcase data:

* **Viewer script** — loaded from `cdn.vitrine3d.com/vitrine.js` on frontend pages that contain the block. This script boots the WebAssembly 3D viewer in the visitor's browser.
* **Showcase API** — called in the block editor to fetch a thumbnail preview when you enter a Showcase ID. The request is made to `lgjkyhbpoosidprneotg.supabase.co/functions/v1/resolve-showcase`.

No personal data is sent to these services. Only the Showcase ID is transmitted to resolve the 3D scene configuration and assets.

* [vitrine Terms of Service](https://vitrine3d.com/terms)
* [vitrine Privacy Policy](https://vitrine3d.com/privacy)

== Installation ==

1. Upload the `vitrine-3d-viewer` folder to `/wp-content/plugins/`
2. Activate the plugin in **Plugins > Installed Plugins**
3. In any post or page, add the "vitrine 3D Viewer" block
4. Enter your Showcase ID in the sidebar

== Frequently Asked Questions ==

= Where do I get a Showcase ID? =

Sign up at [vitrine3d.com](https://vitrine3d.com), upload a 3D model, and publish a showcase. The ID appears in the embed panel and in your dashboard URL.

= Does this work with WooCommerce? =

Yes. Add the block to any WooCommerce product description or page.

= What 3D formats are supported? =

GLB and GLTF 2.0 — the standard formats for real-time 3D on the web.

= Is a vitrine account required? =

Yes. Free accounts are available at [vitrine3d.com](https://vitrine3d.com) with up to 5 published showcases.

== Screenshots ==

1. The vitrine 3D Viewer block in the Gutenberg editor with thumbnail preview and settings panel
2. A published 3D product viewer on the frontend

== Changelog ==

= 1.0.0 =
* Initial release

== Upgrade Notice ==

= 1.0.0 =
Initial release.
