xxxxxxxxxx
23
/*
* @name Geometries
* @description There are six 3D primitives in p5 now.
*/
function setup() {
createCanvas(710, 400, WEBGL);
}
function draw() {
background(250);
ambientLight(250, 200, 250);
ambientMaterial(255);
translate(50, 0, 0);
push();
rotateZ(frameCount * 0.001);
rotateX(frameCount * 0.001);
rotateY(frameCount * 0.001);
sphere(100);
pop();
}