npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-hand-tracking-sdk

v0.1.17

Published

A simple sdk for tracking the actions of the hands

Downloads

23

Readme

React Hand Tracking SDK

A simple sdk for tracking the actions of the hands

Installation

To use the GoApptiv Document Scanner, follow these steps:

  1. Install the package using npm or yarn:

    npm i react-hand-tracking-sdk
  2. Import the component in your project:

    import { HandDetector} from 'react-hand-tracking-sdk';
  3. Use the component in your React application:

     <HandDetector canvasHeight={720} canvasWidth={1200}/>

Props

  • canvasWidth: The width of the canvas in pixels.
  • canvasHeight: The height of the canvas in pixels.
  • loadingElement: The element to be displayed while the canvas loads.
  • onHandsMove: A callback function that is called whenever the position of the hands changes. The callback function is passed an array of fingers (Scroll down to see the names of the points that you can access), where each finger is an object with the following properties:
    • x: The x-coordinate of the fingertip in pixels.
    • y: The y-coordinate of the fingertip in pixels.
  • fingersUp: A callback function that is called whenever the number of fingers up changes. The callback function is passed an array of 1s and 0s, where 1 represents a finger that is up and 0 represents a finger that is down.

Hand Parts

The HandPartKeys enum defines the keys that can be used to access the positions of the hand landmarks:

  • Wrist: The wrist landmark.
  • ThumbBottom: The bottom knuckle of the thumb.
  • ThumbMiddleBottom: The middle knuckle of the thumb.
  • ThumbMiddle: The middle joint of the thumb.
  • ThumbTip: The tip of the thumb.
  • IndexBottom: The bottom knuckle of the index finger.
  • IndexMiddleBottom: The middle knuckle of the index finger.
  • IndexMiddle: The middle joint of the index finger.
  • IndexTip: The tip of the index finger.
  • MiddleBottom: The bottom knuckle of the middle finger.
  • MiddleMiddleBottom: The middle knuckle of the middle finger.
  • MiddleMiddle: The middle joint of the middle finger.
  • MiddleTip: The tip of the middle finger.
  • RingBottom: The bottom knuckle of the ring finger.
  • RingMiddleBottom: The middle knuckle of the ring finger.
  • RingMiddle: The middle joint of the ring finger.
  • RingTip: The tip of the ring finger.
  • PinkyBottom: The bottom knuckle of the pinky finger.
  • PinkyMiddleBottom: The middle knuckle of the pinky finger.
  • PinkyMiddle: The middle joint of the pinky finger.
  • PinkyTip: The tip of the pinky finger.

You can get the position of a hand landmark by using the following syntax:

javascript const fingerPosition = fingPositions[handPart];

where handPart is a key from the HandPartKeys enum. For example, to get the position of the tip of the index finger, you would use the following code:

javascript const indexFingerTipPosition = fingPositions["IndexTip"];

Futute Updates

Will increase the WebAssembly code percentage from "30%" to "70%" for better computations.