input
Decorator that marks a property as an input port for custom nodes.
| Type | Name | Interface Description |
|---|---|---|
| Functions | input(type?: string): (target: any, key: string) => any | • Function: Decorator that marks a property as an input port for custom nodes. Input ports allow data to flow into the node from other nodes in a visual scripting graph. |
Example
@customNode()
export class MathNode extends BasicScriptNode {
@input()
public operandA: number = 0;
@input()
public operandB: number = 0;
@output()
public result: number = 0;
}