Maybe a draw polygon, and then you specify the number of sides and the radius? Then you also specify to fill or only be outlines. This would help with testing and prototyping. It’s a feature which other engines have better support of, and porting projects to Defold would be helped by adding it.
msg.post("@render:", "draw_polygon", { position = vmath.vector3(200, 200, 0), sides = 3, radius = 42, style = 0, rotation = 0, scale = 1 } )
-- draw a triangle with , 0 for outline only no fill
msg.post("@render:", "draw_convex_shape", { position = vmath.vector3(200, 200, 0), points = { ... }, style = 0, rotation = 0, scale = 1 } )
-- draw a convex hull, position would be based on the center of mass