By entering this site you need to consent to the use of cookies and their functional use according to this privacy policy. Cookies help us to provide the functional services of the website. Kindly read the below message of use and consent to the use.
The following cookies are stored and shared when accessing this website:
- Internal cookies for the MediaWiki site. This is used for user authentication and article modifications.
- Third-party cookies from Google providing services for Google AdSense and Google Analytics
We will never use data collected outside of the above scope.
The browser's now-outdated gamepad API provides information about the states of the circle pad, C-stick, and every button aside from the Home and Power buttons. The gamepad, which has an ID of <code>New Nintendo 3DS Controller</code>, is contained within the array returned by the <code>navigator.webkitGetGamepads</code> function.
+
+
The gamepad's <code>axes</code> array contains four floating-point numbers in the following order:
+
+
{|class="wikitable" width="20%"
+
! Index !! Axis
+
|-
+
| 0 || Circle pad X
+
|-
+
| 1 || Circle pad Y
+
|-
+
| 2 || C-stick X
+
|-
+
| 3 || C-stick Y
+
|}
+
+
Each coordinate ranges from -1.0 (left/up) to 1.0 (right/down). Neutral position is indicated by 0.0. Drift and/or inaccurate calibration may make these exact values unattainable.
+
+
The gamepad's <code>buttons</code> array contains numbers for the following numbers:
+
{|class="wikitable" width="20%"
+
! Index !! Button
+
|-
+
| 0 || B
+
|-
+
| 1 || A
+
|-
+
| 2 || Y
+
|-
+
| 3 || X
+
|-
+
| 4 || L
+
|-
+
| 5 || R
+
|-
+
| 6 || ZL
+
|-
+
| 7 || ZR
+
|-
+
| 8 || Select
+
|-
+
| 9 || Start
+
|-
+
| 10 || Unknown
+
|-
+
| 11 || Unknown
+
|-
+
| 12 || Up
+
|-
+
| 13 || Down
+
|-
+
| 14 || Left
+
|-
+
| 15 || Right
+
|}
+
+
Each number is 0 while its associated button is not pressed, and 1 while the button is pressed.
+
+
The two unknown button numbers may have been intended for the Home and Power buttons, but they are always 0, even if the web browser is used while the Home and/or Power buttons are pressed.