# Changelog for @ijewel3d/web-vto

## [0.2.9] - 2026-07-20
### Added
- Wristwear: Onbody front-end loading and support.

## [0.2.8] - 2026-07-13
### Added
- Onbody front-end loading and support.
### Changed
- Move onbody handling from back-end to on-device engine.

## [0.2.7] - 2026-06-18
### Added
- `TryonUIPlugin` (`RingTryonUIPlugin`) is now fully configurable via a `TryonUIConfig` object — pass it to the constructor (`new RingTryonUIPlugin({ ... })`) or update it at runtime with `uiPlugin.configure({ ... })`, which re-applies to the live DOM.
  - Loading box: `enabled` (disable entirely), `title`, `subText` (`null`/`''` hides the subheader), `logo` (image URL/data-URI or raw SVG/HTML), `size` (`'card' | 'half' | 'full'`), `width` (custom CSS override), `align` (`'start' | 'center' | 'end'` for logo/title/subheader), `background`, `textColor`, `subTextColor`, `showProgressBar`, `progressColor`.
  - Hand prompt: `enabled` (show/hide the "show your hand" overlay), `text` (`null`/`''` for outline only), `showHandOutline`, `handSvg` (override the outline markup), `color`.
  - Customizable `messages` strings (initialization, save error, and all camera/error messages).
- `TryonUIPlugin.showHandPrompt()` / `hideHandPrompt()` to imperatively control the hand-prompt overlay.
### Changed
- `TryonUIPlugin` no longer hardcodes loading text, logo, box size/background, alignment, hand SVG, or prompt text — all driven by config (existing defaults preserved when no config is passed).

## [0.2.6] - 2026-06-18
### Added
- Try-on save-image UI with a smoother image-saving animation (ultra mode).
### Changed
- Ultra-mode save: crop size now sized relative to the ring's bounding-sphere radius.
- Fade shader: ring distance fade-out with more smoothness; reduced finger fade occlusion factor and increased circle fade factor.
### Fixed
- Ultra-resolution save mode artifacts.
- Fade shader circle fade-out being incorrect during zoom.
- Ring non-uniform rotation depending on aspect ratio.
- Reset on window resize.

## [0.2.5] - 2026-06-12
### Added
- High-resolution image export using camera.setViewOffset(): Super-sampled ring crop composited onto the original.
- Downloading/loading image bake files for importing accurate onbody image data (for using try-on backend data such as finger edges, finger width, depth rotation, occlusion mask)
- `maxSize` option to `saveImage` for ultra-mode output.
### Fixed
- SSAO options not properly resetting when entering and then exiting the try-on.

## [0.2.4] - 2026-06-10
### Added
- `shadowColor` for SSS contact shadows.
### Fixed
- apply/restore zoom in `_setCameraSettings()`

## [0.2.3] - 2026-06-04
### Added
- `enterSetupMode({ showGizmos: false })`: enter setup mode with the transform gizmo created but hidden/disabled. Calling `setTransformMode()` re-shows it.
### Fixed
- Auto-fit: original child transforms now restored when fit fails (no inner boundary or validation failure) instead of leaving them zeroed.
- Setup mode: camera position is now saved on enter and restored on exit.
- Image-mode transform gizmo could disappear after resize/render-scale changes; now detaches on resize so the next update rebinds it.

## [0.2.2] - 2026-05-29
### Fixed
- Set webcam state throwing error if camera background plugin is not set.

## [0.2.1] - 2026-05-29
### Fixed
- Setting video scale changed video aspect ratio unexpectedly.

## [0.2.0] - 2026-05-28 - Try-On Backend Integration
### Added
- Try-on backend: comprehensive server-side pipeline for ring placement: edge detection,
  depth-based yaw/pitch, finger-width estimation, per-finger visibility scoring, and
  health warmup, roll + many more misc additions. Opt in via `backendUrl` config or the `?backend` query parameter.
- Improvements for the wristwear try-on: wrist velocity calculations and motion-prediction features in `MPHand` and `MPBody` for more stable wristwear tracking.

### Fixed
- Ring landmarks no longer fade when try-on backend is in use.
- Ring position and finger width mismatch when using backend predictions.
- `offsetRotation` was incorrectly displacing ring position.
- Incorrect transform where only the ring model was scaled, not the full setup.
- Ring alignment now uses a single reference edge for consistent placement.
- Fist pitch correction when backend is active.
- Occluded ring finger now shows an explicit error instead of silently failing.
- Cylinder occluder size reduced in image mode to prevent over-occlusion.
- Auto-fit placement accuracy after the onbody-depth merge.
- Share button now downloads via `getImageBlob()` with a proper filename.
- Various setup mode issues and toolbar regressions.

## [0.1.11] - 2026-05-04
### Added
- Setup mode: shift key snapping override for transform controls.
- Setup mode: reset functionality for all transform modes.
- Setup mode: transform mode selector and auto-fit controls exposed in viewer setup (`index.ts`, `watch-index.ts`).
- Watch occluder estimator: new `WatchOccluderDepthPass` for top-down depth map approach; greatly improves occluder accuracy for rings auto-fit as well.
- Wrist velocity calculations and motion-prediction features in `MPHand` and `MPBody` for more stable wristwear tracking.
### Changed
- Wristwear placement now uses `TrackingConfig` offsets (consistent with ring try-on).
- Pose landmarker: reduced smoothing for faster response; disabled for back camera to save resources.
- Pose landmarker: slightly faster convergence for still poses.
- Default `videoScale` changed from 1.0 to 1.35.
- Wrist width calculation in `HandAnalyzer` refined for better size estimation.
- SSAO power no longer influences SSS gamma (separated concerns); SSS parameters tuned for wristwear.
- Watch occluder estimation rewrote using circle-fitting for improved auto-centering and scaling.
### Fixed
- Severe animation lag in `TryonUIPlugin` animations.
- Incorrect wristwear yaw when hand deviates radially/ulnarly while the arm remains still.
- `borderColor` / `borderImage` not applied in wristwear image mode.
- Inconsistent relative wristwear placement across frames.
- Transform gizmo rendering artifacts caused by `FadeShaderExtension`.
- Watch occluder losing its material after estimation.
- Camera depth alignment in setup mode auto-fit.

## [0.1.10] - 2026-05-01
### Fixed
- `TryonUIPlugin` failing to attach in obfuscated builds; reverted plugin lookup to use `PluginType` strings instead of mangled class names.

## [0.1.9] - 2026-05-01
### Added
- `canRunVTO()` pre-flight helper exported from the lib. Returns WebGL2/GPU/device capability check plus an optional `warning` for Chrome/Windows on integrated GPUs.
### Removed
- License/key system removed from `BaseTryonPlugin`; licensing is now handled solely by the underlying webgi runtime.

## [0.1.8] - 2026-04-21
### Fixed
- Fix race condition in `stop` method by setting `_running` to `false` right away.

## [0.1.7] - 2026-04-16
### Added
- `getImageBlob(type?, quality?)` method to retrieve the current try-on image as a `Blob` (auto-cropped in image mode).
- `saveImage` now accepts a file format/MIME type parameter.
- Vertical border support in image mode.
- Crop image in image mode when saving it.
### Changed
- `startWithImage` and `setImage` now accept any `CanvasImageSource` (not just `HTMLImageElement`).
- Hand analyzer resets on window resize to prevent stale tracking state.

## [0.1.6] - 2026-04-09
### Added
- Side fade-out at cylinder edges in live try-on mode to prevent floating shadow artifacts.
### Changed
- Unified SSAO and contact shadows into a single SSS computation pipeline — both now drive the same warm-skin shading path independently.
- Improved orbit-normal line smoothing (`irregularSmoothing`) with a refined distance mapping function.
- Refactored `SSSFingerCylinderShadow`: eliminated duplicated material/uniform/extension blocks; added `updateRingTransform()` for a single-call per-frame update.
- Removed SSS wrap strength and saturation boost config parameters; simplified shader accordingly.
### Fixed
- Contact shadow Z-fighting artifacts between shadow cylinder and sphere end-caps.
- SSAO warm-shading had no effect when contact shadows were disabled; AO now correctly activates the full SSS colour path.

## [0.1.5] - 2026-04-07
### Added
- Pose-based wristwear try-on integration for more independent wrist transform.
- Screen-space contact shadows (SSCS) for more realistic shadow rendering.
- Alternating tracking and model inference for better performance.
- Preliminary API documentation.
### Fixed
- Fix try-on running always in "IMAGE" mode.
- Fix shadow rendering in wrist wear try-on.
- Fix static image resize, fade shader, and default transform controls.
- Fix borderColor and borderImage styling.
- Fix camera moving in image mode.
### Changed
- Adjust wristwear size and snappiness.
- Use average landmarks for body tracking.
- UI clean-ups and code refactoring.

## [0.1.4] - 2026-03-11
### Fixed
- Jewelry object visible in the first frame after entering try-on mode.

## [0.1.3] - 2026-03-11
### Fixed
- Inconsistent AO setting.

## [0.1.2] - 2026-03-08
### Fixed
- Video scale not applied correctly.
- Quaternion filters improved.

## [0.1.1] - 2026-03-08
### Fixed
- Video texture lagging behind during zoom on invisible elements.
- Error messages being to short.
- Restore older hand tracking smoothing functions in MPHand to address degraded tracking.

## [0.1.0] - 2026-03-06
### Added
- WristwearTryonPlugin: Add a watch and bracelet try-on.
- Major refactoring of the codebase.
- Refactor to support future try-on plugins.
- Automatic zoom in on interaction (closer zoom of 1.5 for better experience).
### Fixed
- UX improvements: preloading, polling in-store try-on plugin.
- Fix occlusion for bigger jewelry like the billion dollar ring demo ring.
- Various improvements for artifacts in fade shader and motion blur.



## [0.0.41] - 2026-03-01
### Added
- `preferBackCamera` option on RingTryonPlugin to allow selecting the back (environment) camera on start.

## [0.0.40] - 2026-02-16
### Fixed
- Support for larger rings (e.g. billion dollar ring demo ring) with proper occlusion (faded and SSR occluders) and shadow SSAO.
- Less visual occlusion artifacts for poses like fist.
- Ring try-on UI: no specific error message for most common error (camera permission denied) shown.
- Enable quaternion filters for smoothing rotation flickering which was especially noticeable for larger rings like the billion dollar ring demo one.
- Fix strong display artifacts when entering AR mode due to interpolation with unclamped tonemapped output color.

## [0.0.39] - 2026-01-16
### Added
- A static preload function to the RingTryonPlugin.

## [0.0.38] - 2025-12-26
### Fixed
- Disable DollyFov in camera settings.

## [0.0.37] - 2025-10-02
### Fixed
- In-store: Shader crash when using segmentation.
- In-store: Address not selecting the correct camera.
### Changed
- In-store: More proper syncing of MP and Leap.

## [0.0.36] - 2025-08-29
### Changed
- Demo page: css changes, changed 3d model.
- minDistance change in `RingTryonConfig`

## [0.0.35] - 2025-08-27
### Changed
- Demo page: check for 'edit' query parameter to show UIConfig for TryOn.
- Removed setup mode UI
- static variables for mediapipe libraries

## [0.0.34] - 2025-08-15
### Fixed
- Minor fix: proper button display in demo when try-on start failed.

## [0.0.33] - 2025-08-15
### Changed
- Demo page: setup mode UI, try-on buttons only showing when try-on running.
### Fixed
- Setup mode UI: proper updating in scene when config changed.

## [0.0.32] - 2025-08-06
### Changed
- Update demo link and WebGi version to 0.15.2.

## [0.0.31] - 2025-08-03
### Changed
- Disable motion blur by default.
- Update WebGi version to 0.15.0.

### Fix
- Add backwards compatibility for motion blur and WebGi pre-0.11.0.
- Resolved issues with ring fading and hiding for certain hand poses.

## [0.0.30] - 2025-08-03
### Changed
- Refactored configuration system for improved structure and maintainability.
- Improved motion blur effect; cleaned up and refactored related code.
- Removed `lil-gui` dependency; moved GLSL code to separate files; improved code obfuscation workflow.

### Fixed
- Addressed an issue where the asset was not being hidden entirely, causing an outline to be visible.
- Camera near/far planes are now constant to address a performance issue and to prevent possible clipping artifacts.

## [0.0.29] - 2025-06-17
### Fixed
- Fix camera near/far based clipping at close range.

## [0.0.28] - 2025-06-17
### Fixed
- Revert web camera background plugin to recent version. Fix scene background reset issue introduced by reverting.

## [0.0.27] - 2025-06-06
### Fixed
- Check first for video full HD resolution.

## [0.0.26] - 2025-06-06
### Fixed
- Reverted to old web camera plugin for now.

## [0.0.25] - 2025-06-06
### Fixed
- Reverted to old web camera plugin for now.

## [0.0.24] - 2025-06-06
### Fixed
- Applied custom configs and checking for in-store plugin.
### Added
- Check for in-store availability in index.ts

## [0.0.23] - 2025-06-02
### Fixed
- Revert some scene config (SSR, SSAO).

## [0.0.22] - 2025-06-01
### Fixed
- Instore build deployment.

## [0.0.21] - 2025-05-31
### Fixed
- Integrate latest development changes.
- Deprecate segmenter hand analyzing. Finger width detection is now based on landmarks.
- Adjust config and smoothing.

## [0.0.20-dev.10] - 2025-05-30
### Fixed
- Setup mode cylinder.

## [0.0.20-dev.9] - 2025-05-15
### Added
- Deployment
