The daydream-controls component interfaces with the Google Daydream controllers.
It wraps the tracked-controls component while adding button
mappings, events, and a Daydream controller model that highlights the touched
and/or pressed buttons (trackpad).
As a first time set up, to use the Daydream controller on Chrome for Android
enable both WebVR and Gamepad Extensions experiments in chrome://flags
and relaunch the browser.
Then, open your web app, enter VR mode and place the phone inside the headset.
It can occasionally take a few seconds before the controller can be used.
Example
<!-- Match Daydream controller if present, regardless of hand. --> <a-entitydaydream-controls></a-entity>
<!-- Match Daydream controller if present and for specified hand. --> <a-entitydaydream-controls="hand: left"></a-entity> <a-entitydaydream-controls="hand: right"></a-entity>
Value
Property
Description
Default
armModel
Whether the arm model is used for positional data.
true
buttonColor
Button colors when not pressed.
#000000
buttonTouchedColor
Button colors when touched.
#777777
buttonHighlightColor
Button colors when pressed and active.
#FFFFFF
hand
Set hand that will be tracked (i.e., right, left).