Releases: oakes/play-cljs
1.3.1
This release adds support for loading 3D models. It ended up being easier than I thought, so I decided to quickly cut a new release right after the old one. Check out the example:
https://oakes.github.io/play-cljs/cljs/play-cljs.core/'c'model.html
1.3.0
It's been a while...but I'm back to working on this library. This release updates p5.js to 0.7.2 and adds initial support for 3D. To enable it, you need to pass {:mode :webgl}
to the third argument of create-game. Right now it only supports basic 3D shapes like cubes and spheres. Check out the new 3D examples in the interactive docs:
1.2.0
This release adds expound to dramatically improve the spec errors when incorrect values are passed to options maps. For example, if you pass a number to the :color
option in a :fill
, you used to get this:
https://i.imgur.com/iBt5Jfg.png
Now you get this:
1.1.0
1.0.0
This release dramatically improves error messages using clojure.spec. You don't need to do anything to enable it -- debug mode is automatically enabled if :optimizations are set to :none. In particular, the attributes map for each entity now have specs, so if you try setting an attribute to the wrong type, or neglect to provide a required attribute, you'll see a nice error message now. Try it out in the interactive docs.
For example, try changing the :animation entity to no longer provide a :duration
attribute. Or try changing the :shape entity to provide an odd number of :points
. You now get spec errors, instead of silent failures. If you want to disable debugging even during development, just pass {:debug? false} to the last argument of create-game
.
0.12.0
0.11.2
This release makes the internal draw-sketch!
multimethod public again (I previously made it private by mistake), and adds a neat interactive example showing you how to extend it to create new entity types. Check out the new docs for it:
https://oakes.github.io/play-cljs/cljs/play-cljs.core/draw-sketch'e'.html
0.11.1
This release doesn't really change any functionality, but it was necessary to improve the docs by adding docstrings as well as more functions at the bottom:
0.11.0
This release is mainly for the sake of an effort I've been making to provide interactive documentation for play-cljs. The result of that effort is this:
https://oakes.github.io/play-cljs/
The new interactive docs let you play with each entity type in isolation and see how changing their inputs affects them. It's pretty awesome stuff and I ended up breaking it into a separate library called Dynadoc that people can use to create interactive docs for anything.
I think the only functionality addition in this release is the listen
function, which adds an event listener similarly to the goog.events/listen
function, but additionally makes sure to remove the listener if you call start
again. I added it for the sake of interactive development. Anyway I hope you like the new docs!
0.10.2
This release adds an optional opts
map to the create-game
function. Currently it only takes one option, :parent
, which will cause the canvas' parent function to be called with its value as the argument. The value can be a string ID, a DOM node, or a p5.Element object. The release also adds support for flipping tiles in tiled maps. Thank you very much to Github user niamu for both of these features!
Also, I am sorry for the long period of inactivity with this library. In a few days I'm going to release a new project that is very relevant (and complementary) to play-cljs and I think you'll like it.