UNPKG

aseprite-atlas

Version:

Aseprite sprite atlas parser and animator for browser and Node.js.

14 lines (11 loc) 448 B
import {Aseprite} from 'aseprite-atlas' import * as atlasJSON from './atlas.json' const file: Aseprite.File = Object.freeze(atlasJSON) const tags: readonly string[] = Object.freeze( file.meta.frameTags.map(frameTag => frameTag.name) ) // No orphan Slices. Each Slice has a Tag (and there may be multiple Slices with // the same Tag). test.each(file.meta.slices)('%# Slice name %p is a Tag', slice => expect(tags).toContainEqual(slice.name) )