parse-tmx 1.24.0 → 1.24.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/dist/index.js +4 -4
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -165,14 +165,11 @@ const parseTileLayer = async (node, expectedCount, translateFlips) => {
|
|
|
165
165
|
if (isTMXEmbeddedTilesetNode(nodeData))
|
|
166
166
|
layer.data = nodeData.tile?.map(({ $ }) => $.gid ?? 0) ?? [];
|
|
167
167
|
else {
|
|
168
|
-
//
|
|
168
|
+
// Base64, Csv
|
|
169
169
|
const { _, $ } = nodeData;
|
|
170
170
|
const { compression, encoding } = $;
|
|
171
171
|
const layerData = _.trim();
|
|
172
172
|
switch (encoding) {
|
|
173
|
-
case Encoding.Csv:
|
|
174
|
-
layer.data = layerData.split(",").map((d) => parseInt(d));
|
|
175
|
-
break;
|
|
176
173
|
case Encoding.Base64: {
|
|
177
174
|
const buffer = Buffer.from(layerData, encoding);
|
|
178
175
|
switch (compression) {
|
|
@@ -198,6 +195,9 @@ const parseTileLayer = async (node, expectedCount, translateFlips) => {
|
|
|
198
195
|
}
|
|
199
196
|
break;
|
|
200
197
|
}
|
|
198
|
+
case Encoding.Csv:
|
|
199
|
+
layer.data = layerData.split(",").map((d) => parseInt(d));
|
|
200
|
+
break;
|
|
201
201
|
default:
|
|
202
202
|
exhaustiveGuard(encoding);
|
|
203
203
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "parse-tmx",
|
|
3
|
-
"version": "1.24.
|
|
3
|
+
"version": "1.24.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.24.
|
|
33
|
+
"@esposter/shared": "1.24.1"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@esposter/configuration": "1.24.
|
|
36
|
+
"@esposter/configuration": "1.24.1",
|
|
37
37
|
"@types/node": "^22.7.5"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "c4362297fd2bcab9a2fa2aa1749f678656475521"
|
|
40
40
|
}
|