- From: Rich Tibbett <richt@opera.com>
- Date: Tue, 12 Aug 2014 14:35:42 +0200
- To: Jonas Sicking <jonas@sicking.cc>
- Cc: Mounir Lamouri <mounir@lamouri.fr>, Webapps WG <public-webapps@w3.org>, Tim Volodine <timvolodine@google.com>
On Mon, Aug 11, 2014 at 11:33 PM, Jonas Sicking <jonas@sicking.cc> wrote: > On Fri, Aug 8, 2014 at 6:44 AM, Mounir Lamouri <mounir@lamouri.fr> wrote: >> Maybe this feedback should be more for DeviceOrientation than Screen >> Orientation. There has been a few discussions there >> (public-geolocation). > > This is the type of procedural issues that I'd really rather not get > caught in. I think it's fine to defer to the DeviceOrientation spec, > but only if we think there's any chance of it getting added there > anytime soon. Given that no drafts, to my knowledge, has been > published for a DeviceOrientation v2, that does not seem to be the > case. > >> Anyway. I am not convinced that adding new properties will really fix >> how developers handle this. I asked around and it seems that native >> platforms do not expose Device Orientation relative to the screen. I am >> not sure why we should expose something different on the Web platform. > > I don't think the fact that other platforms do not supply screen > relative orientation events is a strong technical argument for why we > shouldn't. > > I'm definitely in favor of looking at what other platforms do, but not > with the mindset that what other platforms do is the right thing to > do, but rather to see if they have good solutions that we could learn > from. Surely other platforms will make design mistakes, just like we > do. > >> I think we should work on providing developers the right tools in order >> for them to do the right thing. > > I totally agree with this. For all the use cases that I can think of > for getting the coordinates relative to the screen is more important > than relative to the device. This includes: > > * A navigation page which shows a map as well as how the device is > oriented relative to the map. > * A navigation page which shows a map orientated so that the on-screen > map matches real world. > * A game where an in-game character is controlled by tilting the > device left and right to make the character walk left vs. right. > > I'm sure there are use cases where you need to know the orientation > relative to the device rather than relative to the screen, they just > seem to be less common to me. > > Given that, the right tool seems to be to provide the > DeviceOrientation events relative to the screen and allow them to be > compensated to be relative to the device if needed. > > Sadly it's too late for that. Authors already have the wrong tool as a > default since the DeviceOrientation spec is written and implemented > the way it is. > > However we can at least give authors the right tool as well, by > introducing screeAlpha etc. > >> For example, without the Screen >> Orientation API, they do not know the relative angle between the device >> natural orientation and the screen. This API is not yet widely >> available. Some version of it ships in Firefox and IE but is prefixed. >> It should be in Chrome Beta soon. > > I don't think "the right tool to do the right thing" in this case > means "give them coordinates in a coordinate system that they don't > want, and then give them enough information to transform the > coordinate into the coordinate system that they do want". > > I'm not arguing that we remove the relative angle that's in the spec > right now. I'm arguing that for device orientation events, we should > provide coordinates relative to the screen as well. This topic was filed as an issue against the DeviceOrientation spec in March (https://github.com/w3c/deviceorientation/issues/4). Interest from implementers is a strong indicator to proceed with such spec additions. Active implementer engagement around spec clarifications and additions is quite low right now. > > / Jonas
Received on Tuesday, 12 August 2014 12:36:16 UTC