vvvv-patching
20
总安装量
20
周安装量
#18143
全站排名
安装命令
npx skills add https://github.com/tebjan/vvvv-skills --skill vvvv-patching
Agent 安装分布
codex
19
opencode
18
github-copilot
18
gemini-cli
17
amp
16
kimi-cli
16
Skill 文档
vvvv Patching Patterns
Dataflow Basics
- Left-to-right, top-to-bottom execution order
- Links carry data between pads (input/output connection points)
- Spreading â connecting a
Spread<T>to a single-value input auto-iterates the node - Every frame, the entire connected graph evaluates; disconnected subgraphs are skipped
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.
When to Patch vs Write C#
| 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
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 in Patches
Process nodes are the primary way to add state to patches:
- They have a Create region (runs once) and an Update region (runs each frame)
- Internal state persists between frames
- Can contain sub-patches for complex logic
Channels â Reactive Data Flow
Channels provide two-way data binding:
IChannel<T>â observable value container.Valueâ read or write the current value- Channels persist state across sessions
- Connect channels between nodes for reactive updates without explicit links
Event Handling
- Bang â a one-frame
truepulse (trigger) - Toggle â alternates between
trueandfalse - FrameDelay â delays a value by one frame (breaks circular dependencies)
- Use
Changednode to detect when a value changes between frames
Patch Organization
Naming Conventions
- Use PascalCase for patch names and node names
- Group related operations under a common category
- Use descriptive names that indicate the operation (verb + noun)
Structure
- Keep patches focused â one purpose per patch
- Extract reusable logic into sub-patches
- Use IOBox nodes for exposing parameters
- Add Pad nodes to create input/output pins on the patch boundary
Common Anti-Patterns
- Circular dependencies â use FrameDelay to break cycles
- Too many nodes in one patch â extract sub-patches
- Polling instead of reacting â use Channels for reactive updates
- Ignoring Nil â always handle null/empty Spread inputs gracefully
For common patterns reference, see patterns.md.