Project Tango plugin for Cordova.
Installation:
cordova plugin add https://github.com/PyryM/Tangova.git
(For general installation of Cordova+Crosswalk see this documentation)
Usage:
// simplest way to start motion tracking on an ADF with one callvaradfName="herblab";//note: you use the *name* and not the *uuid*//leave adfName as null or "" to not load an adfTangova.start(tangoCallback,onErrorCallback,adfName);// to stop the motion tracking// note: these callbacks won't be called at the moment (but the function does work)Tangova.stopTango(successCallback,errorCallback);// to set the maximum pose update rate (starts at 30hz)Tangova.setMaxUpdateRate(15.5);// 15.5 hzThe callback passed into start will receive pose updates:
functiontangoCallback(data){if(data.baseFrame==="AREA_DESCRIPTION"){// localized against the loaded area description}elseif(data.baseFrame==="START_OF_SERVICE"){// localized against where the tango was when the service started}console.log(data.rotation);console.log(data.translation);}