pixi-tiledmap 1.10.1 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/LICENSE.md +21 -21
  2. package/README.md +131 -232
  3. package/dist/index.cjs +1319 -0
  4. package/dist/index.cjs.map +1 -0
  5. package/dist/index.d.cts +488 -0
  6. package/dist/index.d.cts.map +1 -0
  7. package/dist/index.d.mts +488 -0
  8. package/dist/index.d.mts.map +1 -0
  9. package/dist/index.mjs +1298 -0
  10. package/dist/index.mjs.map +1 -0
  11. package/package.json +70 -59
  12. package/.babelrc +0 -10
  13. package/.git/hooks/README.sample +0 -5
  14. package/dist/pixi-tiledmap.d.ts +0 -163
  15. package/dist/pixi-tiledmap.js +0 -18180
  16. package/dist/pixi-tiledmap.js.map +0 -1
  17. package/dist/pixi-tiledmap.min.js +0 -17
  18. package/dist/pixi-tiledmap.min.js.map +0 -1
  19. package/docs/assets/css/main.css +0 -865
  20. package/docs/assets/css/main.css.map +0 -7
  21. package/docs/assets/images/icons.png +0 -0
  22. package/docs/assets/images/icons@2x.png +0 -0
  23. package/docs/assets/images/widgets.png +0 -0
  24. package/docs/assets/images/widgets@2x.png +0 -0
  25. package/docs/assets/js/main.js +0 -5
  26. package/docs/assets/js/search.js +0 -3
  27. package/docs/classes/_imagelayer_.imagelayer.html +0 -2696
  28. package/docs/classes/_tile_.tile.html +0 -3818
  29. package/docs/classes/_tiledmap_.tiledmap.html +0 -2834
  30. package/docs/classes/_tilelayer_.tilelayer.html +0 -2792
  31. package/docs/classes/_tileset_.tileset.html +0 -412
  32. package/docs/globals.html +0 -192
  33. package/docs/index.html +0 -372
  34. package/docs/interfaces/_index_.__global.pixi.extras.itiledmap.html +0 -209
  35. package/docs/interfaces/_types_interfaces_.ianimation.html +0 -250
  36. package/docs/interfaces/_types_interfaces_.ilayerdata.html +0 -376
  37. package/docs/interfaces/_types_interfaces_.itiledata.html +0 -334
  38. package/docs/interfaces/_types_interfaces_.itilesetdata.html +0 -421
  39. package/docs/interfaces/_types_interfaces_.itmxdata.html +0 -362
  40. package/docs/modules/_imagelayer_.html +0 -191
  41. package/docs/modules/_index_.__global.html +0 -167
  42. package/docs/modules/_index_.__global.pixi.extras.html +0 -176
  43. package/docs/modules/_index_.__global.pixi.html +0 -170
  44. package/docs/modules/_index_.html +0 -188
  45. package/docs/modules/_tile_.html +0 -191
  46. package/docs/modules/_tiledmap_.html +0 -191
  47. package/docs/modules/_tiledmaploader_.html +0 -217
  48. package/docs/modules/_tilelayer_.html +0 -191
  49. package/docs/modules/_tileset_.html +0 -191
  50. package/docs/modules/_types_interfaces_.html +0 -207
  51. package/examples/browser/assets/01_basement.tmx +0 -11
  52. package/examples/browser/assets/meta.png +0 -0
  53. package/examples/browser/index.html +0 -32
  54. package/examples/webpack/.eslintrc.json +0 -37
  55. package/examples/webpack/package.json +0 -26
  56. package/examples/webpack/src/assets/01_basement.tmx +0 -11
  57. package/examples/webpack/src/assets/meta.png +0 -0
  58. package/examples/webpack/src/index.html +0 -9
  59. package/examples/webpack/src/index.js +0 -18
  60. package/examples/webpack/webpack.config.js +0 -42
  61. package/examples/webpack/yarn.lock +0 -4733
  62. package/src/ImageLayer.ts +0 -14
  63. package/src/Tile.ts +0 -82
  64. package/src/TileLayer.ts +0 -77
  65. package/src/TileSet.ts +0 -41
  66. package/src/TiledMap.ts +0 -66
  67. package/src/index.ts +0 -17
  68. package/src/tiledMapLoader.ts +0 -36
  69. package/src/types/interfaces.ts +0 -78
  70. package/src/types/tmx-parser.d.ts +0 -3
  71. package/tsconfig.json +0 -21
  72. package/tslint.json +0 -9
  73. package/webpack.config.js +0 -66
package/LICENSE.md CHANGED
@@ -1,21 +1,21 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2015 Hagen Sommerkorn
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015 Hagen Sommerkorn
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,232 +1,131 @@
1
- # pixi-tiledmap [![NPM version][npm-image]][npm-url]
2
-
3
- Use [Tiled Map Editor](http://www.mapeditor.org/) maps with [pixi.js](https://www.npmjs.com/package/pixi.js).
4
-
5
- pixi-tiledmap is a Pixi loader middleware which loads Tiled Map Editor
6
- [TMX maps](http://doc.mapeditor.org/reference/tmx-map-format/) and parses them with
7
- [node-tmx-parser](https://www.npmjs.com/package/tmx-parser). It exports a pixi.js class `PIXI.extras.TiledMap`
8
- which is an extended `PIXI.Container` containing all layers of the tile map as an instance of `PIXI.Container` and all
9
- tiles within as an instance of `PIXI.extras.AnimatedSprite`.
10
-
11
- ## Installation
12
-
13
- ```sh
14
- npm install pixi-tiledmap
15
- ```
16
-
17
- or
18
-
19
- ```sh
20
- yarn add pixi-tiledmap
21
- ```
22
-
23
- or include `pixi-tiledmap.min.js` after pixi.js in your html file (See [`example/browser`](https://github.com/riebel/pixi-tiledmap/tree/master/example/browser) for an example).
24
-
25
- ```html
26
- <!DOCTYPE html>
27
- <html>
28
- <head>
29
- <meta charset="UTF-8">
30
- <title>pixi-tiledmap example</title>
31
- </head>
32
- <body>
33
- <script type="text/javascript" src="https://pixijs.download/v4.8.7/pixi.min.js"></script>
34
- <script type="text/javascript" src="pixi-tiledmap.min.js"></script>
35
- <script>
36
- (function() {
37
- const renderer = PIXI.autoDetectRenderer(442, 286);
38
- document.body.appendChild(renderer.view);
39
-
40
- /**
41
- * Simply load a Tiled map in TMX format like a usual resource
42
- */
43
- PIXI.loader
44
- .add('assets/01_basement.tmx')
45
- .load(function () {
46
- /**
47
- * PIXI.extras.TiledMap() is an extended PIXI.Container()
48
- * so you can render it right away
49
- */
50
- let tileMap = new PIXI.extras.TiledMap('assets/01_basement.tmx');
51
- renderer.render(tileMap);
52
- }
53
- );
54
- })();
55
- </script>
56
- </body>
57
- </html>
58
- ```
59
-
60
- ## Usage
61
-
62
- ```js
63
- var PIXI = require('pixi.js');
64
- require('pixi-tiledmap');
65
-
66
- var renderer = PIXI.autoDetectRenderer(1024, 768);
67
- document.body.appendChild(renderer.view);
68
-
69
- /**
70
- * Simply load a Tiled map in TMX format like a usual resource
71
- */
72
- PIXI.loader
73
- .add('map.tmx')
74
- .load( function () {
75
- /**
76
- * PIXI.extras.TiledMap() is an extended PIXI.Container()
77
- * so you can render it right away
78
- */
79
- renderer.render(new PIXI.extras.TiledMap("map.tmx"));
80
- }
81
- /**
82
- //Alternatively, an alias can be used in order to identify loaded map.
83
-
84
- .add("myMap", "path/to/myMap.tmx")
85
- .load( function () {
86
- renderer.render(new PIXI.extras.TiledMap("myMap"));
87
- }
88
- */
89
- );
90
- ```
91
-
92
- ES6
93
- ```js
94
- import * as PIXI from 'pixi.js';
95
- import 'pixi-tiledmap';
96
-
97
- const renderer = PIXI.autoDetectRenderer(442, 286);
98
- document.body.appendChild(renderer.view);
99
-
100
- /**
101
- * Simply load a Tiled map in TMX format like a usual resource
102
- */
103
- PIXI.loader
104
- .add('assets/01_basement.tmx')
105
- .load(() => {
106
- /**
107
- * PIXI.extras.TiledMap() is an extended PIXI.Container()
108
- * so you can render it right away
109
- */
110
- renderer.render(new PIXI.extras.TiledMap('assets/01_basement.tmx'));
111
- });
112
- ```
113
-
114
- For the browser examples in `examples/browser/` run `yarn` and `yarn start` to start a `devServer` on Port 3000.
115
- For the webpack examples in `examples/webpack/` run `yarn` and `yarn start` inside of `examples/webpack/` to start a `devServer` on Port 3000.
116
-
117
- Open [http://localhost:3000/](http://localhost:3000/) in your browser.
118
-
119
- ## Documentation
120
-
121
- Documentation available in `docs/`. You can read it online [here](http://htmlpreview.github.io/?https://github.com/riebel/pixi-tiledmap/blob/master/docs/index.html)
122
-
123
- Example TiledMap object
124
-
125
- ```js
126
- {
127
- TiledMap {_events: Events, _eventsCount: 0, tempDisplayObjectParent: DisplayObject, transform: TransformStatic, alpha: 1, …}
128
- alpha: 1
129
- background: Graphics {_events: Events, _eventsCount: 0, tempDisplayObjectParent: null, transform: TransformStatic, alpha: 1, …}
130
- backgroundColor: undefined
131
- buttonMode: (...)
132
- children: (2) [Graphics, TileLayer]
133
- filterArea: null
134
- layers: Array(1)
135
- 0: TileLayer
136
- diagonalFlips: (187) [false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, …]
137
- horizontalFlips: (187) [false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, …]
138
- map: Map {version: "1.0", orientation: "orthogonal", width: 17, height: 11, tileWidth: 26, …}
139
- name: "meta"
140
- opacity: 0.2
141
- properties: {}
142
- tiles: (283) [Tile, Tile, Tile, Tile, Tile, Tile, Tile, Tile, Tile, Tile, Tile, Tile, Tile, Tile, Tile, Tile, Tile, Tile, Tile, Tile, Tile, Tile, Tile, Tile, Tile, Tile, Tile, Tile, Tile, Tile, Tile, Tile, Tile, Tile, Tile, Tile, 49: Tile, 50: Tile, 51: Tile, 52: Tile, 66: Tile, 67: Tile, 68: Tile, 69: Tile, 83: Tile, 84: Tile, 85: Tile, 86: Tile, 100: Tile, 101: Tile, 102: Tile, 103: Tile, 117: Tile, 118: Tile, 119: Tile, 120: Tile, 134: Tile, 135: Tile, 136: Tile, 137: Tile, 151: Tile, 152: Tile, 153: Tile, 154: Tile, 155: Tile, 156: Tile, 157: Tile, 158: Tile, 159: Tile, 160: Tile, 161: Tile, 162: Tile, 163: Tile, 164: Tile, 165: Tile, 166: Tile, 167: Tile, 168: Tile, 169: Tile, 170: Tile, 171: Tile, 172: Tile, 173: Tile, 174: Tile, 175: Tile, 176: Tile, 177: Tile, 178: Tile, 179: Tile, 180: Tile, 181: Tile, 182: Tile, 183: Tile, 184: Tile, 185: Tile, 186: Tile, 187: Tile, 188: Tile, 189: Tile, 190: Tile, …]
143
- type: "tile"
144
- verticalFlips: (187) [false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, …]
145
- visible: true
146
- __proto__: Object
147
- meta: TileLayer {_events: Events, _eventsCount: 0, tempDisplayObjectParent: null, transform: TransformStatic, alpha: 0.2, …}
148
- length: 1
149
- __proto__: Array(0)
150
- orientation: "orthogonal"
151
- parent: null
152
- properties: {}
153
- renderable: true
154
- resourceUrl: "assets/01_basement.tmx"
155
- tempDisplayObjectParent: DisplayObject {_events: Events, _eventsCount: 0, tempDisplayObjectParent: null, transform: TransformStatic, alpha: 1, …}
156
- tileHeight: 26
157
- tileSets: Array(2)
158
- 0: TileSet
159
- firstGid: 1
160
- image: Image {format: undefined, source: "meta.png", trans: undefined, width: 52, height: 26}
161
- margin: null
162
- name: "meta"
163
- properties: {}
164
- source: undefined
165
- spacing: null
166
- terrainTypes: []
167
- tileHeight: 26
168
- tileOffset: {x: 0, y: 0}
169
- tileWidth: 26
170
- tiles: Array(2)
171
- 0: Tile
172
- animations: []
173
- gid: 1
174
- id: 0
175
- image: null
176
- objectGroups: []
177
- probability: null
178
- properties: {}
179
- terrain: []
180
- __proto__: Object
181
- 1: Tile {id: 1, terrain: Array(0), probability: null, properties: {…}, animations: Array(0), …}
182
- length: 2
183
- __proto__: Array(0)
184
- __proto__: Object
185
- 1: TileSet {firstGid: 1, baseTexture: Texture, textures: Array(2), margin: null, spacing: null, …}
186
- length: 2
187
- __proto__: Array(0)
188
- tileWidth: 26
189
- trackedPointers: (...)
190
- transform: TransformStatic {worldTransform: Matrix, localTransform: Matrix, _worldID: 0, _parentID: 0, position: ObservablePoint, …}
191
- version: "1.0"
192
- visible: true
193
- worldAlpha: 1
194
- _bounds: Bounds {minX: Infinity, minY: Infinity, maxX: -Infinity, maxY: -Infinity, rect: null, …}
195
- _boundsID: 5
196
- _boundsRect: null
197
- _destroyed: false
198
- _enabledFilters: null
199
- _events: Events {}
200
- _eventsCount: 0
201
- _filters: null
202
- _height: 11
203
- _lastBoundsID: 2
204
- _localBoundsRect: Rectangle {x: 0, y: 0, width: 0, height: 0, type: 1}
205
- _mask: null
206
- _width: 17
207
- cacheAsBitmap: (...)
208
- filters: (...)
209
- height: (...)
210
- localTransform: (...)
211
- mask: (...)
212
- pivot: (...)
213
- position: (...)
214
- rotation: (...)
215
- scale: (...)
216
- skew: (...)
217
- width: (...)
218
- worldTransform: (...)
219
- worldVisible: (...)
220
- x: (...)
221
- y: (...)
222
- _tempDisplayObjectParent: (...)
223
- __proto__: Container
224
- }
225
- ```
226
-
227
- ## To do
228
-
229
- support isometric and hexagonal orientation
230
-
231
- [npm-url]: https://npmjs.org/package/pixi-tiledmap
232
- [npm-image]: http://img.shields.io/npm/v/pixi-tiledmap.svg?style=flat
1
+ # pixi-tiledmap v2 [![NPM version][npm-image]][npm-url]
2
+
3
+ Load and render [Tiled Map Editor](http://www.mapeditor.org/) maps with [PixiJS v8](https://pixijs.com/).
4
+
5
+ **v2** is a ground-up rewrite targeting PixiJS v8, with its own Tiled JSON and TMX XML parser (no external deps), full layer-type support, typed API, and ESM/CJS dual output.
6
+
7
+ ## Features
8
+
9
+ - **PixiJS v8** uses the modern `Assets` / `LoadParser` extension system
10
+ - **Tiled JSON + TMX XML** — full spec coverage (Tiled 1.11), both `.tmj` and `.tmx` formats
11
+ - **All layer types** — tile, image, object, and group layers
12
+ - **All orientations** — orthogonal, isometric, staggered, hexagonal
13
+ - **Render order** — right-down, right-up, left-down, left-up
14
+ - **Infinite maps** — chunk-based tile layer rendering
15
+ - **Tile features** — animated tiles, flip/rotation flags, image-collection tilesets, tint color
16
+ - **Object rendering** — rectangles, ellipses, polygons, polylines, points, text, tile objects
17
+ - **Data encoding** — CSV and base64 (uncompressed, gzip, zlib)
18
+ - **External tilesets** — automatic resolution via the asset loader (`.tsj` and `.tsx`)
19
+ - **Tree-shakable** — ESM + CJS dual build, side-effect-free
20
+ - **Typed** — comprehensive TypeScript types for the full Tiled spec
21
+
22
+ ## Installation
23
+
24
+ ```sh
25
+ npm install pixi-tiledmap pixi.js
26
+ ```
27
+
28
+ ## Quick Start — Asset Loader (recommended)
29
+
30
+ Register the loader extension once, then load `.tmj` (JSON) or `.tmx` (XML) files through `Assets`:
31
+
32
+ ```ts
33
+ import { Application, extensions, Assets } from 'pixi.js';
34
+ import { tiledMapLoader } from 'pixi-tiledmap';
35
+
36
+ extensions.add(tiledMapLoader);
37
+
38
+ const app = new Application();
39
+ await app.init({ width: 800, height: 600 });
40
+ document.body.appendChild(app.canvas);
41
+
42
+ const { container } = await Assets.load('assets/map.tmj');
43
+ app.stage.addChild(container);
44
+ ```
45
+
46
+ > The loader auto-detects the format by file extension: `.tmj` → JSON, `.tmx` → XML.
47
+
48
+ ## Manual Construction
49
+
50
+ If you prefer to parse and build the display tree yourself:
51
+
52
+ ```ts
53
+ import { parseMap, TiledMap } from 'pixi-tiledmap';
54
+ import { Assets, Texture } from 'pixi.js';
55
+ import type { TiledMap as TiledMapData } from 'pixi-tiledmap';
56
+
57
+ const response = await fetch('assets/map.tmj');
58
+ const data: TiledMapData = await response.json();
59
+
60
+ const mapData = parseMap(data);
61
+
62
+ const tilesetTextures = new Map<string, Texture>();
63
+ for (const ts of mapData.tilesets) {
64
+ if (ts.image) {
65
+ tilesetTextures.set(ts.image, await Assets.load(ts.image));
66
+ }
67
+ }
68
+
69
+ const container = new TiledMap(mapData, { tilesetTextures });
70
+ app.stage.addChild(container);
71
+ ```
72
+
73
+ ## API Reference
74
+
75
+ ### Exports
76
+
77
+ | Export | Description |
78
+ | --------------------- | ---------------------------------------------------------------- |
79
+ | `tiledMapLoader` | PixiJS `LoadParser` extension — register with `extensions.add()` |
80
+ | `TiledMap` | `Container` subclass that renders a resolved map |
81
+ | `TileLayerRenderer` | `Container` for a single tile layer |
82
+ | `ImageLayerRenderer` | `Container` for a single image layer |
83
+ | `ObjectLayerRenderer` | `Container` for a single object layer |
84
+ | `GroupLayerRenderer` | `Container` for a group layer (recursive) |
85
+ | `TileSetRenderer` | Texture manager for a tileset |
86
+ | `parseMap(data)` | Synchronous Tiled JSON → resolved IR |
87
+ | `parseMapAsync(data)` | Async variant (required for gzip/zlib compressed data) |
88
+ | `parseTmx(xml)` | Parse TMX XML string → `TiledMap` data (same shape as JSON) |
89
+ | `parseTsx(xml)` | Parse TSX XML string → `TiledTileset` data |
90
+ | `decodeGid(raw)` | Decode a raw GID into tile ID + flip flags |
91
+
92
+ ### `TiledMap` Container
93
+
94
+ ```ts
95
+ const map = new TiledMap(resolvedMap, {
96
+ tilesetTextures, // Map<imagePath, Texture>
97
+ imageLayerTextures, // Map<imagePath, Texture>
98
+ tileImageTextures, // Map<imagePath, Texture> (image-collection tiles)
99
+ });
100
+
101
+ map.orientation; // 'orthogonal' | 'isometric' | 'staggered' | 'hexagonal'
102
+ map.mapWidth; // tile columns
103
+ map.mapHeight; // tile rows
104
+ map.tileWidth; // tile pixel width
105
+ map.tileHeight; // tile pixel height
106
+ map.getLayer('ground'); // find layer Container by name
107
+ ```
108
+
109
+ ## Migration from v1
110
+
111
+ | v1 (PixiJS v4) | v2 (PixiJS v8) |
112
+ | ------------------------------------- | -------------------------------------------------------- |
113
+ | `PIXI.loader.add('map.tmx').load(…)` | `extensions.add(tiledMapLoader); Assets.load('map.tmj')` |
114
+ | `new PIXI.extras.TiledMap('map.tmx')` | `const { container } = await Assets.load('map.tmj')` |
115
+ | Global namespace mutation | Named ESM imports |
116
+ | TMX XML via `tmx-parser` | Built-in JSON + XML parser (no external deps) |
117
+ | Tile + image layers only | All layer types |
118
+
119
+ ## Development
120
+
121
+ ```sh
122
+ npm install
123
+ npm run build # ESM + CJS + types via tsdown
124
+ npm run dev # watch mode
125
+ npm run check # Biome lint + format
126
+ npm run typecheck # tsc --noEmit
127
+ npm test # Vitest
128
+ ```
129
+
130
+ [npm-url]: https://npmjs.org/package/pixi-tiledmap
131
+ [npm-image]: http://img.shields.io/npm/v/pixi-tiledmap.svg?style=flat