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
Name | Type | Default | Description |
mode | DrawStyle | How to draw the box. | |
x | number | 0 | The x coordinate of the center of the box. |
y | number | 0 | The y coordinate of the center of the box. |
z | number | 0 | The z coordinate of the center of the box. |
width | number | 1 | The width of the box, in meters. |
height | number | 1 | The height of the box, in meters. |
depth | number | 1 | The depth of the box, in meters. |
angle | number | 0 | The rotation of the box around its rotation axis, in radians. |
ax | number | 0 | The x coordinate of the axis of rotation. |
ay | number | 1 | The y coordinate of the axis of rotation. |
az | number | 0 | The z coordinate of the axis of rotation. |
Returns
Nothing
lovr.graphics.box(material, x, y, z, width, height, depth, angle, ax, ay, az)
Arguments
Name | Type | Default | Description |
material | Material | The Material to apply to the box. | |
x | number | 0 | The x coordinate of the center of the box. |
y | number | 0 | The y coordinate of the center of the box. |
z | number | 0 | The z coordinate of the center of the box. |
width | number | 1 | The width of the box, in meters. |
height | number | 1 | The height of the box, in meters. |
depth | number | 1 | The depth of the box, in meters. |
angle | number | 0 | The rotation of the box around its rotation axis, in radians. |
ax | number | 0 | The x coordinate of the axis of rotation. |
ay | number | 1 | The y coordinate of the axis of rotation. |
az | number | 0 | The z coordinate of the axis of rotation. |
Returns
Nothing
lovr.graphics.box(mode, transform)
Arguments
Name | Type | Description |
mode | DrawStyle | How to draw the box. |
transform | mat4 | The transform of the box. |
Returns
Nothing
lovr.graphics.box(material, transform)
Arguments
Name | Type | Description |
material | Material | The Material to apply to the box. |
transform | mat4 | The transform of the box. |
Returns
Nothing
See also
lovr.graphics