Skip to content

GMartigny/vibrisse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vibrisse

Package version

Swiftly read device spacial sensors

Installation

npm install vibrisse

Usage

import { listen, sensors } from "vibrisse";

const api = listen(sensors.RadialAcceleration + sensors.LinearAcceleration, (readings) => {
    const radial = readings[sensors.RadialAcceleration];
    const linear = readings[sensors.LinearAcceleration];
    // ...
});
api.start();

// Later
api.stop();

Available sensors

  • Orientation - Read the gravity and its direction applied to the device
  • RadialAcceleration - Read the change in rotation momentum of the device
  • LinearAcceleration - Read the change in linear momentum of the device
  • RelativeOrientation - Read the change in orientation relative to when the sensor is set up (quaternion)
  • AbsoluteOrientation - Read the change in orientation relative to the Earth (quaternion)

License

MIT

About

😺 Swiftly read device's spatial sensors

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Sponsor this project

  •  

Packages

 
 
 

Contributors