q5play
    Preparing search index...

    Function redraw

    • 💻 Redraws the canvas n times. If no input parameter is provided, it calls the draw function once.

      This is an async function.

      Parameters

      • Optionaln: number

        number of times to redraw the canvas, default is 1

      Returns void

      await Canvas(200);
      noLoop();

      q5.draw = function () {
      circle(frameCount * 5 - 100, 0, 80);
      };
      q5.mousePressed = function () {
      redraw(10);
      };