-
Notifications
You must be signed in to change notification settings - Fork 217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Master atlas #281
base: master
Are you sure you want to change the base?
Master atlas #281
Conversation
@ivanpopelyshev The build failed on Node 7.10 and 8.4 while resolving packages. I did not add any new modules. Should the node versions be updated in travis config or is there an other way to fix this. Thanks in advance |
7.10, 9.4, We'll fix that later, I asked @cursedcoder to look at all failing builds of my pixi plugins. That's new approach, I have to think if this can be done better. It looks like you create a full set of Textures for every spine model. I don't know if BaseTextures are cached in this case, |
Implemented caching of BaseTextures when using master atlas data. To avoid creation of the full set of Textures for every spine model, do you think we should pass customized atlas data (extracted from master atlas) specific to the current model? |
Hey @muralisaripalli , I remember your solution. Spine loader needs rewrite and when I do it, I will take care of that PR too. I added temp solution for single atlas-multiple models here: https://github.com/pixijs/pixi-spine/blob/master/examples/single_atlas_multiple_models.md Thank you for that PR once more! |
@muralisaripalli I am looking into migrating the code to the new That can cause errors if two atlas have the same name for the png file, wouldn't it? 🤔 |
Requirement:
Skeletons to be able to use assets from multiple atlas files
Avoid duplication of assets by allowing skeletons that will be loaded at later stages to use assets from already loaded atlas files.
Solution:
Main a master store of data from all atlas files. Use this with createSkeletonWithRawAtlas when enabled/configured.
Implementation:
The function masterAtlasParser updates the namespace variable masterAtlasData by appending data of files with the extension .atlas
The implementation can be enabled globally by setting PIXI.spine.useMasterAtlasData to true. If this is set to true, atlasParser uses masterAtlasData with createSkeletonWithRawAtlas. Specific skeleton files then can be targeted not to use the masterAtlasData by setting a useMasterAtlasData property to false on their metadata.
If not required globally, this can be enabled on a specific skeleton(s) by setting a useMasterAtlasData property to true on their metadata.