Sa-m commited on
Commit
4f2b55e
·
verified ·
1 Parent(s): 4feff04

Update assets/js/script.js

Browse files
Files changed (1) hide show
  1. assets/js/script.js +9 -21
assets/js/script.js CHANGED
@@ -71,20 +71,6 @@ const emails = [
71
  subject: "Your upcoming trip to Paris",
72
  snippet: "Don't forget to check-in for your flight tomorrow. Here's your itinerary and hotel information.",
73
  timestamp: "Aug 30"
74
- },
75
- {
76
- id: 11,
77
- sender: "GitHub",
78
- subject: "New login to your account",
79
- snippet: "We noticed a new login to your GitHub account from a Windows device in New York.",
80
- timestamp: "Aug 29"
81
- },
82
- {
83
- id: 12,
84
- sender: "Spotify",
85
- subject: "Your Weekly Discover Mix is ready",
86
- snippet: "We've curated 30 songs just for you based on your listening habits. Listen now!",
87
- timestamp: "Aug 28"
88
  }
89
  ];
90
 
@@ -350,9 +336,9 @@ class GestureDetector {
350
  this.selectedEmailId = null;
351
  this.gestureBuffer = [];
352
  this.circlePoints = [];
353
- this.circleThreshold = 8; // Reduced from 10 for better circle detection
354
- this.swipeThreshold = 30; // Reduced from 50 for more sensitive swipe detection
355
- this.gestureCooldown = 1500; // 1.5 seconds
356
  this.lastGestureTime = 0;
357
  this.camera = null;
358
 
@@ -362,9 +348,11 @@ class GestureDetector {
362
 
363
  setupMediaPipe() {
364
  try {
365
- const hands = new Hands({locateFile: (file) => {
366
- return `https://cdn.jsdelivr.net/npm/@mediapipe/[email protected]/${file}`;
367
- }});
 
 
368
 
369
  hands.setOptions({
370
  maxNumHands: 1,
@@ -373,7 +361,7 @@ class GestureDetector {
373
  minTrackingConfidence: 0.7
374
  });
375
 
376
- hands.onResults(results => {
377
  this.processResults(results);
378
  });
379
 
 
71
  subject: "Your upcoming trip to Paris",
72
  snippet: "Don't forget to check-in for your flight tomorrow. Here's your itinerary and hotel information.",
73
  timestamp: "Aug 30"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
74
  }
75
  ];
76
 
 
336
  this.selectedEmailId = null;
337
  this.gestureBuffer = [];
338
  this.circlePoints = [];
339
+ this.circleThreshold = 8;
340
+ this.swipeThreshold = 30;
341
+ this.gestureCooldown = 1500;
342
  this.lastGestureTime = 0;
343
  this.camera = null;
344
 
 
348
 
349
  setupMediaPipe() {
350
  try {
351
+ const hands = new Hands({
352
+ locateFile: (file) => {
353
+ return `https://cdn.jsdelivr.net/npm/@mediapipe/[email protected]/${file}`;
354
+ }
355
+ });
356
 
357
  hands.setOptions({
358
  maxNumHands: 1,
 
361
  minTrackingConfidence: 0.7
362
  });
363
 
364
+ hands.onResults((results) => {
365
  this.processResults(results);
366
  });
367