Skip to content

Instantly share code, notes, and snippets.

@colinta
Created April 25, 2022 14:48
Show Gist options
  • Save colinta/2b2b993c90f0a8aa6244bb50781fb869 to your computer and use it in GitHub Desktop.
Save colinta/2b2b993c90f0a8aa6244bb50781fb869 to your computer and use it in GitHub Desktop.
export const Breathe = () => {
const progress = useLoop(
{
duration: 3000,
easing: Easing.inOut(Easing.ease),
},
{ yoyo: true }
);
return (
<Canvas style={styles.container} debug>
<Paint blendMode="screen">
<BlurMask style="solid" sigma={40} />
</Paint>
<Fill color="rgb(36,43,56)" />
<Group
origin={center}
transform={() => [{ rotate: mix(progress.value, -Math.PI, 0) }]}
>
{new Array(6).fill(0).map((_, index) => {
return <Ring key={index} index={index} progress={progress} />;
})}
</Group>
</Canvas>
);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment