Phaser 2.6.0 发布,HTML5 游戏开发框架

发布于 2016年07月10日
收藏 33

Phaser 2.6.0 发布了,Phaser 是一个开源的桌面和移动 HTML5 2D 游戏开发框架,支持 JavaScript 和 TypeScript。


  • 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)


转载请注明:文章转载自 开源中国社区 []
本文标题:Phaser 2.6.0 发布,HTML5 游戏开发框架