Pass:roundrect
EditDraws a rounded rectangle.
Arguments
Name | Type | Default | Description |
x | number | 0 | The x coordinate of the center of the rectangle. |
y | number | 0 | The y coordinate of the center of the rectangle. |
z | number | 0 | The z coordinate of the center of the rectangle. |
width | number | 1 | The width of the rectangle. |
height | number | 1 | The height of the rectangle. |
thickness | number | 1 | The thickness of the rectangle. |
angle | number | 0 | The rotation of the rectangle around its rotation axis, in radians. |
ax | number | 0 | The x component of the axis of rotation. |
ay | number | 1 | The y component of the axis of rotation. |
az | number | 0 | The z component of the axis of rotation. |
radius | number | 0 | The radius of the rectangle corners. If the radius is zero or negative, the rectangle will have sharp corners. |
segments | number | 8 | 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
Name | Type | Default | Description |
position | Vec3 | The position of the rectangle. | |
size | Vec3 | The size of the rectangle (width, height, thickness). | |
orientation | Quat | The orientation of the rectangle. | |
radius | number | 0 | The radius of the rectangle corners. If the radius is zero or negative, the rectangle will have sharp corners. |
segments | number | 8 | 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
Name | Type | Default | Description |
transform | Mat4 | The transform of the rectangle. | |
radius | number | 0 | The radius of the rectangle corners. If the radius is zero or negative, the rectangle will have sharp corners. |
segments | number | 8 | 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