- From: Marcos Cáceres via GitHub <sysbot+gh@w3.org>
- Date: Thu, 21 Apr 2016 01:56:16 +0000
- To: public-device-apis@w3.org
Drive by comment... 🚗 🔫🔫🔫 This is really screaming to be an observable. You could observe changes on the gyroscope and filter out the ones that don't meet the criteria, and then emit each "step". I'm a bit concerned about seeing so many classes being used (e.g., PedometerReading, SensorReadingEvent), when I think one really just wants to be working with the underlying data to create different abstractions on top. Ideally, you would never need to extend Sensor at all (as it only helps for the purpose of the WebIDL binding to the underlying platform) - and instead could compose these observables into different kinds of abstractions (i.e., like "Pedometer", or whatever ). Yes, we would need to sit down and figure out what all this looks like as an implementation using obsevables... I'm not saying we shouldn't also allow Classes to be used (because we need them for the WebIDL binding), but they appear to be the totally wrong abstraction to use in user-land code. -- GitHub Notification of comment by marcoscaceres Please view or discuss this issue at https://github.com/w3c/sensors/issues/42#issuecomment-212693138 using your GitHub account
Received on Thursday, 21 April 2016 01:56:19 UTC