shamansir / elm-aframe / AFrame.Components.Controls.Daydream

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 occassionally take a few seconds before the controller can be used.

Basic

hand : AFrame.Variants.Hand.Hand -> AFrame.Properties.Property

Set hand that will be tracked (i.e., right, left).

armModel : Basics.Bool -> AFrame.Properties.Property

Whether the arm model is used for positional data.

Default : true

model : Basics.Bool -> AFrame.Properties.Property

Whether the controller model is loaded.

Default : true

Buttons colors

buttonColor : Color -> AFrame.Properties.Property

Button colors when not pressed.

Default : #000000

buttonTouchedColor : Color -> AFrame.Properties.Property

Button colors when touched.

Default : #777777

buttonHighlightColor : Color -> AFrame.Properties.Property

Button colors when pressed and active.

Default : #FFFFFF

Orientation

orientationOffset : Basics.Float -> Basics.Float -> Basics.Float -> AFrame.Properties.Property

Offset to apply to model orientation.

Default: x: 0, y: 0, z: 0