xxxxxxxxxx
26
let shapeState = 2
function setup() {
createCanvas(windowWidth,windowHeight);
strokeWeight(2);
}
function mouseDragged(){
shapeState = 2
}
function draw() {
background(255, 94, 53);
if(shapeState == 2) {
fill(217, 24, 165);
push();
translate(mouseX, mouseY);
let angle = atan2(mouseY - height / 2, mouseX - width / 2);
rotate(angle);
pop();
}
}