CLASSES
TagsA - Z

Gamepad

Gamepad

Description

class Gamepad

Constructor

new Gamepad(id, index, browserGamepad, leftStickX, leftStickY, rightStickX, rightStickY)

Parameters

Name Type Description
id string
index number
browserGamepad any
optional leftStickX number
optional leftStickY number
optional rightStickX number

Members

id : string

index : number

browserGamepad : any

type : number

static GAMEPAD : number

static GENERIC : number

static XBOX : number

static POSE_ENABLED : number

isConnected : boolean

leftStick : StickValues

rightStick : StickValues

Methods

onleftstickchanged(callback) void

Parameters

Name Type Description
callback (values: StickValues) => void

onrightstickchanged(callback) void

Parameters

Name Type Description
callback (values: StickValues) => void

update() void

dispose() void