The DeviceMotionEvent
provides web developers with information about the speed of changes for the device's position and orientation.
Documentation DeviceMotionEvent by Mozilla Contributors, licensed under CC-BY-SA 2.5.
See:
Constructor
Variables
read onlyacceleration:DeviceAcceleration
An object giving the acceleration of the device on the three axis X, Y and Z. Acceleration is expressed in m/s2.
read onlyaccelerationIncludingGravity:DeviceAcceleration
An object giving the acceleration of the device on the three axis X, Y and Z with the effect of gravity. Acceleration is expressed in m/s2.
A number representing the interval of time, in milliseconds, at which data is obtained from the device.
read onlyrotationRate:DeviceRotationRate
An object giving the rate of change of the device's orientation on the three orientation axis alpha, beta and gamma. Rotation rate is express in degrees per seconds.
Methods
initDeviceMotionEvent (type:String, canBubble:Bool, cancelable:Bool, acceleration:DeviceAccelerationInit, accelerationIncludingGravity:DeviceAccelerationInit, rotationRate:DeviceRotationRateInit, interval:Float):Void