Jump to content

Explanation of atlasJSONHash


ForgeableSum
 Share

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

 Share

  • Recently Browsing   0 members

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