How to convert a TexturePacker JSON atlas to a uniform sprite sheet
A grid importer needs one rectangle size for every animation frame. A packer can fit the same frames into a smaller image by removing transparent edges and turning individual poses sideways. The matching JSON tells you how to put them back.
Download the original PNG, JSON, finished strip and frame map
Restore the second frame by hand
- Find
fly02in the JSON. Its packed rectangle starts at pixel (43, 2) and occupies 18 × 36 pixels. Crop that rectangle from the atlas. - Its
rotatedflag is true. The packer turned this pose clockwise, so turn the crop 90° counterclockwise. The bird now occupies 36 × 18 pixels. - Create a transparent 40 × 32 cell using
sourceSize. Draw the upright bird at (2, 6) within that cell, the offset recorded inspriteSourceSize. This step restores the transparent space that keeps the animation aligned. - Arrange
fly01throughfly04in order. Their cells begin at x = 0, 40, 80 and 120. The visible crop forfly02begins at x = 42 in the finished sheet.
Run the same conversion in Atlas Strip
Open the offline converter in desktop Chrome. Select the bundled bird demo, preview the sequence in four columns and save the PNG and frame map. For your own art, supply a single-page rectangular atlas and its matching JSON hash or array. Select frames with the same original canvas size.
If a pose jumps between cells, check the trim offsets. If it faces sideways, check the packing direction. If the poses appear in the wrong order, compare the exported frame map against your animation sequence. Timing and custom pivots must be set in your editor.