=== Comnoira 3D Viewer ===
Contributors: comnoira
Tags: 3d, viewer, embed, showcase, gutenberg
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 8.1
Stable tag: 0.5.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Show an interactive Comnoira 3D Showcase on any page with a Gutenberg block — no code required.

== Description ==

Comnoira 3D Viewer connects your site to your Comnoira account and lets
you place a working, interactive 3D Showcase on any page using a Gutenberg
block — no code, no hand-written snippet.

= Requires a Comnoira account =

This plugin is a client for [Comnoira](https://comnoira.com)'s own 3D
viewing service. You'll need a Comnoira account with at least one published
Comnoira Asset to showcase. The plugin does not bundle any 3D viewer code
itself — it loads the viewer from Comnoira's CDN at runtime and
communicates with Comnoira's API using a License Key you generate from
your own Comnoira dashboard.

= What this plugin does =

* Securely stores your Comnoira License Key on your own server (encrypted
  at rest) — it is never sent to a visitor's browser.
* Lets you register one or more Showcases under Comnoira → Showcases, each one
  referencing a specific Comnoira Asset.
* Adds a "Comnoira Showcase" Gutenberg block so you can place a registered
  Showcase on any page or post, with basic display options (width, height,
  auto-rotate).
* Lets you test whether a Showcase's credentials actually work, right from
  the WordPress admin, before you ever load the real page.

= What this plugin does not do =

* It does not host or process 3D models itself — that happens entirely on
  Comnoira's platform.
* It does not do anything useful without a Comnoira account and at least
  one Showcase registered on your Comnoira dashboard first.

== Installation ==

1. Install and activate the plugin.
2. Go to **Comnoira → Connection** and paste the License Key from your
   Comnoira dashboard.
3. Go to **Comnoira → Showcases** and register at least one Showcase — you'll
   need the Embed ID and Public Key from your Comnoira dashboard's Showcase
   detail page. Use the "Test Connection" button to confirm it's working
   before moving on.
4. Edit any page or post, add the **Comnoira Showcase** block, and pick your
   registered Showcase from the block's sidebar.

== Frequently Asked Questions ==

= Do I need a Comnoira account? =

Yes. This plugin is a WordPress client for Comnoira's own service — it has
nothing to display until you connect a real Comnoira account with at least
one published asset.

= Is my License Key ever sent to a visitor's browser? =

No. The License Key is stored encrypted on your own server and used only
in server-to-server requests this plugin makes on your behalf. A visitor's
browser only ever receives a short-lived session token, never the License
Key itself.

= Why do I have to register each Showcase manually instead of it showing up automatically? =

Comnoira's API doesn't currently expose a way to list all of a shop's
Showcases using just a License Key, so this plugin keeps its own local
registry — you copy the Embed ID and Public Key from your Comnoira
dashboard once per Showcase, and the plugin remembers it from then on.

= Does this work with any WordPress theme? =

The Gutenberg block renders a plain container sized to the width/height
you set — it doesn't depend on theme-specific styling, so it should work
with any block-editor-compatible theme.

= Where can I find the source code for the Gutenberg block? =

The uncompiled JavaScript source is included in this plugin's `blocks/`
directory. The `build/` directory holds the compiled, minified version
that WordPress actually loads — `build/` is generated from `blocks/` via
`npm run build` (`@wordpress/scripts`).

== External services ==

This plugin is a client for Comnoira (https://comnoira.com), the 3D
hosting and viewing service your registered Showcases' assets live on. It
does not work without a Comnoira account, and every network request it
makes is to Comnoira's own API and viewer, at your explicit action — there
is no third-party analytics, ad, or tracking service involved.

* Registering a Showcase or clicking "Test Connection" in the admin sends
  your stored License Key and the Showcase's Embed ID / Public Key to
  Comnoira's API (https://api.comnoira.com), to verify they're valid.
* When a visitor loads a page containing a Comnoira Showcase block, your
  WordPress server sends that Showcase's Embed ID and Public Key (plus
  your License Key, never sent to the visitor) to Comnoira's API to mint a
  short-lived viewer session for that page load.
* The visitor's browser then exchanges that short-lived session token —
  never the License Key itself — directly with Comnoira's viewer service
  (https://viewer.comnoira.com) to load and display the 3D model.

No visitor personal data (name, email, IP address) is collected or sent
by this plugin itself.

This service is provided by Comnoira: [Terms of Service](https://comnoira.com/terms),
[Privacy Policy](https://comnoira.com/privacy).

== Screenshots ==

1. The Comnoira → Connection screen, showing the setup checklist and
   connection status.
2. Registering a Showcase under Comnoira → Showcases, with the Test Connection
   button.
3. The Comnoira Showcase block in the block editor, with the Showcase picker in
   the sidebar.
4. A live Showcase rendered on a published page.

== Changelog ==

= 0.5.2 =
* Fixed session creation failing after Comnoira's backend renamed its API
  field for identifying a Showcase. No changes needed on your part.

= 0.5.1 =
* First public release. Connect a Comnoira account, register Showcases, test
  them from the admin, and place a live 3D Showcase on any page with a
  Gutenberg block.

== Upgrade Notice ==

= 0.5.2 =
Fixes Showcase sessions failing to start. Update recommended for all users.

= 0.5.1 =
First public release.
