parse-tmx 1.20.2 → 1.21.1
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.
- package/LICENSE +1 -1
- package/README.md +32 -8
- package/dist/index.d.ts +2 -1
- package/package.json +5 -5
package/LICENSE
CHANGED
|
@@ -186,7 +186,7 @@
|
|
|
186
186
|
same "printed page" as the copyright notice for easier
|
|
187
187
|
identification within third-party archives.
|
|
188
188
|
|
|
189
|
-
Copyright
|
|
189
|
+
Copyright 2020-present Jimmy Chen
|
|
190
190
|
|
|
191
191
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
192
|
you may not use this file except in compliance with the License.
|
package/README.md
CHANGED
|
@@ -1,15 +1,39 @@
|
|
|
1
|
-
# parse-tmx
|
|
1
|
+
# parse-tmx
|
|
2
|
+
|
|
3
|
+
<p>
|
|
4
|
+
<a href="https://www.npmjs.com/package/parse-tmx">
|
|
5
|
+
<img src="https://img.shields.io/npm/v/parse-tmx.svg?style=flat&colorA=18181B&colorB=28CF8D" alt="Version">
|
|
6
|
+
</a>
|
|
7
|
+
<a href="https://www.npmjs.com/package/parse-tmx">
|
|
8
|
+
<img src="https://img.shields.io/npm/dm/parse-tmx.svg?style=flat&colorA=18181B&colorB=28CF8D" alt="Downloads">
|
|
9
|
+
</a>
|
|
10
|
+
<a href="https://github.com/Esposter/Esposter/blob/main/LICENSE">
|
|
11
|
+
<img src="https://img.shields.io/github/license/Esposter/Esposter.svg?style=flat&colorA=18181B&colorB=28CF8D" alt="License">
|
|
12
|
+
</a>
|
|
13
|
+
</p>
|
|
2
14
|
|
|
3
15
|
Inspired by [tmx-map-parser](https://github.com/praghus/tmx-map-parser).
|
|
4
16
|
A parser for [Tiled Map Editor](http://www.mapeditor.org/) \*.tmx files.
|
|
5
17
|
|
|
6
|
-
|
|
18
|
+
### Table of Contents
|
|
19
|
+
|
|
20
|
+
- 🚀 [Getting Started](#getting-started)
|
|
21
|
+
- 📖 [Documentation](#documentation)
|
|
22
|
+
- ⚖️ [License](#license)
|
|
23
|
+
|
|
24
|
+
---
|
|
7
25
|
|
|
8
|
-
|
|
26
|
+
## <a name="getting-started">🚀 Getting Started</a>
|
|
27
|
+
|
|
28
|
+
```bash
|
|
9
29
|
pnpm i parse-tmx
|
|
10
30
|
```
|
|
11
31
|
|
|
12
|
-
##
|
|
32
|
+
## <a name="documentation">📖 Documentation</a>
|
|
33
|
+
|
|
34
|
+
We highly recommend you take a look at the [documentation](https://esposter.com/docs/modules/parse_tmx.html) to level up.
|
|
35
|
+
|
|
36
|
+
### Usage
|
|
13
37
|
|
|
14
38
|
The basic implementation:
|
|
15
39
|
|
|
@@ -28,11 +52,11 @@ const loadMap = async () => {
|
|
|
28
52
|
};
|
|
29
53
|
```
|
|
30
54
|
|
|
31
|
-
|
|
55
|
+
#### Important
|
|
32
56
|
|
|
33
57
|
Parser only supports embedded tilesets. At the moment, external tilesets are not supported!
|
|
34
58
|
|
|
35
|
-
|
|
59
|
+
### Example data
|
|
36
60
|
|
|
37
61
|
[TMX Map Format documentation](https://doc.mapeditor.org/en/stable/reference/tmx-map-format/)
|
|
38
62
|
|
|
@@ -101,6 +125,6 @@ Parser only supports embedded tilesets. At the moment, external tilesets are not
|
|
|
101
125
|
}
|
|
102
126
|
```
|
|
103
127
|
|
|
104
|
-
## License
|
|
128
|
+
## <a name="license">⚖️ License</a>
|
|
105
129
|
|
|
106
|
-
[Apache-2.0 licensed](
|
|
130
|
+
[Apache-2.0 licensed](https://github.com/Esposter/Esposter/blob/main/LICENSE)
|
package/dist/index.d.ts
CHANGED
|
@@ -177,6 +177,7 @@ declare const isExternalTileset: (tileset: TMXEmbeddedTilesetShared | TMXExterna
|
|
|
177
177
|
interface BaseTMXNode<T> extends Record<string, unknown> {
|
|
178
178
|
$: T;
|
|
179
179
|
}
|
|
180
|
+
|
|
180
181
|
type TMXNode<T, TChildNode extends BaseTMXNode<unknown> | undefined = undefined> = {
|
|
181
182
|
$$: TChildNode extends undefined ? undefined : TChildNode[];
|
|
182
183
|
} & BaseTMXNode<T>;
|
|
@@ -306,4 +307,4 @@ declare enum TMXNodeType {
|
|
|
306
307
|
interface TMXExportParsed extends TMXExportShared {
|
|
307
308
|
}
|
|
308
309
|
|
|
309
|
-
export { Compression, Encoding, Flipped, Shape, type TMX, type TMXBaseTilesetShared, type TMXDataNode, type TMXEditorSettingsNode, type TMXEditorSettingsParsed, type TMXEmbeddedTilesetNode, type TMXEmbeddedTilesetParsed, type TMXEmbeddedTilesetShared, type TMXExportNode, type TMXExportParsed, type TMXExportShared, type TMXExternalTilesetNode, type TMXExternalTilesetParsed, type TMXExternalTilesetShared, type TMXFlipsParsed, type TMXGroupLayerNode, type TMXGroupLayerParsed, type TMXGroupLayerShared, type TMXImageNode, type TMXImageParsed, type TMXImageShared, type TMXLayerNode, type TMXLayerParsed, type TMXLayerShared, type TMXMapNode, TMXMapParsed, TMXMapShared, type TMXNode, TMXNodeType, type TMXObjectNode, type TMXObjectParsed, type TMXObjectShared, type TMXParsed, type TMXPropertiesNode, type TMXPropertiesParsed, type TMXPropertyNode, type TMXTileNode, type TMXTileParsed, type TMXTileShared, type TMXTilesetNode, type TMXTilesetParsed, isExternalTileset, isTMXEmbeddedTilesetNode, parseFlips, parseGroup, parseLayer, parseNode, parseObject, parseObjectShape, parseProperties, parseTile, parseTileId, parseTileLayer, parseTileset, parseTmx, unpackTileBytes };
|
|
310
|
+
export { type BaseTMXNode, Compression, Encoding, Flipped, Shape, type TMX, type TMXBaseTilesetShared, type TMXDataNode, type TMXEditorSettingsNode, type TMXEditorSettingsParsed, type TMXEmbeddedTilesetNode, type TMXEmbeddedTilesetParsed, type TMXEmbeddedTilesetShared, type TMXExportNode, type TMXExportParsed, type TMXExportShared, type TMXExternalTilesetNode, type TMXExternalTilesetParsed, type TMXExternalTilesetShared, type TMXFlipsParsed, type TMXGroupLayerNode, type TMXGroupLayerParsed, type TMXGroupLayerShared, type TMXImageNode, type TMXImageParsed, type TMXImageShared, type TMXLayerNode, type TMXLayerParsed, type TMXLayerShared, type TMXMapNode, TMXMapParsed, TMXMapShared, type TMXNode, TMXNodeType, type TMXObjectNode, type TMXObjectParsed, type TMXObjectShared, type TMXParsed, type TMXPropertiesNode, type TMXPropertiesParsed, type TMXPropertyNode, type TMXTileNode, type TMXTileParsed, type TMXTileShared, type TMXTilesetNode, type TMXTilesetParsed, isExternalTileset, isTMXEmbeddedTilesetNode, parseFlips, parseGroup, parseLayer, parseNode, parseObject, parseObjectShape, parseProperties, parseTile, parseTileId, parseTileLayer, parseTileset, parseTmx, unpackTileBytes };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "parse-tmx",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.21.1",
|
|
4
4
|
"description": "A parser for tmx.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -30,11 +30,11 @@
|
|
|
30
30
|
"export:gen": "ctix build --config ../configuration/.ctirc-ts"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@esposter/shared": "1.
|
|
33
|
+
"@esposter/shared": "1.21.1"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@esposter/configuration": "1.
|
|
37
|
-
"@types/node": "^22.5.
|
|
36
|
+
"@esposter/configuration": "1.21.1",
|
|
37
|
+
"@types/node": "^22.5.5"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "e297220e97366d5843bb741e61fedf601f66c3cb"
|
|
40
40
|
}
|