Liking cljdoc? Tell your friends :D

brute.system

Utility functions for system management. Systems in brute are simply functions that manage aspects like Physics, Rendering, Camera etc

Utility functions for system management.
Systems in brute are simply functions that manage aspects like Physics, Rendering, Camera etc
raw docstring

add-system-fnclj/s

(add-system-fn system system-fn)

Add a function that represents a system, e.g. Physics, Rendering, etc. This needs to be in the structure: (fn [system delta]) where 'delta' is the number of milliseconds since the last game tick. This will also need to return the system in the state you want passed to the next system-fn, and ultimately out of process-one-game-tick. This will then be called directly when process-one-game-tick is called

Add a function that represents a system, e.g. Physics, Rendering, etc.
This needs to be in the structure: (fn [system delta]) where 'delta' is the number of milliseconds
since the last game tick. This will also need to return the system in the state you want passed to the
next system-fn, and ultimately out of process-one-game-tick.
This will then be called directly when `process-one-game-tick` is called
sourceraw docstring

add-throttled-system-fnclj/s

(add-throttled-system-fn system system-fn threshold)

Same as add-system-fn, but will only execute the system-fn after threshold milliseconds has been equalled or passed.

Same as `add-system-fn`, but will only execute the `system-fn` after `threshold` milliseconds has been equalled or passed.
sourceraw docstring

process-one-game-tickclj/s

(process-one-game-tick system delta)

Optional convenience function that calls each of the system functions that have been added in turn, with the provided delta.

Optional convenience function that calls each of the system functions that have been added in turn, with the provided delta.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close