shopar-plugin 1.1.0 → 1.1.1-alpha.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 +40 -2
- package/dist/deepar/VERSION.txt +1 -1
- package/dist/deepar/file_sizes.json +1 -1
- package/dist/deepar/js/deepar.esm.js +1 -1
- package/dist/deepar/js/deepar.js +1 -1
- package/dist/deepar/js/types/DeepAR-shopar-minimal.d.ts +1 -0
- package/dist/deepar/js/types/DeepAR.d.ts +1 -0
- package/dist/deepar/js/types/version.d.ts +1 -1
- package/dist/deepar/package.json +1 -1
- package/dist/deepar/wasm/deepar.wasm +0 -0
- package/dist/img/prompt/ar-foot.webp +0 -0
- package/dist/shopar-analytics.js +1 -1
- package/dist/shopar-deepar.js +1 -1
- package/dist/shopar-plugin.d.ts +5 -1
- package/dist/shopar-plugin.esm.js +2 -2
- package/dist/shopar-plugin.js +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -15,6 +15,7 @@ Powered and developed by DeepAR.
|
|
|
15
15
|
- [Usage](#usage)
|
|
16
16
|
- [API](#api)
|
|
17
17
|
- [ShopAR.plugin.setup(options)](#shoparpluginsetupoptions)
|
|
18
|
+
- [SkuData](#skudata)
|
|
18
19
|
- [License](#license)
|
|
19
20
|
|
|
20
21
|
## Getting started
|
|
@@ -32,7 +33,7 @@ There are two distinct ways of integrating the plugin: via Script tag and via NP
|
|
|
32
33
|
Add the following script to your HTML.
|
|
33
34
|
|
|
34
35
|
```html
|
|
35
|
-
<script src="https://cdn.jsdelivr.net/npm/shopar-plugin@
|
|
36
|
+
<script src="https://cdn.jsdelivr.net/npm/shopar-plugin@{{VERSION}}/dist/shopar-plugin.js"></script>
|
|
36
37
|
```
|
|
37
38
|
|
|
38
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).
|
|
@@ -194,13 +195,17 @@ Options used for the plugin setup:
|
|
|
194
195
|
- Type: `HTMLElement`
|
|
195
196
|
- The element to inflate with ShopAR UI.
|
|
196
197
|
- Its CSS position property must be either `static` or `relative`.
|
|
198
|
+
- `skuData` (optional)
|
|
199
|
+
- Type: `SkuData`
|
|
200
|
+
- If provided, the API call is skipped and this data is used instead. This is useful for providing product data directly without relying on the ShopAR Dashboard API.
|
|
201
|
+
- See [SkuData](#skudata) for the full type reference.
|
|
197
202
|
- `initialState` (optional)
|
|
198
203
|
- Type: `'AR' | '3D'`
|
|
199
204
|
- If provided, defines which preview type the plugin initializes to.
|
|
200
205
|
- `baseUrl` (optional)
|
|
201
206
|
- Type: `string`
|
|
202
207
|
- If provided, defines where the additional ShopAR plugin files are fetched from.
|
|
203
|
-
- Default value: `https://cdn.jsdelivr.net/npm/shopar-plugin@
|
|
208
|
+
- Default value: `https://cdn.jsdelivr.net/npm/shopar-plugin@{{VERSION}}/dist`
|
|
204
209
|
- `defaultUI` (optional)
|
|
205
210
|
- Type: `boolean`
|
|
206
211
|
- If provided and set to `false`, disables the default UI (buttons and error UI).
|
|
@@ -258,6 +263,39 @@ Options used for the plugin setup:
|
|
|
258
263
|
- If provided, it will be called with the engagement duration on every (debounced) 3D engagement.
|
|
259
264
|
- 3D engagement is measured as the time spent by the user rotating, panning or zooming the product in 3D.
|
|
260
265
|
|
|
266
|
+
### SkuData
|
|
267
|
+
|
|
268
|
+
The `skuData` option allows you to provide product data directly, bypassing the ShopAR Dashboard API call. All properties are optional.
|
|
269
|
+
|
|
270
|
+
| Property | Type | Description |
|
|
271
|
+
| --- | --- | --- |
|
|
272
|
+
| `category` | `AssetCategory` | Product category. Supported values: `'Glasses'`, `'Shoes'`, `'Watches'`, `'Bracelets'`, `'Handbags'`, `'Rings'`, `'Bottles'`, `'Scarves'`, `'Hats'`, `'Necklaces'`, `'Earrings'`. |
|
|
273
|
+
| `arUrl` | `string` | URL to the AR model asset. |
|
|
274
|
+
| `arEnvUrl` | `string` | URL to the AR environment map. |
|
|
275
|
+
| `arDiamondEnvUrl` | `string` | URL to the AR diamond environment map. |
|
|
276
|
+
| `arToneMapping` | `ToneMapping` | Tone mapping mode for AR. Supported values: `'ACES'`, `'Linear'`, `'Neutral'`. |
|
|
277
|
+
| `arToneMappingExposure` | `number` | Tone mapping exposure for AR. |
|
|
278
|
+
| `arBloomEnabled` | `boolean` | Whether bloom is enabled in AR. |
|
|
279
|
+
| `arBloomStrength` | `number` | Bloom strength in AR. |
|
|
280
|
+
| `arBloomRadius` | `number` | Bloom radius in AR. |
|
|
281
|
+
| `arBloomThreshold` | `number` | Bloom threshold in AR. |
|
|
282
|
+
| `arKey` | `string` | License key for AR. |
|
|
283
|
+
| `arPromptEnabled` | `boolean` | Whether the AR prompt overlay is shown. |
|
|
284
|
+
| `arPromptText` | `string` | Custom text displayed in the AR prompt. |
|
|
285
|
+
| `arPromptImage` | `string` | URL to a custom AR prompt image. If not provided, a default bundled image is used. |
|
|
286
|
+
| `previewUrl` | `string` | URL to the 3D preview model asset. |
|
|
287
|
+
| `previewEnvUrl` | `string` | URL to the 3D preview environment map. |
|
|
288
|
+
| `previewDiamondEnvUrl` | `string` | URL to the 3D preview diamond environment map. |
|
|
289
|
+
| `previewToneMapping` | `ToneMapping` | Tone mapping mode for 3D preview. Supported values: `'ACES'`, `'Linear'`, `'Neutral'`. |
|
|
290
|
+
| `previewToneMappingExposure` | `number` | Tone mapping exposure for 3D preview. |
|
|
291
|
+
| `previewBloomEnabled` | `boolean` | Whether bloom is enabled in 3D preview. |
|
|
292
|
+
| `previewBloomStrength` | `number` | Bloom strength in 3D preview. |
|
|
293
|
+
| `previewBloomRadius` | `number` | Bloom radius in 3D preview. |
|
|
294
|
+
| `previewBloomThreshold` | `number` | Bloom threshold in 3D preview. |
|
|
295
|
+
| `previewPosterUrl` | `string` | URL to a poster image shown before 3D loads. |
|
|
296
|
+
| `cameraErrorText` | `string` | Custom text shown when camera access fails. |
|
|
297
|
+
| `qrPromptText` | `string` | Custom text shown on the QR code screen. |
|
|
298
|
+
|
|
261
299
|
## License
|
|
262
300
|
|
|
263
301
|
Please see: https://developer.deepar.ai/customer-agreement
|
package/dist/deepar/VERSION.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
DeepAR SDK version: v5.6.
|
|
1
|
+
DeepAR SDK version: v5.6.22-shopar-alpha-414
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"default_envmap.webp":65532,"background_blur.deepar":4912,"background_replacement.deepar":7024,"deepar.esm.js":
|
|
1
|
+
{"default_envmap.webp":65532,"background_blur.deepar":4912,"background_replacement.deepar":7024,"deepar.esm.js":140722,"deepar.js":140902,"xzimg.js":421260,"draco-decoder.js":5864,"selfie_segmenter.tflite":249537,"selfie_segmenter_landscape.tflite":250177,"vision_wasm_internal.js":205044,"vision_wasm_internal.wasm":8892001,"vision_wasm_nosimd_internal.js":205051,"vision_wasm_nosimd_internal.wasm":8762352,"face-det.bin":810418,"face-pdm.zip":315482,"face-track-19-v2.bin":698591,"face-track.bin":758982,"face.obj":131564,"models-68-extreme.bin":8139350,"foot-detector-96x96x6-q8.bin":308992,"foot-keyps-superfast-23JUN2024.bin":697885,"foot-right-200.obj":10205,"segmentation-160x160-opt.bin":1306177,"wrist-det-9.bin":1472871,"wrist-track-181-fast-q.bin":2382576,"wrist-track-181-q.bin":3633365,"wrist-track.obj":116157,"split_sum.webp":9562,"deepar.wasm":440550,"draco-decoder.wasm":210412,"libxzimgPoseEstimation.wasm":156543,"tfjs-backend-wasm-simd.wasm":260697,"tfjs-backend-wasm-threaded-simd.wasm":269578,"tfjs-backend-wasm.wasm":171241}
|