xxxxxxxxxx
48
function setup() {
createCanvas(500, 600, WEBGL);
background(100);
angleMode(DEGREES);
}
function draw() {
background(255);
orbitControl();
rotateY(-35);
let worldSize = 300;
let gridSize = 10;
for (let rad = 120; rad > 60; rad -= 5) {
for (let i = 0; i < 360; i += 3) {
let x = sin(i) * rad;
let z = cos(i) * rad;
let y = 20 * sin(frameCount * 2 + i * 7);
let h = 130;
push();
translate(x, y + h, z);
noFill();
noStroke();
fill(81, 130, 155, 150);
box(5);
pop();
}
}
for (let rad = 120; rad > 60; rad -= 5) {
for (let i = 0; i < 360; i += 3) {
let x = sin(i) * rad;
let z = cos(i) * rad;
let y = 20 * sin(frameCount + i * 7);
let h = 50;
push();
translate(z, y + h, x);
noFill();
noStroke();
fill(251, 168, 52, 150);
box(5);
pop();
}
}
}