The LinearAccelerationSensor interface of the Sensor APIs provides on each reading the acceleration applied to the device along all three axes, but without the contribution of gravity.
To use this sensor, the user must grant permission to the 'accelerometer' device sensor through the Permissions API.
If a feature policy blocks use of a feature it is because your code is inconsistent with the policies set on your server. This is not something that would ever be shown to a user. See Feature-Policy for implementation instructions.
Creates a new LinearAccelerationSensor object.
Returns a double containing the linear acceleration of the device along the device's x axis.
Returns a double containing the linear acceleration of the device along the device's y axis.
Returns a double containing the linear acceleration of the device along the device's z axis.
Linear acceleration is typically read in the Sensor.onreading event callback. In the example below this occurs sixty times a second.
Generic Sensor API Candidate Recommendation Defines sensors in general.