-
Notifications
You must be signed in to change notification settings - Fork 282
Connection
Thomas Wagenaar edited this page Apr 14, 2017
·
3 revisions
A connection instance defines the connection between two nodes. All you have to do is pass on a from and to node, and optionally a weight.
var B = new Node();
var C = new Node();
var connection = new Connection(A, B, 0.5);
Connection properties:
Property | contains |
---|---|
from | connection origin node |
to | connection destination node |
weight | the weight of the connection |
gater | the node gating this connection |
gain | for gating, gets multiplied with weight |
There are three connection methods:
-
Methods.Connection.ALL_TO_ALL connects all nodes from group
x
to all nodes from groupy
-
Methods.Connection.ALL_TO_ELSE connects every node from group
x
to all nodes in the same group except itself -
Methods.Connection.ONE_TO_ONE connects every node in group
x
to one node in groupy
Every one of these connection methods can also be used on the group itself! (x.connect(x, METHOD)
)