(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`.
(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
(init-glfw {[initial-window-width initial-window-height] :size :as state})
Initialise GLFW, most GLFW functions will not work before doing this
Initialise GLFW, most GLFW functions will not work before doing this
(init-nanovg state)
Initialise text rendering stuff
Initialise text rendering stuff
(init-transparency state)
enable transprency for drawing images
enable transprency for drawing images
(preload-assets! window {audio-assets :audio image-assets :image})
Pre-load assets and display a loading bar
Pre-load assets and display a loading bar
(process-event {:keys [current-scene scenes] :as state}
{:keys [event-type] :as e})
(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.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close