deepar 5.6.7 → 5.6.9-alpha-256
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 +21 -0
- package/VERSION.txt +1 -1
- package/js/deepar.esm.js +1 -1
- package/js/deepar.js +1 -1
- package/js/dynamicModules/xzimg.js +1 -1
- package/js/types/DeepAR.d.ts +1 -1
- package/js/types/canvasHelper.d.ts +2 -2
- package/js/types/initParams.d.ts +5 -0
- package/js/types/version.d.ts +1 -1
- package/package.json +1 -1
- package/wasm/deepar.wasm +0 -0
- package/wasm/dyArcoreScripting.wasm +0 -0
package/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/VERSION.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
DeepAR SDK version: v5.6.
|
|
1
|
+
DeepAR SDK version: v5.6.9-alpha-256
|