Jump to content

Explanation of atlasJSONHash


Recommended Posts

Is there somekind of explanation somewhere of what all these properties mean:


"filename": "1",
"frame": {"x":64,"y":0,"w":20,"h":40},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":0,"y":0,"w":20,"h":40},
"sourceSize": {"w":20,"h":40}
They are just to vague for me to understand. I've tried reverse-engineering from the examples, but I'm running around in circles. What is frame, spriteSourceSize and sourceSize exactly? I cannnot find this explained in detail anywhere. 
I get that frame is x and y in the entire image and than the width and height cut from those coordinates. But the other two don't make sense to me. 
Link to comment
Share on other sites

These are usually automatically generated by something like TexturePacker. Texture packer will turn a series of individual frame images into one big image, and cut out all the extra wasted space around each one. Source size holds onto the initial size of the image, and the positioning of that frame within the image. That is important because of the way the animation can change how the object is positioned within the frame.

Link to comment
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...