## for texture in textures {% set sheet=at(sheets, texture.sheetIndex) %} .{{ sheet.id }} { background-image: url('{{ texture.filename }}'); background-repeat: no-repeat; {{ style }} } ## for spriteIndex in texture.spriteIndices {% set sprite=at(sprites, spriteIndex) %} .{{ sheet.id }}.{{ sprite.id }} { width: {{ sprite.rect.w }}px; height: {{ sprite.rect.h }}px; background-position: -{{ sprite.rect.x }}px -{{ sprite.rect.y }}px; } ## endfor ## endfor