Back to Aframe

magicleap-controls

docs/components/magicleap-controls.md

1.7.11.9 KB
Original Source

The magicleap-controls component interfaces with the Magic Leap controller. It wraps the tracked-controls component while adding button mappings, events, and Magic Leap controller model/

Example

html
<!-- Match Magic Leap controller if present, regardless of hand. -->
<a-entity magicleap-controls></a-entity>

<!-- Match Magic Leap controller if present and for specified hand. -->
<a-entity magicleap-controls="hand: left"></a-entity>
<a-entity magicleap-controls="hand: right"></a-entity>

Value

PropertyDescriptionDefault
handThe hand that will be tracked (e.g., right, left).
modelWhether the Magic Leap controller model is loaded.true

Events

Event NameDescription
touchpadchangedTouchpad changed.
touchpaddownTouchpad pressed.
touchpadmovedTouchpad axis changed.
touchpadupTouchpad released.
touchpadtouchstartTouchpad touched.
touchpadtouchendTouchpad not touched.
gripchangedGrip changed.
gripdownGrip pressed.
gripupGrip released.
triggerchangedTrigger changed.
triggerdownTrigger pressed.
triggerupTrigger released.
menuchangedMenu changed.
menudownMenu pressed.
menuupMenu released.

Assets