Comparing version
@@ -34,2 +34,8 @@ /** | ||
} | ||
export interface FootData { | ||
/** | ||
* True if the foot is detected, false otherwise. | ||
*/ | ||
detected: boolean; | ||
} | ||
/** | ||
@@ -86,3 +92,3 @@ * Functions that gets called by the DeepAR SDK. | ||
/** | ||
* Passes the information about the detected faces. If this callback is set it will get called every frame. | ||
* Passes the information about the detected faces. If this callback is set, it will get called every frame when a face is detected. | ||
* @param faceDataArray Information about all the tracked faces. | ||
@@ -92,2 +98,12 @@ */ | ||
/** | ||
* Called when foot tracking is fully initialized. | ||
*/ | ||
onFootTrackingInitialized?: () => void; | ||
/** | ||
* Passes the information about the detected feet. If this callback is set, it will get called every frame when a foot is detected. | ||
* @param leftFootData Information about the left foot. | ||
* @param rightFootData Information about the right foot. | ||
*/ | ||
onFeetTracked?: (leftFootData: FootData, rightFootData: FootData) => void; | ||
/** | ||
* Called when any DeepAR related event happens | ||
@@ -130,22 +146,5 @@ * @param errorType Type of message. | ||
/** | ||
* Object containing configuration for DeepAR foot tracking which is used for virtual shoe try on | ||
* Object containing configuration for DeepAR foot tracking which is used for virtual shoe try on. | ||
*/ | ||
footTrackingConfig?: { | ||
/** | ||
* Path to the pose estimation wasm file, e.g. "/path/to/libPoseEstimation.wasm" | ||
*/ | ||
poseEstimationWasmPath: string; | ||
/** | ||
* Path to the detector model, e.g. "/path/to/foot-detector-ios.bin" | ||
*/ | ||
detectorPath: string; | ||
/** | ||
* Path to the tracker model, e.g. "/path/to/foot-tracker-ios.bin" | ||
*/ | ||
trackerPath: string; | ||
/** | ||
* Path to the foot model object file, e.g. "/path/to/foot-model.obj" | ||
*/ | ||
objPath: string; | ||
}; | ||
footTrackingConfig?: DeepARFootTrackingConfig; | ||
/** | ||
@@ -161,2 +160,24 @@ * Path to deepar.wasm file. Something like "path/to/deepar.wasm". | ||
/** | ||
* Foot tracking initialization parameters. | ||
*/ | ||
export interface DeepARFootTrackingConfig { | ||
/** | ||
* Path to the pose estimation wasm file, e.g. "/path/to/libPoseEstimation.wasm". | ||
*/ | ||
poseEstimationWasmPath: string; | ||
/** | ||
* Path to the detector model, e.g. "/path/to/foot-detection-96x96x6.bin". | ||
*/ | ||
detectorPath: string; | ||
/** | ||
* Path to the tracker model, e.g. "/path/to/foot-tracker-96x96x18-test.bin". | ||
* For better performance on older devices, you can use "/path/to/foot-tracker-96x96x13-test.bin". | ||
*/ | ||
trackerPath: string; | ||
/** | ||
* Path to the foot model object file, e.g. "/path/to/foot-model.obj". | ||
*/ | ||
objPath: string; | ||
} | ||
/** | ||
* Describes the touch/click type. | ||
@@ -293,2 +314,12 @@ */ | ||
/** | ||
* Downloads the foot tracking models and initializes foot tracking. | ||
* @param options Foot tracking initialization options. | ||
* @param options.config Foot tracking configuration. It will extend any previously defined foot tracking configuration. | ||
* @param options.onInitialized Callback that gets called when foot tracking is fully initialized. | ||
*/ | ||
initializeFootTracking(options?: { | ||
config?: DeepARFootTrackingConfig; | ||
onInitialized?: () => void; | ||
}): void; | ||
/** | ||
* Sets the face tracking model data. | ||
@@ -295,0 +326,0 @@ * @param byteArray Face tracking model data. |
@@ -34,2 +34,8 @@ /** | ||
} | ||
export interface FootData { | ||
/** | ||
* True if the foot is detected, false otherwise. | ||
*/ | ||
detected: boolean; | ||
} | ||
/** | ||
@@ -86,3 +92,3 @@ * Functions that gets called by the DeepAR SDK. | ||
/** | ||
* Passes the information about the detected faces. If this callback is set it will get called every frame. | ||
* Passes the information about the detected faces. If this callback is set, it will get called every frame when a face is detected. | ||
* @param faceDataArray Information about all the tracked faces. | ||
@@ -92,2 +98,12 @@ */ | ||
/** | ||
* Called when foot tracking is fully initialized. | ||
*/ | ||
onFootTrackingInitialized?: () => void; | ||
/** | ||
* Passes the information about the detected feet. If this callback is set, it will get called every frame when a foot is detected. | ||
* @param leftFootData Information about the left foot. | ||
* @param rightFootData Information about the right foot. | ||
*/ | ||
onFeetTracked?: (leftFootData: FootData, rightFootData: FootData) => void; | ||
/** | ||
* Called when any DeepAR related event happens | ||
@@ -130,22 +146,5 @@ * @param errorType Type of message. | ||
/** | ||
* Object containing configuration for DeepAR foot tracking which is used for virtual shoe try on | ||
* Object containing configuration for DeepAR foot tracking which is used for virtual shoe try on. | ||
*/ | ||
footTrackingConfig?: { | ||
/** | ||
* Path to the pose estimation wasm file, e.g. "/path/to/libPoseEstimation.wasm" | ||
*/ | ||
poseEstimationWasmPath: string; | ||
/** | ||
* Path to the detector model, e.g. "/path/to/foot-detector-ios.bin" | ||
*/ | ||
detectorPath: string; | ||
/** | ||
* Path to the tracker model, e.g. "/path/to/foot-tracker-ios.bin" | ||
*/ | ||
trackerPath: string; | ||
/** | ||
* Path to the foot model object file, e.g. "/path/to/foot-model.obj" | ||
*/ | ||
objPath: string; | ||
}; | ||
footTrackingConfig?: DeepARFootTrackingConfig; | ||
/** | ||
@@ -161,2 +160,24 @@ * Path to deepar.wasm file. Something like "path/to/deepar.wasm". | ||
/** | ||
* Foot tracking initialization parameters. | ||
*/ | ||
export interface DeepARFootTrackingConfig { | ||
/** | ||
* Path to the pose estimation wasm file, e.g. "/path/to/libPoseEstimation.wasm". | ||
*/ | ||
poseEstimationWasmPath: string; | ||
/** | ||
* Path to the detector model, e.g. "/path/to/foot-detection-96x96x6.bin". | ||
*/ | ||
detectorPath: string; | ||
/** | ||
* Path to the tracker model, e.g. "/path/to/foot-tracker-96x96x18-test.bin". | ||
* For better performance on older devices, you can use "/path/to/foot-tracker-96x96x13-test.bin". | ||
*/ | ||
trackerPath: string; | ||
/** | ||
* Path to the foot model object file, e.g. "/path/to/foot-model.obj". | ||
*/ | ||
objPath: string; | ||
} | ||
/** | ||
* Describes the touch/click type. | ||
@@ -293,2 +314,12 @@ */ | ||
/** | ||
* Downloads the foot tracking models and initializes foot tracking. | ||
* @param options Foot tracking initialization options. | ||
* @param options.config Foot tracking configuration. It will extend any previously defined foot tracking configuration. | ||
* @param options.onInitialized Callback that gets called when foot tracking is fully initialized. | ||
*/ | ||
initializeFootTracking(options?: { | ||
config?: DeepARFootTrackingConfig; | ||
onInitialized?: () => void; | ||
}): void; | ||
/** | ||
* Sets the face tracking model data. | ||
@@ -295,0 +326,0 @@ * @param byteArray Face tracking model data. |
{ | ||
"name": "deepar", | ||
"version": "4.0.3", | ||
"version": "4.1.0-alpha-720", | ||
"description": "The official DeepAR Web SDK", | ||
@@ -5,0 +5,0 @@ "main": "js/deepar.esm.js", |
@@ -212,4 +212,4 @@ # deepar | ||
import poseEstimationWasmPath from 'deepar/wasm/libxzimgPoseEstimation.wasm'; | ||
import footDetectorPath from 'deepar/models/foot/foot-detector-android.bin'; // or ...-ios.bin | ||
import footTrackerPath from 'deepar/models/foot/foot-tracker-android.bin'; // or ...-ios.bin | ||
import footDetectorPath from 'deepar/models/foot/foot-detection-96x96x6.bin'; | ||
import footTrackerPath from 'deepar/models/foot/foot-tracker-96x96x18-test.bin'; // or foot-tracker-96x96x13-test.bin | ||
import footObjPath from 'deepar/models/foot/foot-model.obj'; | ||
@@ -216,0 +216,0 @@ |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
8399
807.02%16444645
-11.28%15
-6.25%37
85%