CrazyTim / spin-wheel

An easy to use, themeable component for randomising choices and prizes.
https://crazytim.github.io/spin-wheel/examples/themes
MIT License
174 stars 45 forks source link

Equal randomness? #16

Closed DiAvisoo closed 2 years ago

DiAvisoo commented 2 years ago

I'm struggling to configure the props so that there is an equal chance of landing on any of the items.

Seems like whatever I set the .spin(speed) value to, it always ends up on the same ones. I tried creating a random speed between 500 and 1500, but still it's very predictable. Please advice.

DiAvisoo commented 2 years ago

Figured out I could map intervals to specific items. Like 250-255 always end up on the same if rotation is 0. So I created a list of all the different intervals and then pick a random from that list.