mouseWheel(button);
EventCalled when a mouse wheel is used
Arguments
button
The pressed mouse button
In the following example, the circle's size changes when the user scrolls
size = 0;
function setup()
createWindow(400, 400);
end
function draw()
background(51);
circle(mouseX, mouseY, size);
end
-- Change circle size when mouse is scrolled
function mouseWheel(delta)
size = size + delta;
end