xxxxxxxxxx
function setup() {
createCanvas(windowWidth, windowHeight);
background(0);
}
function draw() {
frameRate(400)
//background(0)
colorMode(HSB, 360, 100, 100);
for(i=0; i<millis()/10; i++)
{
var col = map(i, 0, width, 0, 360);
stroke(col, 100, 100);
//line(i, 0, i, height);
if (mouseIsPressed)
{
push();
translate(width/2, height/2);
rotate(radians(col));
rectMode(CENTER);
noFill();
rect(0,0,col,col);
pop();
}
else{
rectMode (CENTER);
fill (0);
rect (windowWidth/2,windowHeight/2,900,600);
}
}
}