Comparing version 0.0.1 to 0.0.2
@@ -1,1 +0,1 @@ | ||
module.exports = require('./src/tracking'); | ||
module.exports = require('./build/tracking'); |
{ | ||
"name": "jstracking", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "An npm compatible modern approach for Computer Vision on the web", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -23,5 +23,33 @@ # jstracking | ||
## Usage | ||
If `tracking(-min).js` is embedded in HTML, the usage of jstracking is the same | ||
as that of tracking.js. | ||
For ES6 or CommonJS modules, an example of usage is shown below. | ||
```javascript | ||
import tracking from 'jstracking'; // ES6 | ||
// Or | ||
// const tracking = require('jstracking'); // CommonJS | ||
const tracker = new tracking.ObjectTracker('face'); | ||
tracker.setInitialScale(4); | ||
tracker.setStepSize(2); | ||
tracker.setEdgesDensity(0.1); | ||
tracking.track('#video', tracker, { | ||
camera: true, | ||
fps: 10, | ||
scaled: true | ||
}); | ||
tracker.on('track', event => { | ||
// handle event... | ||
}); | ||
``` | ||
## APIs | ||
The tracking.js library APIs are all kept, so you can refer to | ||
The tracking.js library APIs are all kept, so you can refer to documentation of | ||
[tracking.js](https://trackingjs.com/) for details. | ||
@@ -28,0 +56,0 @@ |
14963664
66