lovr.graphics.circle

Draws a 2D circle.

lovr.graphics.circle(mode, x, y, z, radius, angle, ax, ay, az, segments)

Arguments

NameTypeDefaultDescription
modeDrawStyleWhether the circle is filled or outlined.
xnumber0The x coordinate of the center of the circle.
ynumber0The y coordinate of the center of the circle.
znumber0The z coordinate of the center of the circle.
radiusnumber1The radius of the circle, in meters.
anglenumber0The rotation of the circle around its rotation axis, in radians.
axnumber0The x coordinate of the circle's axis of rotation.
aynumber1The y coordinate of the circle's axis of rotation.
aznumber0The z coordinate of the circle's axis of rotation.
segmentsnumber32The number of segments to use for the circle geometry. Higher numbers increase smoothness but increase rendering cost slightly.

Returns

Nothing


lovr.graphics.circle(material, x, y, z, radius, angle, ax, ay, az, segments)

Arguments

NameTypeDefaultDescription
materialMaterialThe Material to apply to the circle.
xnumber0The x coordinate of the center of the circle.
ynumber0The y coordinate of the center of the circle.
znumber0The z coordinate of the center of the circle.
radiusnumber1The radius of the circle, in meters.
anglenumber0The rotation of the circle around its rotation axis, in radians.
axnumber0The x coordinate of the circle's axis of rotation.
aynumber1The y coordinate of the circle's axis of rotation.
aznumber0The z coordinate of the circle's axis of rotation.
segmentsnumber32The number of segments to use for the circle geometry. Higher numbers increase smoothness but increase rendering cost slightly.

Returns

Nothing


lovr.graphics.circle(mode, transform, segments)

Arguments

NameTypeDefaultDescription
modeDrawStyleWhether the circle is filled or outlined.
transformmat4The circle's transform.
segmentsnumber32The number of segments to use for the circle geometry. Higher numbers increase smoothness but increase rendering cost slightly.

Returns

Nothing


lovr.graphics.circle(material, transform, segments)

Arguments

NameTypeDefaultDescription
materialMaterialThe Material to apply to the circle.
transformmat4The circle's transform.
segmentsnumber32The number of segments to use for the circle geometry. Higher numbers increase smoothness but increase rendering cost slightly.

Returns

Nothing

Notes

The local normal vector of the circle is (0, 0, 1).

See also