Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ircam/motion-input

Package Overview
Dependencies
Maintainers
2
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ircam/motion-input

Module that provides unified motion data across platforms (iOS and Android) and browsers

  • 1.0.7
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-50%
Maintainers
2
Weekly downloads
 
Created
Source

motion-input

Module that provides unified motion data across platforms (iOS and Android) and browsers.

Installation

npm install [--save] collective-soundworks/motion-input

Example

motion-input

Usage

const motionInput = require('motion-input');
 
motionInput
  .init(['accelerationIncludingGravity'])
  .then(([accelerationIncludingGravity]) => {

    if (accelerationIncludingGravity.isValid) {
      accelerationIncludingGravity.addListener(val => {
        console.log(val) 
      });
    }
    // ...
  })
  .catch(err => console.error(err.stack));

Warning

Due to some weird (buggy ?) behavior in Chrome and and Firefox, if you need to use both 'acceleration' and 'orientation' modules, 'acceleration' should always be initialized and listened before 'orientation'.

FAQs

Package last updated on 30 May 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc