Track Your Smartphone in 2D With JavaScript
Imagine what you can do with this new medium of interaction
With a fundamental shift to the web, we are able to do really cool things right from our browser. In this tutorial, we will be utilising the Generic Sensor API to turn your smartphone into a pointer with real-time tracking.
Here’s what we will be making:
Prerequisites
- As of writing, the Generic Sensor API is not yet supported on iOS. In addition, some Android smartphones don’t have the required sensors. However, it is still possible to work through this tutorial with simulated sensors found in Chrome DevTools:
- It is also possible to view the console output of Chrome…