package js.html
extends Event
Available on js
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 also:
new(type:String, ?eventInitDict:Null<DeviceMotionEventInit>)
Throws:
null |
DOMError |
---|
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.
read onlyinterval:Float
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 expressed in degrees per seconds.
initDeviceMotionEvent(type:String, canBubble:Bool = false, cancelable:Bool = false, ?acceleration:Null<DeviceAccelerationInit>, ?accelerationIncludingGravity:Null<DeviceAccelerationInit>, ?rotationRate:Null<DeviceRotationRateInit>, ?interval:Float):Void
© 2005–2020 Haxe Foundation
Licensed under a MIT license.
https://api.haxe.org/js/html/DeviceMotionEvent.html