KKKIIO/selene/mesh2d provides centered rectangle and circle primitives plussegment, polyline, triangle, convex polygon, ellipse, vertical capsule, regularpolygon, circular sector, and annulus geometry. Explicit points useentity-local coordinates; ellipse sizes are half sizes, capsule length is thestraight-section half length, and sector angles are radians centered on thepositive x axis.
Filled primitives are triangulated into the backend-independentGeometryDrawCommand2D contract and render consistently through both theWebGPU and raylib backends. Tessellation and local bounds are cached when anasset is registered or updated. Segments and polylines use one-pixel linelists. Convex polygon points must describe a convex boundary in order.Textured ColorMaterial projection remains specific to rectangle meshes;other primitives use the material color.
Construct assets with Mesh2dAsset::ellipse(...),Mesh2dAsset::convex_polygon(...), and the other named constructors, or usethe matching ellipse(...), convex_polygon(...), and related helpers toregister an asset and receive a Mesh2dHandle.