toMesh

fun Rectangle.toMesh(resolution: Double = 2.0): VertexBuffer(source)

Converts a Rectangle to a VertexBuffer 2D mesh matching its location and dimensions. resolution specifies the size in pixels of the triangles in the mesh.

Return

A vertex buffer containing the triangles to render the 3D shape.