sensor-gyroscope

Web component for the DeviceMotion API.


Keywords
web-component, web-components, polymer, gyroscope, sensor
License
Apache-2.0
Install
bower install sensor-gyroscope

Documentation

#sensor-gyroscope See the component page for more information.

#Installation

bower install sensor-gyroscope

#Use

<sensor-gyroscope></sensor-gyroscope>
<script>
  var gyroscope = document.querySelector('sensor-gyroscope');
  gyroscope.addEventListener('onGyroscopeUpdate', function(e) {
    console.log('alpha:' + this.alpha,
                'beta:' + this.beta,
                'gamma:' + this.gamma);
  });
</script>