Here is an example of a 2 part wheel, where there are 2 rings of segments. This is achieved by creating a second Winwheel object and positioning it over the top of the first wheel. One wheel acts as the "primary" and has the animation applied to it, the other wheel is the "secondary" which we just update during the animation loop to have the same rotation angle as the primary wheel.
2019-01-01 Note: Currently Winwheel.js does not support animating multiple independent wheels on the same page, nor do I really recommend trying to create games made up of multiple wheels. While I do know how to add multiwheel support to Winwheel.js, experience in helping people to do this over the last year or so has shown that, depending on the options used, the framerate is so bad with as little as three wheels that any game made does not look good and is almost unusable. Best to stick to single wheel uses of Winwheel.js for now.
Choose a power setting then press the Spin button. You will be alerted to the prize won when the spinning stops.
|