Motion tracking - js style
JavaScript HTML
Failed to load latest commit information.
demo Minority report is now 15 years old Feb 2, 2017
.gitignore .gitignore Feb 2, 2017 small tweak Aug 1, 2012
index.html Redo 3D first gallery demo Jul 17, 2012
mocap.js change error message Aug 1, 2012

Mocap.js - motion capture for webpages


So it's been 10 years since minority report came out, and I think the question that came to everyone's mind was "how close are we to being able to do that cool user interface in a browser?"...just me?...

Anyway, here's a basic direction capture library that's at least a start, check out the explainitory demo here.

Usage: (subject to change)

<!DOCTYPE html>
  <div id='output'></div>

  <script src="./js/mocap.js"></script>
    var ms = new motionSensor();

    document.addEventListener('motion', function(e){
      document.getElementById('output').innerHTML = e.detail.dir;

Browser Support

Gold standard

  • Chrome - full support for mocap.js
  • Opera - full support for mocap.js, but doesn't support the 3D transforms used in the demo


  • Firefox - currently works in nightly (FF17), but requires a settings flag


  • IE - not on <10, not sure about 10 indications are good though

Wooden Spoon

  • Safari - doesn't yet support getUserMedia


Licensed under a MIT license, see