Jump to content

get frame data in original JSONHash format


ForgeableSum
 Share

Recommended Posts

Is there a way to get a copy of frame data in the format it was originally in before it went through the animation parser?

Suppose I want to add a texture atlas to the cache that shares the same frame data as another asset. I can't use game.cache.addTextureAtlas because the frameData it expects (retrieved via game.cache.getFrameData) is in the original hash format, not the Phaser-version (i.e. what's output from Phaser.AnimationParser). 

Link to comment
Share on other sites

I wonder if there is a way to add it to the cache like a normal image, e.g. game.cache.addImage, then give it the animation frames another way (instead of via loader). in other words, bypass the animation parser and use a direct copy of all the frame data the other sprite has. I wonder if setting setting sprite.animations to reference the animations of the other sprite will work? 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

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