released enchant.js v0.7.0

104 views
Skip to first unread message

sidestepism

unread,
Apr 30, 2013, 12:50:40 PM4/30/13
to
(English follows Japanese)

開発チームは、enchant.js v0.7.0 をリリースしました。いくつかの新機能を紹介します。

- features
    - add Entity#intersectStrict (feature/boundingRect #166)
Entity#intersect と Entity#within はどちらも回転、拡大を考慮しないものなので、回転、拡大を行ったEntityについて正しい結果を得ることができません。Entity のバウンディングを取得するEntity#getBoundingRect と Entity#getOrientedBoundingRect を追加し、回転、拡大を考慮したサイズの矩形を取得することができます。また、これらのメソッドで取得した値を基に厳密な当たり判定を計算する Entity#intersectStrict も追加しています。
intersectStrict は intersect に比べ 1.8-2.0 倍ほど計算時間がかかります。 getBoundingRect、intersectStrict の値は getOrientedBoundingRect の結果を基に求められるので、getOrientedBoundingRect の結果をキャッシュする実装についても検討しています。


    - add Deferred class
jQuery.deferred 風の Deferred を利用できるようになりました。enchant.js の内部で利用しています。詳しくはブログに掲載します。

    - add LoadingScene class
わたしたちは LoadingScene クラスを追加しました。これを継承することで、デフォルトのローディング画面を簡単に変更することができます。


    - allows preload alias (feature/asset-name-alias #193)
Core.preload を拡張し、アセットのファイル名に対してエイリアスを設定できるようになりました。

    - Core can be resize after initialized
    - add Core resize event
v0.6 までは、new Core() を読んだあとにリサイズすると、canvas 要素の大きさがセットされませんでした。v0.7 からは画面をリサイズすると、Core インスタンスに coreresize イベントが dispatch され、それにあわせて要素の大きさも変わります。

    - improved Group#addChild, insertBefore
addChild しようとした Entity がすでに親の Group を持っている場合、これを親から removeChild してから親に追加します。 (Entity が複数の Group に追加されるバグを防ぎます)

- bugfix
    - improved some DOM bugs on Internet Explorer
    - some fixes

- other 
    - remove built files from repository
コンフリクトなど、開発上の不具合の原因となるため、enchant.js, enchant.min.js など、ビルド済みのファイルを削除しました。開発用のソースコードは dev/ 以下に含まれるものを利用します。また、enchant.js の利用者の方々は以下の リポジトリから、ビルド済みのファイルをダウンロードすることができます。

    - grunt v0.4.1 (thanks to @chick307)

v0.7 系統は多くの新機能を追加しました。メインループの処理の最適化などにより、描画速度は大幅に向上しましたが、最新版にはいくつかのバグがまだ含まれているかもしれません。バグフィクスは次のマイナーアップデート (v0.7.1) に含まれます。商用案件などのプロジェクトには、v0.6 系の利用をおすすめします 。

公式のリリースノートが発表されるまでしばらくお待ちください。

---------- here is translated version.
The development team has released an enchant.js v0.7.0. I will introduce several new features. 

- Features 
    - Add Entity #intersectStrict (feature / boundingRect # 166) 
Entity#within and Entity #intersect does not take rotation and expansion into account. You cannot get the correct result for Entity made rotation and expansion in v0.6. With Entity#getOrientedBoundingRect and Entity#getBoundingRect, you can get the bounding of the Entity, to get the rectangle of size considering rotation and expansion. In addition, Entity#intersectStrict was added to calculate the exact collision detection based on the value that you obtained with these methods. Computation time of intersectStrict can take up to 1.8-2.0 times in comparison with Entity#intersect.


    - Add Deferred class 
We can now use a Deferred class. Please wait for the post on the official website for more information. 

    - Add LoadingScene class 
We added LoadingScene class. By inheriting this, you will be able to easily change the default loading screen. 


    - Allows preload alias (feature / asset-name-alias # 193) 
You can expand the Core.preload, you can now set up an alias for the file name of the asset. 

    - Core can be resized after initializing 
    - Add Core resize event 
Until v0.6, if you resize after new Core (), the size of the canvas element has not been set. When you resize the screen, 'coreresize' event will be dispatched to Core instance, the size of the elements will also change accordingly from v0.7. 

    - Improved Group #addChild, insertBefore 
If the Entity you try to addChild has a Group of parents already, and add it to the parent after parent removeChild from this. (I will avoid the bug to be added to the Group more than one Entity) 

- Bugfix 
    - Improved some DOM bugs on Internet Explorer 
    - Some fixes 

- Other 
    - Remove built files from repository 
We've removed built files such as enchant.js, enchant.min.js, ja/* and de/*, since the conflict on development. You can acquire pre-built files on following repository:

    - Grunt v0.4.1 (thanks to @ chick307) 

We added some new features. Due to optimization of the processing of the main loop, rendering speed has been greatly improved, but the latest build might still contain some bugs.

Please wait for the official release notes until the announcement. 
Reply all
Reply to author
Forward
0 new messages