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 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.5/dist/shopar-plugin.js"></script>
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.5/dist`
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.
@@ -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:
@@ -1 +1 @@
1
- DeepAR SDK version: v5.6.8-shopar
1
+ DeepAR SDK version: v5.6.9-shopar