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 🙏

© 2026 – Pkg Stats / Ryan Hefner

finger-mouse

v0.0.1

Published

Mouse control with hand gestures

Readme

Finger Mouse

Finger Mouse is a gesture recognition-based mouse that controls mouse movement and clicks through finger behaviors. It also provides underlying recognized finger joint events, allowing for custom interaction behaviors.

Online Demo | 中文

Quick Start

Using with npm

npm i finger-mouse
import { initFingerMouse } from 'finger-mouse';
initFingerMouse();

Using with CDN

<script src="https://cdn.jsdelivr.net/npm/finger-mouse"></script>
<script>
  FingerMouse.initFingerMouse();
</script>

Initialization Parameters

export declare function initFingerMouse(options?: {
    showOriginPointer?: boolean; // Whether to show the real mouse pointer, default is false
    showPanel?: boolean; // Whether to show the performance panel, default is false
    cdnMirror?: string; // CDN mirror address
    showCamera?: boolean; // Whether to show the camera画面, default is false
    showHandSkeleton?: boolean; // Whether to show the hand skeleton drawing, default is true
    fingerColor?: string; // Finger color, default is Red
    lineColor?: string; // Color of the connecting lines between nodes, default is White
    touchedFingerColor?: string; // Color of the finger when touched, default is Green
    whichHand?: "left" | "right" | "auto"; // Which hand to use for operation, "auto" means using the first recognized hand
    touchThreshold?: number; // Threshold for judging the distance when fingers touch, default is 25px
    showPointer?: boolean; // Whether to show the simulated mouse pointer, default is true
    disableDefaultAction?: boolean; // Whether to disable the default simulated mouse operation behavior, default is false
    onRenderReady?: () => void; // Callback function when rendering is ready
    onHandMove?: (x: number, y: number) => void; // Callback function when the thumb moves
    onFingerTouch?: (finger: IFinger, touched: boolean) => void; // Callback function when the thumb touches with four fingers
    onOriginData?: (data: any) => void; // Callback function for raw palm data
    onMouseDown?: (e: IMouseEvent) => void; // Simulated mouse click event under default mouse behavior
    onMouseUp?: (e: IMouseEvent) => void; // Simulated mouse release event under default mouse behavior
    onMouseMove?: (e: IMouseMoveEvent) => void; // Simulated mouse movement event under default mouse behavior
}): Promise<Camera>;

CDN Mirrors

The model-related resources used in FingerMouse are from third-party CDNs. The default is the jsDelivr China mirror. You can use other built-in mirrors or custom mirrors through CDM_MIRROR.

import { CDM_MIRROR } from 'finger-mouse';

API

FingerClient

const client = await initFingerMouse();

await client.ready; // Wait for rendering to be ready, equivalent to onRenderReady

client.isRenderReady; // Whether rendering is ready, boolean
client.pointer; // Get the simulated mouse pointer DOM element

client.isFingerTouched('index'); // Check if a certain finger is touching the thumb // 'index' | 'middle' | 'ring' | 'pinky';
client.destroy(); // Destroy the instance, cannot be used again after destruction

Mouse

const client = await initFingerMouse();
await client.ready; // Wait for rendering to be ready, equivalent to onRenderReady
const mouse = client.mouse;
client.clientX; // X coordinate of the simulated mouse pointer
client.clientY; // Y coordinate of the simulated mouse pointer