Last active
September 22, 2019 12:58
-
-
Save vladbatushkov/e1cbeff207160e591eb960e56c853ba0 to your computer and use it in GitHub Desktop.
Example of animation - breathing of water planet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const [scaleValue] = useState(new Animated.Value(1)) | |
const waterAnimation = () => { | |
Animated.sequence([ | |
Animated.timing(scaleValue, { // 1 | |
toValue: 1.2, | |
duration: 1500, | |
easing: Easing.linear | |
}), | |
Animated.timing(scaleValue, { // 2 | |
toValue: 1, | |
duration: 1500, | |
easing: Easing.linear | |
}) | |
]).start(() => waterAnimation()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment