OrientationSensor: quaternion property
The quaternion read-only property of the OrientationSensor interface returns a four element Array whose elements contain the components of the unit quaternion representing the device's orientation.
Because OrientationSensor is a base class, quaternion may only be read from one of its derived classes.
Value
An Array whose values are the x, y, z, and w components of the quaternion representing the device orientation.
Examples
Specifications
Browser compatibility
|
Desktop |
Mobile |
|
Chrome |
Edge |
Firefox |
Internet Explorer |
Opera |
Safari |
WebView Android |
Chrome Android |
Firefox for Android |
Opera Android |
Safari on IOS |
Samsung Internet |
quaternion |
67 |
79 |
No |
No |
54 |
No |
67 |
67 |
No |
48 |
No |
9.0 |