{ "meta": { "app": "https://github.com/houmain/spright" }, "textures": [ ## for texture in textures { {% set scale=texture.scale %} "image": "{{ texture.filename }}", "format": "RGBA8888", "size": { "w": {{ texture.width }}, "h": {{ texture.height }} }, "scale": {{ scale }}, "frames": [ ## for index in texture.spriteIndices { {% set sprite=at(sprites, index) %} "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 ] } ## endfor ] }