Build a wheel of fortune for your Phaser games in only a few lines. Draw the wheel on the fly with large room for customization.
From Emanuele Feronato: "When rewarding your players with a wheel of fortune, sometimes you just need the same wheel each time, like in the example I showed you some days ago, sometimes you need to build your wheel on the fly adding or removing options.
I am going to show you a wheel built on the fly using Phaser’s ability to draw slices on a graphic object then turn it into a sprite.
This is the completely commented source code, you can compare it with the previous version to see how I generated the wheel on the fly rather than preloading an image."