Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
DimaDemchenko committed Jan 24, 2024
1 parent 37b2a5d commit 1c85c41
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/camera-stream/CameraStream.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const CameraStream = ({ handleWrist }: CameraScrollProps) => {
<div className="camera-container">
<div>
<video
className="video-stream"
className="display-none"
ref={videoRef}
width={1280}
height={720}
Expand Down
3 changes: 2 additions & 1 deletion src/hooks/useWristDetection.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as posenet from '@tensorflow-models/posenet'
import * as tf from '@tensorflow/tfjs'
import { useEffect, useRef } from 'react'

type useWristProps = {
handleWrist: (direction: 'up' | 'down') => void
}
Expand Down Expand Up @@ -30,7 +31,7 @@ export const useWristDetection = ({ handleWrist }: useWristProps) => {
return
}

if (wristPosition.y < 300 && Date.now() - initialWristPos.time > 250) {
if (wristPosition.y < 220 && Date.now() - initialWristPos.time > 250) {
handleScrollRef.current('down')
initialWristPos = { ...wristPosition, time: Date.now() }
}
Expand Down
Empty file removed src/index.css
Empty file.

0 comments on commit 1c85c41

Please sign in to comment.