xxxxxxxxxx
11
// Move the mouse across the canvas to leave a trail
function setup() {
createCanvas(300,200)
frameRate(10); //slow down the frameRate to make it more visible
}
function draw() {
background(244, 248, 252);
line(mouseX, mouseY, pmouseX, pmouseY);
print(pmouseX + ' -> ' + mouseX); // show the coordinates in the console
}