January 2019
Intermediate to advanced
592 pages
14h 30m
English
In step 4, we defined the interpolations to get the left value for each cloud. The interpolate method receives an object with two required configurations, inputRange and outputRange.
The inputRange configuration receives an array of values. These values should always be ascending values; you could use negative values too, as long as the values are ascending.
outputRange should match the number of values defined on inputRange. These are the values that we need as a result of the interpolation.
For this recipe, inputRange goes from 0 to 1, which are the values of our animatedValue. In outputRange, we defined the limits of the movement that we need.
Read now
Unlock full access