Skip to main content
Module

x/evt/mod.ts>dom.Gamepad

💧EventEmitter's typesafe replacement
Go to Latest
interface dom.Gamepad
import { type dom } from "https://deno.land/x/evt@v2.3.1/mod.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