Skip to main content

vScriptValIterator

Keeps every Nth point of an array and skips the points in between.

BeginnerMograph / ScriptValScriptValArrayJSON
vScriptValIterator node

vScriptValIterator takes an array of XYZ points and outputs points 1, 1 + Step, 1 + 2 * Step and so on. Step is the only control, and 1 keeps every point.

Parameters​

ParameterTypeDefaultDescription
Step - (skip x points)Integer1Take every Nth point, so Step - 1 points are skipped between kept ones. Minimum 1, slider 1 to 10, default 1.
InputDATATYPE—Data to process.
Read the full description

The node walks the input from the first element in steps of Step and copies the first three values of each element it lands on. With Step 2 on ten points it keeps points 1, 3, 5, 7 and 9. With Step 3 it keeps points 1, 4, 7 and 10.

Step is an integer from 1, slider 1 to 10, default 1. At 1 every point is copied. Elements that are not lists with at least three values are dropped, so an array of plain numbers gives an empty output.

Nothing is repeated or looped. The output has at most the input length divided by Step, rounded up, because dropped elements shorten it further.

Example Connections​

vScriptValPointsOnGrid.Output -> vScriptValIterator.ArrayA
vScriptValIterator.Output -> vScriptValCameraProjection.ArrayA
vScriptValCameraProjection.Output -> vScriptValShapeRender.ArrayPoint
Background.Output -> vScriptValShapeRender.Input