Closed lxnnydev closed 1 year ago
If there are only two or three prize items you will need to increase it. The roulette works fine if there are enough prize items passed via the ‘prizes’ prop. If I didn’t get you right provide an example of code
Is there a way of duplicating the price items, so 2 items would "act" like 4? (possibly even higher)
Of course. In this usage example is a function:
const reproductionArray = (array = [], length = 0) => [
...Array(length)
.fill('_')
.map(() => array[Math.floor(Math.random() * array.length)]),
];
You can use it
Enough with the ironic issues 😅
If I am only animating/spinning 3 items or even 2, it turns out to be really slow, but if I spin over 20 it's way faster and looks a lot nicer! Is there any way to change it?