=== Tyralix WebAR ===
Contributors: progremzion
Donate link: https://tyralix.com/
Tags: woocommerce, augmented reality, ar, 3d viewer, product visualization
Requires at least: 5.8
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.0
Requires Plugins: woocommerce
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Enable customers to visualize furniture and home decor products in their real-world environment using WebAR technology - no app required!

== Description ==

**Tyralix WebAR Place in Room** transforms your WooCommerce store by allowing customers to place your products in their actual space using their smartphone camera. This immersive augmented reality experience helps customers make confident purchase decisions, leading to increased conversions and reduced returns.

= Key Features =

* **No App Required** - Works directly in mobile browsers using WebXR technology
* **Cross-Platform Support** - Compatible with iOS (AR Quick Look) and Android (Scene Viewer)
* **Easy Integration** - Seamlessly integrates with WooCommerce product pages
* **3D Model Management** - Upload and manage GLB/GLTF and USDZ models
* **Customizable AR Button** - Configure text, position, and styling
* **Analytics Dashboard** - Track AR views, sessions, and conversion rates
* **Performance Optimized** - Lazy loading, caching, and progressive model loading
* **Developer Friendly** - REST API, hooks, filters, and shortcodes

= Perfect For =

* Furniture stores
* Home decor retailers
* Lighting showrooms
* Art galleries
* Kitchen and bath retailers
* Office furniture suppliers
* Any product that benefits from spatial visualization

= How It Works =

1. Upload your 3D models (GLB for Android, USDZ for iOS)
2. Assign models to your WooCommerce products
3. Customers tap "View in Your Room" on product pages
4. The product appears in their actual space through their camera
5. Customers can move, rotate, and scale the product
6. Confident customers add to cart!

= Browser Support =

* **iOS**: Safari 13+ with AR Quick Look
* **Android**: Chrome 79+, Samsung Internet 11+, Edge 79+
* **Desktop**: 3D viewer with AR via QR code

= Requirements =

* WordPress 5.8 or higher
* WooCommerce 6.0 or higher
* PHP 7.4 or higher
* HTTPS enabled (required for camera access)
* 3D models in GLB/GLTF format (Android) and USDZ format (iOS)

== Installation ==

= Automatic Installation =

1. Go to Plugins > Add New in your WordPress admin
2. Search for "Tyralix WebAR"
3. Click "Install Now" and then "Activate"
4. Go to Tyralix WebAR > Settings to configure the plugin

= Manual Installation =

1. Download the plugin zip file
2. Go to Plugins > Add New > Upload Plugin
3. Choose the zip file and click "Install Now"
4. Activate the plugin
5. Go to Tyralix WebAR > Settings to configure

= Configuration =

1. Navigate to Tyralix WebAR > Settings
2. Configure your AR button text and position
3. Set performance options (lazy loading, caching)
4. Enable analytics if desired

= Adding AR to Products =

1. Edit a WooCommerce product
2. Click on the "WebAR" tab in the product data section
3. Check "Enable WebAR"
4. Upload or select a 3D model (GLB and/or USDZ)
5. Configure scale and other options
6. Save the product

== Frequently Asked Questions ==

= What 3D file formats are supported? =

The plugin supports:
* **GLB/GLTF 2.0** - For Android devices and 3D preview
* **USDZ** - For iOS AR Quick Look experience

We recommend providing both formats for the best cross-platform experience.

= How do I create 3D models of my products? =

You can:
* Hire a 3D artist or agency
* Use 3D scanning services
* Create models using software like Blender (free), Maya, or 3ds Max
* Use AI-powered 3D generation tools

= What are the recommended model specifications? =

For optimal performance:
* File size: Under 10MB (50MB maximum)
* Polygon count: Under 100,000 triangles
* Texture resolution: 2048x2048 maximum
* Use Draco compression when possible

= Does this work on desktop computers? =

The 3D viewer works on all devices. AR placement requires a mobile device with camera access. Desktop users can scan a QR code to open the AR experience on their phone.

= Why does my site need HTTPS? =

Camera access requires a secure connection (HTTPS). This is a browser security requirement, not a plugin limitation.

= Can customers share their AR screenshots? =

Yes! Customers can capture screenshots of products placed in their space and share them via social media or messaging apps.

= Does this affect my site's performance? =

The plugin is optimized for performance:
* Scripts load only on the pages that need them
* 3D models load lazily
* Caching reduces repeated processing
* All 3D/AR libraries are bundled locally (no external CDN calls)

= Is the plugin GDPR compliant? =

Yes. The plugin:
* Does not collect personal data without consent
* Analytics can be disabled
* All data can be exported and deleted
* No third-party tracking without consent

== Screenshots ==

1. AR button on product page
2. 3D model viewer modal
3. Product placed in real environment via AR
4. Admin dashboard with analytics
5. AR Viewer block in the WordPress block editor
6. AR Button block in the WordPress block editor
7. Plugin settings page
8. Analytics dashboard with charts

== Changelog ==

= 1.0.0 =
* Initial release
* WebXR/AR Quick Look/Scene Viewer support
* 3D model management (GLB/USDZ)
* WooCommerce product integration
* Analytics tracking
* REST API
* Shortcodes and widgets
* Multi-language support

== Upgrade Notice ==

= 1.0.0 =
Initial release of Tyralix WebAR.

== Developer Documentation ==

= Hooks and Filters =

**Actions:**
* `tyralix_webar_before_ar_button` - Before AR button renders
* `tyralix_webar_after_ar_button` - After AR button renders
* `tyralix_webar_model_created` - When a model is created
* `tyralix_webar_model_updated` - When a model is updated
* `tyralix_webar_model_deleted` - When a model is deleted
* `tyralix_webar_ar_session_start` - When AR session starts
* `tyralix_webar_ar_session_end` - When AR session ends

**Filters:**
* `tyralix_webar_button_text` - Filter AR button text
* `tyralix_webar_button_class` - Filter AR button CSS class
* `tyralix_webar_model_data` - Filter model data before rendering
* `tyralix_webar_viewer_attributes` - Filter model-viewer attributes
* `tyralix_webar_allowed_domains` - Filter allowed external model-file domains
* `tyralix_webar_rate_limit` - Filter API rate limit

= Shortcodes =

**[tyralix_ar_viewer]**
Display an AR-enabled 3D viewer.

Attributes:
* `product_id` - WooCommerce product ID
* `model_id` - Model library ID
* `glb_url` - Direct GLB file URL
* `usdz_url` - Direct USDZ file URL
* `width` - Viewer width (default: 100%)
* `height` - Viewer height (default: 400px)
* `auto_rotate` - Enable auto-rotation (yes/no)
* `ar` - Enable AR button (yes/no)

Example:
`[tyralix_ar_viewer product_id="123" height="500px" auto_rotate="yes"]`

**[tyralix_ar_button]**
Display just the AR button.

Attributes:
* `product_id` - WooCommerce product ID
* `text` - Button text
* `class` - Additional CSS class
* `style` - Button style (primary/secondary)

Example:
`[tyralix_ar_button product_id="123" text="View in AR" style="primary"]`

= REST API Endpoints =

Base URL: `/wp-json/tyralix-webar/v1/`

* `GET /models` - List all models
* `POST /models` - Create a model
* `GET /models/{id}` - Get a model
* `PUT /models/{id}` - Update a model
* `DELETE /models/{id}` - Delete a model
* `GET /products/{id}/ar` - Get product AR data
* `POST /analytics/track` - Track an event
* `GET /analytics/summary` - Get analytics summary
* `GET /settings` - Get plugin settings
* `PUT /settings` - Update plugin settings

== Support ==

For support, please visit [Tyralix Support](https://tyralix.com/support) or use the WordPress.org support forums.

== Credits ==

This plugin bundles the following open-source libraries:

* [Google &lt;model-viewer&gt;](https://modelviewer.dev/) - 3D/AR rendering (Apache-2.0)
* [qrcodejs](https://github.com/davidshimjs/qrcodejs) - QR code generation for the desktop "view on mobile" flow (MIT)
* [Chart.js](https://www.chartjs.org/) - Admin analytics charts (MIT)
