24 lines
586 B
JavaScript
24 lines
586 B
JavaScript
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();
|
|
}
|
|
}
|