lovr.graphics.box

Draws a box. This is similar to lovr.graphics.cube except you can have different values for the width, height, and depth of the box.

lovr.graphics.box(mode, x, y, z, width, height, depth, angle, ax, ay, az)

Arguments

NameTypeDefaultDescription
modeDrawStyleHow to draw the box.
xnumber0The x coordinate of the center of the box.
ynumber0The y coordinate of the center of the box.
znumber0The z coordinate of the center of the box.
widthnumber1The width of the box, in meters.
heightnumber1The height of the box, in meters.
depthnumber1The depth of the box, in meters.
anglenumber0The rotation of the box around its rotation axis, in radians.
axnumber0The x coordinate of the axis of rotation.
aynumber1The y coordinate of the axis of rotation.
aznumber0The z coordinate of the axis of rotation.

Returns

Nothing


lovr.graphics.box(material, x, y, z, width, height, depth, angle, ax, ay, az)

Arguments

NameTypeDefaultDescription
materialMaterialThe Material to apply to the box.
xnumber0The x coordinate of the center of the box.
ynumber0The y coordinate of the center of the box.
znumber0The z coordinate of the center of the box.
widthnumber1The width of the box, in meters.
heightnumber1The height of the box, in meters.
depthnumber1The depth of the box, in meters.
anglenumber0The rotation of the box around its rotation axis, in radians.
axnumber0The x coordinate of the axis of rotation.
aynumber1The y coordinate of the axis of rotation.
aznumber0The z coordinate of the axis of rotation.

Returns

Nothing


lovr.graphics.box(mode, transform)

Arguments

NameTypeDescription
modeDrawStyleHow to draw the box.
transformmat4The transform of the box.

Returns

Nothing


lovr.graphics.box(material, transform)

Arguments

NameTypeDescription
materialMaterialThe Material to apply to the box.
transformmat4The transform of the box.

Returns

Nothing

See also