This is controller on the javascript.
- Using GamePadAPI
- Chrome / FireFox
// onacon instance
var onacon = new Onacon();
// start measuring
onacon.start();
// (navigator.webkitGetGamepads && navigator.webkitGetGamepads())[i]
onacon.onacons(i);
// fps
onacon.fps();
// velocity of i
onacon.velocity(i);
// all velocities
onacon.velocity();
// array of strokes
onacon.allStrokes();
// measuring time
onacon.allStrokes();
// setting shoot method foe gamepad[i]
onacon.shoot(i,function(){
// do something
});
// stop measuring
onacon.stop();