box(w, [h], [d]);
Draw a 3D box.
Arguments
w
The width dimension[h]
The height dimension[d]
The depth dimensionfunction setup()
createWindow(300, 300, GL3D);
end
function draw()
background('purple');
box(150, 225, 180);
end
Output
function setup()
createWindow(300, 300, GL3D);
end
function draw()
background('purple');
rotateX(45);
rotateZ(45);
box(150, 225, 180);
end
Output