This commit is contained in:
2019-01-02 19:16:16 +01:00
commit e76aafc35a
34 changed files with 13596 additions and 0 deletions

29
src/nodes/Node.js Normal file
View File

@@ -0,0 +1,29 @@
import {Inputs, Outputs} from './io.js';
export default class Node {
constructor(inputNames, outputNames) {
this.__in = new Inputs(inputNames);
this.__out = new Outputs(outputNames);
this.__in.update = (name) => this.__update([name]);
}
__update(changes) {
throw new Error('__update method not implemented');
}
/**
* Input getters
*/
get in() {
return this.__in;
}
/**
* Output getters
*/
get out() {
return this.__out;
}
};