xxxxxxxxxx
var distance = 1;
var rectX = 0, rectY = 0;
function setup() {
createCanvas(windowWidth, windowHeight);
background(100);
}
function draw() {
background(0,255,0);
fill(255,0,0);
stroke(0,0,255);
rect(rectX,rectY,100,100);
rectX = rectX + distance;
rectY = rectY + distance;
}