AbsoluteOrientationSensor: AbsoluteOrientationSensor() コンストラクター
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
AbsoluteOrientationSensor()
コンストラクターは、地球の参照用座標系に対するデバイスの物理的な向きを表す新しい AbsoluteOrientationSensor
オブジェクトを生成します。
構文
js
new AbsoluteOrientationSensor()
new AbsoluteOrientationSensor(options)
引数
options
省略可-
以下のオプションがあります。
frequency
-
1 秒間にサンプルを何回取得したいかであり、
reading
イベントが呼ばれる 1 秒あたりの回数になります。整数または小数が使用でき、小数は 1 秒に 1 回未満の頻度を設定するのに用います。実際の取得頻度はデバイスハードウェアに依存するので、要求値より少なくなる可能性があります。 referenceFrame
-
'device'
または'screen'
です。デフォルトは'device'
です。
仕様書
Specification |
---|
Orientation Sensor # dom-absoluteorientationsensor-absoluteorientationsensor |
ブラウザーの互換性
関連情報
reading
イベント