xxxxxxxxxx
104
// let dancer;
// function setup() {
// // no adjustments in the setup function needed...
// createCanvas(windowWidth, windowHeight);
// // ...except to adjust the dancer's name on the next line:
// dancer = new MikaelaDancer(width / 2, height / 2);
// }
// function draw() {
// background(0);
// drawFloor();
// dancer.update();
// dancer.display();
// }
class Logo2 {
constructor(startX, startY) {
this.x = startX;
this.y = startY;
}
update() {
// this.x = this.x + sin(frameCount * 0.1)*2;
// this.y = this.y + cos(frameCount * 0.1)*3;
// update properties here to achieve
// your dancer's desired moves and behaviour
}
display() {
push();
translate(this.x, this.y);
drawArms(0,0,5);
//body
noStroke();
fill("white");
ellipse(0, 40, 90, 70);
noFill();
strokeWeight(6);
stroke(239, 68, 68);
//right legs
// curve(5, 55, 23, 53, 56, 71, 17, 122);
// curve(5, 55, 23, 53, 56, 55, 17, 122);
//left legs
// curve(-5, 55, -23, 53, -56, 71, -17, 122);
// curve(-5, 55, -23, 53, -56, 55, -17, 122);
//hat
push();
fill(149, 106, 67);
noStroke();
rotate(9);
arc(3, -3, 40, 40, 0, PI + QUARTER_PI, CHORD);
pop();
//brim
stroke(149, 106, 67);
line(-40, 10, 40, 10);
//arms
function drawArms(x,y,speed){
push();
let angle = frameCount/(speed);
rotate(radians(cos(angle)*8));
translate(0, -10);
strokeWeight(15);
stroke("pink");
//left arm
curve(-5, 15, -35, 47, -56, 28, -17, 40);
//line(-50,39,-66,34);
//right arm
curve(5, 15, 35, 47, 56, 28, 17, 40);
//line(50,39,66,34);
//line(50,39,66,34);
//ellipse(60, 20, 10, 10); // hand
pop();
}
//eyes
noStroke();
fill("black");
ellipse(15, 30, 10, 15);
ellipse(-15, 30, 10, 15);
// mouth
noStroke();
fill("black");
ellipse(0, 50, 10, 15);
pop();
}
}