質問するログイン新規登録

回答編集履歴

2

追記

2020/01/04 17:22

投稿

oikashinoa
oikashinoa

スコア2826

answer CHANGED
@@ -13,7 +13,7 @@
13
13
  ページを閉じたり開いたりして実験しました。
14
14
  ページを開いた瞬間の向きからの相対値っぽいですがときどきページを閉じる前の値を覚えているような動きをしました。
15
15
 
16
- ### Generic Sensor API
16
+ ### Generic Sensor APIのAbsoluteOrientationSensor
17
17
  [Absolute orientation sensor demo](https://intel.github.io/generic-sensor-demos/orientation-phone/)
18
18
  上記Demoで想定の動き(端末が北を向く)のなら、Generic Sensor APIおよび[GitHub - kenchris/sensor-polyfills: Polyfill for Generic Sensor API](https://github.com/kenchris/sensor-polyfills)が使えそうです。
19
19
  ※iOSで使用する場合、Known issuesをみておいてください。

1

追記

2020/01/04 17:22

投稿

oikashinoa
oikashinoa

スコア2826

answer CHANGED
@@ -1,8 +1,9 @@
1
1
  ### Safari
2
2
  [DeviceOrientationEvent - WebKit JS | Apple Developer Documentation](https://developer.apple.com/documentation/webkitjs/deviceorientationevent)
3
- safariでは相対値との事です。
3
+ safariでは相対値との事です。画面右上に `API Changes:None`と有るので、仕様は変更なしと思います。
4
4
  > They are defined as an offset from an arbitrary direction—typically, the direction in which the device was held when the orientation was first obtained.
5
5
 
6
+
6
7
  ### Chrome
7
8
  [端末画面の向きと端末のモーション  |  Web  |  Google Developers](https://developers.google.com/web/fundamentals/native-hardware/device-orientation?hl=ja)
8
9
  Androidは絶対値との事…ですが、手元の実機では相対値でした。