xxxxxxxxxx
void setup()
{
size(500,500);
background(55);
}
void draw()
{
background(0,0,0);
float m=map(mouseX,0,width,200,300);
background(m,80,60);
println(m);
translate (width/2,width/2);
float x= sin(millis()/1000.0);
println(x);
noStroke();
rotate(millis()/2500.0);
if (mousePressed==false)
{
float h=map (12-1.1*mouseX,0,height,100,0);
colorMode(HSB,300,100,0);
fill(300,h,h);
rect(0,x*-100,x*140,x*130);
}
else if (mousePressed==true)
{
float h=map (12-1.1*mouseX,0,height,100,0);
colorMode(HSB,300,50,200);
fill(300,h,h);
ellipse(0,x*100,x*140,x*130);
}
}