new Gamepad(gamepad, id, deadzone, height) → {platypus.Gamepad}
This class defines an axis-aligned bounding box (AABB) which is used during the collision process to determine if two objects are colliding. This is used in a few places including CollisionBasic and [[Collision-Shape]].
- Source:
Parameters:
Name | Type | Description |
---|---|---|
gamepad |
number
|
The browser's gamepad object. |
id |
number
|
Id of gamepad. |
deadzone |
number
|
distance from axis |
height |
number
|
The height of the AABB. |
Methods
(static) recycle(gamepad)
Returns a Gamepad back to the cache.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
gamepad |
platypus.Gamepad
|
The Gamepad to be recycled. |
(static) setUp() → {platypus.Gamepad}
Returns an Gamepad from cache or creates a new one if none are available.
- Source: