Skip to content

Commit

Permalink
Update Oculus Go controller documentation for WebXR (#4574)
Browse files Browse the repository at this point in the history
* Document the legacy WebVR events for oculus go controller

* WebVR uses trackpad, not just WebVR on Oculus Go
  • Loading branch information
andygill authored May 5, 2020
1 parent da94b61 commit e41651c
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions docs/components/oculus-go-controls.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,27 @@ and/or pressed buttons (trackpad, trigger).

| Event Name | Description |
| ---------- | ----------- |
| trackpadchanged | Trackpad changed. |
| trackpaddown | Trackpad pressed. |
| trackpadup | Trackpad released. |
| trackpadtouchstart | Trackpad touched. |
| trackpadtouchend | Trackpad not touched. |
| trackpadmoved | Trackpad moved. |
| touchpadchanged | Touchpad changed. |
| touchpaddown | Touchpad pressed. |
| touchpadup | Touchpad released. |
| touchpadtouchstart | Touchpad touched. |
| touchpadtouchend | Touchpad not touched. |
| touchpadmoved | Touchpad moved. |
| triggerchanged | Trigger changed. |
| triggerdown | Trigger pressed. |
| triggerup | Trigger released. |

### Legacy WebVR Browsers

Legacy WebVR browsers use the older 'trackpadXXXX' event names, rather than the
[WebXR nomenclature](https://github.com/immersive-web/webxr-input-profiles/tree/master/packages/assets/profiles)
'touchpadXXXX'. If you want to support both event types, then you can listen for both flavors of event names.

```.js
el.addEventListener('touchpadchanged', yourHandler);
el.addEventListener('trackpadchanged', yourHandler);
```

## Assets

- [Controller GLTF](https://cdn.aframe.io/controllers/oculus/go/oculus-go-controller.gltf)
Expand Down

0 comments on commit e41651c

Please sign in to comment.