martmists
10/09/2025, 11:20 PMJack Boswell
10/09/2025, 11:45 PMmartmists
10/10/2025, 12:21 AMmartmists
10/10/2025, 12:22 AMJack Boswell
10/10/2025, 12:22 AMshikasd
10/11/2025, 11:19 AMLaunchedEffect {
while (true) {
withFrameNanos {
// update animation
}
}
}
Modifier.drawBehind {
// read animation state
}efemoney
10/13/2025, 6:15 AMDon’t you need recomposition to be able to update your animation state? Once per recomposition sounds idealNo. If you set it up as infinite repeatable then it already animates & updates its state.
Sounds like your particles have a state, which should trigger recomposition on updateThere should be a state but it does not need to trigger recomposition, it could trigger only relayout and/or redraw.
Jack Boswell
10/13/2025, 6:17 AMefemoney
10/13/2025, 6:18 AMJack Boswell
10/13/2025, 6:20 AMJack Boswell
10/13/2025, 6:21 AMefemoney
10/13/2025, 6:30 AMefemoney
10/13/2025, 6:33 AMMy understanding is composition isn’t a magic third step, instead it encompasses both layout and draw, deciding which one to run (if any)Ah, I get it, I think we just have different meaning for the terms, but officially compose ui has (generally) three *distinct* phases: composition, layout & draw. Thats the definition I am referencing
Jack Boswell
10/13/2025, 9:33 AMJack Boswell
10/13/2025, 9:34 AMZach Klippenstein (he/him) [MOD]
10/14/2025, 8:54 PMmartmists
10/15/2025, 11:38 AMoverride val shouldAutoInvalidate = false
override fun onAttach() {
coroutineScope.launch {
while (isActive) {
withFrameNanos {
invalidateDraw()
}
}
}
}shikasd
10/15/2025, 11:39 AMmartmists
10/15/2025, 11:45 AMshikasd
10/15/2025, 11:55 AM