W3C home > Mailing lists > Public > public-device-apis@w3.org > November 2017

[sensors] motion sensors polyfill

From: Kostiainen, Anssi <anssi.kostiainen@intel.com>
Date: Mon, 27 Nov 2017 20:41:28 +0000
To: W3C Devices and Sensors WG <public-device-apis@w3.org>
CC: "Christiansen, Kenneth R" <kenneth.r.christiansen@intel.com>
Message-ID: <113DDE8B-EE04-472B-8AE8-36BE31DC06FE@intel.com>
Hi All,

Kenneth started working on a polyfill for Generic Sensor-based motions sensors (thanks!) to make migration from the old DeviceOrientationEvent/DeviceMotionEvent to the new Generic Sensor-based APIs a smoother experience:

https://github.com/kenchris/sensor-polyfills
https://www.npmjs.com/package/motion-sensors-polyfill

In particular, this polyfill will allow the users of all modern browsers (Chrome has had a native implementation since 63 [1]) to get a feel of the new API shape.

Currently, the polyfill contains an early implementation of the following interfaces:

Accelerometer
https://w3c.github.io/accelerometer/#accelerometer-interface

LinearAccelerationSensor
https://w3c.github.io/accelerometer/#linearaccelerationsensor-interface

GravitySensor
https://w3c.github.io/accelerometer/#gravitysensor-interface

Gyroscope
https://w3c.github.io/gyroscope/#gyroscope-interface

RelativeOrientationSensor
https://w3c.github.io/orientation-sensor/#relativeorientationsensor-interface

AbsoluteOrientationSensor
https://w3c.github.io/orientation-sensor/#absoluteorientationsensor-interface

Test drive the early release and report any bugs in GitHub:

https://github.com/kenchris/sensor-polyfills

Thanks,

-Anssi

[1] https://developers.google.com/web/updates/2017/09/sensors-for-the-web
Received on Monday, 27 November 2017 20:42:00 UTC

This archive was generated by hypermail 2.3.1 : Monday, 27 November 2017 20:42:00 UTC