Device Motion

Demo

This page demonstrates how to use the device motion JavaScript object to read physical X, Y, Z acceleration values of the current device.

Details

  1. The X axis runs from left to right through the device.
  2. The Y axis runs from top to bottom through the device.
  3. The Z axis runs from front to back through the device.

Live demo: http://www.mobilexweb.com/samples/ball.html