Number Range
Intro
The Number Range can be used to remap values within a range. For example, if a set of input values are in a range of 0-100
the Number Range can be used to increase those values to output a range of 0-400
.
UI
Source Minimum - The smallest value within the range of the input.
Source Maximum - The largest value within the range of the input.
Value - Connect a range of values (e.g. from a Spreadsheet)
Minimum - The value to remap Source Minimum to.
Maximum - The value to remap Source Maximum to.
Graph - See Common Attributes (Behaviours)
Clamp - When checked, the output will never go above or below the Maximum or Minimum values.
Offset - Add/subtract a value to/from the output.
This Layer is also used as a base for options on the Spreadsheet Utility. The Value attribute will not appear within the Spreadsheet Attribute Editor UI as that is being driven by the data connected to the Spreadsheet.
- Create 2 Shapes (Shape1 and Shape2).
- Create a Number Range.
- Set:
- Source Minimum =
-100
- Source Maximum =
100
- Minimum =
-400
- Maximum =
400
- Source Minimum =
- Connect shape1.position.y→numberRange.value.
- Connect numberRange.id→shape2.position.y.
- Move Shape1 up and down in the Viewport.
As Shape1 reaches a position of 100 in the Y axis, Shape2 will move to a position of 400. If Clamp is checked then as Shape1 moves above 100 Shape2 will remain at 400.
Regardless of the values entered in Minimum and Maximum, the smallest value will always be used as the Minimum and the largest value as the Maximum. For example, where the value entered into the Minimum attribute is actually larger than the Maximum attribute, those values will be inverted as part of the Layer's calculation. This is also true of Source Minimum and Source Maximum.