🖲 Define this function to respond to mouse drag events.
Dragging the mouse is defined as moving the mouse while a mouse button is pressed.
await Canvas(200);let gray = 0.4;q5.mouseDragged = function () { background(gray % 1); gray += 0.005;}; Copy
await Canvas(200);let gray = 0.4;q5.mouseDragged = function () { background(gray % 1); gray += 0.005;};
🖲 Define this function to respond to mouse drag events.
Dragging the mouse is defined as moving the mouse while a mouse button is pressed.