Re: [sensors] Investigate possibility of synchronizing coordinate systems

@kenchris' https://github.com/kenchris/sensor-polyfills now implements the synchronization of the sensor and screen coordinate systems as discussed in this issue. The sync is enabled by default in the polyfill for testing purposes.

To try it out:
- disable the OS-level screen orientation lock
- if on Chrome 63+ disable the native Generic Sensor API support via `chrome://flags/#enable-generic-sensor`
- go to https://intel.github.io/generic-sensor-demos/orientation-phone/

When you change the orientation from portrait to landscape and back, you should see the back of the rendered object always point towards the center of the Earth.

Would people like to see this feature cherry picked into the v1 spec and implemented natively? 

If so, we should spec the opt-in mechanism. The most obvious extension point would be to add a new flag to [`SensorOptions`](https://w3c.github.io/sensors/#dictdef-sensoroptions) defaulting to what is currently specified.

I'll start the bikeshedding with an initial name proposal for such a flag: `syncScreenCoords` :innocent:

```
let orientation = new AbsoluteOrientationSensor({ syncScreenCoords: true });
```

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

Received on Tuesday, 19 December 2017 10:58:08 UTC