Re: DeviceOrientation comments

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.

Dean

Received on Friday, 23 July 2010 04:31:54 UTC