vive-focus-controls
Note: This documentation is for the old 1.2.0 version of A-Frame. Check out the documentation for the current 1.6.0 version
The vive-focus-controls component interfaces with the Vive Focus controller. It wraps the tracked-controls component while adding button mappings, events, and an Vive Focus controller model that highlights the touched and/or pressed buttons (trackpad, trigger).
Example
<!-- Match Vive Focus controller if present, regardless of hand. --> |
Value
Property | Description | Default |
---|---|---|
armModel | Whether the arm model is used for positional data. | true |
buttonTouchedColor | Button colors when touched (Trackpad only). | #777777 |
buttonHighlightColor | Button colors when pressed and active. | #FFFFFF |
hand | The hand that will be tracked (e.g., right, left). | |
model | Whether the Vive Focus controller model is loaded. | true |
orientationOffset | Offset to apply to model orientation. | x: 0, y: 0, z: 0 |
Events
Event Name | Description |
---|---|
trackpadchanged | Trackpad changed. |
trackpaddown | Trackpad pressed. |
trackpadmoved | Trackpad axis changed. |
trackpadup | Trackpad released. |
trackpadtouchstart | Trackpad touched. |
trackpadtouchend | Trackpad not touched. |
triggerchanged | Trigger changed. |
triggerdown | Trigger pressed. |
triggerup | Trigger released. |
As this controller’s buttons are digital, the changed events only fire when a button is fully pressed or released (value 0 or 1).