xxxxxxxxxx
153
function setup() {
createCanvas(800, 800);
}
function draw() {
background(0,0,0);
noStroke();
fill(255);
rect(450,450,300,300); //작은하트
fill(0,0,0);
rect(450,450,150,150); //작은 그림자
fill(200,100,100);
quad(500,450,450,500,650,700,700,650); // 통로
fill(255);
rect(550,600,200,100); //작은
fill(255);
rect(600,550,100,200); //작은
fill(200,0,0);
rect(50,50,450,450); //큰 하트
fill(0,0,0);
rect(0,0,250,250); //큰 그림자
fill(200,0,0);
rect(420.5,420.5,80,80); // 큰 덮개
stroke(0);
fill(130,200,700);
rect(60,260,100,230); // 방 1
fill(200,200,500);
rect(185,280,130); // 방 2
fill(550,200,100);
rect(200,430,230,45); // 방 3
fill(30,190,100);
rect(300,60,130,70); // 방 4
fill(250,100,0);
rect(270,150,100); // 방 5
fill(220,130,200);
rect(390,200,100,200); // 방 6
noStroke(0);
fill(250,200,0);
ellipse(680,580,130,200); //방 7
fill(2,2,200);
triangle(680,550,480,690, 730,720); // 방 8
fill(300,0,0)
quad(460,730,490,610,650,700,650,740); // 방 9
fill(220)
stroke(0);
quad(53,420,53,370,130,340,130,470); // 문
fill(150,10,10);
ellipse(80,420,7,14); //문고리
// 책
fill(0);
arc(220, 340, 40, 20, PI,0, PIE);
arc(260, 340, 40, 20, PI,0, PIE);
rect(200,340,80,50);
fill(255);
arc(220, 390, 40, 20, PI,0, PIE);
arc(260, 390, 40, 20, PI,0, PIE);
stroke(255);
line(240,390,240,335);
//침대
stroke(0);
fill(0);
rect(465,250,20,130);
rect(440,235,45,10);
//배개
fill(220);
arc(460, 270, 20, 25, HALF_PI,0-HALF_PI, PIE);
//이불
fill(0);
arc(460, 330, 40, 89, HALF_PI,0-HALF_PI, PIE);
//변기
stroke(225);
ellipse(310,220,45,30);
ellipse(281,202,13,55);
stroke(0);
fill(225);
ellipse(310,220,22,13);
//휴지
rect(310,180,20,15)
//컵
fill(0);
stroke(0);
ellipse(370,90,20,10);
ellipse(370,110,20,10);
rect(360,90,19)
fill(225);
ellipse(370,90,18,8);
//컵 손잡이
fill(0);
arc(380,100, 15, 15, 0-HALF_PI,HALF_PI, PIE);
fill(30,190,100);
arc(380,100, 10, 10, 0-HALF_PI,HALF_PI, PIE);
//TV
fill(0);
rect(410,435,8,30);
rect(420,442,5,20);
//소파
arc(205,447, 15, 25, 0-HALF_PI,HALF_PI, PIE);
arc(225,465, 25, 25, PI,0, PIE);
rect(212.5,465,25,6)
//액자,그림
rect(325,436,21,10);
fill(225);
rect(326,437,19,8);
quad(329,439,336,443,342,439,336,441)
//신발
fill(0);
stroke(255);
arc(87, 300, 40, 20, PI,0, PIE);
arc(87, 310, 40, 20, PI,0, PIE);
arc(100, 333, 45, 30, PI,0, PIE);
arc(90, 343, 45, 30, PI,0, PIE);
arc(135, 310, 30, 20, PI,0, PIE);
arc(135,290, 30, 20, PI,0, PIE);
// 내 신발
arc(545, 525, 30, 20, 120,180, PIE);
arc(550, 550, 30, 20, 120,180, PIE);
if(mouseIsPressed){
console.log(mouseX + ','+ mouseY);}
}