🖲 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.
await Canvas(200);let gray = 0.4;q5.touchStarted = function () { background(gray % 1); gray += 0.1;}; Copy
await Canvas(200);let gray = 0.4;q5.touchStarted = function () { background(gray % 1); gray += 0.1;};
🖲 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.