Skip to content

Instantly share code, notes, and snippets.

@vladbatushkov
Last active September 22, 2019 12:58
Show Gist options
  • Save vladbatushkov/e1cbeff207160e591eb960e56c853ba0 to your computer and use it in GitHub Desktop.
Save vladbatushkov/e1cbeff207160e591eb960e56c853ba0 to your computer and use it in GitHub Desktop.
Example of animation - breathing of water planet
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