xxxxxxxxxx
48
let i = 0;
let x = 0;
let circleX = 0;
let circleY = 0;
let sz = 25;
let spd = 10;
let h = 0;
let s = 100;
let l = 50;
function setup() {
createCanvas(600, 600);
background(0);
}
function mousePressed(){
//circleY = (circleY + 90)%height;
h = (h + 20)%360;
}
function draw() {
blendMode(BLEND);
noStroke();
colorMode(HSL);
fill(h,s,l);
ellipse(circleX, circleY, sz);
i = i + spd;
circleX = i%(width+sz);
circleY = ((ceil(i/(width+sz))*100+mouseX/30*sin(i/20)))%(height+sz);
fill(0);
rect(0,0,600,120)
stroke(255);
s
line(0,120,600,120);
blendMode(BLEND);
textSize(32);
textAlign(LEFT,CENTER);
fill(255);
text('Click to Change Color',20,30)
text('Move the Mouse to change Amp',20,70)
}