q5play
    Preparing search index...

    Function mousePressed

    • 🖲 Define this function to respond to mouse down events.

      Returns void

      await Canvas(200);
      let gray = 0.4;

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