/*https://editor.p5js.org/p5/sketches/3D:_geometries
* @name Geometries
* @description There are six 3D primitives in p5 now.
*/
function setup() {
createCanvas(710, 400, WEBGL);
}
function draw() {
background(250);
translate(-240, -100, 0);
normalMaterial();
push();
rotateZ(frameCount * 0.01);
rotateX(frameCount * 0.01);
rotateY(frameCount * 0.01);
plane(70);
pop();
translate(240, 0, 0);
push();
rotateZ(frameCount * 0.01);
rotateX(frameCount * 0.01);
rotateY(frameCount * 0.01);
box(70, 70, 70);
pop();
translate(240, 0, 0);
push();
rotateZ(frameCount * 0.01);
rotateX(frameCount * 0.01);
rotateY(frameCount * 0.01);
cylinder(70, 70);
pop();
translate(-240 * 2, 200, 0);
push();
rotateZ(frameCount * 0.01);
rotateX(frameCount * 0.01);
rotateY(frameCount * 0.01);
cone(70, 70);
pop();
translate(240, 0, 0);
push();
rotateZ(frameCount * 0.01);
rotateX(frameCount * 0.01);
rotateY(frameCount * 0.01);
torus(70, 20);
pop();
translate(240, 0, 0);
push();
rotateZ(frameCount * 0.01);
rotateX(frameCount * 0.01);
rotateY(frameCount * 0.01);
sphere(70);
pop();
}