Examples
Each example is one HTML file that loads the SDK from a CDN. No build step and no companion app. Open the source, copy it, and it runs. No controller nearby? Every example has a built-in simulation.
The same files are served as-is from GitHub Pages, with addresses that match the repository’s examples/ folder.
Haptics playground
Section titled “Haptics playground”
Try every haptic preset with a stereo pan, apply DualSense trigger effects and lightbar colors, and watch which haptic route each controller takes. A collapsed panel adds the optional L2 4-channel audio.
- Live: gamepadly.com/sdk/examples/playground
- GitHub Pages: gamepadly.github.io/gamepadly-sdk/examples/playground.html
- Source:
examples/playground.html
Keyboard game bridge
Section titled “Keyboard game bridge”
A plain keyboard Canvas shooter. The bridge adds stick movement, a DualSense trigger wall, and haptics panned to
where each shot and hit happens, in about 20 lines, without touching the game loop. Those lines are one marked
<script> block in the source. See Add a controller in 5 minutes.
- Live: gamepadly.com/sdk/examples/bridge-arcade
- GitHub Pages: gamepadly.github.io/gamepadly-sdk/examples/bridge-arcade.html
- Source:
examples/bridge-arcade.html
Controller diagnostics
Section titled “Controller diagnostics”
A custom controller tester built on @gamepadly/sdk/diagnostics: raw axes, 360° circularity rings, resting drift,
button bounce, and a tested-buttons checklist with labels that match the connected brand. See
Diagnostics.