Liking cljdoc? Tell your friends :D

clunk.core


default-draw!clj

(default-draw! {:keys [vg default-font window current-scene] :as state})

default-on-closeclj

(default-on-close & _)

default-optsclj


default-window-resizeclj

(default-window-resize state e)

Default handler for :window-resize events.

Default handler for `:window-resize` events.
raw docstring

drain-events!clj

(drain-events!)

draw-background!clj

(draw-background! [r g b a])

draw-game!clj

(draw-game! {:keys [scenes current-scene] :as state})

Draw the game using the current scenes :draw-fn.

Draw the game using the current scenes `:draw-fn`.
raw docstring

draw-preload-progress!clj

(draw-preload-progress! {:keys [window] :as state} current total)

empty-queueclj


enqueue-event!clj

(enqueue-event! e)

eventsclj


gameclj

(game override-opts)

Create a game config map

Create a game config map
raw docstring

initclj

(init game-config)

init-audioclj

(init-audio state)

init-contextclj

(init-context {:keys [window] :as state})

init-error-callbackclj

(init-error-callback state)

Set up an error callback, the default implementation will print the error message in System.err

Set up an error callback, the default implementation will print
the error message in System.err
raw docstring

init-event-handlersclj

(init-event-handlers {:keys [window] :as state})

init-glfwclj

(init-glfw
  {[initial-window-width initial-window-height] :size :keys [title] :as state})

Initialise GLFW, most GLFW functions will not work before doing this

Initialise GLFW, most GLFW functions will not work before doing this
raw docstring

init-nanovgclj

(init-nanovg state)

Initialise text rendering stuff

Initialise text rendering stuff
raw docstring

init-orthoclj

(init-ortho state)

init-shadersclj

(init-shaders state)

init-transparencyclj

(init-transparency state)

enable transprency for drawing images

enable transprency for drawing images
raw docstring

main-loopclj

(main-loop {:keys [window] :as state})

position-windowclj

(position-window {:keys [window] :as state})

preload-assets!clj

(preload-assets! {:keys [window] :as state}
                 {audio-assets :audio image-assets :image})

Pre-load assets and display a loading bar

Pre-load assets and display a loading bar
raw docstring

process-eventclj

(process-event {:keys [current-scene scenes] :as state}
               {:keys [event-type] :as e})

quit!clj

(quit! {:keys [window]})

reset-ortho-projectionclj

(reset-ortho-projection {:keys [window] :as state})

start!clj

(start! {:keys [init-scenes-fn on-start-fn on-close-fn] :as game})

update-gameclj

(update-game {:keys [scenes current-scene last-frame-time] :as state})

Update the game state based on the current scenes :update-fn.

Applies all unprocessed events to the game.

Update the game state based on the current scenes `:update-fn`.

Applies all unprocessed events to the game.
raw docstring

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