Closed kimyounghoons closed 9 months ago
There's probably an issue where the deltatime is not correctly applied to one of parameters. I should dive into this and see what's causing this.
I also observed differences in animation between a Samsung device and Google Pixel device. Samsung shoots down (as desired), but on a Pixel it shoots to the right
@omargda What configuration did you use? Can you share some more details about this specific case
Hi, I'm facing the same issue.
I'm using this configuration:
val leftParty = Party(
spread = 45,
angle = 315,
position = Position.Relative(0.0, 0.35),
emitter = Emitter(duration = 3, TimeUnit.SECONDS).perSecond(30)
)
val rightParty = Party(
spread = 45,
angle = 225,
position = Position.Relative(1.0, 0.35),
emitter = Emitter(duration = 3, TimeUnit.SECONDS).perSecond(30)
)
// ...
KonfettiView(
modifier = Modifier.fillMaxSize(),
parties = listOf(leftParty, rightParty),
)
It looks like this:
60 Hz is fine but 120 Hz seems broken. It looks like the confetti cannon only has half power at 120 Hz haha.
Thanks for the example! Right now the refresh rate seems to be locked at 60fps in the code. I'll make the proper adjustments and update the frame rate dynamically.
Opened a branch with a fix here: https://github.com/DanielMartinus/Konfetti/pull/319
@kit0kat @kimyounghoons would you be able to check-out that branch (add-dynamic-framerate
) and run the xml or compose example on your device with 120Hz?
@DanielMartinus I checked out your branch and tried both XML and Compose examples. It now works perfectly at 120 Hz 👍You are amazing. When will the update be available?
@kit0kat I've just released 2.0.4 that includes the fix
Confirmed, fixed in production. Thank you!!
When testing on multiple devices, there is a difference between 120 Frame device and 60 Frame device animation. How should I solve it?