Skip to main content

vJSONMinMax

Generate an array of random values where each value in an entry has its own minimum and maximum.

BeginnerMograph / JSONJSONArrayScriptVal
vJSONMinMax node

vJSONMinMax has no input and outputs an array of random entries. Array length sets the number of entries, Pack To sets whether each entry holds X, X Y or X Y Z, and each value has its own range.

Parameters​

ParameterTypeDefaultDescription
Array lengthInteger1Number of entries in the output. Minimum 0, default 1.
Pack To:DropdownXYOptions: X, XY, XYZ.
Min1Float-1Lower limit of the first value in each entry. Default -1.
Max1Float1Upper limit of the first value in each entry. Default 1.
Min2Float-1Lower limit of the second value in each entry. Default -1.
+5 more parameters
ParameterTypeDefaultDescription
Max2Float1Upper limit of the second value in each entry. Default 1.
Min3Float-1Lower limit of the third value in each entry. Default -1.
Max3Float1Upper limit of the third value in each entry. Default 1.
SeedInteger0Seed of the random generator. Default 0.
Show InputInteger0.0Shows or hides a connection point on the Array length control. Default off.
Read the full description

The node seeds Lua's random generator with Seed and writes Array length entries. The first value of each entry is drawn uniformly between Min 1 and Max 1, the second between Min 2 and Max 2 and the third between Min 3 and Max 3. The same Seed gives the same output.

Pack To selects how many of the three ranges are used: X uses range 1, XY uses ranges 1 and 2, and XYZ uses all three. With the defaults (Array length 1, XY, every range -1 to 1) the node outputs one entry with two values. Ranges that are not used are ignored.

Array length can be 0, which gives an empty array. Show Input adds a connection point to the Array length control so that the length can be driven from another node.

Use vJSONRandom when one range is enough for every value.

Example Connections​

vJSONMinMax.Output -> vJSONCameraProjection.ArrayA
vJSONCameraProjection.Output -> vJSONShapeRender.ArrayPoint
Background.Output -> vJSONShapeRender.Input