Gamepad

Gamepad

package js-html

Available on js

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

Documentation Gamepad by Mozilla Contributors, licensed under CC-BY-SA 2.5.

See:

Variables

read only axes:Array<Float>

An array representing the controls with axes present on the device (e.g. analog thumb sticks).

read only buttons:Array<GamepadButton>

An array of gamepadButton objects representing the buttons present on the device.

read only connected:Bool

A boolean indicating whether the gamepad is still connected to the system.

read only id:String

A DOMString containing identifying information about the controller.

read only index:Int

An integer that is auto-incremented to be unique for each device currently connected to the system.

read only mapping:GamepadMappingType

A string indicating whether the browser has remapped the controls on the device to a known layout.

read only timestamp:Float

A DOMHighResTimeStamp representing the last time the data for this gamepad was updated. Note that this property is not currently supported anywhere.

© 2005–2016 Haxe Foundation
Licensed under a MIT license.
http://api.haxe.org/js/html/Gamepad.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部