xxxxxxxxxx
287
let Mouth = [
{ x: 492, y: 572 },
{ x: 495, y: 584 },
{ x: 539, y: 604 },
{ x: 603, y: 625 },
{ x: 681, y: 642 },
{ x: 811, y: 639 },
{ x: 945, y: 600 },
{ x: 967, y: 577 },
{ x: 955, y: 580 },
{ x: 886, y: 609 },
{ x: 774, y: 632 },
{ x: 624, y: 620 },
{ x: 558, y: 600 },
];
let FrontLeg = [
{ x: 527, y: 651 },
{ x: 588, y: 681 },
{ x: 629, y: 705 },
{ x: 591, y: 735 },
{ x: 517, y: 786 },
{ x: 483, y: 816 },
{ x: 482, y: 831 },
{ x: 523, y: 873 },
{ x: 606, y: 950 },
{ x: 615, y: 988 },
{ x: 586, y: 1016 },
{ x: 485, y: 1032 },
{ x: 466, y: 1020 },
{ x: 490, y: 998 },
{ x: 515, y: 981 },
{ x: 511, y: 961 },
{ x: 441, y: 919 },
{ x: 355, y: 859 },
{ x: 331, y: 823 },
{ x: 363, y: 787 },
{ x: 422, y: 732 },
{ x: 466, y: 698 },
];
let BackLeg = [
{ x: 554, y: 674 },
{ x: 475, y: 819 },
{ x: 537, y: 999 },
{ x: 514, y: 1025 },
{ x: 277, y: 1033 },
{ x: 232, y: 1020 },
{ x: 258, y: 990 },
{ x: 304, y: 963 },
//{ x: 367, y: 956 },
{ x: 409, y: 939 },
{ x: 244, y: 800 },
{ x: 168, y: 718 },
{ x: 159, y: 665 },
{ x: 207, y: 626 },
{ x: 299, y: 614 },
{ x: 450, y: 627 },
{ x: 518, y: 644 },
];
let Crease = [
{ x: 408, y: 767 },
{ x: 397, y: 770 },
{ x: 362, y: 752 },
{ x: 271, y: 697 },
{ x: 260, y: 684 },
{ x: 278, y: 687 },
{ x: 349, y: 733 },
];
function setup() {
createCanvas(1400, 1400);
}
function draw() {
background(250,249,239);
noStroke()
translate(-28,0)
// main body
fill(159,145,77)
ellipse(723,793,580,395)
//tummy
push()
beginClip()
fill(159,145,77)
ellipse(723,793,580,395)
endClip()
push()
translate(0,-22)
fill(210,204,126)
ellipse(710,1051,620,492)
pop()
push()
translate(0,-11)
fill(227,221,143)
ellipse(710,1051,620,492)
pop()
fill(245,239,161)
ellipse(710,1051,620,492)
pop()
//left back leg
fill(100,95,39)
beginShape();
for (let p of BackLeg) {
curveVertex(p.x, p.y);
}
curveVertex(BackLeg[0].x, BackLeg[0].y);
curveVertex(BackLeg[1].x, BackLeg[1].y);
curveVertex(BackLeg[2].x, BackLeg[2].y);
endShape()
//right back leg
push()
scale(-1,1)
translate(-1450,0)
fill(100,95,39)
beginShape();
for (let p of BackLeg) {
curveVertex(p.x, p.y);
}
curveVertex(BackLeg[0].x, BackLeg[0].y);
curveVertex(BackLeg[1].x, BackLeg[1].y);
curveVertex(BackLeg[2].x, BackLeg[2].y);
endShape()
pop()
//left leg crease
fill(67,53,8)
beginShape();
for (let p of Crease) {
curveVertex(p.x, p.y);
}
curveVertex(Crease[0].x, Crease[0].y);
curveVertex(Crease[1].x, Crease[1].y);
curveVertex(Crease[2].x, Crease[2].y);
endShape()
//right leg crease
push()
scale(-1,1)
translate(-1450,0)
fill(67,53,8)
beginShape();
for (let p of Crease) {
curveVertex(p.x, p.y);
}
curveVertex(Crease[0].x, Crease[0].y);
curveVertex(Crease[1].x, Crease[1].y);
curveVertex(Crease[2].x, Crease[2].y);
endShape()
pop()
//left front leg
fill(130,124,62)
beginShape();
for (let p of FrontLeg) {
curveVertex(p.x, p.y);
}
curveVertex(FrontLeg[0].x, FrontLeg[0].y);
curveVertex(FrontLeg[1].x, FrontLeg[1].y);
curveVertex(FrontLeg[2].x, FrontLeg[2].y);
endShape()
//right front leg
push()
scale(-1,1)
translate(-1450,0)
fill(130,124,62)
beginShape();
for (let p of FrontLeg) {
curveVertex(p.x, p.y);
}
curveVertex(FrontLeg[0].x, FrontLeg[0].y);
curveVertex(FrontLeg[1].x, FrontLeg[1].y);
curveVertex(FrontLeg[2].x, FrontLeg[2].y);
endShape()
pop()
//head base
fill(210,204,126)
ellipse(728,586,471,298)
//start of clip within the head
push()
beginClip()
fill(210,204,126)
ellipse(728,586,471,298)
endClip()
//top of head
fill(159,145,77)
ellipse(729,472,608,326)
//closed mouth
fill(60,56,8);
noStroke();
beginShape();
for (let p of Mouth) {
curveVertex(p.x, p.y);
}
curveVertex(Mouth[0].x, Mouth[0].y);
curveVertex(Mouth[1].x, Mouth[1].y);
curveVertex(Mouth[2].x, Mouth[2].y);
endShape()
pop()
//left eye
fill(159,145,77)
ellipse(582,461,139,129)
//eye white
fill(300)
ellipse(583,454,79,77)
//eye black
fill(0)
ellipse(585,457,65,63)
push()
scale(-1,1)
translate(-1450,0)
//right eye
fill(159,145,77)
ellipse(582,461,139,129)
//eye white
fill(300)
ellipse(583,454,79,77)
//eye black
fill(0)
ellipse(585,457,65,63)
pop()
//spots
//head
fill(137,122,55)
ellipse(739,489,80,43)
ellipse(672,519,30,23)
ellipse(791,541,30,25)
//mouth
fill(186,180,102)
ellipse(535,641,26,23)
ellipse(556,663,14,16)
ellipse(898,646,24)
ellipse(874,668,17,15)
//left leg
fill(78,73,17)
ellipse(213,690,52,51)
ellipse(217,742,17,15)
ellipse(252,751,22,19)
ellipse(348,983,15,16)
ellipse(369,975,8,9)
//right leg
ellipse(1202,644,25,28)
ellipse(1233,673,28)
ellipse(1216,701,15,17)
ellipse(1057,979,26)
ellipse(1088,976,12)
}
function keyPressed(){
if (key === 's' || key === 'S'){
save('NPCfrog.png')
}}