Expand description
Sprite-sheet atlases: frame metadata from a JSON sidecar plus the UV math the sprite pipeline needs.
The frame table lives here because the renderer owns UVs and batches by
texture key — one sheet means one texture, so every frame of it lands in
the same draw call. pite-assets reuses parse_atlas to validate the
same files for check.
Structs§
- Atlas
- A parsed sheet: its texture file plus named frames.
- Atlas
Frame - One frame inside the sheet, in pixels.
Constants§
- SIDECAR_
EXT - Sidecar suffix appended to a sheet’s file stem.
Functions§
- load_
atlas - parse_
atlas - Parse atlas JSON. Empty sheets, zero sizes, and frames outside the sheet are errors — a bad atlas must never reach the GPU as silent garbage.
- sheet_
for_ sidecar - The sheet a sidecar describes:
sheet.atlas.json->sheet.png. - sidecar_
for - Sidecar path for a sheet:
sheet.png->sheet.atlas.jsonbeside it.