Jump to content

More attributes in texture atlases?


Braxen
 Share

Recommended Posts

I've made my own class that can "combine" multipack atlases and select images between them (frame names are very important), but the biggest hurdle still is that i need pivot/anchor points. I have them all in the texture atlas (JSON), created by my own tool.

However, when i load this atlas, only hardcoded data is put into the frameData object, and i can't seem to hijack the JSON file being loaded either. I've thought about creating my own loader class, but with this framework workflow i just get confused.

Is this something that's planned for future releases, or are pivot points obsolete now?

Link to comment
Share on other sites

2 hours ago, samme said:

The atlas object in the game cache should have the original JSON data somewhere. So you could look it up and the just assign anchor and pivot.

Oh I've looked. This is the function that discards it.

I ended up hijacking it on game boot, it works - but a very duct-tape-esque solution.

And i've hijacked the loadTexture and set frameName functions too, so it automatically sets the pivot point on load.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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