xxxxxxxxxx
65
function setup() {
createCanvas(400, 400);
}
function draw() {
background(220);
fill(190, 149, 227)
rectMode(CENTER);
//head
circle(195,150,50);
fill(0)
//eyes
circle(195 - 8,150,5);
circle(195 + 8,150,5);
//frown
line(191 - 11, 145 - 3, 191, 145);
line(200 + 11, 145 - 3, 200, 145);
fill(190, 149, 227)
//torso
triangle(30 + 137,
75 + 110,
58 + 137,
20 + 250,
86 + 135,
75 + 110);
//arms
line(200 - 38, 200 - 10, 200 - 70, 200 + 5);
//sword arm
line(200 + 28, 200 - 10, 200 + 58, 200 + 40);
fill(255, 195, 0)
//shield
ellipse(200 - 80, 200 + 15, 60, 90)
fill(144, 12, 63)
//sword
//quad(x1, y1, x2, y2, x3, y3, x4, y4, [detailX], [detailY])
quad(200 + 62, 200 + 52,
200 + 178, 200 + 62,
200 + 198, 200 + 52,
200 + 62, 200 + 42,)
//legs
line(200, 200 + 70, 200 + 11, 200 + 140)
line(200- 10, 200 + 70, 200 - 19, 200 + 140)
}
function mousePressed() {
save("character.jpg")
}