Skip to content

Commit

Permalink
chore: play around with default values
Browse files Browse the repository at this point in the history
  • Loading branch information
AlirezaHadjar committed Oct 16, 2024
1 parent 8d2eae0 commit 06b0ea3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 11 deletions.
10 changes: 1 addition & 9 deletions example/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,7 @@ export default function App() {

return (
<View style={styles.container}>
<Confetti
ref={confettiRef}
autoplay={true}
autoStartDelay={0}
fadeOutOnEnd={false}
count={200}
duration={4000}
colors={['red', 'blue']}
/>
<Confetti ref={confettiRef} />
<Button title="Resume" onPress={() => confettiRef.current?.resume()} />
<Button title="Pause" onPress={() => confettiRef.current?.pause()} />
<Button title="Restart" onPress={() => confettiRef.current?.restart()} />
Expand Down
2 changes: 1 addition & 1 deletion src/Confetti.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export const Confetti = forwardRef<ConfettiMethods, ConfettiProps>(
const progress = useSharedValue(0);
const opacity = useDerivedValue(() => {
if (!fadeOutOnEnd) return 1;
return interpolate(progress.value, [0, 0.7, 1], [1, 0, 0]);
return interpolate(progress.value, [0, 0.9, 1], [1, 0, 0]);
}, [fadeOutOnEnd]);
const running = useSharedValue(false);
const { width: DEFAULT_SCREEN_WIDTH, height: DEFAULT_SCREEN_HEIGHT } =
Expand Down
2 changes: 1 addition & 1 deletion src/constants.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export const DEFAULT_BOXES_COUNT = 200;

export const DEFAULT_FLAKE_SIZE = { width: 6, height: 12 };
export const DEFAULT_FLAKE_SIZE = { width: 8, height: 16 };

export const DEFAULT_DURATION = 8000;

Expand Down

0 comments on commit 06b0ea3

Please sign in to comment.