Re: [sensors] Provide the DeviceOrientation sensor

> Vectors and quaternions are easy

Well, are they really?

There's a different cost to each API:

```js
sensor.quaternion; // returns TypedArray 
```
benefit: simpler than BYOB, plays well with WebGL
cost: GC

```js
sensor.acceleration, sensor.x, sensor.y, sensor.z  ; // returns floats
 corresponding to the quaternion values
```
benefit: simpler than BYOB, GC
cost: doesn't play well with WebGL

```js
sensor.buffer = buffer;
requestAnimationFrame(_ => buffer); // returns TypedArray
```
benefit: GC, plays well with WebGL
cost: dev complexity, especially for simple cases

-- 
GitHub Notification of comment by tobie
Please view or discuss this issue at 
https://github.com/w3c/sensors/issues/170#issuecomment-283118404 using
 your GitHub account

Received on Tuesday, 28 February 2017 18:54:06 UTC