mouseX

v0.1.7
mouseXGlobal

The x mouse coordinate.

createWindow(200, 200);
stroke(255);

function draw()
  background('purple');
  
  line(mouseX, 0, mouseX, height);
end

Output

See mouseX in mouse.h