assassin-bug/framework/resonator/effects/base-effect.js

24 lines
586 B
JavaScript
Raw Permalink Normal View History

2022-11-26 01:22:02 +00:00
export default class BaseEffect {
constructor(context, graph, params) {
this.graph = graph;
this.context = context;
this.effectParams = params;
}
connectOutput(node) {
this.effectNode.connect(node);
}
connectInput(node) {
this.inputNode = node;
if (this.effectNode) {
this.inputNode.connect(this.effectNode);
}
}
getOutput() {
return this.effectNode;
}
disconnect() {
this.inputNode.disconnect();
this.effectNode.disconnect();
}
}