Vibration Tester

Press "Start Vibration" to test your controller's vibration function.

``` ### How It Works: - This example listens for gamepad connections and disconnections. - When a game controller is connected, the `gamepadconnected` event is triggered and the index of the gamepad is saved. - The "Start Vibration" button uses the Gamepad API to initiate a vibration on the controller if it's supported. - The button initiates a `dual-rumble` effect, which enables maximum intensity on both the weak and strong motors of compatible gamepads. ### Important Notes: - The vibration functions may not be supported on all browsers or gamepads. - Browsers may require secure contexts (HTTPS) for gamepad vibration to work. - Ensure your browser has gamepad access enabled. - This example only tests the vibration feature and doesn't provide a UI to test controller buttons or axes. This setup is perfect for experimenting with how you can interact programmatically with controllers' hardware features using the web. Enjoy your interactive vibration testing!