customNode
Decorator that marks a class as a custom node.
| Type | Name | Interface Description |
|---|---|---|
| Functions | customNode(): (target: BaseUserConstructor<BasicScriptNode>) => void | • Function: Decorator that marks a class as a custom node. Custom nodes can be used in visual scripting graphs to create reusable logic blocks. This decorator should be applied to classes that extend BasicScriptNode. Returns Class decorator function |
Example
@customNode()
export class MyCustomNode extends BasicScriptNode {
@input()
public inputValue: number = 0;
@output()
public outputValue: number = 0;
public execute(): void {
this.outputValue = this.inputValue * 2;
}
}