xxxxxxxxxx
function setup() {
createCanvas(400, 400, WEBGL);
}
function draw() {
background(168, 199, 187);
ambientLight(247, 127, 0);
noStroke();
// add point light to showcase specular material
let locX = mouseX - width / 2;
let locY = mouseY - height / 2;
pointLight(255,255,255, locX, locY, 50);
specularMaterial(252, 191, 73);
shininess(50);
//rotate(millis*0.1);
for(let i = 0;i<10;i++){
for (let z=0;z<10;z++){
for (let p=0;p<10;p++){
push();
translate(width/3*-1+z*30,height/3*-1+i*30,p*30*-1);
rotate(millis()*0.001);
box(20,20,20);
pop();
}
}
}
orbitControl();
}
function keyPressed() {
// this will download the first 5 seconds of the animation!
if (key === 's') {
saveGif('myNFT', 5);
}
}