These side-effecting functions draw various shapes to the game window.
Positions (pos
) are [x y]
vectors, so are
dimensions (size
).
Polygons (poly
) are a vector of [x y]
point vectors which are
relative to the pos
.
Colors are [r g b a]
vectors.
These side-effecting functions draw various shapes to the game window. Positions (`pos`) are `[x y]` vectors, so are dimensions (`size`). Polygons (`poly`) are a vector of `[x y]` point vectors which are relative to the `pos`. Colors are `[r g b a]` vectors.
(draw-line! [x1 y1]
[x2 y2]
[r g b a]
&
{:keys [line-width] :or {line-width default-line-width}})
(draw-poly! [x y]
poly
[r g b a]
&
{:keys [line-width] :or {line-width default-line-width}})
(fill-concave-poly! pos poly color)
Draw a concave polygon filled with the specified colour.
Draw a concave polygon filled with the specified colour.
(fill-convex-poly! [x y] poly [r g b a])
Draw a convex polygon filled with the specified colour.
Draw a convex polygon filled with the specified colour.
(fill-poly! pos poly color)
Draw a polygon filled with the specified colour.
Draw a polygon filled with the specified colour.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close