1.0.2 • Published 4 years ago

aframe-proximity v1.0.2

Weekly downloads
3
License
ISC
Repository
github
Last release
4 years ago

aframe-proximity

A proximity detector component for Aframe that triggers an event when the distance between two entities is the established

Usage

    <a-box color="red" id="red"></a-box>
    <a-box color="blue" id="blue" proximity="target: #red; drawLine: true; distance: 10;"></a-box>
PropertyDescriptionDefault
targetAframe selector of target entity to measure distance with current entitynull
distanceThe distance where the event starts to throw1
drawLineShow or not a line between the measured objectsfalse
color1if drawLine is true, the line's color when distance es greater than distance param#0000FF
color2if drawLine is true, the line's color when distance es lower than distance param#00FF00
customDataEventA custom data (JSON as String) to attatch to event when it triggers{"message": "no custom data provided"}