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-curves! state curves color & opts)(draw-ellipse! state pos size color & opts)(draw-ellipses! state ellipse-data color & opts)(draw-line! state p1 p2 color & opts)(draw-lines! {:keys [shader-programs] :as state}
             lines
             color
             &
             {:keys [line-width] :or {line-width default-line-width}})(draw-poly! state pos poly color & opts)(draw-polys! state poly-data color & opts)(draw-rect! state pos [w h] color & opts)(draw-rects! state rect-data color & opts)(fill-ellipse! state pos size color)(fill-ellipses! state ellipse-data color)(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.
(fill-rect! state pos [w h] color)(fill-rects! state rect-data 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 |