--- title: DeviceMotionEvent.rotationRate slug: Web/API/DeviceMotionEvent/rotationRate tags: - API - DOM - Firefox OS - 传感器 - 运动传感器 - 需要示例 translation_of: Web/API/DeviceMotionEvent/rotationRate ---
{{ ApiRef("Device Orientation Events") }}
返回设备围绕其每个轴(x、y、z)旋转的速率(单位:度/秒)。
var rates = instanceOfDeviceMotionEvent.rotationRate;
rotationRates属性是一个只读对象,用于描述设备围绕其每个轴的旋转速率:
alpha
beta
gamma
Specification | Status | Comment |
---|---|---|
{{SpecName('Device Orientation')}} | {{Spec2('Device Orientation')}} | Initial specification. |
{{CompatibilityTable}}
Feature | Chrome | Edge | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
---|---|---|---|---|---|---|
Basic support | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} | {{CompatGeckoDesktop("6")}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} |
Feature | Android | Edge | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|---|
Basic support | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} | {{CompatGeckoMobile("6")}} | {{CompatNo}} | {{CompatNo}} | 4.2 |