165 Days since last release.
Overview
The new gamejs.time.interval()
supersedes the old fpsCallback()
. The new interval()
not only has a less horrible name but it also uses the requestAnimationFrame if available.
GameJs used to completely supress all default browser actions which are triggered by key presses. For example, the browser’s default action, when “space” is pressed, is to scroll the page. GameJs now only supresses the default browser action of a key if the canvas has focus.
The new display flag gamejs.display.DISABLE_SMOOTHING
is especially useful for retro graphics when you do not want GameJs to smooth the images when they are rotated or scaled.
Major changes and new features
- new gamejs.time.interval() using requestAnimationFrame were available supersedes the now deprecated gamejs.time.fpsCallback
- new flag gamejs.display.DISABLE_SMOOTHING to disable image smoothing when scaling or rotating (e.g., useful for retro graphics)
- new seedable pseudo random number generator gamejs/utils/prng
- new noise generator gamejs/noise module
- new function Sprite.groups() returns the array of groups this sprite is contained in
- do not supress any default browser actions by keypress unless the GameJs display canvas has focus (example browser action: search opens in firefox if “/” is pressed)
- Surface.clear() accepts rect argument
- module moved
gamejs/base64
->gamejs/utils/base64
Changes and bugfixes
- fix bottomleft, bottomright, topright accessors not setting values correctly
- gamejs.utils.vectors.angle() now returns the normalized value
- implement argument for
gamejs.event.get(eventTypes)
to filter the list of returned events - update qunit and fix some unit tests
- fix broken audio looping
- fix some cases were asset preloading failed due to broken URL resolving
Contributors
- brgt
- Johannes Baagøe (random number generator Alea)
- Troy J. Farrell
- Mathieu Gagnon
- Vesa Hagström
- Simon Oberhammer
- zz85 (simplex JS port from Stefan Gustavson Java code)