xxxxxxxxxx
let x
let y
function setup() {
createCanvas(500, 400);
background(242, 224, 206);
x = 0
y = 0
//blackboard
stroke(0)
fill(242, 189, 41)
rect(0, 0, 500, 400)
fill(23, 92, 35)
rect(10, 10, 480, 180)
}
function draw(){
// whiteboard drawing
noStroke(0)
fill(255)
ellipse(mouseX, mouseY, 3, 3);
//classroom
stroke(0)
fill(115, 43, 13)
rect(0, 200, 500, 300)
fill(140, 51, 13)
rect(0, 210, 500, 300)
//rectX = rectX + 1 * (deltaTime / 50);
//ears
stroke(0)
fill(255, 200, 191)
ellipse(x+340,y+170,60,150)
ellipse(x+390,y+160,60,150)
//innerears
stroke(0)
fill(255)
ellipse(x+340,y+190,40,150)
ellipse(x+390,y+180,40,150)
//headshape
noStroke()
fill(255, 200, 191)
rect(x+165, y+220, 265, 300, 70);
ellipse(x+320,y+265,220,250)
if (mouseIsPressed){
//eyes
stroke(0)
fill(255)
circle(x+290,y+195,45)
circle(x+340,y+195,45)
//eyeballs
stroke(0)
fill(0)
circle(x+290,y+195,10)
circle(x+340,y+195,10)
//ripped shirt
stroke(0)
fill(255)
triangle(x+280, y+320, x+300, 340, x+320, 320)
triangle(x+220, y+320, x+250, 330, x+280, 320)
triangle(x+320, y+320, x+360, 330, x+380, 320)
// nipples
noStroke(0)
fill(250, 207, 200)
circle(x+230,y+350,20)
circle(x+350,y+350,20)
fill(227, 161, 150)
circle(x+230,y+350,10)
circle(x+350,y+350,10)
fill(61, 24, 10)
circle(x+230,y+350,3)
circle(x+350,y+350,3)
//underchin
// stroke(255, 102, 0);
//curve(73, 24, 73, 61, 15, 65, 15, 65);
//arms
stroke(0)
fill(255, 200, 191)
ellipse(x+190,y+370,75,170)
ellipse(x+400,y+370,75,170)
//text
fill(255)
textSize(40);
text('CUTEY CLASS 101',80,100)
}
else {
//shirt
stroke(0)
fill(245, 224, 191)
rect(x+165, y+320, 265, 200)
//blink
stroke(0)
line(x+270,y+195, x+305,195)
line(x+325,y+195, x+360,195)
//arms
stroke(0)
fill(245, 224, 191)
ellipse(x+190,y+370,75,170)
ellipse(x+400,y+370,75,170)
//arm cuffs
strokeWeight(5);
stroke(0)
line(x+154, y+380, x+225, y+380)
line(x+365, y+380, x+436, y+380)
//tie
strokeWeight(1);
stroke(0)
fill(68, 60, 194)
ellipse(x+300,y+360,8,70)
fill(29, 22, 135)
triangle(x+290, y+320, x+300, y+340, x+310, y+320);
}
//nose
strokeWeight(1);
stroke(0)
fill(250, 145, 208)
ellipse(x+310,y+223,30,15)
//line(305, 223, 315, 223);
//eyebrows
stroke(0)
fill(0)
rect(x+270, y+170, 40, 10, 20);
rect(x+320, y+170, 40, 10, 20);
//eyelashes
stroke(0)
fill(0)
rect(x+270, y+170, 40, 10, 20);
rect(x+320, y+170, 40, 10, 20);
//mouth
stroke(0)
fill(237, 109, 126)
rect(x+250, y+240, 70, 60, 80);
//teeth
stroke(0)
fill(255)
rect(x+260, y+240, 50, 30, 80, 80, 80, 80);
line(x+285, y+240, x+285, y+270);
if(keyIsPressed){
if(key == "ArrowRight")
x = x + 1
}
if(keyIsPressed){
if(key == "ArrowLeft")
x = x - 1
}
}