Analysis updated 2026-07-03
Create a parallax 3D scene in the browser that shifts perspective as the user moves their head left or right
Build a web-based game that responds to the player's physical head movement without mouse or keyboard
Add a face-tracking overlay to a webcam feed on a webpage that shows a bounding box around the user's face
Connect headtrackr to three.js to make a 3D model appear to exist in real space as the viewer moves closer or further away
| auduno/headtrackr | jin-yufeng/mp-html | mumuy/relationship | |
|---|---|---|---|
| Stars | 3,707 | 3,708 | 3,708 |
| Language | JavaScript | JavaScript | JavaScript |
| Setup difficulty | moderate | easy | easy |
| Complexity | 3/5 | 2/5 | 2/5 |
| Audience | developer | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
Page must be served over HTTPS for Chrome to grant camera access.
headtrackr is a JavaScript library that uses a laptop or desktop webcam to track the position of a person's face in real time, inside a web browser. It relies on a browser standard called getUserMedia, which gives web pages permission to access the camera without any plugins or installs. The library does two things. First, it locates the user's face in the webcam feed and reports its position on screen, including the bounding box size and rotation angle. Second, it estimates where the user's head is in three-dimensional space relative to the center of the screen, reporting x, y, and z coordinates in centimeters. As the person moves their head closer, further, or to the side, those numbers update continuously. To use it, you include the minified JavaScript file in a webpage, create a video element and a hidden canvas element, then pass both to the tracker. The tracker fires events on the page that your own code can listen to. One event type carries the face position data, the other carries the head position in 3D space. You can also connect it to the three.js 3D graphics library using pre-built controllers included in the repo, which creates a perspective-shift effect where the 3D scene appears to respond to the viewer's physical head movement. The project was built at a time when webcam access in browsers was new technology. Chrome now requires the page to be served over HTTPS for camera access to work. The library is distributed under the MIT license, with small portions under the BSD-3 license. Building from source requires Node.js and the Grunt task runner.
A JavaScript library that tracks a user's face position in real time via webcam in the browser, reporting 2D face location and 3D head coordinates so web apps can respond to head movement.
Mainly JavaScript. The stack also includes JavaScript, three.js, Node.js.
Use freely for any purpose, including commercial use, as long as you keep the copyright notice.
Setup difficulty is rated moderate, with roughly 30min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.