DeviceMotionEvent

DeviceMotionEvent

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:

Constructor

new (type:String, ?eventInitDict:DeviceMotionEventInit)

Throws:

null DOMError

Variables

read only acceleration:DeviceAcceleration

An object giving the acceleration of the device on the three axis X, Y and Z. Acceleration is expressed in m/s2.

read only accelerationIncludingGravity: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 only interval:Float

A number representing the interval of time, in milliseconds, at which data is obtained from the device.

read only rotationRate: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

© 2005–2016 Haxe Foundation
Licensed under a MIT license.
http://api.haxe.org/js/html/DeviceMotionEvent.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部