lovr.graphics.cube

Draws a cube.

lovr.graphics.cube(mode, x, y, z, size, angle, ax, ay, az)

Arguments

NameTypeDefaultDescription
modeDrawStyleHow to draw the cube.
xnumber0The x coordinate of the center of the cube.
ynumber0The y coordinate of the center of the cube.
znumber0The z coordinate of the center of the cube.
sizenumber1The size of the cube, in meters.
anglenumber0The rotation of the cube around its rotation axis, in radians.
axnumber0The x coordinate of the cube's axis of rotation.
aynumber1The y coordinate of the cube's axis of rotation.
aznumber0The z coordinate of the cube's axis of rotation.

Returns

Nothing


lovr.graphics.cube(material, x, y, z, size, angle, ax, ay, az)

Arguments

NameTypeDefaultDescription
materialMaterialThe Material to apply to the cube faces.
xnumber0The x coordinate of the center of the cube.
ynumber0The y coordinate of the center of the cube.
znumber0The z coordinate of the center of the cube.
sizenumber1The size of the cube, in meters.
anglenumber0The rotation of the cube around its rotation axis, in radians.
axnumber0The x coordinate of the cube's axis of rotation.
aynumber1The y coordinate of the cube's axis of rotation.
aznumber0The z coordinate of the cube's axis of rotation.

Returns

Nothing


lovr.graphics.cube(mode, transform)

Arguments

NameTypeDescription
modeDrawStyleHow to draw the cube.
transformmat4The cube's transform.

Returns

Nothing


lovr.graphics.cube(material, transform)

Arguments

NameTypeDescription
materialMaterialThe Material to apply to the cube faces.
transformmat4The cube's transform.

Returns

Nothing

See also