Repeat2d Op

Repeat2d

Triggers all ops underneath Num X * Num Y times


<p>Imagine a <a href="/op/Ops.Trigger.Repeat">Ops.Trigger.Repeat</a> connected to a <a href="/op/Ops.Trigger.Repeat">Ops.Trigger.Repeat</a>, or a for loop inside a for loop. This loop is especially useful for drawing a matrix of objects.</p>


Full Name
  • Ops.Trigger.Repeat2d
Visibility
  • Core Op - Official cables op
License
  • MIT
AuthorgithubTest Patches


Example Patch Repeat 2D

The repeat 2D op is like using two repeat ops in one. Check the Repeat example for a simplified demonstration of this patch.

Open In Editor

INPUT PORTS


exe (Trigger)

<p>Executes the loop</p>

num x (Number:

<i>integer</i>

)

<p>Number of times executed on the X axis</p>

num y (Number:

<i>integer</i>

)

<p>Number of times executed on the Y axis</p>

mul (Number)

<p>Multiplies the <code>X</code> and <code>Y</code>values, makes it easier e.g. to use the outputs directly in a Ops.Gl.Matrix.Transform</p>

center (Number:

<i>boolean</i>

)

<p>Centers <code>X</code> and <code>Y</code> around the origin <code>(0/0)</code></p>

OUTPUT PORTS


trigger (Trigger)

<p>Trigger for each iteration of the loop</p>

x (Number)

<p>The X value for the current iteration</p>

y (Number)

<p>The Y value for the current iteration</p>

index (Number)

<p>Current index. If you have a 5x5 repeater, this value goes from 0 to (including) 24</p>

total iterations (Number)

Patches using Repeat2d

  • Examples
  • Public
  • My Patches