@@ -24,6 +24,14 @@ Get the pointer lock status.
2424
2525An array of valid event listener types.
2626
27+ ### ` rawGamepads `
28+
29+ Get the raw ` navigator.getGamepads() ` data.
30+
31+ ### ` gamepads `
32+
33+ Get easy-to-use gamepad data, in the form of [ ` GamepadInterface ` instances] ( #gamepadinterface ) .
34+
2735---
2836
2937## Methods
@@ -58,3 +66,78 @@ Remove a listener for clicks on a `GameObject`.
5866
5967- ` gameObjectId ` &mdash ; ` string ` The ID of the ` GameObject ` .
6068- ` listener ` &mdash ; ` function ` The event listener function that was added to the event listener.
69+
70+ ---
71+
72+ ## GamepadInterface
73+
74+ Normalizes inputs for various game controllers, providing a unified interface for interacting with them.
75+
76+ Automatically generated by ` InputManager ` instances when gamepads are connected to device.
77+
78+ ---
79+
80+ ### Properties
81+
82+ #### normalized
83+
84+ Get the inputs in a normalized format to allow identical input layouts across different controllers.
85+
86+ Return format:
87+ ` { axes, buttons } `
88+
89+ #### asXB
90+
91+ Get the inputs from an XB controller.
92+
93+ Return format:
94+ ` { axes, buttons } `
95+
96+ #### asPS
97+
98+ Get the inputs from a PS controller.
99+
100+ Return format:
101+ ` { axes, buttons } `
102+
103+ #### asNS
104+
105+ Get the inputs from an NS Pro controller.
106+
107+ Return format:
108+ ` { axes, buttons } `
109+
110+ #### axes
111+
112+ Get the controller axes (normalized to two analog sticks).
113+
114+ #### buttons
115+
116+ Get the controller buttons (normalized to a standard "XB" layout: [ A/B/X/Y, d-pad, triggers/bumpers] ).
117+
118+ #### raw
119+
120+ The raw gamepad data from the ` InputManager ` .
121+
122+ Return format:
123+ ` [Gamepad, Gamepad, null, null] `
124+
125+ #### mapping
126+
127+ Get the mapping type of the gamepad.
128+
129+ #### id
130+
131+ The ID of the gamepad.
132+
133+ #### vibrationActuator
134+
135+ Access the vibration actuator of the gamepad, if available.
136+
137+ #### hapticActuators
138+
139+ Access the haptic actuators of the gamepad, if available.
140+
141+ #### hand
142+
143+ Get which hand the gamepad is associated with, if applicable.
0 commit comments