All examples · Sprites and 2D

Atlas as a file

What this example shows

useLoadAtlas reads an .atlas file: which texture, how it is sliced, and the named sequences its frames form. Unlike createSpriteAtlas, it needs no texture loaded beforehand: the file names its own image, so a single scene can ask for an atlas and use it at once.

Because the slicing is a file, a scene can save "frame 12 of this atlas" instead of two opaque pairs of coordinates, and one sequence serves both a sprite animation and an animated tile.

Starting