code: function winwheelAnimationLoop()
  {
      if (winwheelToDrawDuringAnimation) {
          // Check if the clearTheCanvas is specified for this animation, if not or it is not false then clear the canvas.
          if (winwheelToDrawDuringAnimation.animation.clearTheCanvas != false) {
              winwheelToDrawDuringAnimation.ctx.clearRect(0, 0, winwheelToDrawDuringAnimation.canvas.width, winwheelToDrawDuringAnimation.canvas.height);
          }
  
          let callbackBefore = winwheelToDrawDuringAnimation.animation.callbackBefore;
          let callbackAfter = winwheelToDrawDuringAnimation.animation.callbackAfter;
  
          // If there is a callback function which is supposed to be called before the wheel is drawn then do that.
          if (callbackBefore != null) {
              // If the property is a function then call it, otherwise eval the proptery as javascript code.
              if (typeof callbackBefore === 'function') {
                  callbackBefore();
              } else {
                  eval(callbackBefore);
              }
          }
  
          // Call code to draw the wheel, pass in false as we never want it to clear the canvas as that would wipe anything drawn in the callbackBefore.
          winwheelToDrawDuringAnimation.draw(false);
  
          // If there is a callback function which is supposed to be called after the wheel has been drawn then do that.
          if (callbackAfter != null) {
              // If the property is a function then call it, otherwise eval the proptery as javascript code.
              if (typeof callbackAfter === 'function') {
                  callbackAfter();
              } else {
                  eval(callbackAfter);
              }
          }
  
          // If there is a sound callback then call a function which figures out if the sound should be triggered
          // and if so then call the function specified by the developer.
          if (winwheelToDrawDuringAnimation.animation.callbackSound) {
              winwheelTriggerSound();
          }
      }
  }
docs: ==================================================================================================================== In order for the wheel to be re-drawn during the spin animation the function greesock calls needs to be outside of the class as for some reason it errors if try to call winwheel.draw() directly. ====================================================================================================================