OrientationSensor:populateMatrix() 方法
OrientationSensor 介面的 populateMatrix() 方法使用基於最新感測器讀數的旋轉矩陣來填充給定的目標矩陣。旋轉矩陣如下所示。

其中
- W = cos(θ/2)
- X = Vx * sin(θ/2)
- Y = Vy * sin(θ/2)
- Z = Vz * sin(θ/2)
語法
js
populateMatrix(targetMatrix)
由於 OrientationSensor 是一個基類,因此 populateMatrix 只能從其派生類之一中讀取。
引數
targetMatrix-
待定
返回值
無(undefined)。
示例
js
// TBD
規範
| 規範 |
|---|
| 方向感測器 # orientationsensor-populatematrix |
瀏覽器相容性
載入中…