Sign in to follow this  
cbjo

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

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}
}
}
}

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.