Spaces:
Running
on
L40S
Running
on
L40S
Commit
β’
0a5e214
1
Parent(s):
22b2a6e
hum
Browse files
client/src/hooks/useFaceLandmarkDetection.tsx
CHANGED
@@ -394,11 +394,14 @@ export function useFaceLandmarkDetection() {
|
|
394 |
if (!currentLandmark || (currentLandmark?.group !== landmark?.group)) {
|
395 |
setActiveLandmark(landmark);
|
396 |
}
|
|
|
|
|
397 |
modifyImageWithRateLimit({
|
398 |
landmark,
|
399 |
vector,
|
400 |
mode: 'HOVERING'
|
401 |
});
|
|
|
402 |
}
|
403 |
}, [currentLandmark, dragStart, setActiveLandmark, setIsDragging, modifyImageWithRateLimit, landmarkCenters]);
|
404 |
|
|
|
394 |
if (!currentLandmark || (currentLandmark?.group !== landmark?.group)) {
|
395 |
setActiveLandmark(landmark);
|
396 |
}
|
397 |
+
|
398 |
+
/*
|
399 |
modifyImageWithRateLimit({
|
400 |
landmark,
|
401 |
vector,
|
402 |
mode: 'HOVERING'
|
403 |
});
|
404 |
+
*/
|
405 |
}
|
406 |
}, [currentLandmark, dragStart, setActiveLandmark, setIsDragging, modifyImageWithRateLimit, landmarkCenters]);
|
407 |
|
public/index.js
CHANGED
@@ -32970,7 +32970,7 @@ function useFaceLandmarkDetection() {
|
|
32970 |
const previewImage = useMainStore((s2) => s2.previewImage);
|
32971 |
const handleServerResponse = useMainStore((s2) => s2.handleServerResponse);
|
32972 |
const faceLandmarks = useMainStore((s2) => s2.faceLandmarks);
|
32973 |
-
const throttleInMs =
|
32974 |
const [isMediaPipeReady, setIsMediaPipeReady] = import_react7.useState(false);
|
32975 |
const [isDrawingUtilsReady, setIsDrawingUtilsReady] = import_react7.useState(false);
|
32976 |
const [dragStart, setDragStart] = import_react7.useState(null);
|
@@ -33248,11 +33248,6 @@ function useFaceLandmarkDetection() {
|
|
33248 |
if (!currentLandmark || currentLandmark?.group !== landmark?.group) {
|
33249 |
setActiveLandmark(landmark);
|
33250 |
}
|
33251 |
-
modifyImageWithRateLimit({
|
33252 |
-
landmark,
|
33253 |
-
vector,
|
33254 |
-
mode: "HOVERING"
|
33255 |
-
});
|
33256 |
}
|
33257 |
}, [currentLandmark, dragStart, setActiveLandmark, setIsDragging, modifyImageWithRateLimit, landmarkCenters]);
|
33258 |
const handleEnd = import_react7.useCallback((x2, y2, mode) => {
|
|
|
32970 |
const previewImage = useMainStore((s2) => s2.previewImage);
|
32971 |
const handleServerResponse = useMainStore((s2) => s2.handleServerResponse);
|
32972 |
const faceLandmarks = useMainStore((s2) => s2.faceLandmarks);
|
32973 |
+
const throttleInMs = 220;
|
32974 |
const [isMediaPipeReady, setIsMediaPipeReady] = import_react7.useState(false);
|
32975 |
const [isDrawingUtilsReady, setIsDrawingUtilsReady] = import_react7.useState(false);
|
32976 |
const [dragStart, setDragStart] = import_react7.useState(null);
|
|
|
33248 |
if (!currentLandmark || currentLandmark?.group !== landmark?.group) {
|
33249 |
setActiveLandmark(landmark);
|
33250 |
}
|
|
|
|
|
|
|
|
|
|
|
33251 |
}
|
33252 |
}, [currentLandmark, dragStart, setActiveLandmark, setIsDragging, modifyImageWithRateLimit, landmarkCenters]);
|
33253 |
const handleEnd = import_react7.useCallback((x2, y2, mode) => {
|