var pointX;
var pointY;
function setup() {
createCanvas(windowWidth, windowHeight);
background(54, 136, 201);
stroke(156, 48, 156);
strokeWeight(10);
}
function draw() {
blendMode(SCREEN);
if(mouseIsPressed) {
line(mouseX, mouseY, pointX, pointY);
}
}
//on mouse press I save the coordinated
//in global variables
function mousePressed() {
pointX = mouseX;
pointY = mouseY;
}