accelerationIncludingGravity property

Returns a DeviceAcceleration object representing the acceleration (in m/s2), including the effect of gravity, of the host device in motion along the X, Y, and Z axes.

This property is read-only.

IE11

Syntax

JavaScript
ptr = object.accelerationIncludingGravity

Property values

Type: DeviceAcceleration

Standards information

Remarks

The value of accelerationIncludingGravity is typically less useful in cases where a non-null value of the acceleration property (which represents the acceleration of the host device independent of the effect of gravity) is available. This property is primarily intended to be of use when the host device is unable to provide acceleration data without the effect of gravity (for example, when lacking a gyroscope).

See also

DeviceMotionEvent

 

 

Show:
© 2014 Microsoft