q5play
    Preparing search index...

    Function mouseDragged

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

      Dragging the mouse is defined as moving the mouse while a mouse button is pressed.

      Returns void

      await Canvas(200);
      let gray = 0.4;

      q5.mouseDragged = function () {
      background(gray % 1);
      gray += 0.005;
      };