atlanteh / react-native-slot-machine

Text slot machine for react-native
MIT License
156 stars 39 forks source link

Spinning Speed #9

Closed chandrabudiman closed 5 years ago

chandrabudiman commented 5 years ago

Thanks for your great component.

How to adjust the spinning speed ? When I add the duration, the spinning become slower. I expect high speed spinning like real machine.

And defaultChar props doesnt work for me. default value is 0. I wanna change it to 8. expected result is 4 digits number.

Highly appreciated for your answer. Thanks

atlanteh commented 5 years ago

In the current implementation this is the way it works: it aligns the range characters next to each other, setting the lowest one to your desired char and then it just scrolls them from top to bottom until it reaches your item. What you can try and do is set the range to "9876543210987654321098765432109876543210" so that there are more characters to scroll until it reaches your elements so the the speed whould increase. I haven't tested it, but I think it should work. Let me know if it works out for you

chandrabudiman commented 5 years ago

It works !! Thanks @atlanteh

atlanteh commented 5 years ago

Cool 😎