Since the first version, I’ve been iterating my way through Jax prereleases like there’s no tomorrow! I’ve been going so fast, in fact, that I’ve unfortunately not taken the time to post updates to say what’s actually in them.
So here they are: a list all of the noteworthy updates I’ve made in preparation for the first official release. I won’t bother mentioning all of the bugfixes and minor changes, because that would take up way too much space.
- Custom shaders. Support for adding your own shaders to an application was added in v0.0.0.2, and they’ve been steadily improving since then. I’ve already covered how to use them in some detail and am currently working on comprehensive documentation.
- Incremental failoff for shaders. As of v0.0.0.2, Jax is smart enough to detect when a given client is incapable of handling the graphics options you’ve requested, and to make an intelligent decision as to which effects to omit. First it tries to see if there’s anything blatantly impossible to run on the given hardware, and if not (or if it’s already omitted those effects), Jax will remove the last effect in a given effect list until the material itself works. Because the “basic” shader (that is, per-vertex color and nothing else) is guaranteed to run on WebGL-compatible hardware, your app is guaranteed to run on all hardware, even if they don’t have the processing power to run it full-blast.
- The role of helpers has been solidly defined. Another thing that was added into v0.0.0.2, helpers can be used to make the application at large far DRYer.
- New generators: the scaffold generator was added in v0.0.0.2, and the material generator was modified to accept the –append option to avoid overwriting existing materials. Both of these generators are extremely helpful.
- Special handling was added for non-power-of-two (NPoT) textures. WebGL supports these types of textures under very specific circumstances. I wanted Jax to attempt to handle these textures automatically, and instead of simply scaling them up to power-of-two (which technically works, but is kind of flaky across browsers and takes additional processing overhead), I instead altered Jax to assume the specific circumstances that allow NPoT textures to be used natively. This includes switching to GL_LINEAR filters, GL_CLAMP_TO_EDGE wrapping techniques, etc. As long as all the right options are selected (which Jax now assumes automatically), the NPoT texture can be used without issue.
- Added the Jax license, which is the MIT license. Basically, you can pretty much do anything you want to Jax — including redistribute it, modify it, or even sell it if you think you can find someone who’ll pay for free software.
$ rake jax:update
- Jax now sports built-in Perlin noise functions. None of the built-in shaders use it (yet), but you can easily include it into your own shaders:
//= require "functions/noise"
Detailed documentation for exactly how to use the noise is still in the works, but it’s not difficult. For now, see the example application for a demonstration.
- Jax also supports picking an entire region of pixels in the shape of a rectangle; all objects rendered in the region will be returned.
- Also added in v0.0.0.6 were framerate and update-rate calculations. By default, Jax won’t waste the resources to figure these out, but if you request them, Jax will automatically start calculating them. You can programmatically disable calculating them when you’re finished.
- The default spec layout was modified to include a hyperlink to activate FPS and UPS calculations. This will affect new applications, but not applications generated prior to v0.0.0.6.
- Finally, v0.0.0.7 brings us current with a single fairly major bugfix. It turns out that when Jax was packaging files for use in production, it was packaging the helpers in the wrong order, breaking the entire application. I figured this was a major-enough fix to warrant its own, immediate, release. This was the only change between 0.0.0.6 and 0.0.0.7.
…and there you have it. In addition to the mountain of documentation and the plethora of bugfixes, I’ve been able to implement some quite noteworthy feature additions that I believe really bring Jax to the forefront of WebGL application development — again!
I’ll do my best to put out a blog post upon every release going forward so that you’re not left in the dark again. On the other hand, you could always check the changelog — but where’s the fun in that?