=== Models3D Studio for WooCommerce ===
Contributors: alkadristudio
Donate link: https://studio.medhatalkadri.com/
Tags: 3d-viewer, woocommerce-3d, glb-viewer, 3d-product, product-configurator
Requires at least: 5.8
Tested up to: 7.1
Requires PHP: 7.4
Requires Plugins: woocommerce
WC requires at least: 7.0
WC tested up to: 9.3
Stable tag: 1.1.16
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

A self-hosted, high-fidelity PBR 3D product configuration suite tailored for WooCommerce.

== Description ==

Models3D Studio brings high-fidelity interactive 3D product visualization, real-time variation mapping, and PBR material inspection directly into the WooCommerce store workflow.

Allow your customers to rotate, zoom, inspect, and configure products in photorealistic 3D before buying. Models3D Studio seamlessly connects WooCommerce variation attributes (colors, materials, finishes, and components) to 3D meshes in your GLB models, updating visuals instantly in the browser without server lag.

= Key Features =

* **Photorealistic 3D Canvas**: Real-time WebGL rendering powered by Three.js and React Three Fiber with full PBR (Physically Based Rendering) material support.
* **Bi-Directional WooCommerce Variation Sync**: Instantly connects WooCommerce attribute swatches and select dropdowns to 3D meshes, textures, and material finishes.
* **Interactive 3D Visual Studio**: Dedicated full-screen admin editor to inspect GLB/glTF hierarchy, test lighting environments, configure camera angles, and bind product variations.
* **Dual-Channel Customization**: Independent controls for material properties (roughness, metalness, colors) and part visibility toggles.
* **Native 2D Fallback Protection**: Graceful degradation to standard WooCommerce product images if WebGL is unavailable or when JavaScript is disabled.
* **Zero External Rendering Fees**: 100% self-hosted client-side execution. No SaaS subscription or third-party cloud rendering required.
* **Universal Builder & Theme Compatibility**: Works smoothly with standard WooCommerce themes, Block themes (FSE), and major page builders.

== Installation ==

1. Upload the plugin files to the `/wp-content/plugins/models3d-studio-for-woocommerce` directory, or install the plugin through the WordPress plugins screen directly.
2. Activate the plugin through the **Plugins** screen in WordPress.
3. Navigate to **WooCommerce -> 3D Studio** to configure global viewer display preferences.
4. Edit any WooCommerce product, open the **3D Studio** tab in the Product Data box, and upload your `.glb` model.
5. Launch the **3D Visual Studio** to map your WooCommerce attributes to 3D meshes and materials.

== Frequently Asked Questions ==

= Does this require an external rendering service or monthly subscription? =
No. All 3D rendering happens locally inside the customer's web browser using standard WebGL via Three.js. There are zero external rendering charges or ongoing cloud service requirements for the core viewer.

= Which 3D file formats are supported? =
Models3D Studio supports standard `.glb` and `.gltf` binary formats, including Google Draco compression and KHR material extensions.

= How do variable products work with 3D models? =
You upload a single multi-part or multi-variant GLB file. In the 3D Visual Studio, you connect each WooCommerce attribute (e.g. Color, Finish, Component) to specific mesh parts or materials. When customers pick variations on the product page, the 3D model automatically updates in real time.

= What happens if a customer visits with an older browser or device without WebGL? =
Models3D Studio includes an automated fail-safe fallback system. If WebGL is unsupported or encounters an error, the plugin automatically restores the standard 2D WooCommerce product gallery image.

= Where can I find documentation and tutorials? =
Full offline documentation is bundled inside the plugin under **WooCommerce -> 3D Studio -> Documentation**. You can also visit our online portal at https://studio.medhatalkadri.com/

== Screenshots ==

1. 3D Visual Studio editor with real-time PBR material inspection and viewport controls.
2. Storefront interactive 3D product viewer integrated with WooCommerce variations.
3. Dual-channel variation mapping for material properties and target mesh layers.
4. PBR material customization with metalness, roughness, and color swatches.
5. Scene lighting, HDR environment presets, and camera positioning controls.

== External services ==

This plugin connects to the following external services:

1. Freemius API (https://api.freemius.com)
* Service Used: Freemius SDK (https://freemius.com)
* Purpose: Optional user opt-in telemetry, account synchronization, and software license verification.
* Data Sent: Site URL, active theme name, WordPress and PHP versions, and administrator email (transmitted strictly upon explicit user opt-in or during license activation).
* Terms of Service: https://freemius.com/terms/
* Privacy Policy: https://freemius.com/privacy/

2. Drei HDRI Environment Repository (https://raw.githack.com/pmndrs/drei-assets/)
* Service Used: pmndrs/drei-assets via raw.githack.com (GitHub CDN)
* Purpose: Provides high dynamic range (HDR) radiance environment lighting maps for realistic 3D PBR material reflections when the user selects a preset studio or outdoor environment in the 3D Visual Studio editor.
* Data Sent: None. Only public read-only static .hdr radiance map assets are downloaded via HTTPS GET when a preset is chosen.
* Terms of Service: https://raw.githack.com/
* Privacy Policy: https://docs.github.com/en/site-policy/privacy-policies/github-general-privacy-statement

== Changelog ==

= 1.1.16 =
* UX: Streamlined WordPress admin update notification presentation according to directory standards.

= 1.1.15 =
* CI/CD: Automated native Freemius Pro deployment pipeline via official Freemius PHP SDK.
* Documentation: Enhanced WordPress.org Plugin Directory metadata, FAQ coverage, and screenshots guide.
* Build: Hardened physical code-splitting build transformations and clean packaging discipline.

= 1.1.14 =
* Compliance (WordPress.org Guideline 5 - Physical Code Splitting): Automated build transformations to completely strip inactive commercial layout code from the Free edition plugin files.

= 1.1.13 =
* Fix: Removed HTML markup from translation functions in models3d-studio.php to comply with WordPress i18n standards.

= 1.1.12 =
* Compliance (WordPress.org Guideline 8 - Enqueue Discipline): Refactored inline styles and scripts across PHP controllers to standard WordPress enqueue APIs.
* Compliance (WordPress.org Guideline 5 - Trialware Elimination): Removed developer JSON editor and custom rotation speed controls from Free edition DOM, replacing them with educational previews.
* Compliance (WordPress.org Guideline 8 - Local Dependencies): Bundled Google Draco WASM decoders locally in /assets/draco/ and eradicated remote CDN dependencies.
* Compliance (WordPress.org Guideline 6 - External Services Disclosure): Added full external services disclosures for pmndrs/drei-assets and Freemius.
* Compliance (WordPress.org Guideline 9 - Non-Destructive Protection): Ensured clean, non-destructive coexistence with companion extensions.

= 1.1.11 =
* Release Architecture: Bifurcated automated packaging pipelines for WordPress.org repository and Freemius distribution.
* Security: Sanitized cookie extraction and hardened query parameter validation across admin controllers.

= 1.1.0 =
* Initial WordPress.org repository release.

== Upgrade Notice ==

= 1.1.0 =
Initial release.

== Copyright and License Credits ==

* Three.js: MIT License, Copyright (c) 2010-2024 Three.js Authors, https://threejs.org
* Google Draco 3D Library: Apache License 2.0, Copyright Google Inc., https://github.com/google/draco
* React and React-DOM: MIT License, Copyright (c) Meta Platforms, Inc., https://react.dev
* React Three Fiber (@react-three/fiber): MIT License, Copyright (c) 2019 Paul Henschel, https://github.com/pmndrs/react-three-fiber
* React Three Drei (@react-three/drei): MIT License, Copyright (c) 2020 Paul Henschel, https://github.com/pmndrs/drei
* Inter Font: SIL Open Font License 1.1, Copyright (c) 2016-2020 Rasmus Andersson, https://rsms.me/inter/
* Freemius WordPress SDK: GPLv3 License, Copyright Freemius, Inc., https://freemius.com
* glTF-Transform (@gltf-transform/*): MIT License, Copyright (c) Don McCurdy, https://gltf-transform.dev
* meshoptimizer: MIT License, Copyright (c) Arseny Kapoulkine, https://github.com/zeux/meshoptimizer
* Bundled Starter 3D Models (High-Performance Sports Car, Sneaker, Sunglasses): Created and optimized locally by Alkadri Studio for Models3D Studio for WooCommerce, licensed under GPLv2 or later.
