xxxxxxxxxx
24
function setup() {
createCanvas(400, 400, WEBGL);
colorMode(HSB, 100);
}
function draw() {
background(220);
//stroke(255);
noStroke();
rotateX(sin(frameCount * 0.01));
rotateY(cos(frameCount * 0.02));
//ambientLight(150);
for (let x=10; x<width; x+=20) {
for (let y=10; y<height; y+=20) {
push()
translate(x - 200, y - 200);
let n = noise(x/100, y/100, frameCount/10);
//ambientMaterial(map(n, -1, 1, 25, 75), 75, 100);
fill(map(n, -1, 1, 25, 75), 75, 100);
box(20, 20, n * 100);
pop();
}
}
}