Py5Graphics.box()

A box is an extruded rectangle.

Description

A box is an extruded rectangle. A box with equal dimensions on all sides is a cube.

This method is the same as box() but linked to a Py5Graphics object. To see example code for how it can be used, see box().

Underlying Java method: PGraphics.box

Syntax

box(size: float, /) -> None
box(w: float, h: float, d: float, /) -> None

Parameters

  • d: float - dimension of the box in the z-dimension

  • h: float - dimension of the box in the y-dimension

  • size: float - dimension of the box in all dimensions (creates a cube)

  • w: float - dimension of the box in the x-dimension

Updated on September 11, 2021 16:51:34pm UTC