0.2.1 • Published 5 months ago

aframe-connecting-line v0.2.1

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

connecting-line

Uses the A-Frame "line" component to draw a line between points on two entities.

The position of the line is updated automatically whenever the entity at either end is moved.

Schema

PropertyDescriptionDefault
startselector for entity to draw line from
startOffsetoffset of the start of the line in the co-ordinate space of the start entity0 0 0
endselector for entity to draw line to
endOffsetoffset of the start of the line in the co-ordinate space of the end entity0 0 0
coloras per "line" component#74BEC1
opacityas per "line" component1
visibleas per "line" componenttrue
lengthAdjustmentone of: none, scale, extend, absolutenone
lengthAdjustmentValueValue used in adjusting the length of the line. Meaning depends on the lengthAdjustment parameter as follows:none: this parameter is ignoredscale: a scale factor to apply to the length of the connecting line, relative to the actual distance between start and endextend: an absolute length to extend the connecting line by (negative values will mean the line is just short of the points)absolute: an absolute length for the connecting line, irrespective of the distance between start and end.0

Installation

<script src="https://cdn.jsdelivr.net/npm/aframe-connecting-line@0.2.1/index.min.js"></script>

Examples

connecting-line.html

Code

connecting-line