Creating and running a game, along with management of update and draw functions.
Creating and running a game, along with management of update and draw functions.
Default initial values for the state map. The result of the game's
:setup function will be merged on top.
Default initial values for the `state` map. The result of the game's `:setup` function will be merged on top.
Default game configuration options.
Default game configuration options.
(draw-wrapper {:keys [parent-draw-fn] :as state})Allow us to change our draw function.
Allow us to change our draw function.
(game
{:keys [init-scenes-fn restart-fn current-scene]
:or {init-scenes-fn (constantly {}) restart-fn identity current-scene :none}
:as override-opts})Create a quip game configuration.
Takes a single override-opts map argument which contains overrides
for default-opts.
Works with an empty override-opts, but needs a :init-scenes-fn
and a :current-scene to start doing anything useful.
Create a quip game configuration. Takes a single `override-opts` map argument which contains overrides for `default-opts`. Works with an empty `override-opts`, but needs a `:init-scenes-fn` and a `:current-scene` to start doing anything useful.
(start! {:keys [title size setup update draw focus-gained focus-lost key-pressed
key-released mouse-pressed mouse-released mouse-entered
mouse-exited mouse-clicked mouse-moved mouse-dragged mouse-wheel
middleware on-close]
:as game})Run a quip game configuration as a quil sketch.
Run a quip game configuration as a quil sketch.
(update-framerate {:keys [fr-window] :as state})Keep track of the current average framerate.
Keep track of the current average framerate.
(update-wrapper {:keys [parent-update-fn] :as state})Allow us to change our update function.
Allow us to change our update function.
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 |