Numeric range sliders, by implementing decoupled property view types
One thing that has long irked me when working in Rive is the inability to define a numeric range for number properties. An example use case is when you’re implementing a health bar or progress bar, you want to only scrub the value “percentage” between 0 and 100.
With the way the UI is set up, it’s super hard to preview or play around with these values as it’s very hard to activate the “drag to increase/decrease number” interaction in the number fields. It’s also very easy to overshoot into negative values, and values above 100.
My feature request is that you create a concept of property views that ultimately map down to an already supported property type like string, boolean, double.
For example, a ValueRange property would map to a single floating point number internally, but would provide an outward interface that makes it easier to handle.
An example in dart pseudo code.
class ValueRange extends Property<double> {
// Inherited from Property
T value;
// Other props
double maxValue;
double minValue;
double increment;
}
The user could then specify if doubles within a ViewModel or state machine input is just a plain ol double, or if it’s a range.