# Examples

> Three complete single-file HTML examples of @gamepadly/sdk with built-in simulations, hosted on gamepadly.com and GitHub Pages.

Source: https://gamepadly.com/sdk/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

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](https://gamepadly.com/sdk/examples/playground)
- GitHub Pages: [gamepadly.github.io/gamepadly-sdk/examples/playground.html](https://gamepadly.github.io/gamepadly-sdk/examples/playground.html)
- Source: [`examples/playground.html`](https://github.com/gamepadly/gamepadly-sdk/blob/main/examples/playground.html)

## 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](https://gamepadly.com/sdk/start/add-controller).

- Live: [gamepadly.com/sdk/examples/bridge-arcade](https://gamepadly.com/sdk/examples/bridge-arcade)
- GitHub Pages: [gamepadly.github.io/gamepadly-sdk/examples/bridge-arcade.html](https://gamepadly.github.io/gamepadly-sdk/examples/bridge-arcade.html)
- Source: [`examples/bridge-arcade.html`](https://github.com/gamepadly/gamepadly-sdk/blob/main/examples/bridge-arcade.html)

## 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](https://gamepadly.com/sdk/guides/diagnostics).

- Live: [gamepadly.com/sdk/examples/diagnostics](https://gamepadly.com/sdk/examples/diagnostics)
- GitHub Pages: [gamepadly.github.io/gamepadly-sdk/examples/diagnostics.html](https://gamepadly.github.io/gamepadly-sdk/examples/diagnostics.html)
- Source: [`examples/diagnostics.html`](https://github.com/gamepadly/gamepadly-sdk/blob/main/examples/diagnostics.html)
