In this episode of HTTP 203 Jake and Surma go over the code that’s needed to use a Joy-Con (a Nintendo Switch Controller) on the web, which they also use for their own slide decks.
As mentioned it’s not possible to get the orientation of the Joy-Con via (the current version of) the Gamepad API. To get the orientation today, you can use the WebHID API (which is only supported by Chromium at the time of writing 😢)