https://kotlinlang.org logo
#compose
Title
# compose
g

grandstaish

02/02/2021, 7:27 PM
is there a way to slow down animations in compose? (for debugging)
s

spierce7

02/02/2021, 7:29 PM
the dev settings for a device has an ablity to slow down or speed up animations. I would expect that compose respects those settings
g

grandstaish

02/02/2021, 7:31 PM
i think those settings are independent of compose. (or at least they don’t seem to affect compose animations yet)
s

spierce7

02/02/2021, 7:32 PM
sounds like a bug 😞 The only other way that I could think of is to set a global variable that’s the animation duration factor, and you manually factor that in when setting animation times 😞
j

jw

02/02/2021, 7:57 PM
It would be nice to be able to inject a clock so that the window could keep rendering at 60fps but the clock progressed more slowly (or manually).
d

Dominaezzz

02/02/2021, 8:34 PM
Lol I can't tell if that is sarcasm.
a

Adam Powell

02/02/2021, 8:37 PM
you can do that already - the Recomposer doesn't care about the timestamps, it just passes them through at whatever rate the clock ticks frames
keep the frames coming at framerate but skew the timestamps and you're there
c

codeslubber

02/02/2021, 9:34 PM
a sample app with an animation and a clock would be dope…
j

jw

02/03/2021, 1:38 AM
so Adam you're saying all the animation stuff uses those timestamps?
Also, EPIC slack workspace crossover talk: How do you know someone is using the clock I provide and not the default platform clock?
😄 1
a

Adam Powell

02/03/2021, 2:13 AM
All of the animation stuff that isn't still using the obsolete
AnimationClockObservable
uses those timestamps, yes
👌 2
l

louiscad

02/12/2021, 7:03 PM
Is this documented somewhere? I am afraid I'd not remember when the UCT clock has advanced too much for me.
a

Adam Powell

02/12/2021, 7:08 PM
I'm not sure I understand the question. Is which part documented?
l

louiscad

02/12/2021, 7:19 PM
The different clocks in Compose, which controls what, and how to provide your own for different use cases like the one of this thread (slowing down animations).
👍 1