@theopenweb/js-sensor
Version:
JavaScript sensor library for native input sensors.
61 lines (53 loc) • 1.77 kB
HTML
<html>
<head>
<title>JavaScript Sensor Abstraction js-sensor</title>
</head>
<body>
<h1>JavaScript Sensor Abstraction js-sensor</h1>
<div>
<h2>Introduction</h2>
<div>
JavaScript offers a variety of APIs for accessing device sensor data.
Obtaining this data is often done in similar but slightly different ways.
Sometimes, an easy way to get all the desired sensor data at once with little interest in the underlying mechanism is desired.
This library offers just this by abstracting JavaScript sensor events into a simple API.
</div>
</div>
<div>
<h2>Setup</h2>
<div>
1. Download bundle.js from ./dist folder or build
2. npm install @theopenwebjp/js-sensor
3. const JsSensor = require('js-sensor'); // OR use global from dist file.
4. Done!
</div>
</div>
<div>
<h2>Usage</h2>
<div>
const JsSensor = require('js-sensor');
JsSensor.watch
JsSensor.get
JsSensor.stop
</div>
</div>
<div>
<h2>Examples</h2>
<div>
<a href="./example/">Sensor examples page</a>
</div>
</div>
<div>
<h2>Build</h2>
<div>
npm run build-all
</div>
</div>
<div>
<h2>Test</h2>
<div>
npm run test
</div>
</div>
</body>
</html>