I'm using jetpack compose in kotlin for my Android project. I am trying to animate planets orbiting around a center, which works perfectly. The animation starts at a button push and will continue for as long as the user wants. But I want to start the animation with an ease-in instead of a hard-jerk go.
Here is my animation code. I am using rememberInfiniteTransition on animateFloat to animate numbers from 0 to 360 (angles for the planets). I use baseRotation to draw the planets in the proper locations.
val infiniteTransition = rememberInfiniteTransition(label = "")
val baseRotation by infiniteTransition.animateFloat(
initialValue = masterAngle,
targetValue = masterAngle + 360f,
label = "",
animationSpec = infiniteRepeatable(
animation = tween(
durationMillis = 3000,
easing = EaseInCubic
)
)
)

As you can see the animation stops when it reaches the target value and then eases in for the next iteration. This happens every time. I would like to do the ease in for only the first iteration of the infinite transition.
I'm surprised that I can't find any information on this common situation. Any ideas how to do an infinite animation with an ease in for only the first time?