xxxxxxxxxx
45
function setup() {
createCanvas(1920/2, 1080/2, WEBGL);
colors=[];
colors.push(color("#0557f0"));
colors.push(color("#ff3c13"));
colors.push(color("#ffa6b4"));
colors.push(color("#efddcf"));
graphics=createGraphics(100, 100);
//frameRate(30);
}
function draw() {
background(0);
//translate(-width/2, -height/2);
for (let i=-height; i<=height; i+=100){
for (let j=-width; j<=width; j+=100){
push();
translate(i, j);
rotateX(frameCount * 0.01);
rotateY(frameCount * 0.01);
plane(100);
pop();
}
}
noStroke();
//strokeWeight(3);
texture(graphics);
for(var x=0;x<graphics.width;x+=5){
for(var i=0;i<graphics.height;i+=5){
let c = colors[int(i/(sin(i)*cos(frameCount/20+mouseX/100)*5+40+sin(x/100+i/100 +mouseY/100+noise(frameCount/10,i,x))*10) +frameCount/8)%colors.length]
// c.setRed(random(3))
graphics.fill(c)
graphics.rect(x,i,5)
}
}
}