=== BatForge - 3D Cricket Bat Configurator ===
Contributors: noorealam
Tags: woocommerce, 3d, configurator, personalization, cricket
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Let customers build their own cricket bat in real-time 3D — colors, grip, stickers — right on your WooCommerce product page.

== Description ==

BatForge adds a full-screen, real-time 3D configurator to any WooCommerce cricket bat product. Customers rotate, zoom, and customize the bat — choosing colors, grip style, and stickers/decals — and see every change rendered instantly in 3D before adding their exact configuration to the cart.

**Key features**

* Real-time 3D preview powered by a locally-bundled Three.js engine — no third-party CDN calls, no external service required.
* Per-product enable/disable, so it only appears on the WooCommerce products you choose.
* Built-in GLB Config Builder tool: drag in your own `.glb` 3D model, map its mesh names to colour/sticker/material controls, and export a ready-to-use configuration — no coding required.
* Customer sticker/decal uploads (PNG, JPG, GIF, WEBP — validated and size-limited server-side).
* Live price breakdown — each colour, material, or sticker option can carry its own price modifier, totalled automatically.
* The customer's exact selections are attached to the WooCommerce cart item and order, visible in cart, checkout, order emails, and admin order screen.
* Light/dark theme toggle, mobile-friendly bottom-sheet panel, PNG export of the final design.
* Custom button text and UI label overrides per product.
* Works with any GLB model exported from Blender or similar — not hardcoded to one mesh or product.

**Requirements**

* WooCommerce (active and configured).
* A `.glb` 3D model of the product you want customers to configure (the bundled GLB Config Builder tool helps you wire one up).

= Privacy / Third-Party Services =

BatForge makes no calls to any third-party service, CDN, or analytics endpoint. The 3D engine (Three.js) and its Draco decoder are bundled locally with the plugin. Customer-uploaded sticker images are stored in your own WordPress media library, the same as any other media upload.

== External services ==

BatForge does not connect to, send data to, or load resources from any third-party or external service. The 3D engine (Three.js) and its Draco decoder are bundled with the plugin and served entirely from your own site — there is no CDN dependency and no outbound network call of any kind. The only known external-looking reference in the codebase is a documentation URL (https://www.khronos.org) inside a code comment in the bundled, unmodified Three.js source file, which is not loaded or requested by the plugin and exists only as a citation for other developers reading the source. Customer-uploaded sticker images are stored in your own WordPress media library, the same as any other WordPress media upload.

== Installation ==

1. Upload the plugin files to `/wp-content/plugins/batforge-3d-cricket-bat-configurator`, or install directly through the WordPress Plugins screen.
2. Activate the plugin. Make sure WooCommerce is installed and active.
3. Edit a WooCommerce product, find the "BatForge 3D Configurator" panel, enable it, and upload a `.glb` 3D model.
4. Use the bundled GLB Config Builder tool (Tools menu / linked from the product metabox) to map mesh names to color, material, and sticker controls, then save the generated config.
5. View the product on the frontend — a "Customize in 3D" button will appear.

== Frequently Asked Questions ==

= Does this work with any product, not just cricket bats? =
The underlying engine is generic — it reads mesh names and controls entirely from a config file you build with the included GLB Config Builder tool, so any `.glb` model can be wired up the same way.

= Does this load anything from a CDN? =
No. Three.js and the Draco decoder are bundled locally with the plugin and served from your own site.

= What happens if a customer's browser doesn't support WebGL? =
The configurator requires WebGL (standard in all modern browsers). On unsupported browsers the loader shows a friendly error instead of a blank screen.

= Can I limit this to specific products? =
Yes — the configurator is enabled per-product from the product edit screen, not site-wide.

== Screenshots ==

1. The 3D configurator on the frontend, with live color/sticker controls.
2. The GLB Config Builder tool used to map a model's meshes to controls.
3. The per-product metabox used to enable the configurator and upload a model.

== Changelog ==

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.0.0 =
Initial release.
