shopar-plugin 0.7.5 → 0.7.6
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 +2 -2
- package/dist/deepar/README.md +21 -0
- package/dist/deepar/VERSION.txt +1 -1
- package/dist/deepar/js/deepar.esm.js +1 -1
- package/dist/deepar/js/deepar.js +1 -1
- package/dist/deepar/js/dynamicModules/xzimg.js +1 -1
- package/dist/deepar/js/types/DeepAR.d.ts +1 -1
- package/dist/deepar/js/types/canvasHelper.d.ts +2 -2
- package/dist/deepar/js/types/initParams.d.ts +5 -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/deepar/wasm/dyArcoreScripting.wasm +0 -0
- package/dist/shopar-deepar.js +1 -1
- package/dist/shopar-plugin.esm.js +1 -1
- package/dist/shopar-plugin.js +1 -1
- package/dist/shopar-qr.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -32,7 +32,7 @@ There are two distinct ways of integrating the plugin: via Script tag and via NP
|
|
|
32
32
|
Add the following script to your HTML.
|
|
33
33
|
|
|
34
34
|
```html
|
|
35
|
-
<script src="https://cdn.jsdelivr.net/npm/shopar-plugin@0.7.
|
|
35
|
+
<script src="https://cdn.jsdelivr.net/npm/shopar-plugin@0.7.6/dist/shopar-plugin.js"></script>
|
|
36
36
|
```
|
|
37
37
|
|
|
38
38
|
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).
|
|
@@ -153,7 +153,7 @@ Options used for the plugin setup:
|
|
|
153
153
|
- `baseUrl` (optional)
|
|
154
154
|
- Type: `string`
|
|
155
155
|
- If provided, defines where the additional ShopAR plugin files are fetched from.
|
|
156
|
-
- Default value: `https://cdn.jsdelivr.net/npm/shopar-plugin@0.7.
|
|
156
|
+
- Default value: `https://cdn.jsdelivr.net/npm/shopar-plugin@0.7.6/dist`
|
|
157
157
|
- `defaultUI` (optional)
|
|
158
158
|
- Type: `boolean`
|
|
159
159
|
- If provided and set to `false`, disables the default UI such as buttons, loading and error views.
|
package/dist/deepar/README.md
CHANGED
|
@@ -55,6 +55,8 @@ Add the following code to an HTML file:
|
|
|
55
55
|
```html
|
|
56
56
|
<html>
|
|
57
57
|
<head>
|
|
58
|
+
<!-- Ensure compatibility and performance on mobile -->
|
|
59
|
+
<meta name="viewport" content="width=device-width, initial-scale=1 "/>
|
|
58
60
|
<!-- Load deepar.js -->
|
|
59
61
|
<script src='https://cdn.jsdelivr.net/npm/deepar/js/deepar.js'> </script>
|
|
60
62
|
</head>
|
|
@@ -223,6 +225,25 @@ const deepAR = await deepar.initialize({
|
|
|
223
225
|
await deepAR.startCamera();
|
|
224
226
|
```
|
|
225
227
|
|
|
228
|
+
In cases where the camera aspect ratio doesn't match the screen aspect ratio, it is possible to rotate the camera input to achieve better camera quality.
|
|
229
|
+
This is usually the case for in-store AR screens which have portrait screens, but use standard landscape webcams.
|
|
230
|
+
To improve camera quality in those cases, rotate the camera physically 90° and call the following API.
|
|
231
|
+
```javascript
|
|
232
|
+
const deepAR = await deepar.initialize({
|
|
233
|
+
// ...
|
|
234
|
+
additionalOptions: {
|
|
235
|
+
cameraConfig: {
|
|
236
|
+
rotation: 90 // or 270
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
});
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
If you are using non-default DeepAR camera apply the rotation with:
|
|
243
|
+
```javascript
|
|
244
|
+
deepAR.setVideoRotation(90) // or 270
|
|
245
|
+
```
|
|
246
|
+
|
|
226
247
|
## Providing your own canvas for rendering
|
|
227
248
|
|
|
228
249
|
Create canvas directly in the HTML:
|
package/dist/deepar/VERSION.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
DeepAR SDK version: v5.6.
|
|
1
|
+
DeepAR SDK version: v5.6.9-shopar
|