W3C home > Mailing lists > Public > public-geolocation@w3.org > July 2010

Re: DeviceOrientation comments

From: Maciej Stachowiak <mjs@apple.com>
Date: Fri, 23 Jul 2010 01:18:27 -0700
Cc: public-geolocation@w3.org
Message-id: <9FF3D724-EDB4-4D0F-92B4-C4B422AD7F45@apple.com>
To: Dean Jackson <dino@apple.com>

On Jul 22, 2010, at 9:31 PM, Dean Jackson wrote:

> On 22/07/2010, at 9:53 PM, Dean Jackson wrote:
>> My main comment/proposal is that Accelerometer Event should include the ability to return rotation around the 3 axes. 
> I've realised this is pretty silly. A new event type is a better idea.
> interface GyroscopeEvent : Event {
>  readonly attribute double xRotationRate;
>  readonly attribute double yRotationRate;
>  readonly attribute double zRotationRate;
>  void initGyroscopeEvent(....
> }
> This way implementations without gyroscopes don't need to waste space sending null values. Similar to AccelerometerEvents, if you can't support it, you fire one event with all nulls.

A) It's not really a significant waste of space to have three more fields in a transient event.

B) For applications that care about both of these, are they likely to benefit from being able to process both accelerations and rotation rates at the same time? If so, one event will be more convenient for the developer.

C) If an event is not supported, it seems more sensible to me if the implementation doesn't fire it at all, rather than repeatedly firing a fake event with no useful values.

Received on Friday, 23 July 2010 08:19:00 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:51:01 UTC