dom / latest / orientationsensor / quaternion.html /

OrientationSensor.quaternion

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

// TBD

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

© 2005–2021 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/OrientationSensor/quaternion