0.1.7 • Published 7 years ago

aframe-gearvr-controls-component v0.1.7

Weekly downloads
8
License
MIT
Repository
github
Last release
7 years ago

aframe-gearvr-controls-component

A GearVR Controller component for A-Frame.

GearVR Touchpad

The gearvr-controls component interfaces with the Gear VR Touchpad controller exposed by the Carmel and Samsung Internet VR browsers. The tracked-controls component cannot provide its usual functionality, since the Gear VR touchpad has no pose. Instead, the look-controls component is used to mimic a 3DOF controller. (Note that a dummy instance of tracked-controls is currently added anyway for compatibility, since other components such as aframe-teleport-controls query for entities with that component attached.)

This component adds button mappings and events, but does not currently provide a controller model since it is assumed that end users will use this indirectly through higher level components such as the hand-controls component.

As there is only one Gear VR Touchpad, currently this component should only be bound to one hand (e.g. to the right hand, not the left).

Example

<a-entity gearvr-controls></a-entity>

Value

PropertyDescriptionDefault Value
handThe hand that will be tracked (i.e., right, left).right
modelWhether the controller model is loaded.false
rotationOffsetOffset to apply to model rotation.0

Events

Event NameDescription
trackpaddownTrackpad pressed.
trackpadupTrackpad released.

Installation

Browser

Install and use by directly including the browser files:

<head>
  <title>My A-Frame Scene</title>
  <script src="https://aframe.io/releases/0.4.0/aframe.min.js"></script>
  <script src="https://rawgit.com/chenzlabs/gearvr-controls/master/dist/aframe-gearvr-controls-component.min.js"></script>
</head>

<body>
  <a-scene>
    <a-entity gearvr-controls></a-entity>
  </a-scene>
</body>

npm

Install via npm:

npm install aframe-gearvr-controls-component

Then register and use.

require('aframe');
require('aframe-gearvr-controls-component');
0.1.7

7 years ago

0.1.6

7 years ago

0.1.5

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago