xxxxxxxxxx
205
//press the screen!
var skinColor = '#ffcc66';
var neckColor = '#ffeecc';
var ghairColor = '#663300';
var gpatternColor = '#b35900';
var pantsColor = '#336699';
var prettytextColor = '#ffcc66';
var justtextColor = '#ffffff'
function setup() {
createCanvas(400, 600);
angleMode(DEGREES);
}
function draw() {
background(255);
if (mouseIsPressed){
background(255, 204, 102);
skinColor = 0;
neckColor = 0;
ghairColor = 0;
gpatternColor = 255;
pantsColor = 0;
prettytextColor = '#ffcc66';
justtextColor = 0;
}else {
skinColor = '#ffcc66';
neckColor = '#ffeecc';
ghairColor = '#663300';
gpatternColor = '#b35900';
pantsColor = '#336699';
prettytextColor = '#ffcc66';
justtextColor = '#ffffff'
}
//text
push();
fill(prettytextColor);
textSize(30);
textFont('fontBold');
text('pretty', 30, 80);
pop();
push();
fill(justtextColor);
textSize(30);
textFont('fontBold');
text('just', 30, 550);
text('a', 200, 550);
pop();
push();
fill(0);
textSize(30);
textFont('fontBold');
text('girl', 330, 550);
pop();
//zombie feet
/*L*/
push();
translate(148, 500);
rotate(270);
noStroke();
fill(skinColor);
rect(0, 0, 22, 50, 100, 100, 0, 0);
pop();
/*R*/
push();
translate(277, 478);
rotate(-270);
noStroke();
fill(skinColor);
rect(0, 0, 22, 50, 100, 100, 0, 0);
pop();
//zombie legs
push();
noStroke();
fill(skinColor);
rect(227, 450, 18, 30);
pop();
//zombie pants
push();
noStroke();
fill(pantsColor);
rect(175, 360, 23, 120);
rect(225, 360, 23, 100);
pop();
//giraffe hair
ghair(245, 180, 45);
ghair(247, 190, 45);
ghair(249, 200, 45);
ghair(251, 210, 49);
ghair(252, 220, 47);
ghair(254, 230, 47);
ghair(256, 240, 48);
ghair(258, 250, 48);
ghair(260, 260, 48);
ghair(261, 270, 49);
ghair(263, 280, 47);
ghair(264, 292, 47);
ghair(266, 305, 51);
ghair(269, 315, 51);
ghair(271, 325, 53);
ghair(273, 335, 55);
//giraffe neck
push();
stroke(255, 221, 153);
strokeWeight(2);
fill(neckColor);
quad(230, 180, 260, 360, 160, 360, 190, 200);
pop();
//giraffe pattern
drawgpattern1(150,130,20);
drawgpattern1(180,140,40);
drawgpattern2(210,170,40);
drawgpattern2(170,85,30);
drawgpattern2(290,240,90);
drawgpattern3(290,210,90);
drawgpattern3(290,210,70);
drawgpattern3(170,150,20);
//head
push();
noStroke();
fill(skinColor);
ellipse(width/2, height/4, 100, 100);
ellipse(170, 130, 50, 30);
pop();
//nose
push();
noStroke();
fill(skinColor);
rotate(-20);
ellipse(105, 215, 50, 15);
pop();
//lips
push();
noStroke();
fill(skinColor);
rect(155, 170, 10, 15);
ellipse(170, 190, 20, 8);
pop();
//chin
push();
noStroke();
fill(skinColor);
rotate(-40);
ellipse(45, 260, 90, 50);
rotate(-40);
pop();
//hair
push();
noStroke();
fill(skinColor);
ellipse(230, 100, 50);
ellipse(260, 120, 40);
ellipse(270, 145, 30);
ellipse(280, 165, 20);
pop();
}
function ghair(ghairX, ghairY, ghairRotate) {
push();
translate(ghairX, ghairY);
fill(ghairColor);
rotate(ghairRotate);
rect(0, 0, 5, 22, 100);
pop();
}
function drawgpattern1(gpatternX, gpatternY, gpatternRotate){
push();
stroke(102, 51, 0);
translate(gpatternX, gpatternY);
rotate(gpatternRotate);
fill(gpatternColor);
ellipse(100,100,30,20)
pop();
}
function drawgpattern2(gpatternX, gpatternY, gpatternRotate){
push();
stroke(102, 51, 0);
translate(gpatternX, gpatternY);
rotate(gpatternRotate);
fill(gpatternColor);
ellipse(100,100,30,35)
pop();
}
function drawgpattern3(gpatternX, gpatternY, gpatternRotate){
push();
stroke(102, 51, 0);
translate(gpatternX, gpatternY);
rotate(gpatternRotate);
fill(gpatternColor);
ellipse(100,100,10,15)
pop();
}