Quantcast
Channel: Clojure – Compound Theory
Viewing all articles
Browse latest Browse all 9

Brute 0.3.0 – Now Supporting ClojureScript

$
0
0

Brute has a few new features with this new release. The most exciting is that thanks to the cljx project, and the hard work of Martin Janiczek, Brute now supports both Clojure and ClojureScript!

There are also a couple of new features, including an implementation of update-component that takes a function and arguments to allow you to functionally change data within the system (Thanks to Yair Iny).

For example:

;; Change the Position's x value to 10
(update-component @system entity Position assoc :x 10)

Also, if you have a function that you only want to happen every n milliseconds (a physics library, for instance), you can now throttle system functions.

For example:

;; only execute 60 times per second
(add-throttled-system-fn @system my-throttled-function (/ 1000 60))

Hope you enjoy these new features, and as always, feedback and pull requests are always welcome!


Viewing all articles
Browse latest Browse all 9

Trending Articles