accelerometer Object

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


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.


Reportez-vous à notre Notice d'optimisation pour plus d'informations sur les choix et l'optimisation des performances dans les produits logiciels Intel.