DoraemonEXA Posted March 12, 2018 Share Posted March 12, 2018 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 Link to comment Share on other sites More sharing options...
AndreasLoew Posted March 12, 2018 Share Posted March 12, 2018 If it's only swapping w and h it's easy to do this in TexturePacker's exporter. But I think that you'll run in all kinds of issues with this in Phaser..?! Link to comment Share on other sites More sharing options...
DoraemonEXA Posted March 14, 2018 Author Share Posted March 14, 2018 On 3/12/2018 at 5:01 PM, AndreasLoew said: If it's only swapping w and h it's easy to do this in TexturePacker's exporter. But I think that you'll run in all kinds of issues with this in Phaser..?! 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 Link to comment Share on other sites More sharing options...
Recommended Posts