Comparing version 5.1.0 to 5.1.1
/** | ||
* DeepAR Web SDK version. | ||
*/ | ||
declare const version = "5.1.0"; | ||
declare const version = "5.1.1"; | ||
export { version }; |
{ | ||
"name": "deepar", | ||
"version": "5.1.0", | ||
"version": "5.1.1", | ||
"description": "The official DeepAR Web SDK", | ||
@@ -5,0 +5,0 @@ "main": "js/deepar.esm.js", |
@@ -45,24 +45,2 @@ # deepar | ||
## Bundler setup | ||
We recommend using a bundler to correctly include assets like DeepAR effects files. | ||
For example, if using Webpack, add this to your `webpack.config.js`: | ||
```javascript | ||
module.exports = { | ||
// ... | ||
module: { | ||
rules: [ | ||
{ | ||
include: [ | ||
path.resolve(__dirname, 'effects/'), | ||
], | ||
type: 'asset/resource', | ||
}, | ||
], | ||
}, | ||
// ... | ||
``` | ||
## Canvas | ||
@@ -85,10 +63,6 @@ | ||
You can always change the canvas dimensions and they don't have to match the | ||
input video resolution. DeepAR will fit the input camera/video stream correctly | ||
to any canvas size. | ||
Or you can create it in Javascript. | ||
```javascript | ||
let canvas = document.createElement("canvas"); | ||
``` | ||
> **Note:** Be sure to set `width` and `height` properties of the `canvas`! | ||
## Getting started | ||
@@ -129,2 +103,16 @@ There are two main ways to get deepar.js in your JavaScript project: | ||
Alternatively, you can import DeepAR as an ES6 module. | ||
Via `<script type="module">`. | ||
```html | ||
<script type="module"> | ||
import * as deepar from 'https://cdn.jsdelivr.net/npm/deepar/js/deepar.esm.js'; | ||
</script> | ||
``` | ||
Or via dynamic [import](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/import). | ||
```javascript | ||
const deepar = await import('https://cdn.jsdelivr.net/npm/deepar/js/deepar.esm.js'); | ||
``` | ||
### via NPM | ||
@@ -131,0 +119,0 @@ Add deepar.js to your project using [yarn](https://yarnpkg.com/en/) or |
@@ -1,1 +0,1 @@ | ||
DeepAR SDK version: v5.1.0 | ||
DeepAR SDK version: v5.1.1 |
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
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
26147732
8300
318