xxxxxxxxxx
function setup() {
createCanvas(windowWidth, windowHeight);
background(100);
}
function draw() {
//background(0);
colorMode(HSB, 360, 100, 100);
var col = map(mouseX, 0, width, 0, 360);
stroke(col, 100, 100);
//line(mouseX, 0, mouseX, height);
for(i=0; i<width; i++)
{
var col = map(i, 0, width, 0, 360);
var sat = map(mouseX, 0, width, 0, 100);
stroke(col, sat, 100);
line(i, 0, i, height);
push();
translate(width/2, height/2);
rotate(radians(col) );
rectMode(CENTER);
noFill();
rect(0, 0, col, col);
pop();
}
}