xxxxxxxxxx
function setup() {
createCanvas(1000, 800);
background(100);
}
function draw() {
if (mouseX <= width / 2) {
background(102, 255, 255)
//suelo
fill(204, 255, 255)
ellipse(500, 800, 1100, 600)
ellipse(0, 800, 1000, 600)
ellipse(800, 800, 1000, 600)
if(mouseIsPressed){
circle(random(0,400),random(0,800),200)
}
fill(102, 51, 0)
rect(500, 350, 40, 150)
fill(102, 153, 0)
triangle(520, 360, 440, 470, 600, 470)
triangle(520, 330, 460, 420, 580, 420)
triangle(520, 300, 480, 370, 560, 370)
//navidad
fill(255, 0, 0)
circle(500, 358, 20)
circle(530, 450, 20)
circle(560, 410, 20)
circle(510, 400, 20)
fill(255)
circle(10, 160, 50)
circle(0, 190, 50)
circle(30, 110, 50)
circle(40, 120, 50, 100)
fill(102, 51, 0)
rect(0, 190, 40, 60)
rect(0, 320, 100, 200)
quad(0, 200, 0, 320, 100, 320)
fill(255)
circle(300, 100, 100)
circle(800, 530, 80)
circle(800, 500, 50)
circle(800, 480, 40)
fill(0)
stroke(10)
circle(800, 550, 5)
circle(800, 520, 5)
circle(800, 535, 5)
circle(800, 510, 5)
circle(790,480,5)
circle(810,480,5)
fill(255, 153, 0)
triangle(800,510,795,485,805,485)
} else {
background(102, 204, 255)
fill(255, 255, 0)
circle(300, 100, 100)
//suelo
fill(102, 153, 0)
ellipse(500, 800, 1100, 600)
ellipse(0, 800, 1000, 600)
fill(102, 51, 0)
rect(500, 350, 40, 150)
fill(102, 153, 0)
triangle(520, 360, 440, 470, 600, 470)
triangle(520, 330, 460, 420, 580, 420)
triangle(520, 300, 480, 370, 560, 370)
fill(51, 153, 255)
rect(410,503,40,800)
fill(102, 153, 0)
ellipse(800, 800, 1000, 600)
fill(102, 51, 0)
rect(0, 190, 40, 60)
rect(0, 320, 100, 200)
quad(0, 200, 0, 320, 100, 320)
}
fill(255, 0, 0)
ellipse(mouseX, mouseY, 50, 50)
}