xxxxxxxxxx
14
function setup() {
createCanvas(windowWidth, windowHeight);
colorMode(HSB, 360, 100, 100, 100);
}
function draw() {
let bgCol = map(mouseX, 0, width, 0, 360);
background(bgCol, 100, 100);
translate(width / 2, height / 2);
let a = atan2(mouseY - height / 2, mouseX - width / 2);
rotate(a);
rectMode(CENTER);
rect(0, 0, 200, 50);
}