function setup() {
createCanvas(300,300);
createSprite(width/2, height/2, 50, 50);
}
function draw() {
background(220,220,220);
drawSprites();
}
//
function setup() {
createCanvas(300, 300);
for (var i = 0; i < 10; i++) {
var spr = createSprite(
random(width), random(height),random(40, 50), random(40, 50));
spr.shapeColor = random(255);
}
}
function draw() {
background(50,50,50);
drawSprites();
}