DeviceMotionEvent: rotationRate プロパティ

Baseline 2023
Newly available

Since September 2023, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.

DeviceMotionEvent.rotationRate は読み取り専用プロパティで、端末がそれぞれの軸を中心に回転している秒あたりの角度を返します。

メモ: ハードウェアがこの情報を提供できない場合、このプロパティは null を返します。

rotationRate プロパティは読み取り専用のオブジェクトで、端末の各軸に沿った回転速度を記述します。

alpha

端末が Z 軸を中心に回転している速度です。つまり、画面に垂直な線を中心に回転している速度です。

beta

端末が X 軸、つまり後ろから横に向かう軸を中心に回転している速度です。

gamma

端末が Y 軸、つまり横から横へ向かう軸を中心に回転している速度です。

仕様書

Specification
Device Orientation and Motion
# ref-for-dom-devicemotionevent-rotationrate②

ブラウザーの互換性

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
rotationRate

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support

関連情報