louiscad
01/03/2024, 7:28 AMFloat
value, like an angle?
I'm using animateFloatAsState
, but it produces a loop back glitch every time the angle goes from 359.xx degrees back down to 0°.romainguy
01/03/2024, 8:19 AMlouiscad
01/03/2024, 1:37 PMromainguy
01/03/2024, 1:44 PMif (trigger) 360f else 0f
or something like that?louiscad
01/03/2024, 1:45 PMval offsetAngle by remember {
derivedStateOf { if (isAmbient) 0f else 6 * time.secondsWithMillis }
}
val animatedOffsetAngle by animateFloatAsState(
targetValue = offsetAngle,
label = "bg offset angle"
)
romainguy
01/03/2024, 1:53 PMlouiscad
01/03/2024, 2:44 PMromainguy
01/03/2024, 2:46 PMlouiscad
01/03/2024, 2:47 PMFloat.PositiveInfinity
romainguy
01/03/2024, 2:49 PMromainguy
01/03/2024, 2:50 PM