ProtoFlux:Range Loop Int: Difference between revisions

From Resonite Wiki
add range loop node
 
Almost done, just needs clarification on inclusive or exclusive.
 
(3 intermediate revisions by 2 users not shown)
Line 4: Line 4:
|Inputs=
|Inputs=
[
[
{"Name": "*", "Type": "Impulse"},
{"Name": "*", "Type": "Call"},
{"Name": "Start", "Type": "int"},
{"Name": "Start", "Type": "int"},
{"Name": "End", "Type": "int"},
{"Name": "End", "Type": "int"},
Line 11: Line 11:
|Outputs=
|Outputs=
[
[
{"Name": "LoopStart", "Type":"Impulse"},
{"Name": "LoopStart", "Type":"Call"},
{"Name": "LoopIteration", "Type":"Impulse"},
{"Name": "LoopIteration", "Type":"Call"},
{"Name": "LoopEnd", "Type": "Continuation"},
{"Name": "LoopEnd", "Type": "Continuation"},
{"Name": "Current", "Type": "int"}
{"Name": "Current", "Type": "int"}
]
]
|}}
|}}
{{Stub}}<i> Missing clarification </i>
Range Loop Int is a ProtoFlux node that allows for firing a bunch of executions like a [[ProtoFlux:For|For Loop]] except that instead of having to go one at a time from 0->count, you can specify a Start ([[Type:Int|int]]) number, End ([[Type:Int|int]]) number, and a StepSize ([[Type:Int|int]]) which all determine the range of numbers that will come out of Current ([[Type:Int|int]]) during execution and the distance between each Current ([[Type:Int|int]]) outputted.
== Inputs ==
=== * ([[Type:Int|int]]) ===
Start Execution of the Range Loop.
=== Start ([[Type:Int|int]]) ===
The number to start at when executing.
=== End ([[Type:Int|int]]) ===
The number to end at when executing.
TODO: Is this inclusive or exclusive?
=== StepSize ([[Type:Int|int]]) ===
How much to add to Start ([[Type:Int|int]]) per execution for the Current ([[Type:Int|int]]) output number.
== Outputs ==
=== LoopStart ([[Impulses|Call]]) ===
Fires when the loop starts, regardless of executions of the Range Loop.
=== LoopIteration ([[Impulses|Call]]) ===
Fires every time Current ([[Type:Int|int]]) increases by StepSize ([[Type:Int|int]]) and (has just or hasn't/hasn't)? hit the End ([[Type:Int|int]]) limit.
TODO: Is this inclusive or exclusive?
=== LoopEnd ([[Impulses|Continuation]]) ===
Fires once the loop has finished.
=== Current ([[Type:Int|int]]) ===
The current number between Start ([[Type:Int|int]]) and End ([[Type:Int|int]]). has a value during every LoopIteration ([[Impulses|Call]]).
== Examples ==
<gallery widths=480px heights=480px>
File:Protoflux_example_Range_Loop_Int.webp|Range Loop Int being used to iterate over every other character in a string using [[ProtoFlux:Get Character|Get Character]].
</gallery>


[[Category:ProtoFlux:Flow]]
[[Category:ProtoFlux:Flow]]

Latest revision as of 18:20, 16 February 2024

Range Loop
*
LoopStart
Start
LoopIteration
End
LoopEnd
StepSize
Current
Flow


This article or section is a Stub. You can help the Resonite Wiki by expanding it.

Missing clarification

Range Loop Int is a ProtoFlux node that allows for firing a bunch of executions like a For Loop except that instead of having to go one at a time from 0->count, you can specify a Start (int) number, End (int) number, and a StepSize (int) which all determine the range of numbers that will come out of Current (int) during execution and the distance between each Current (int) outputted.

Inputs

* (int)

Start Execution of the Range Loop.

Start (int)

The number to start at when executing.

End (int)

The number to end at when executing.

TODO: Is this inclusive or exclusive?

StepSize (int)

How much to add to Start (int) per execution for the Current (int) output number.

Outputs

LoopStart (Call)

Fires when the loop starts, regardless of executions of the Range Loop.

LoopIteration (Call)

Fires every time Current (int) increases by StepSize (int) and (has just or hasn't/hasn't)? hit the End (int) limit.

TODO: Is this inclusive or exclusive?

LoopEnd (Continuation)

Fires once the loop has finished.

Current (int)

The current number between Start (int) and End (int). has a value during every LoopIteration (Call).

Examples