Giter VIP home page Giter VIP logo

cordova-plugin-gyroscope's People

Contributors

wjones0 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

cordova-plugin-gyroscope's Issues

how to judge the orientation of iPhone after success call back

After success call back I got different kind of orientation objects and
and I want to check whether the iPhone is in landscape or portrait orientation currently.
success call back is below:

Orientation {x: 0.02584065205703885, y: -0.3507689419159716, z: -0.1126170930161808, timestamp: 1476258447743.268}

Error: no sensors found to register gyroscope listening to

I'm trying to get the speed x,y,z positions using this code:

methods: {
  	startGyroscope: function() {
  		alert("start Gyroscope")
  		navigator.gyroscope.getCurrent(this.onSuccess, this.onError);
  	},
  	onSuccess (speed) {
  		alert("success")
  		this.speed.x = speed.x
  		this.speed.y = speed.y
  		this.speed.z = speed.z
  		this.speed.timestamp = speed.timestamp
  	},
  	onError (err) {
  		alert("code: " + err.code + " message: " + err.message)
  	}
  }

I call the startGyroscope when the page is loaded
Error code 3 with this message "no sensors found to register gyroscope listening to"

weird timestamps

Hi,
do you know why the timestamps are not in the same date format as the timestamps in the acceleration, orientation and geolocation plugins?
example

Unity

Hi,
I wanted to knew what is the unity of the vector3 returned by the getCurrent function.
Thanks for that plugin :3

An example to use

I'm sorry, i'm a beat newb. I'm able to use deviceorientation in html5, but i'm lost with your plugin
It would be kind to provide a code example.
I don't know how to use it and how to have an answer... What kind of object is returned.... Sorry...
Regards

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.