pub static box: RBoxInternalTypeExpand description
Draw a box with given width, height and depth
Examples
// draw a spinning box
// with width, height and depth of 50
function setup() {
createCanvas(100, 100, WEBGL);
}
function draw() {
background(200);
rotateX(frameCount * 0.01);
rotateY(frameCount * 0.01);
box(50);
}Parameters
width? width of the box
Height? height of the box
depth? depth of the box
detailX? Optional number of triangle
subdivisions in x-dimension
detailY? Optional number of triangle
subdivisions in y-dimension