Function reference
Every variable function, formula, parameters, and what it's for.
Functions compute a variable's value each tick. All except MasterTime read an input variable x. The result additionally passes through the common modifiers.
MasterTime
The free-running master clock, the heartbeat of most simulations.
Value: ramps from min to max at speed, then wraps around.
| Parameter | Meaning |
|---|---|
| Minimum / maximum | The cycle range (e.g. 0–360 for an angle) |
| Speed | Units per second |
Use it as the master for cams, the movement variable of paths, or the crank angle of mechanisms.
Sine
Value: amplitude · sin(2π · x / period + phase)
| Parameter | Meaning |
|---|---|
| Amplitude | Peak value |
| Period | Length of one cycle, in input units |
| Phase | Phase offset |
Feed it a MasterTime input for smooth oscillation, vibratory feeders, shakers, bobbing indicators.
TwoValuesFloat
A threshold switch.
Value: x ≥ threshold ? onValue : offValue
| Parameter | Meaning |
|---|---|
| Threshold | Switch point on the input |
| Off / on value | Output below / at-and-above the threshold |
Turns an analog input into a two-state output: position → clamp closed flag, PLC bool (0/1) → offset applied to some axis.
TwoValuesColor
Like TwoValuesFloat, but the outputs are colors, so the variable becomes bindable as an object's color source.
| Parameter | Meaning |
|---|---|
| Threshold | Switch point on the input |
| Off / on color | Hex colors output below / above |
The one-liner status lamp: bind an object's color to this variable, feed the alarm bit in. See Appearance.
Copy
Value: scaleFactor · (x + inputOffset) + outputOffset
A scaled, offset copy of another variable. The Swiss-army knife: unit conversion, inverting a direction (scale −1), staggering copies of a master, deriving a follower that lags a leader by a fixed amount.
Chain functions across variables
Functions take one input, but variables chain: MasterTime → Sine → TwoValuesFloat is three variables, each reading the previous one. The dependency order resolves the whole chain every tick, and Signal trace visualizes it.