mirror of https://github.com/lgc-4/DataTools3.git
17 lines
390 B
JavaScript
17 lines
390 B
JavaScript
class Duplicator extends Box {
|
|
constructor() {
|
|
super("Duplicator");
|
|
|
|
let input = new Connector(Connector.INPUT, "any", "");
|
|
input.addListener((d) => {
|
|
for (let output of this.outputs) {
|
|
output.send(d);
|
|
}
|
|
});
|
|
|
|
this.inputs.push(input);
|
|
|
|
this.outputs.push(new Connector(Connector.OUTPUT, "any", ""));
|
|
this.outputs.push(new Connector(Connector.OUTPUT, "any", ""));
|
|
}
|
|
} |