bounce() { this.animValue.setValue(0.3); Animated.spring( this.animValue, { toValue: 1, friction: 3, tension: 100 } ).start(); }
animate() { Animated.sequence( this.data.map(item => Animated.spring(item.value, { toValue: randomNumber(min, max) }) ) ).start(() => this.animate()); }
animate() { const animation = Animated.sequence([ Animated.delay(1000), Animated.stagger( 100, this.r.map(animValue => Animated.spring(animValue, { toValue: 10 }) ) ) ]); animation.start(); }
const onChange = ({ changeSize, setChangeSize, inputAnimation }) => () => { setChangeSize(!changeSize); Animated.spring(inputAnimation, { toValue: !changeSize ? 1 : 0, duration: 150 }).start(); }
this.state.fabs.map( (value, i) => (this.open ? Animated.timing(value, { toValue: (i + 1) * -90 * toValue, duration: 300 }) : Animated.spring(value, { toValue: (i + 1) * -90 * toValue, friction: 5 })) )
onPlayingUpdate(playing) { Animated.spring(this.borderWidth, { toValue: playing ? this.props.borderWidth : 0, friction: 5 }).start(); }
Animated.spring(this.shakedValue, { toValue: 1, friction: 3, tension: 10, }).start(() => this.shakedValue.setValue(0));
_animate(startValue, endValue) { this.animatedValue.setValue(startValue); Animated.spring( this.animatedValue, { toValue: endValue, velocity: 1, friction: 10 } ).start(); }
Animated.stagger( 100, this.state.replyOptions.map((replyOption, i) => Animated.spring(this.replyOptionStyle[i].bottom, { toValue: 0 }) ) ).start();
Animated.parallel([ Animated.spring(this.t, { toValue: Math.random() }) ]).start(() => this.animate());
resetPosition() { Animated.spring(this.state.position, { toValue: { x: 0, y: 0 } }).start(); }
Animated.parallel([ Animated.spring(this.t, { toValue: Math.random() }) ]).start(() => this.animate());