For years, the most popular link on my site has been
a simple jquery slot machine effect. At the encouragement of a fellow developer (Ron Sparks), I have parlayed that into a
proper github project. Maintaining the simplicity was key; there's another similar project that has stolen my google juice thunder, but it's more complex than what I have, so I have worked to Keep It Simple, Silly, so a novice coder can more readily customize it to the effect they want.
Improvements include:
- under 100 (well-commented) lines!
- wrapped as an instance
- being available on github
- allowing images to be used
- each reel can have its own options
- you can call the "win()" function rather than "spin()" and it will show a pre-selected result
So, go to
the github project see it in action at the
sample page.
Hello is there a way of increasing the duration of the spin. If I increase the time value in the code it only slows down the animation.
ReplyDeleteHmm. I just commited a version that sort of gets to what you want, in terms of making the number of slots flying past proportionate to the time. But unfortunately it spends a lot more time with the animation for that and the effect is not satisfactory :-/
ReplyDelete