Comparing version 5.6.9-diamonds-alpha-250 to 5.6.9
@@ -13,3 +13,3 @@ /** | ||
*/ | ||
declare function createCanvas(previewElement: HTMLElement): HTMLCanvasElement; | ||
declare function createCanvas(previewElement: HTMLElement, pixelRatio: number): HTMLCanvasElement; | ||
/** | ||
@@ -19,4 +19,4 @@ * Removes the created canvas and invalidates the current context. | ||
declare function invalidate(): void; | ||
declare function changePreviewElement(newPreviewElement: HTMLElement): void; | ||
declare function changePreviewElement(newPreviewElement: HTMLElement, pixelRatio: number): void; | ||
declare function isPreviewElementUsed(): boolean; | ||
export { preRenderUpdate, postRenderUpdate, createCanvas, invalidate, changePreviewElement, isPreviewElementUsed }; |
@@ -208,3 +208,3 @@ /// <reference types="dom-mediacapture-transform" /> | ||
*/ | ||
changePreviewElement(newPreviewElement: HTMLElement): void; | ||
changePreviewElement(newPreviewElement: HTMLElement, pixelRatio?: number): void; | ||
/** | ||
@@ -211,0 +211,0 @@ * Shutdown the DeepAR SDK and release all resources associated with it. It is invalid to call any function from this {@link DeepAR} object after shutdown. |
@@ -301,2 +301,7 @@ import { ToneMapping } from "./DeepAR"; | ||
/** | ||
* Pixel ratio used for scaling the canvas. | ||
* By default, SDK uses min(window.devicePixelRatio, 2). | ||
*/ | ||
pixelRatio?: number; | ||
/** | ||
* @internal | ||
@@ -303,0 +308,0 @@ */ |
/** | ||
* DeepAR Web SDK version. | ||
*/ | ||
declare const version = "5.6.9-diamonds-alpha-250"; | ||
declare const version = "5.6.9"; | ||
export { version }; |
{ | ||
"name": "deepar", | ||
"version": "5.6.9-diamonds-alpha-250", | ||
"version": "5.6.9", | ||
"description": "The official DeepAR Web SDK", | ||
@@ -5,0 +5,0 @@ "main": "js/deepar.esm.js", |
@@ -58,2 +58,4 @@ # deepar | ||
<head> | ||
<!-- Ensure compatibility and performance on mobile --> | ||
<meta name="viewport" content="width=device-width, initial-scale=1 "/> | ||
<!-- Load deepar.js --> | ||
@@ -227,2 +229,21 @@ <script src='https://cdn.jsdelivr.net/npm/deepar/js/deepar.js'> </script> | ||
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. | ||
This is usually the case for in-store AR screens which have portrait screens, but use standard landscape webcams. | ||
To improve camera quality in those cases, rotate the camera physically 90° and call the following API. | ||
```javascript | ||
const deepAR = await deepar.initialize({ | ||
// ... | ||
additionalOptions: { | ||
cameraConfig: { | ||
rotation: 90 // or 270 | ||
} | ||
} | ||
}); | ||
``` | ||
If you are using non-default DeepAR camera apply the rotation with: | ||
```javascript | ||
deepAR.setVideoRotation(90) // or 270 | ||
``` | ||
## Providing your own canvas for rendering | ||
@@ -229,0 +250,0 @@ |
@@ -1,1 +0,1 @@ | ||
DeepAR SDK version: v5.6.9-diamonds-alpha-250 | ||
DeepAR SDK version: v5.6.9 |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
49744637
2798
3
351