xxxxxxxxxx
19
function setup() {
createCanvas(320, 240);
background(255, 100, 100);
noStroke();
fill(100,255,100);
rect(0,0, 160, 240);
}
function draw() {
console.log( whatside() );
}
function whatside() {
if (mouseX > 160) {
return "RIGHT";
} else {
return "LEFT";
}
}