Picker Wheel, Spin the Wheel

Enter your Name, options, spin the wheel, and let fate decide the winner!

Inputs & Options

Winning Option

How to Use the Picker Wheel

  1. Add Options: Enter text into the input fields on the right. Click + Add Option to insert new items.
  2. Customize List: Remove unwanted options by clicking the red × button next to each entry.
  3. Auto-Remove Winner: Enable Remove winning option automatically if you want the picked result removed after spinning.
  4. Spin: Click the glowing Spin the Wheel button to initiate the random rotation.
  5. View Winner: See the outcome highlighted in the results box accompanied by celebratory confetti and sound effects.

The Logic Used

The application renders segments dynamically on an HTML5 Canvas based on your input list. Key components include:

  • Randomized Rotation: Utilizes Math.random() to generate random initial speeds and total spin durations.
  • Physics & Animation: Employs a cubic easeOut easing function to simulate friction, delivering realistic slowing motion.
  • Angle Math & Precision: Calculates exact segment boundaries to align the top indicator with the corresponding item index.
  • Audio Engine: Generates real-time audio ticks using Web Audio API synthesis along with celebratory sounds upon completion.

Frequently Asked Questions (FAQ)

Is the wheel spin completely random and fair?

Yes. The stopping angle and spin force are generated using random mathematical functions every time you click spin.

How many options can I add to the wheel?

You can add as many items as needed. The wheel dynamically calculates equal angular slices for all entries.

Is my data saved or uploaded to a server?

No. All code runs locally inside your browser. Your input data is private and never transmitted over the network.

Scroll to Top