Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/evt/lib/types/lib.dom.ts>Gamepad

💧EventEmitter's typesafe replacement
Go to Latest
interface Gamepad
import { type Gamepad } from "https://deno.land/x/evt@v2.5.3/lib/types/lib.dom.ts";

This Gamepad API interface defines an individual gamepad or other controller, allowing access to information such as button presses, axis positions, and id.

Properties

readonly
axes: ReadonlyArray<number>
readonly
buttons: ReadonlyArray<GamepadButton>
readonly
connected: boolean
readonly
hand: GamepadHand
readonly
hapticActuators: ReadonlyArray<GamepadHapticActuator>
readonly
id: string
readonly
index: number
readonly
mapping: GamepadMappingType
readonly
pose: GamepadPose | null
readonly
timestamp: number