jack 3 yıl önce
ebeveyn
işleme
d7ccd17e1d
1 değiştirilmiş dosya ile 5 ekleme ve 4 silme
  1. 5 4
      src/components/functionFan2.vue

+ 5 - 4
src/components/functionFan2.vue

@@ -214,7 +214,7 @@ export default {
       detector: null,
       detector: null,
       hand: 0,
       hand: 0,
       isC: false,
       isC: false,
-      f:null,
+      f: null,
     };
     };
   },
   },
   methods: {
   methods: {
@@ -296,8 +296,10 @@ export default {
         console.log(e);
         console.log(e);
         try {
         try {
           this.detector.dispose();
           this.detector.dispose();
-          this.detector = null;
-        } catch (e) {}
+        } catch (e) {
+          console.log(e);
+        }
+        this.detector = null;
       }
       }
       console.log(hands);
       console.log(hands);
       if (hands.length > 0 && this.isCamera) {
       if (hands.length > 0 && this.isCamera) {
@@ -414,7 +416,6 @@ export default {
       const detectorConfig = {
       const detectorConfig = {
         runtime: "mediapipe", // or 'tfjs'
         runtime: "mediapipe", // or 'tfjs'
         modelType: "full",
         modelType: "full",
-        // solutionPath: `https://cdn.jsdelivr.net/npm/@mediapipe/hands@${mpHands.VERSION}`,
         solutionPath: `/static/hands`,
         solutionPath: `/static/hands`,
       };
       };
       this.detector = await handPoseDetection.createDetector(
       this.detector = await handPoseDetection.createDetector(