发布于 2016-07-10 01:24:29 | 70 次阅读 | 评论: 0 | 来源: 网友投递
Phaser 开源HTML5游戏开发框架
Phaser 是一个开源的桌面和移动 HTML5 2D 游戏开发框架,支持 JavaScript 和 TypeScript。
Phaser 2.6.0 发布了,
本次发布更新如下:
TypeScript definitions fixes and updates (thanks @monagames)
Docs typo fixes (thanks @drhayes)
The TilemapParser will now add more data when importing Image object types from Tiled. The extra data available is: image width, image height, and flags to see if the image is flipped either horizontally, vertically or diagonally (thanks @gotenxds #2564 #2554)
TilemapLayer.renderRegion has had an assignment to the obsolete tileColor
property removed (thanks @cryptographer #2583)
Group.getFurthestFrom and Group.getClosestTo has a new optional argument: callback
. This allows you to apply your own additional filtering to the distance checks, ultimately influencing the selected child (thanks @LoneStranger #2577)
Text.setText has a new optional argument immediate
which will re-create the texture immediately upon call, rather than wait for the next render pass to do so (thanks @Scraft #2594)
Phaser.Utils.pad now calls toString
on the input given, which means you can pass in common data types, such as numbers, and have them padded and returned as strings.
The canvas created by Phaser.Debug for use when displaying debug data is no longer stored in the CanvasPool, and is instead a stand-alone canvas, free from ever being re-used by another game object.
BitmapData has a new, optional, fifth argument: skipPool
. By default BitmapData objects will ask for the first free canvas found in the CanvasPool, but this behavior can now be customized on a per object basis.
Phaser.ArrayUtils.rotate is now deprecated. Please use Phaser.ArrayUtils.rotateLeft instead.
Phaser.Text.fontPropertiesCanvas used to be taken from the CanvasPool, but as it's constantly needed it is now generated directly from the document.
The default image texture, for when none is supplied, is now available under Phaser.Cache.DEFAULT
.
The missing image texture, for when an image has failed to load, is now available under Phaser.Cache.MISSING
.
Phaser.Cache.addImage will now check the key given, and if __default
or __missing
it will update the new consts Phaser.Cache.DEFAULT
and Phaser.Cache.MISSING
accordingly, allowing you to replace the default or missing image textures used by Phaser.
Phaser.Cache.getPixiTexture has now been removed, as the Pixi Cache isn't used internally anywhere any longer.
Phaser.Cache.getPixiBaseTexture has now been removed, as the Pixi Cache isn't used internally anywhere any longer.
The second argument to Phaser.Cache.removeImage has been renamed from removeFromPixi
to destroyBaseTexture
, as that is fundamentally what the argument always did.
AnimationManager.refreshFrame has been removed as it never actually did anything internally.
Sound.stop will check to see if gainNode
exists before trying to disconnect from it (#2597)
更多发布信息,查看完整发布说明。