- From: Maciej Stachowiak <mjs@apple.com>
- Date: Fri, 23 Jul 2010 01:18:27 -0700
- To: Dean Jackson <dino@apple.com>
- Cc: public-geolocation@w3.org
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. Regards, Maciej
Received on Friday, 23 July 2010 08:19:00 UTC