cordova-plugin-device-gyroscope

0.2.2 • Public • Published

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 cordova-plugin-device-gyroscope@0.2.2

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);

Package Sidebar

Install

npm i cordova-plugin-device-gyroscope

Weekly Downloads

9

Version

0.2.2

License

MIT

Last publish

Collaborators

  • fuegowolf