Skip to main content

Flow and interactivity

Most Rete scripts are data flow: values travel along the wires, and a component runs when its inputs change. That is enough to build any model. Some scripts also need to happen over time or on an event: spin a part on every frame, count clicks, add a shape each second, react to a key. For that, Rete has flow components, under flow in the palette.

Action wires​

Flow components have action sockets beside their data sockets: small arrows instead of circles. The wires between them are drawn green, dashed and moving, so you can tell them from data wires at a glance. An action wire does not carry a value; it carries the moment: when the component on its left fires, the component on its right runs, reads the values on its data inputs at that moment, and fires its own action output in turn.

When a script has a start component, pressing Run The Code starts the flow from it, once. Without one, the script runs as data flow, as usual.

The flow components​

GroupComponentWhat it does
actionsstartfires once, when the script runs
actionstriggerfires each time you press its button
actionskeyboard, mouse clickfire when the chosen key or mouse button goes down or up
timeintervalfires at once and then every so many milliseconds, for ever or for a set number of times
timedelayfires once, so many milliseconds after it is reached
counterscounter, counter min max, counter stepscount how often they are reached, by a step, between limits or through a list of values, and give the count as a number
logicflip flopfires its two outputs in turn
logicboolean gate, boolean gate silent, is undefinedlet the flow through one way or the other by a condition; the silent gate fires only when the condition changes
loopsfor loop, for each loopfire their body once for each number in a range or each item of a list, then fire when complete
babylonrenderfires on every frame the 3D view draws, with the milliseconds since the last one
babylonbabylon observable listener, get event datafire when an object of the scene reports an event, such as a click on a GUI button, and read its data
babylon > guibuttonfires when a GUI button is clicked or pressed
babylon > scenepointerfires on pointer events in the 3D view: down, up, move, wheel, pick, tap and double tap

A run starts a fresh scene, so intervals, render functions and key listeners from the run before are gone when you run again.

Interactivity in the other editors​

The same behaviours are plain code in TypeScript: bitbybit.time.registerRenderFunction runs a function on every frame, and BabylonJS observables report pointer and GUI events. Blockly's time category has blocks that run code later or at an interval, on keys and pointer events, and on BabylonJS observables.

Export to runner​

A runner cannot run a flow script yet. Export to runner refuses a script that uses flow components or action wires, and says so; remove them, keeping the data flow, to export. Scripts that change over time can still be run in the editor and shared as projects.

Verified against the product in October 2026