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-curve! state points color & opts)Takes a sequence of points and connects them with lines.
See the clunk.util/bezier-curve function.
Takes a sequence of points and connects them with lines. See the `clunk.util/bezier-curve` function.
(draw-lines! {:keys [shader-programs] :as state}
lines
color
&
{:keys [line-width] :or {line-width default-line-width}})(fill-poly! {:keys [shader-programs] :as state} pos poly color)Draw a polygon filled with the specified colour.
Draw a polygon filled with the specified colour.
(fill-polys! {:keys [shader-programs] :as state} poly-data color)Draw a collection of polygons filled with the same color.
Draw a collection of polygons filled with the same color.
(render-vertices! {:keys [ortho-projection]}
[x y]
vertices
color
primitive-mode
shader-program)cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |