DeviceMotionEventRotationRate

可用性有限

此特性不是基线特性,因为它在一些最广泛使用的浏览器中不起作用。

安全上下文: 此功能仅在安全上下文(HTTPS)中可用,且支持此功能的浏览器数量有限。

DeviceMotionEventRotationRate 接口属于 设备方向事件,它提供了有关设备绕所有三个轴旋转速率的信息。

实例属性

DeviceMotionEventRotationRate.alpha 只读

绕 Z 轴的旋转量,单位为度/秒。

DeviceMotionEventRotationRate.beta 只读

绕 X 轴的旋转量,单位为度/秒。

DeviceMotionEventRotationRate.gamma 只读

绕 Y 轴的旋转量,单位为度/秒。

规范

规范
设备方向和运动
# devicemotioneventrotationrate

浏览器兼容性