{"id":42760915,"url":"https://github.com/praghus/tmx-map-parser","last_synced_at":"2026-01-29T20:33:38.852Z","repository":{"id":37016725,"uuid":"192165638","full_name":"praghus/tmx-map-parser","owner":"praghus","description":"Tiled Map Editor *.tmx files parser","archived":false,"fork":false,"pushed_at":"2025-06-24T18:50:57.000Z","size":818,"stargazers_count":12,"open_issues_count":0,"forks_count":4,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-08T15:49:02.598Z","etag":null,"topics":["parser","tiled-map-editor","tiled-parser","tmx","tmx-tiledmap"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/praghus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-06-16T08:04:08.000Z","updated_at":"2025-06-24T18:50:55.000Z","dependencies_parsed_at":"2024-07-10T11:05:22.469Z","dependency_job_id":"481c9ecd-252e-4d05-8338-c5ce3602d044","html_url":"https://github.com/praghus/tmx-map-parser","commit_stats":null,"previous_names":["praghus/tmx-tiledmap"],"tags_count":22,"template":false,"template_full_name":null,"purl":"pkg:github/praghus/tmx-map-parser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/praghus%2Ftmx-map-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/praghus%2Ftmx-map-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/praghus%2Ftmx-map-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/praghus%2Ftmx-map-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/praghus","download_url":"https://codeload.github.com/praghus/tmx-map-parser/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/praghus%2Ftmx-map-parser/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28884291,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-29T19:55:09.949Z","status":"ssl_error","status_checked_at":"2026-01-29T19:55:08.490Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["parser","tiled-map-editor","tiled-parser","tmx","tmx-tiledmap"],"created_at":"2026-01-29T20:33:38.283Z","updated_at":"2026-01-29T20:33:38.847Z","avatar_url":"https://github.com/praghus.png","language":"TypeScript","readme":"# tmx-map-parser [![NPM Version](https://img.shields.io/npm/v/tmx-map-parser.svg?style=flat)](https://www.npmjs.org/package/tmx-map-parser)\n\nParser for [Tiled Map Editor](http://www.mapeditor.org/) \\*.tmx files.\n\n## Installation\n\n```sh\nnpm install tmx-map-parser\n```\n\nor using yarn\n\n```sh\nyarn add tmx-map-parser\n```\n\n## Usage\n\nThe basic implementation:\n\n```js\nimport { tmx } from 'tmx-map-parser'\nimport tmxFile from 'map.tmx'\n// The *.tmx file can be loaded as a string or URL encoded data.\n// for Webpack use 'url-loader' plugin, for Rollup it can be '@rollup/plugin-url'\n\nconst translateFlips = true // Translates the tile flips in the layer data (default false)\n\ntmx(tmxFile, translateFlips).then(data =\u003e {\n    console.log(data)\n})\n\n// or using async/await\nasync function loadMap() {\n    const data = await tmx(tmxFile, translateFlips)\n    console.log(data)\n}\n```\n\n### Important\n\nParser only supports embedded tilesets. At the moment, external tilesets are not supported!\n\n## Example data\n\n[TMX Map Format documentation](https://doc.mapeditor.org/en/stable/reference/tmx-map-format/)\n\n```js\n{\n    tiledversion: \"1.8.0\",\n    tilewidth: 16,\n    tileheight: 16,\n    version: 1.8,\n    width: 512,\n    height: 128,\n    infinite: 0,\n    nextlayerid: 5,\n    nextobjectid: 165,\n    orientation: \"orthogonal\",\n    renderorder: \"right-down\",\n    properties: {\n        property1: 'value',\n        property2: 0.5\n    },\n    layers: [{\n        id: 1,\n        name: \"layer name\",\n        type: \"layer\",\n        visible: 1,\n        data: [0, 1, 1, 10, 10, 10, 1, 1, 0, 0, 0, 0, …],\n        // When the translateFlips parameter is enabled\n        flips: [\n            {H: false, V: false, D: false},\n            {H: true, V: false, D: true},\n            {H: false, V: false, D: false},\n            {…}\n        ],\n        width: 512,\n        height: 128,\n        opacity: 0.77,\n        properties: {\n           property1: 'value',\n           property2: false\n        }\n    }, {\n        id: 2,\n        name: \"objects\",\n        type: \"objectgroup\",\n        visible: 1,\n        objects: [{…}, {…}, {…}],\n        properties: {\n           property1: 'value',\n           property2: false\n        }\n    }, {\n        …\n    }],\n    tilesets: [{\n        columns: 32,\n        firstgid: 1,\n        image: {source: \"tiles.png\", width: 512, height: 512},\n        name: \"tiles\",\n        tilecount: 1024,\n        tilewidth: 16,\n        tileheight: 16,\n        tiles: [{…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}]\n    }, {\n        …\n    }]\n}\n```\n\n## License\n\n[MIT licensed](./LICENSE).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpraghus%2Ftmx-map-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpraghus%2Ftmx-map-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpraghus%2Ftmx-map-parser/lists"}