This week I solved the rotation problem that I had been eager to solve last week. The two small yellow flowers on the braid are using the knowledge of rotation. But I encountered a problem. When I added angleMode(DEGREES); following the tutorial, an error occurred, some graphics are messed up, which made me very confused.
function setup() {
createCanvas(500, 500);
angleMode(DEGREES);
}
In the background, I change the color according to the moving position of the mouse X using function map. I set the RGB color of the rectangle on the clothes to random. But I want to slow down the flashing frequency. I haven't solved this problem yet.
function draw() {
r = map(mouseX, 0, 500, 0, 255);
b = map(mouseX, 0, 500, 255, 0);
background(r, 0, b);
r = random(0, 255);
g = random(0, 255);
b = random(0, 255);
fill(r, g, b, 90);