q5play
    Preparing search index...

    Function touchEnded

    • 🖲 Define this function to respond to touch down events on the canvas.

      Return true to enable touch gestures like pinch-to-zoom and scroll, which q5 disables on the canvas by default.

      Returns void

      await Canvas(200);
      let gray = 0.4;

      q5.touchEnded = function () {
      background(gray % 1);
      gray += 0.1;
      };