Add method for "linking" compute nodes together
just smol standard things
This commit is contained in:
parent
958017fc5c
commit
1c4042325d
1 changed files with 6 additions and 1 deletions
|
@ -24,7 +24,7 @@ class ComputeNode {
|
||||||
* Request update of this compute node. Pushes updates to children.
|
* Request update of this compute node. Pushes updates to children.
|
||||||
*/
|
*/
|
||||||
update(timestamp) {
|
update(timestamp) {
|
||||||
if (timestamp < this.update_time) {
|
if (timestamp <= this.update_time) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.update_time = timestamp;
|
this.update_time = timestamp;
|
||||||
|
@ -52,6 +52,11 @@ class ComputeNode {
|
||||||
compute_func() {
|
compute_func() {
|
||||||
throw "no compute func specified";
|
throw "no compute func specified";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
link_to(parent_node) {
|
||||||
|
this.inputs.push(parent_node)
|
||||||
|
parent_node.children.push(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/***
|
/***
|
||||||
|
|
Loading…
Reference in a new issue