three-game-engine
Version:
Simple light-weight game engine using three.js, three-mesh-ui and rapier
22 lines (21 loc) • 737 B
TypeScript
declare class GamepadHandler {
gamepads: (Gamepad | null)[];
apiSupported: boolean;
constructor();
isGamepadAPISupported(): boolean;
setup(): void;
teardown(): void;
anyGamepadConnected(): boolean;
_onGamePadConnected: (event: any) => void;
_onGamePadDisconnected: (event: any) => void;
readGamepads(): void;
getButtonIndex(button: number | string): number;
getButton(button: number | string): GamepadButton | null;
isButtonPressed(button: number | string): boolean;
readButtonValue(button: number | string): number;
readAxisValue(axisIndex: number): number;
readVerticalAxis(): number;
readHorizontalAxis(): number;
print(): void;
}
export default GamepadHandler;