More Animated
The Animated library allows us to do a lot more things such as composing animations or driving animations through gestures and input events. Let's look at a few examples.
Interpolation
Using the same Animated.Value
you can drive multiple animations through interpolation. Interpolation can also be used to convert numbers into rgb
colours or rotation values in degrees
.
Input | Output |
-400 | 450 |
-300 | 300 |
-200 | 150 |
-100 | 0 |
-50 | 0.5 |
0 | 1 |
50 | 0.5 |
100 | 0 |
101 | 0 |
200 | 0 |
Composing Animations
Animated.Event
Allows us to extract values from an input event and set values for an Animated.Value
.
Last updated