|
|
@ -304,10 +304,12 @@ def stitch_sprites(metadata, filename_base): |
|
|
|
image_filename = os.path.expanduser(filename_base) + '.png' |
|
|
|
print('saving image to', image_filename) |
|
|
|
pygame.image.save(output, image_filename) |
|
|
|
json_filename = os.path.expanduser(filename_base) + '.json' |
|
|
|
json_filename = os.path.expanduser(filename_base) + '.js' |
|
|
|
print('saving json to', json_filename) |
|
|
|
with open(json_filename, 'w') as json_file: |
|
|
|
json_file.write(' const spritesheet_json = ') |
|
|
|
json.dump(output_json, json_file, sort_keys=True, indent=2) |
|
|
|
json_file.write(';') |
|
|
|
|
|
|
|
|
|
|
|
def main(args): |
|
|
|