Spread to a single-value input auto-iterates the node
Both visual patches and C# source projects operate in a live environment — edits take effect immediately while the program runs. Patch changes preserve node state; C# code changes trigger a node restart (Dispose → Constructor). You can adjust parameters, add connections, and restructure patches while seeing results in real-time.
| Patch | Code (C#) |
|---|---|
| Data flow routing, visual connections | Performance-critical algorithms |
| Prototyping and parameter tweaking | Complex state machines |
| UI composition and layout | .NET library interop |
| Simple transformations | Native resource management |
As a rule: patch the data flow, code the algorithms.
Regions are visual constructs that control execution flow:
| Region | Purpose | C# Equivalent |
|---|---|---|
| ForEach | Iterate over Spread elements | foreach loop |
| If | Conditional execution | if/else |
| Switch | Multi-branch selection | switch |
| Repeat | Loop N times | for loop |
| Accumulator | Running aggregation | Aggregate/Fold |
Process nodes are the primary way to add state to patches:
Channels provide two-way data binding:
IChannel — observable value container
.Value — read or write the current value
true pulse (trigger)
true and false
Changed node to detect when a value changes between frames
For common patterns reference, see patterns.md.
共 1 个版本