-
-
Save Ahmed-Sellami/c60bbcfb070f80b69f7c1da54c37b6f9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val funnelInitialTranslation = -funnelWidth - particleRadius | |
val funnelTranslation = remember { mutableStateOf(funnelInitialTranslation) } | |
funnelTranslation.value = (offsetX.value + funnelInitialTranslation).negateIfPositive() | |
Box { | |
Canvas( | |
Modifier.height(itemHeightDp) | |
) { | |
translate(funnelTranslation.value) { | |
/* Funnel */ | |
} | |
translate(offsetX.value - particleRadius) { | |
/* Circle */ | |
} | |
} | |
/* ... */ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment