You're attempting to map a value from one value range to another, and these ranges are of different lengths.
This error originates in an internal function used in many different Motion APIs, like useTransform
, transform
and mapValue
.
Explanation
When mapping between two keyframe ranges, Motion matches the keyframes from the input range to those in the output range.
When these range lengths are different, it becomes impossible for Motion to know what the user intends when the input value is, in this example, 1
:
Solution
There's no good default behaviour here, which is why Motion throws rather than takes a default position.
One approach could be to map the input range "over" the output range by adding values in-between:
Alternatively, you could duplicate a value at the end of the input range.
This would have a different behaviour, where any value 1 or above would snap to 100, but any value below would output between 0
and 50
.