{ "meta": { {% set scale=first(textures).scale %} "app": "https://github.com/houmain/spright", "image": "{{ first(textures).filename }}", "size": { "w": {{ first(textures).width }}, "h": {{ first(textures).height }} }, "scale": {{ scale }} }, "frames": [ ## for sprite in sprites { "filename": "{{ sprite.id }}", "rotated": {{ sprite.rotated }}, "trimmed": {% if sprite.sourceRect.w == sprite.trimmedSourceRect.w and sprite.sourceRect.h == sprite.trimmedSourceRect.h %}false{% else %}true{% endif %}, "sourceSize": { "w": {{ round(sprite.sourceRect.w * scale, 0) }}, "h": {{ round(sprite.sourceRect.h * scale, 0) }} }, "spriteSourceSize": { "x": {{ round(sprite.trimmedSourceRect.x * scale, 0) }}, "y": {{ round(sprite.trimmedSourceRect.y * scale, 0) }}, "w": {{ round(sprite.trimmedSourceRect.w * scale, 0) }}, "h": {{ round(sprite.trimmedSourceRect.h * scale, 0) }} }, "frame": { "x": {{ round(sprite.rect.x * scale, 0) }}, "y": {{ round(sprite.rect.y * scale, 0) }}, "w": {{ round(sprite.rect.w * scale, 0) }}, "h": {{ round(sprite.rect.h * scale, 0) }} }, "anchor": { "x": {{ sprite.pivot.x / sprite.rect.w }}, "y": {{ sprite.pivot.y / sprite.rect.h }} } }{% if not loop.is_last %},{% endif %} ## endfor ] }