q5play
    Preparing search index...

    Function mouseMoved

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

      On touchscreen devices this function is not called when the user drags their finger on the screen.

      Returns void

      await Canvas(200);
      let gray = 0.4;

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