Skip to content

Commit 0bdae23

Browse files
committed
Use parallel instead of stagger
1 parent 34dca4d commit 0bdae23

File tree

6 files changed

+21
-21
lines changed

6 files changed

+21
-21
lines changed

src/Bounce.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ export default class Bounce extends React.Component<SpinnerProps> {
2020
}
2121
return (
2222
<AnimationContainer
23-
animation={Animated.stagger(
24-
1000,
25-
this.values.map(value =>
23+
animation={Animated.parallel(
24+
this.values.map((value, index) =>
2625
anim({
2726
duration: 2000,
2827
value: value,
2928
keyframes: [0, 45, 55, 100],
29+
delay: index * 1000,
3030
})
3131
)
3232
)}

src/Chase.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,23 +22,23 @@ export default class Chase extends React.Component<SpinnerProps> {
2222
return (
2323
<AnimationContainer
2424
animation={Animated.parallel([
25-
Animated.stagger(
26-
100,
27-
this.chaseDotValues.map(value =>
25+
Animated.parallel(
26+
this.chaseDotValues.map((value, index) =>
2827
anim({
2928
duration: 2000,
3029
value: value,
3130
keyframes: [0, 80, 100],
31+
delay: index * 100,
3232
})
3333
)
3434
),
35-
Animated.stagger(
36-
100,
37-
this.chaseDotBeforeValues.map(value =>
35+
Animated.parallel(
36+
this.chaseDotBeforeValues.map((value, index) =>
3837
anim({
3938
duration: 2000,
4039
value: value,
4140
keyframes: [0, 50, 100],
41+
delay: index * 100,
4242
})
4343
)
4444
),

src/Circle.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ export default class Circle extends React.Component<SpinnerProps> {
1919
}
2020
return (
2121
<AnimationContainer
22-
animation={Animated.stagger(
23-
100,
24-
this.values.map(value =>
22+
animation={Animated.parallel(
23+
this.values.map((value, index) =>
2524
anim({
2625
duration: 1200,
2726
value: value,
2827
keyframes: [0, 40, 80, 100],
28+
delay: index * 100,
2929
})
3030
)
3131
)}

src/CircleFade.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ export default class CircleFade extends React.Component<SpinnerProps> {
1919
}
2020
return (
2121
<AnimationContainer
22-
animation={Animated.stagger(
23-
100,
24-
this.values.map(value =>
22+
animation={Animated.parallel(
23+
this.values.map((value, index) =>
2524
anim({
2625
duration: 1200,
2726
value: value,
2827
keyframes: [0, 39, 40, 100],
28+
delay: index * 100,
2929
})
3030
)
3131
)}

src/Flow.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ export default class Flow extends React.Component<SpinnerProps> {
1313

1414
return (
1515
<AnimationContainer
16-
animation={Animated.stagger(
17-
150,
18-
this.values.map(value =>
16+
animation={Animated.parallel(
17+
this.values.map((value, index) =>
1918
anim({
2019
duration: 1400,
2120
value: value,
2221
easing: Easing.bezier(0.455, 0.03, 0.515, 0.955),
2322
keyframes: [0, 40, 80, 100],
23+
delay: index * 150,
2424
})
2525
)
2626
)}

src/Wave.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ export default class Wave extends React.Component<SpinnerProps> {
1313

1414
return (
1515
<AnimationContainer
16-
animation={Animated.stagger(
17-
100,
18-
this.values.map(value =>
16+
animation={Animated.parallel(
17+
this.values.map((value, index) =>
1918
anim({
2019
duration: 1200,
2120
value: value,
2221
keyframes: [0, 20, 40, 100],
22+
delay: index * 100,
2323
})
2424
)
2525
)}

0 commit comments

Comments
 (0)