Expand description
TileMap document schema, TOML serialization, coordinate math, and layer management.
Stores sparse tile layers referencing atlas frames. TOML (.ptmap) is canonical
and human-readable, consistent with .ptscn.
Structs§
- Tile
Cell - An individual placed tile entry in a sparse layer:
(column, row, frame_name). - Tile
MapDoc - Canonical
.ptmapdocument. - Tile
MapLayer - A named layer of placed tiles within a
TileMapDoc.
Functions§
- load_
tilemap - Loads and validates a
.ptmapfile from disk. - map_
to_ world - Convert grid coordinate
(col, row)to world center position(x, y). - parse_
tilemap_ str - Parses a tilemap document from a TOML string.
- save_
tilemap - Serializes and writes a
TileMapDocto disk at the specified path. - world_
to_ map - Convert world position to tilemap grid coordinate
(col, row).