drawPolygon(opt: DrawPolygonOpt): void

Draw a convex polygon from a list of vertices.

paramopt- The draw polygon options.

drawPolygon({
    pts: [
        vec2(-12),
        vec2(0, 16),
        vec2(12, 4),
        vec2(0, -2),
        vec2(-8),
    ],
    pos: vec2(100, 200),
    color: rgb(0, 0, 255),
});

sincev3000.0

kaplay logo

Misc

Layer