Jump to content

DoraemonEXA

Members
  • Content Count

    4
  • Joined

  • Last visited

  1. Thanks for reply. I just read this article and confirm that Phaser supports texture-atlas with rotation enabled, so I don't need any pre-processing now. https://phaser.io/tutorials/advanced-rendering-tutorial/part7 It seems that the comments of altas loaders are not updated, it still says that the "rotate" option in the atlas software must be disabled? https://photonstorm.github.io/phaser-ce/Phaser.Loader.html#atlasJSONHash
  2. If your game is landscape orientation, may be you can try this code, generally i call it "fixed height" scale mode, and the target width & target height is the design resolution of your game (I use typescript) class SimpleGame { game: Phaser.Game; static readonly targetWidth = 2560; static readonly targetHeight = 1280; constructor() { this.game = new Phaser.Game(SimpleGame.targetWidth, SimpleGame.targetHeight, Phaser.AUTO, 'content', { preload: this.preload }); } preload() { this.game.scale.scaleMode = Phaser.ScaleManager.
  3. I have a texture atlas generated by Texture Packer with the "rotate" option is enabled. In order to load & render all the frames correctly, now I have to use a simple script to pre-process the json file, swap the "w" and "h" properties if the frame is marked "rotated". Is it possible to make a custom loader to load such texture atlas and store the restored frame in the cache
  4. hi, I'm new to Phaser and recently translating a Cocos2dx extension to Phaser(2.8.7) with Typescript. This extension is written in C++ and basically is a skeleton animation run-time, it uses an additional matrix (3x3) to transform the cells (CCSprite object, similar to the Phaser.Sprite) of the skeleton. In Cocos2dx, the additional transformation is done by the following code, the CCSprite object stores this matrix as m_sAdditionalTransform, and re-calculate its local transformation matrix m_sTransform. (simplified from CCNode::nodeToParentTransform) // Translate v
×
×
  • Create New...