xxxxxxxxxx
28
function setup() {
createCanvas(400,400);
background (220);
strokeWeight(4);
drawCreature (100, 100, radians(0));
drawCreature (300, 100, radians(-45));
drawCreature (200, 300, radians(10));
}
function drawCreature(x, y, rotation) {
rectMode(CENTER);
push();
translate(x, y);
rotate(rotation);
rect(0, 0, 150, 50);
//------MOUTH---
line(50,0,75,0);
//------EYES----
strokeWeight(5);
point(50,-10);
pop();
}