xxxxxxxxxx
102
function setup() {
createCanvas(800, 800);
background("#ffffff");
noCursor();
noSmooth();
}
function draw() {
if (mouseX != pmouseX && mouseY != pmouseY) kirby(mouseX, mouseY, 100);
let step = int(map(sin(frameCount / 50), -1, 1, 1, 10));
copy(0, 0, width, height, -step, -step, width + step * 2, height + step * 2);
}
function kirby(x, y, s) {
strokeWeight(5);
stroke(100,0,0)
fill(200,100,100);
ellipse(460,540,70,90);
ellipse(340,540,70,90);
fill(0,0,100);
ellipse(345,640,75,30);
ellipse(455,640,75,30);
fill(0,0,100)
ellipse(500,550,40,40);
ellipse(300,550,40,40);
fill(200,100,100);
ellipse(400,560,170,170);
fill(0,0,100)
ellipse(400,550,160,150);
fill(360,100,100);
rect(325,475,150,20)
fill(200,100,100);
ellipse(400,405,200,175);
fill(0,0,100);
ellipse(400,420,190,150);
fill(100,0,100);
ellipse(380,350,40,50);
fill(100,0,100);
ellipse(420,350,40,50);
fill(0,360,100);
ellipse(400,380,30,28);
fill(0,0,100);
arc(400,420,150,100,0,600)
fill(0,0,0);
ellipse(390,355,10,20)
fill(0,0,0)
ellipse(410,355,10,20)
line(400,394,400,467)
line(410,400,450,390)
line(410,405,460,400)
line(410,410,450,410)
line(390,400,350,390)
line(390,405,340,400)
line(390,410,350,410)
fill(0,0,100);
ellipse(400,560,120,80);
stroke(0,0,100)
rect(340,520,120,40);
stroke(0,0,0);
fill(60,100,100);
ellipse(400,505,34,34);
}
function keyPressed(){
save();
}