Skip to content

Commit 320c2e8

Browse files
authored
Restore old spring behavior in bouncing box example (#8420)
## Summary This PR changes the `withSpring` parameters in bouncing box example to match the old behavior. ## Test plan
1 parent 662b1e7 commit 320c2e8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apps/common-app/src/apps/reanimated/examples/BouncingBoxExample.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export default function BouncingBoxExample() {
2727
);
2828
})
2929
.onFinalize(() => {
30-
offset.value = withSpring(0, { mass: 2, stiffness: 500 });
30+
offset.value = withSpring(0, { damping: 20 });
3131
});
3232

3333
const rotation = Gesture.Rotation()
@@ -40,7 +40,7 @@ export default function BouncingBoxExample() {
4040
);
4141
})
4242
.onFinalize(() => {
43-
angle.value = withSpring(0, { mass: 2, stiffness: 500 });
43+
angle.value = withSpring(0, { damping: 20 });
4444
});
4545

4646
const animatedStyles = useAnimatedStyle(() => {

0 commit comments

Comments
 (0)