- From: Alexander Shalamov via GitHub <sysbot+gh@w3.org>
- Date: Wed, 01 Mar 2017 14:21:09 +0000
- To: public-device-apis-log@w3.org
For basic use-cases we can add predefined set of orientations
@pozdnyakov wdyt?
```
enum Orientation {
"Portrait",
"PortraitFlipped",
"Landscape",
"LandscapeFlipped",
....
};
interface DeviceOrientation : Sensor {
// 4x4 rotation matrix
void populateRotationMatrix(Float32Array);
// populates quaternion [cos(θ/2), x*sin(θ/2), y*sin(θ/2),
z*sin(θ/2)]
void populateQuaternion(Float32Array);
// For basic use-cases
readonly attribute Orientation orientation;
};
```
--
GitHub Notification of comment by alexshalamov
Please view or discuss this issue at
https://github.com/w3c/sensors/issues/170#issuecomment-283352227 using
your GitHub account
Received on Wednesday, 1 March 2017 14:21:18 UTC