Skip to content

Commit

Permalink
feat(SkyBackground): add fade in animation
Browse files Browse the repository at this point in the history
  • Loading branch information
martinezguillaume committed May 5, 2024
1 parent 3f4627b commit 736776a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion components/SkyBackground/SkyBackground.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ const Star = memo(
getRandomInt(0, 3000),
withRepeat(withTiming(1, {duration: 2000}), -1, true),
)
} else {
opacity.value = withDelay(
getRandomInt(0, 10000),
withTiming(getRandomInt(0.1, 1), {duration: 2000}),
)
}
}, [animated, opacity])

Expand All @@ -79,7 +84,7 @@ const Star = memo(
width={size}
height={size}
r={size / 2}
opacity={animated ? opacity : getRandomInt(0.1, 1)}
opacity={opacity}
color="white"
/>
)
Expand Down

0 comments on commit 736776a

Please sign in to comment.