function Gamepad() {
	this.available = false;

	// buttons
	this.btn  = {};
	this.btnp = {};
	this.btnr = {};

	// axes
	this.x = 0;
	this.y = 0;
	this.z = 0;
	this.w = 0;

	// trigger analog value
	this.lt = 0;
	this.rt = 0;

	this._setupButtons();
}
@class Gamepad
 @classdesc gamepad state

@attribute {boolean} available - is gamepaad available
@property {object}  btn  - button state

@property {boolean} btn.A     - A button
@property {boolean} btn.B     - B button
@property {boolean} btn.X     - X button
@property {boolean} btn.Y     - Y button
@property {boolean} btn.lb    - left bumper button
@property {boolean} btn.rb    - right bumper button
@property {boolean} btn.lt    - left trigger button
@property {boolean} btn.rt    - right trigger button
@property {boolean} btn.back  - back button
@property {boolean} btn.start - start button
@property {boolean} btn.lp    - first axis push button
@property {boolean} btn.rp    - second axis push button
@property {boolean} btn.up    - directional pad up button
@property {boolean} btn.down  - directional pad down button
@property {boolean} btn.left  - directional pad left button
@property {boolean} btn.right - directional pad right button

@property {object}  btnp - button press.   This object has the same structure as `btn` but the value are true only on button press
@property {object}  btnr - button release. This object has the same structure as `btn` but the value are true only on button release
@property {number}  x - x axe value (first stick horizontal)
@property {number}  y - y axe value (first stick vertical)
@property {number}  z - z axe value (second stick horizontal)
@property {number}  w - w axe value (second stick vertical)
@property {number}  lt - left trigger analog value
@property {number}  rt - right trigger analog value