Jump to content

how to make animation from group of sprites which difference size (picture include)


cbjo
 Share

Recommended Posts

I believe what you're looking for is turning this thing into a sprite atlas. If you know all the x and y and width and height coordinates, you could use that to create a JSON structure (save it to a file or pass it "raw" to the loader) that shows where all those frames are.

Here's a small slice of the texture atlas Texture Packer is generating for me...

{"frames": {

"beetle0":
{
        "frame": {"x":69,"y":666,"w":11,"h":5},
        "rotated": false,
        "trimmed": true,
        "spriteSourceSize": {"x":2,"y":11,"w":11,"h":5},
        "sourceSize": {"w":16,"h":16}
},
"beetle1":
{
        "frame": {"x":113,"y":350,"w":12,"h":5},
        "rotated": false,
        "trimmed": true,
        "spriteSourceSize": {"x":2,"y":11,"w":12,"h":5},
        "sourceSize": {"w":16,"h":16}
}
}
}

 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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