You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, Animated.loop calls animation.reset() before each iteration. That makes sense in most cases. However, when looping a Animated.sequence one might want to loop between the animations in the sequence without falling back to the initial value on each iteration.
state = {
animated: new Animated.Value(0),
};
animate() {
// What I want:
// 0-1-2-1-2-1-2 etc.
// What I get:
// 0-1-2-0-1-2 etc.
Animated.loop(
Animated.sequence([
Animated.timing(this.state.animated, {
toValue: 1,
}),
Animated.timing(this.state.animated, {
toValue: 2,
}),
])
).start();
}
The text was updated successfully, but these errors were encountered:
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "For Discussion" or "Good first issue" and I will leave it open. Thank you for your contributions.
stalebot
added
the
Stale
There has been a lack of activity on this issue and it may be closed soon.
label
Dec 21, 2018
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.
Environment
Description
Currently,
Animated.loop
callsanimation.reset()
before each iteration. That makes sense in most cases. However, when looping aAnimated.sequence
one might want to loop between the animations in the sequence without falling back to the initial value on each iteration.Some people faced the same issue:
I would propose to add a new a config to
Animated.loop
like:Reproducible Demo
MCVE: https://snack.expo.io/@sokki/animated-loop
The text was updated successfully, but these errors were encountered: