cordova-plugin-device-gyroscope
v0.2.2
Published
Cordova plugin to access the device gyroscope.
Downloads
18
Maintainers
Readme
Cordova Gyroscope Plugin
This project is a fork of the old cordova-plugin-gyroscope published by Jason Yang. Thanks to him, this plugin is working.
Description
This project's idea is inspired from these two projects.
This project is merged by those two projects.
Installation
cordova plugin add [email protected]Usage
This plugin is working like the Apache Cordova Accelerometer plugin, the API is the same.
Get the current gyroscope
navigator.gyroscope.getCurrentGyroscope(gyroscopeSuccess, gyroscopeError);Watch the gyroscope
var watchID = navigator.gyroscope.watchGyroscope(gyroscopeSuccess,
gyroscopeError,
gyroscopeOptions);Stop the watch of the gyroscope
navigator.gyroscope.clearWatch(watchID);