Skip to content

docs: add @nativescript/canvas-gamepad - #1

Merged
triniwiz merged 1 commit into
mainfrom
docs/canvas-gamepad
Sep 28, 2026
Merged

triniwiz merged 1 commit into
mainfrom
docs/canvas-gamepad

Conversation

@triniwiz

@triniwiz triniwiz commented Sep 28, 2026 •

Copy link
Copy Markdown
Member

Adds docs for @nativescript/canvas-gamepad, the Gamepad API package added in 3.0.0-alpha.17.

What's in it

  • New page /plugins/canvas-gamepad:
    • Installing it alongside the polyfill.
    • Reading input: polling, the standard mapping, dead zones, and detecting a single press.
    • Connection events.
    • A standalone example that doesn't use the polyfill.
    • Platform notes and differences from browsers.
  • Live demo, a controller tester. It runs on the browser's own Gamepad API, so readers can try it with a real controller. The tester source (.vitepress/theme/demos/gamepad-tester.ts) uses only web APIs. The page embeds it with <<<, so the code shown is exactly what runs, and it runs unchanged in a NativeScript app with the polyfill.
  • Links from the sidebar, packages index, ecosystem table, polyfill globals table, and a new "Game controllers" section on Events and Input.

Testing

  • npm run build passes and the <<< include renders.
  • I checked the tester in headless Chrome with a stubbed navigator.getGamepads(), in both the connected and waiting states. I haven't tried it with a real controller.

Add a Gamepad API page with a live controller tester that runs on the
browser's own Gamepad API. The tester source is embedded in the page,
so the code shown is the code running. Covers usage with and without
the polyfill, the standard mapping, dead zones, press detection,
platform notes and differences from browsers.

Link the package from the sidebar, packages index, ecosystem table,
polyfill globals table and the Events and Input page.
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying canvas-nativescript-org with  Cloudflare Pages  Cloudflare Pages

Latest commit: 4f31ee0
Status: ✅  Deploy successful!
Preview URL: https://be78cf6c.canvas-nativescript-org.pages.dev
Branch Preview URL: https://docs-canvas-gamepad.canvas-nativescript-org.pages.dev

View logs

@coderabbitai

coderabbitai Bot commented Sep 28, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 99510697-ef43-4a50-b776-7973b1954894

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@triniwiz
triniwiz merged commit fa244b9 into main Sep 28, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant