flutter_confetti icon indicating copy to clipboard operation
flutter_confetti copied to clipboard

Is there a way to control the speed and amount of confetti based on seconds instead of framerate?

Open edwardcahyadi opened this issue 3 years ago • 3 comments

I recently changed my phone display settings from 60hz to 120hz. I noticed that this caused more confetti to be produced and caused them to fall faster.

This is an issue because different users with different devices will have a different user experience.

Is there an easy way to base the speeds on actual time (seconds) instead on the device's framerate?

edwardcahyadi avatar Jul 27 '22 07:07 edwardcahyadi

I'm having the same issue - iphone 13 with promotion display.

acoutts avatar Aug 04 '22 15:08 acoutts

As documented, it is strongly tied to drawing a frame. Yes, you'd need to multiply it with the fps rate.

If I think about it I'd really like to see some dependency on Duration instead of Frames.

image

Eerey avatar Sep 02 '22 15:09 Eerey

Hi, @edwardcahyadi, thanks for opening this issue, I'll look into this soon. It will likely be breaking changes and a rewrite of the underlying logic - I'll keep you updated here. It'll be something similar to this: https://en.wikipedia.org/wiki/Delta_timing

HayesGordon avatar Sep 04 '22 06:09 HayesGordon

Sorry that this took so long, but I have implemented a fix, and will release a new release after some additional changes. Please feel free to test out the develop branch in the meantime.

HayesGordon avatar Nov 26 '22 17:11 HayesGordon