Liking cljdoc? Tell your friends :D

clunk.shape

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.
raw docstring

default-line-widthclj


draw-curve!clj

(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.
raw docstring

draw-curves!clj

(draw-curves! state curves color & opts)

draw-ellipse!clj

(draw-ellipse! state pos size color & opts)

draw-ellipses!clj

(draw-ellipses! state ellipse-data color & opts)

draw-line!clj

(draw-line! state p1 p2 color & opts)

draw-lines!clj

(draw-lines! {:keys [shader-programs] :as state}
             lines
             color
             &
             {:keys [line-width] :or {line-width default-line-width}})

draw-poly!clj

(draw-poly! state pos poly color & opts)

draw-polys!clj

(draw-polys! state poly-data color & opts)

draw-rect!clj

(draw-rect! state pos [w h] color & opts)

draw-rects!clj

(draw-rects! state rect-data color & opts)

fill-ellipse!clj

(fill-ellipse! state pos size color)

fill-ellipses!clj

(fill-ellipses! state ellipse-data color)

fill-poly!clj

(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.
raw docstring

fill-polys!clj

(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.
raw docstring

fill-rect!clj

(fill-rect! state pos [w h] color)

fill-rects!clj

(fill-rects! state rect-data color)

render-vertices!clj

(render-vertices! {:keys [ortho-projection]}
                  [x y]
                  vertices
                  color
                  primitive-mode
                  shader-program)

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close