xxxxxxxxxx
23
function setup() {
createCanvas(400, 400);
background(100);
}
function draw() {
if (mouseIsPressed) {
brush(mouseX, mouseY);
}
}
function brush(X, Y) {
noStroke();
triangle(X, Y, X+10,Y+10, X-10,Y+10);
if (mouseX > 200) {
fill(0);
}
else {
fill(255);
}
}