Skip to content

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.

The haptics playground simulating a DualSense: haptic preset buttons, a stereo pan slider, trigger presets, and lightbar colors

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.

A small keyboard arcade shooter running in controller mode with the 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.

The diagnostics example simulating two sticks: circularity rings, a normal left stick, and a drifting right stick

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.