Skip to content
This repository has been archived by the owner on Feb 22, 2020. It is now read-only.

Releases: oakes/play-cljs

1.3.1

24 Jan 17:34
Compare
Choose a tag to compare

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

24 Jan 05:17
Compare
Choose a tag to compare

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:

https://oakes.github.io/play-cljs/

1.2.0

09 Apr 01:17
Compare
Choose a tag to compare

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:

https://i.imgur.com/yBgrfZn.png

1.1.0

27 Jan 15:44
Compare
Choose a tag to compare

This release updates p5.js to 0.6.0. It also improves the specs -- there were a few cases where options were treated as optional when they should've been required, such as the coordinates in :bezier and :curve.

1.0.0

21 Jan 18:26
Compare
Choose a tag to compare

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

31 Dec 17:12
Compare
Choose a tag to compare

This release updates p5.js to version 0.5.16. I also updated the dynadocs as I realized I hadn't documented the very useful :flip-x and :flip-y options in the :image entity.

0.11.2

16 Dec 19:18
Compare
Choose a tag to compare

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

05 Dec 01:48
Compare
Choose a tag to compare

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:

https://oakes.github.io/play-cljs/

0.11.0

27 Nov 07:07
Compare
Choose a tag to compare

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

03 Nov 20:42
Compare
Choose a tag to compare

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.