0) {
+ return;
+ }
+ const clickX = event.clientX;
+ const width = window.innerWidth;
+ if (clickX > width / 2) {
+ this.next(false, true);
+ } else {
+ this.prev(true);
}
}
diff --git a/src/app/services/face-detector.service.ts b/src/app/services/face-detector.service.ts
index 4546dd8..6c4a1b5 100644
--- a/src/app/services/face-detector.service.ts
+++ b/src/app/services/face-detector.service.ts
@@ -102,10 +102,16 @@ export class FaceDetectorService {
this.processLandmarks(results);
});
+ let lastFrameTime = 0;
+ const FRAME_INTERVAL_MS = 100; // Analizza massimo 10 fotogrammi al secondo per risparmiare CPU/RAM
this.camera = new CameraLib(videoElement, {
onFrame: async () => {
if (this.isCameraActive() && this.faceMesh) {
- await this.faceMesh.send({ image: videoElement });
+ const now = Date.now();
+ if (now - lastFrameTime >= FRAME_INTERVAL_MS) {
+ lastFrameTime = now;
+ await this.faceMesh.send({ image: videoElement });
+ }
}
},
width: 320,
diff --git a/src/app/version.ts b/src/app/version.ts
index ae28131..3f10555 100644
--- a/src/app/version.ts
+++ b/src/app/version.ts
@@ -1 +1 @@
-export const VERSION = '2026.06.27.1457';
+export const VERSION = '2026.07.13.1755';