Posted by & filed under Release Notes.

Hey everyone. This is Fushimi from the Dev Team.
enchant.js v0.6.2 has been released and can be downloaded from github. Major changes are listed below

Improved drawing performance in Android via Lazy-Scene (#145)

Scenes in v0.6 render both Canvas and DOM, via the Scene’s CanvasLayer Object and DOMLayer object.
Based on the existence of the _element property for Entities added to a scene, those Entities will either be drawn on the CanvasLayer or the DomLayer.
In the current version, when a Scene is created, the CanvasLayer and DomLayer are created, and then added Scene’s div element, which is layered over the Canvas’s div element. However, in mobile browsers, layering the Dom over Canvas causes a significant drop in performance. To fix this problem, a new type of scene has been created under feature/lazy-scene.
With lazy-scene, creating the scene does not create a layer immediately. The layer is only prepared when the Entity is added to the display tree.
Also, CanvasScene and DOMScene have been added to support drawing in Canvas and DOM, respectively.

Addition of the CanvasScene and DOMScene classes (#145)

Continuing from the above, CanvasScene, which specifically supports drawing in Canvas, and DOMScene, specifically for drawing in the DOM, have been added. Users wanting to use CSS for objects like Sprites should now use DOMScene instead of the (v0.5 and earlier) Scene.
https://github.com/wise9/enchant.js/issues/145

Core#keybind Extended (#148)

Keys can now be assigned any name.
https://github.com/wise9/enchant.js/issues/148

RequestAnimationFrame (#131)

We’ve improved the timing of browser-based redrawing by having it specifically wait for drawing commands from enchant.js.
Also, when a page’s tab goes inactive, or there is no screen updating taking place, enchant.js will now pause drawing updates. Every currently supported browser is listed below:
スクリーンショット 2012-12-28 21.32.21 スクリーンショット 2012-12-28 21.32.27
With the addition of this feature, bugs may occur if the fps setting exceeds 60 fps. Since most web browsers don’t generally update their screens more than 60 fps anyway, please don’t set it higher.

Usage of WebPerf API’s performance.now() for time acquisition

When possible, enchant.js now uses window.performance.webkitNow (if supported in-browser) for high resolution timing. The “elapsed” property of the enchant.Event.ENTER_FRAME object will return how much time has passed since the previous frame, in floating point format.

Plans for next release

In order to more easily understand problems when reading displayed errors or debugging, we plan on developing a better way of treating them with features/better-error.
grunt.js has been utilized as enchant.js’s build system, but in order to better manage post-build scripts and the repository, they were not separated from commits. In the next release, we plan on separating the “Download Package” from the repository.
Furthermore, we plan on preparing a “Beginning Programmer Package” derived from the download package, which will include some tutorials and exclude some dev files.

v0.6.2 Source Code

That’s it. We’d like to extend our thanks to everyone who worked with enchant.js in 2012. Stay tuned for more in 2013!

This post is also available in: Japanese