Control three.js camera with device orientation API
// 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 do:
npm install three.orientation
MIT