Pass:roundrect

Edit

Draws a rounded rectangle.




Arguments

NameTypeDefaultDescription
xnumber0 The x coordinate of the center of the rectangle.
ynumber0 The y coordinate of the center of the rectangle.
znumber0 The z coordinate of the center of the rectangle.
widthnumber1 The width of the rectangle.
heightnumber1 The height of the rectangle.
thicknessnumber1 The thickness of the rectangle.
anglenumber0 The rotation of the rectangle around its rotation axis, in radians.
axnumber0 The x component of the axis of rotation.
aynumber1 The y component of the axis of rotation.
aznumber0 The z component of the axis of rotation.
radiusnumber0 The radius of the rectangle corners. If the radius is zero or negative, the rectangle will have sharp corners.
segmentsnumber8 The number of circular segments to use for each corner. This increases the smoothness, but increases the number of vertices in the mesh.

Returns

Nothing

Arguments

NameTypeDefaultDescription
positionVec3 The position of the rectangle.
sizeVec3 The size of the rectangle (width, height, thickness).
orientationQuat The orientation of the rectangle.
radiusnumber0 The radius of the rectangle corners. If the radius is zero or negative, the rectangle will have sharp corners.
segmentsnumber8 The number of circular segments to use for each corner. This increases the smoothness, but increases the number of vertices in the mesh.

Returns

Nothing

Arguments

NameTypeDefaultDescription
transformMat4 The transform of the rectangle.
radiusnumber0 The radius of the rectangle corners. If the radius is zero or negative, the rectangle will have sharp corners.
segmentsnumber8 The number of circular segments to use for each corner. This increases the smoothness, but increases the number of vertices in the mesh.

Returns

Nothing

See also