deepar 5.6.3 → 5.6.4
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 +6 -22
- package/VERSION.txt +1 -1
- package/js/deepar.esm.js +1 -1
- package/js/deepar.js +1 -1
- package/js/types/DeepAR.d.ts +3 -0
- package/js/types/callbacks.d.ts +9 -0
- package/js/types/footData.d.ts +1 -0
- package/js/types/initParams.d.ts +5 -6
- package/js/types/version.d.ts +1 -1
- package/js/types/wristData.d.ts +1 -0
- package/package.json +1 -2
- package/wasm/deepar.wasm +0 -0
- package/wasm/dyArcoreScripting.wasm +0 -0
- package/effects/Shoe +0 -0
package/README.md
CHANGED
|
@@ -9,7 +9,6 @@ DeepAR Web supports:
|
|
|
9
9
|
- Face filters and masks.
|
|
10
10
|
- Background replacement.
|
|
11
11
|
- Background blur.
|
|
12
|
-
- Shoe try-on.
|
|
13
12
|
- AR mini-games.
|
|
14
13
|
|
|
15
14
|
## Documentation
|
|
@@ -159,25 +158,19 @@ await deepAR.backgroundReplacement(true, 'images/sunny_beach.png')
|
|
|
159
158
|
## Callbacks
|
|
160
159
|
|
|
161
160
|
DeepAR has some callbacks you can implement for additional informations. For example,
|
|
162
|
-
to check if
|
|
161
|
+
to check if face is detected in the scene.
|
|
163
162
|
```javascript
|
|
164
|
-
await deepAR.switchEffect('https://cdn.jsdelivr.net/npm/deepar/effects/
|
|
165
|
-
deepAR.callbacks.
|
|
166
|
-
if(
|
|
167
|
-
console.log(
|
|
168
|
-
} else if (leftFoot.detected) {
|
|
169
|
-
console.log('Left foot detected!');
|
|
170
|
-
} else if (rightFoot.detected) {
|
|
171
|
-
console.log('Right foot detected!');
|
|
172
|
-
} else {
|
|
173
|
-
console.log('No feet detected!');
|
|
163
|
+
await deepAR.switchEffect('https://cdn.jsdelivr.net/npm/deepar/effects/aviators');
|
|
164
|
+
deepAR.callbacks.onFaceTracked = function(faceDataArr) {
|
|
165
|
+
if (faceDataArr[0].detected) {
|
|
166
|
+
console.log("Face is detected!");
|
|
174
167
|
}
|
|
175
168
|
};
|
|
176
169
|
```
|
|
177
170
|
|
|
178
171
|
To remove callback if you don't need it anymore.
|
|
179
172
|
```javascript
|
|
180
|
-
deepAR.callbacks.
|
|
173
|
+
deepAR.callbacks.onFaceTracked = undefined;
|
|
181
174
|
```
|
|
182
175
|
|
|
183
176
|
## Different video sources
|
|
@@ -326,15 +319,6 @@ const deepAR = await deepar.initialize({
|
|
|
326
319
|
segmentationConfig: {
|
|
327
320
|
modelPath: 'path/to/deepar/models/segmentation/segmentation-160x160-opt.bin'
|
|
328
321
|
},
|
|
329
|
-
footTrackingConfig: {
|
|
330
|
-
poseEstimationWasmPath: 'path/to/deepar/wasm/libxzimgPoseEstimation.wasm',
|
|
331
|
-
detectorPath: 'path/to/deepar/models/foot/foot-detection-96x96x6.bin',
|
|
332
|
-
trackerPath: 'path/to/deepar/models/foot/foot-tracker-96x96x18-test.bin',
|
|
333
|
-
objPath: 'path/to/deepar/models/foot/foot-model.obj',
|
|
334
|
-
tfjsBackendWasmPath: 'path/to/deepar/wasm/tfjs-backend-wasm.wasm',
|
|
335
|
-
tfjsBackendWasmSimdPath: 'path/to/deepar/wasm/tfjs-backend-wasm-simd.wasm',
|
|
336
|
-
tfjsBackendWasmThreadedSimdPath: 'path/to/deepar/wasm/tfjs-backend-wasm-threaded-simd.wasm',
|
|
337
|
-
},
|
|
338
322
|
deeparWasmPath: 'path/to/deepar/wasm/deepar.wasm'
|
|
339
323
|
}
|
|
340
324
|
});
|
package/VERSION.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
DeepAR SDK version: v5.6.
|
|
1
|
+
DeepAR SDK version: v5.6.4
|