new AxHtmlGamepadInputDevice()
Create a new AxGamepadInputDevice.
This input device uses an Html Canvas element to obtain user input from
Methods
(static) GetAxisValue(rawValue) → {Number}
Returns the floating point value of an axis by eliminating small values, which appear when the axis control is actually at rest
The returned value is in the range [-1, 1]
For internal usage
Parameters:
Name | Type | Description |
---|---|---|
rawValue |
type | The original value of the analog axis |
Returns:
The filtered value in the range [-1, 1] of the analog axis
- Type
- Number
(static) SetPropertyButtonValue(prop, button)
Sets an AxProperty value according to the value of a gamepad button
For internal usage
Parameters:
Name | Type | Description |
---|---|---|
prop |
AxProperty | The property to be set |
button |
type | The button value to be used |
AcquireGamepadProperties(gamepadIndex) → {AxHtmlGamepadProperties}
Acquires an object which holds properties for a given gamepad
For internal usage
Parameters:
Name | Type | Description |
---|---|---|
gamepadIndex |
Integer | The index of the gamepad |
Returns:
SetContext(context)
Sets the context for the input device
Parameters:
Name | Type | Description |
---|---|---|
context |
Axis | The instance of Axis, to which the input device will apply |
Update()
Updates the device.
This method is called continuously on each rendering iteration