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 |
浏览器兼容性
加载中…