Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

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
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

kurtisens94

[GLOBAL: userInfoPane.html]
kurtisens94
  • 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]
#2

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.

 

Rob




[topic_controls]
[/topic_controls]