Release 2.0.1
Overview
We haven’t changed the API in any big ways since 2011 but this release changes a lot. The two major changes are the addition of renderers for Tiled maps and the new Animation and SpriteSheet classes. Touch events were also incorporated into the new event API. Most of the API was shuffled around to fit better into todays conceptions of what a game API should provide.
The API should be stable for a while now with mostly additions following.
Changes
- added gamejs.tiledmap.MapView and tiledmap.LayerView to draw the map
- added gamejs.animation.* with SpriteSheet and Animation constructor
- improved gamejs.pixelcollision API
- special gamejs.event callbacks for different types of events: onMouseMotion, onKeyDown, onFullscreen(),…
- feature: all callback functions can be called multiple times to add multiple callbacks
- added threaded noise example; uses webworkers to produce new map
- jshinted all files
- removed: gamejs.sprite and SpriteGroup module
- add “debug” loglevel (even lower than “info”)
- docs: overhaul all jsdoc with better text and more relevant examples
- fixed circle not accepting 0 as radius
- fixed DataCloneError when logging from inside a WebWorker
- rename:
- gamejs.log/debug/info/error/fatal -> gamejs.logging.*
- gamejs.tmx -> gamejs.tiledmap
- gamejs.worker.Worker -> gamejs.thread.Worker
- gamejs.Surface -> gamejs.graphics.Surface
- gamejs.transform.* -> instance methods on gamejs.graphics.Surface
- gamejs.draw.* -> static functions in gamejs.graphics
- gamejs.utils.vectors -> gamejs.math.vectors
- gamejs.utils.prng -> gamejs.math.random
- gamejs.utils.matrix -> gamejs.math.matrix
Contributors
- Farhan Munshi
- Simon Oberhammer