Skip to content
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

Reusing spine atlas frames #51

Open
lukz opened this issue Apr 27, 2017 · 4 comments
Open

Reusing spine atlas frames #51

lukz opened this issue Apr 27, 2017 · 4 comments
Labels

Comments

@lukz
Copy link

lukz commented Apr 27, 2017

Hi!

Is there any way to use spine atlas frames as Phaser images? I know there's atlas image loaded into cache and I can use it but it doesn't contain any frames.

@lukz lukz changed the title Reusing atlas frames Reusing spine atlas frames Apr 27, 2017
@AleBles
Copy link
Member

AleBles commented May 4, 2017

There's also an SpineCache available that contains Spine's .atlas file in which you should be able to extract the frame from.

You can access this with:

var atlasData = this.game.cache.getSpine(<spineName>).atlas;

You can check out spine.Atlas and spine.AtlasReader on how to extract data from this file

@lukz
Copy link
Author

lukz commented May 26, 2017

Does this.game.cache.getSpine(<spineName>).atlas; suppose to contain just a string?

@lukz
Copy link
Author

lukz commented May 26, 2017

I've managed to get in working. For people looking for similar solution this is what I did (basically rewrote createSpine fucntion):

https://gist.github.com/lukz/0867e9f1875f9771873fc540862e6179

@AleBles AleBles added the v3 label Aug 21, 2017
@spayton
Copy link

spayton commented Sep 26, 2017

where does addSpineCache() get called?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants