UNPKG

rx-winjs

Version:

Library for composing asynchronous and event-based operations in JavaScript extending the Windows WinJS library

12 lines (10 loc) 448 B
var gyrometer = Windows.Devices.Sensors.Gyrometer.getDefault(); Rx.WinJS.Gyrometer = { /** * Creates a wrapper for the Gyrometer which listens for the readingchanged event. * @returns {Observable} An observable sequence wrapping the Gyrometer's readingchanged event. */ readingChanged: function () { return fromSensorEvent(gyrometer, 'readingchanged'); } };