Oops! it happened
again. My new "lunch time" 30 minute project that went on for 3 weeks is ...
Wheel of Destiny.
Originally it was "wheel of Dev" and contained the names of all the developers at work. Born of a random brain fart when asked who should do a the mundane jog of merging this releases project branches.
As with the
2048 investigations this quickly got out of hand and now boasts;
Dynamically created html5 canvas "Wheel".
Any number of slices.
Full theming of colours and settings.
Auto packing of any text to fit on a slice (
try it)
Callback of the "winning" slice's value for any purpose needed.
Sizing and scaling based on html/css containers width/height.
Bounce back from the pointer when slowing down.
Github page with
demos,
demos.
Here we have the different layers that make up the spinning wheel. I was able to reuse the canvas layering functions that were developed as part of the
html5eyeball
There is the composite at the top, followed by wheel and its attachments, then the pointer and centre, finally the slice selection.
This project is so mature it even has an
issue and an enhancement in
Github
If you are interested in the genesis of this project it all started on
jsfiddle.
Wheel of Dev. Works perfectly as long as you do not change anything.
Wheel of Dev(sizeablity). Concentrating on the sizing and scaling.
Wheel of Destiny. Rewriting the math from scratch to actually work with different numbers of slices.
With
Wheel of Destiny out of my mind I can get on with filling that odd gap on the new
home page, which is what I should have been concentrating on!