xxxxxxxxxx
39
function setup() {
createCanvas(windowWidth,windowHeight);
frameRate(30);
}
count=0;
function draw() {
p=(count%100)/100.0;
count++;
background(0);
noFill();
strokeWeight(100);
strokeCap(ROUND);
colorMode(RGB,100);
randomSeed(192131);
translate(width/2,-p*height*3);
c=int(count/20)%4;
for(i=0;i<100;i++){
y=random(0,height*4);
stroke( c==0?100:0 ,c==1?30:0,c==2?100:0);
x=random(0,0.9);
x=width*x;
//x=width/2*(1-x*x*x)
line( x,y, x,y+1*width/5*0);
line(-x,y,-x,y+1*width/5*0);
}
}
function mousePressed() {
let fs = fullscreen();
fullscreen(!fs);
}
function windowResized() {
resizeCanvas(windowWidth, windowHeight);
}