Console Tester is a simple, browser-based utility designed to instantly test and visualize the input from any connected gamepad (joystick, controller, etc.) using the Web Gamepad API.
It's an essential tool for developers checking browser compatibility, or gamers verifying if their controller's buttons, analog sticks, and rumble functionality are working correctly before starting a game.
The tester is available on https://astear17.sino.tw/Console_Tester
The application provides a real-time, interactive display for key controller inputs:
-
Controller Information: Displays the connected gamepad's name and ID.
-
Button Testing: Shows the pressed state and analog value (from
$0.00$ to$1.00$ ) for every button, including analog triggers. -
Analog Stick Visualization: Renders interactive canvases that show the real-time position of the Left and Right analog sticks, including their raw Axis values (from
$-1.0000$ to$1.0000$ ). -
Vibration (Rumble) Test: Allows you to test the controller's rumble feature with short, continuous, and stop functions (requires browser support).
This project is built as a single-page web application (index.html) leveraging modern web standards to provide a high-frequency input check:
| Component | Technology | Description |
|---|---|---|
| Core Functionality | JavaScript (Web Gamepad API) | Uses navigator.getGamepads() and requestAnimationFrame to poll the controller's state at a high frequency, ensuring minimal input latency. |
| Visuals (Sticks) | HTML Canvas API | The analog stick movement is rendered dynamically using the Canvas API to create a visual, central representation of the X/Y axes and the stick's position. |
| Structure & Style | HTML5 / CSS3 | Provides the structure and a clean, dark-themed, and responsive user interface. |