forked from realityeditor/server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemp
41 lines (40 loc) · 2.07 KB
/
temp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
function BlockLink() {
// origin block UUID
this.nodeA = null;
// item in that block
this.logicA = 0;
// destination block UUID
this.nodeB = null;
// item in that block
this.logicB = 0;
// check if the links are looped.
this.loop = false;
// Will be used to test if a link is still able to find its destination.
// It needs to be discussed what to do if a link is not able to find the destination and for what time span.
this.health = 0; // todo use this to test if link is still valid. If not able to send for some while, kill link.
}
function Link() {
// The origin object from where the link is sending data from
this.objectA = null;
// The origin IOPoint from where the link is taking its data from
this.nodeA = null;
// if origin location is a Logic Node then set to Logic Node output location (which is a number between 0 and 3) otherwise null
this.logicA = null;
// Defines the type of the link origin. Currently this function is not in use.
this.namesA = ["",""];
// The destination object to where the origin object is sending data to.
// At this point the destination object accepts all incoming data and routs the data according to the link data sent.
this.objectB = null;
// The destination IOPoint to where the link is sending data from the origin object.
// objectB and nodeB will be send with each data package.
this.nodeB = null;
// if destination location is a Logic Node then set to logic block input location (which is a number between 0 and 3) otherwise null
this.logicB = null;
// Defines the type of the link destination. Currently this function is not in use.
this.namesB = ["",""];
// check that there is no endless loop in the system
this.loop = false;
// Will be used to test if a link is still able to find its destination.
// It needs to be discussed what to do if a link is not able to find the destination and for what time span.
this.health = 0; // todo use this to test if link is still valid. If not able to send for some while, kill link.
}