orcus Posted May 30, 2015 Share Posted May 30, 2015 Hi Folks, EDIT: At first sorry for my Mistake. I dont meant Tiled, i meant TexturePacker!! I am completely new in the matter and have a question about *Texturepacker. I wanted to create a JSON file (jsonHash) for an animation in Phaser. In Phaser example, the description of a frame looks like this:{ "filename": "blueJellyfish0001", "frame": {"x":484,"y":836,"w":63,"h":65}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":1,"y":0,"w":66,"h":66}, "sourceSize": {"w":66,"h":66}}I do not get displayed by my own example, the file name. Look here:"002.png":{ "frame": {"x":2,"y":34,"w":30,"h":30}, "rotated": false, "trimmed": false, "spriteSourceSize": {"x":0,"y":0,"w":30,"h":30}, "sourceSize": {"w":30,"h":30}, "pivot": {"x":0.5,"y":0.5}},OK i can "trim Sprite Name", then i become "002" without the filetype:"002":{ "frame": {"x":2,"y":34,"w":30,"h":30}, ...Does anyone have a clue how I can create a file as described in Example Phaser? { "filename": "blueJellyfish0001",......Thank you Quote Link to comment Share on other sites More sharing options...
venomdev Posted May 30, 2015 Share Posted May 30, 2015 Those are the file names of the files in the sprite directory. You'll need to rename all the separate files before exporting them from TexturePacker. Quote Link to comment Share on other sites More sharing options...
orcus Posted May 31, 2015 Author Share Posted May 31, 2015 OK thanks. I've managed that so far as now. But I always have to do a path forward, otherwise it does not work with me. "leg/0001":{ "frame": {"x":324,"y":2,"w":105,"h":105},......},"leg/0002":{ "frame": {"x":324,"y":2,"w":105,"h":105},......etc.There are only a little more than 10 options, now I do not know what I could search. But as I said, it works so far and play animations. So far everything well. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.