Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]

Knowing where each image-asset (Atlas) inside the JSON file, HELP!
Started by kurtisens94 Feb 20 2019 06:36 AM

1 reply to this topic
This topic has been archived. This means that you cannot reply to this topic.
[TOPIC: post.html]


[GLOBAL: userInfoPane.html]
  • Observer

  • 1 posts
  • Corona SDK

Instead of scrolling down to each "image-name" in the JSON file and looking for the frame position to see where that image is on the atlas. Is there an efficient way to know exactly where that image is on the atlas?


I only say this because If there are many assets inside the Atlas, I don't wan't to go through every asset, reading every frame, where the assets are. 


thank you in advance 

[TOPIC: post.html]

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,196 posts
  • Enterprise

Hi @kurtisens94, many Corona developers use a tool called "Texture Packer", which produces Lua code where your image data is contained in a Lua table. You wouldn't use or need JSON in this case. Texture Packer produces keys that lets you identify objects by name instead of traversing through an indexed array.


You might want to look into that.