W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2013

Re: Supporting Portrait-First and Landscape-First devices in HTML5 Device Orientation

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 14 Aug 2013 08:16:13 -0700
Message-ID: <CAAWBYDBG4BcHrX0gs1TTdgwLqNM5YAuBKccFLPDSVOOfRQD=+A@mail.gmail.com>
To: Dhruv Chadha <Dhruv.Chadha@microsoft.com>
Cc: "public-webapps@w3.org" <public-webapps@w3.org>
On Wed, Aug 14, 2013 at 5:22 AM, Dhruv Chadha
<Dhruv.Chadha@microsoft.com> wrote:
> Imagine a game which requires the user to hold the device in landscape
> orientation (e.g. car game). For a landscape-first devices the device height
> would the Y axis (attachment: GamePlay_Landscape_First_Device.PNG). But if
> the user has a portrait-first device, she would have to rotate the device to
> landscape to correctly play the game play.  Because the Y axis of the
> portrait-first device is still the device height, the user would continue to
> get the wrong Y axis information after rotating the device.  At this point,
> the developer has to re-map the coordinate system (Y to X and X to Y) to
> allow the game’s logic to execute correctly since the Y axis is always
> relative to the device’s native orientation. (attachment:
> GamePlay_Portrait_First_Device.PNG).
>
> That is the reason we believe it is important for the developer to know the
> device’s native orientation so they could map their axis respectively.  The
> proposal is to expose this information using a new Screen Orientation API
> and provide the developer with guidance on how to re-map the device
> orientation coordinates if they require to do so (attachment:
> Remapping_Table.PNG). Since Screen Orientation has to do with how the
> physical device is being held (portrait or landscape), exposing the native
> orientation made sense under the Screen Orientation API.

I don't see how this would help.  If the author still has to query the
native orientation to know which way to map things, they can just
*look at the width and height* instead.  If you're in landscape, the
longer dimension is the horizontal size and the shorter is the
vertical; vice versa in portrait.

Given that this is trivial to detect from existing information, I
don't see what added value this attribute would bring.

~TJ
Received on Wednesday, 14 August 2013 15:17:03 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:14:12 UTC