xxxxxxxxxx
let f = 0;
let W = 400;
setup = _ => {
createCanvas(W, W, WEBGL);
noStroke();
}
draw = _ => {
background(0);
lights();
rotateX(-PI / 2);
for (y = -200; y < W; y += 50) {
rotateY(sin(y * 2 - f / 66) / 9);
for (z = -W; z < W; z += 20) {
for (x = -W; x < W; x += 20) {
push();
M = mag(x, z + f % 20);
fill(255 - (y * 2 + 255));
translate(x, y, z + f % 20);
sphere(5 - M / 28);
pop();
}
}
}
f++;
}
// Minimized version:
// f=0,draw=a=>{for(f++||createCanvas(W=400,W,WEBGL),background(0),lights(),rotateX(-PI/2),y=-200;y<W;y+=50)for(rotateY(sin(2*y-f/66)/9),z=-W;z<W;z+=20)for(x=-W;x<W;x+=20)push(),M=mag(x,z+f%20),fill(255-(2*y+255)),translate(x,y,z+f%20),sphere(5-M/28,W),pop()};//#つぶやきProcessing