accelerometer Object

Use the accelerometer object to listen to the device's motion sensor

Description:

The accelerometer is the device on a smartphone that detects movement. The accelerometer object is used to track the accelerometer on the device. Success and failure callback functions need to be defined in your Javascript. Successful data is returned as an object with the attributes ".x", ".y", and ".z". Values of accelerometer samples for each axis range from -1 to 1.

Methods:

For more complete information about compiler optimizations, see our Optimization Notice.