shopar-plugin 1.2.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -2
- package/dist/shopar-plugin.d.ts +9 -0
- package/dist/shopar-plugin.esm.js +2 -2
- package/dist/shopar-plugin.js +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -33,7 +33,7 @@ There are two distinct ways of integrating the plugin: via Script tag and via NP
|
|
|
33
33
|
Add the following script to your HTML.
|
|
34
34
|
|
|
35
35
|
```html
|
|
36
|
-
<script src="https://cdn.jsdelivr.net/npm/shopar-plugin@1.2.
|
|
36
|
+
<script src="https://cdn.jsdelivr.net/npm/shopar-plugin@1.2.1/dist/shopar-plugin.js"></script>
|
|
37
37
|
```
|
|
38
38
|
|
|
39
39
|
It is possible to use a different CDN instead of [jsDelivr](https://www.jsdelivr.com/) (e.g. [cdnjs](https://cdnjs.com/), [unpkg](https://www.unpkg.com/)), or even a relative path if the plugin is distributed as a static asset to your app. Just make sure to set the `baseUrl` parameter accordingly (see [setup options](#shoparpluginsetupoptions) for more details).
|
|
@@ -205,7 +205,7 @@ Options used for the plugin setup:
|
|
|
205
205
|
- `baseUrl` (optional)
|
|
206
206
|
- Type: `string`
|
|
207
207
|
- If provided, defines where the additional ShopAR plugin files are fetched from.
|
|
208
|
-
- Default value: `https://cdn.jsdelivr.net/npm/shopar-plugin@1.2.
|
|
208
|
+
- Default value: `https://cdn.jsdelivr.net/npm/shopar-plugin@1.2.1/dist`
|
|
209
209
|
- `defaultUI` (optional)
|
|
210
210
|
- Type: `boolean`
|
|
211
211
|
- If provided and set to `false`, disables the default UI (buttons and error UI).
|
|
@@ -292,6 +292,15 @@ Options used for the plugin setup:
|
|
|
292
292
|
- Type: `function`
|
|
293
293
|
- If provided, it will be called with the engagement duration on every (debounced) 3D engagement.
|
|
294
294
|
- 3D engagement is measured as the time spent by the user rotating, panning or zooming the product in 3D.
|
|
295
|
+
- `trueScaleEnabled` (optional)
|
|
296
|
+
- Type: `boolean`
|
|
297
|
+
- If provided and set to `false`, disables ShopAR True Scale sizing for AR glasses. The glasses are then rendered at their authored size instead of being scaled to the user's measured face.
|
|
298
|
+
- Only applies to the Glasses category.
|
|
299
|
+
- Default value: `true`
|
|
300
|
+
- `customTrueScaleFaceWidth` (optional)
|
|
301
|
+
- Type: `number`
|
|
302
|
+
- If provided, it will be used as the True Scale face width, in millimeters, for AR glasses, instead of measuring it with ShopAR True Scale technology.
|
|
303
|
+
- Only applies to the Glasses category.
|
|
295
304
|
|
|
296
305
|
### SkuData
|
|
297
306
|
|
package/dist/shopar-plugin.d.ts
CHANGED
|
@@ -481,6 +481,15 @@ type SetupOptions = {
|
|
|
481
481
|
* If not provided, the value is determined by ShopAR True Scale technology.
|
|
482
482
|
*/
|
|
483
483
|
customTrueScaleFaceWidth?: number;
|
|
484
|
+
/**
|
|
485
|
+
* Controls whether ShopAR True Scale is used to size AR glasses to the user's face.
|
|
486
|
+
*
|
|
487
|
+
* Defaults to `true`. Set to `false` to disable True Scale, in which case glasses are
|
|
488
|
+
* rendered at their authored size instead of being scaled to the measured face width.
|
|
489
|
+
*
|
|
490
|
+
* Only applies to the Glasses category.
|
|
491
|
+
*/
|
|
492
|
+
trueScaleEnabled?: boolean;
|
|
484
493
|
_internalOptions?: any;
|
|
485
494
|
};
|
|
486
495
|
/**
|