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

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

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

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