three.orientation
Version:
Control three.js camera with device orientation API
29 lines (17 loc) • 412 B
Markdown
Control three.js camera with device orientation API
``` js
// create control:
var orientationControl = require('three.orientation')(camera);
// somewhere inside request animation frame:
orientationControl.update();
```
This module depends on `THREE.js` being in a global scope
With [npm](https://npmjs.org) do:
```
npm install three.orientation
```
MIT