pixelkiln 0.115.0 → 0.115.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/README.md +1 -1
- package/dist/index.cjs +43 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +29 -1
- package/dist/index.d.ts +29 -1
- package/dist/index.js +41 -0
- package/dist/index.js.map +1 -1
- package/docs/LIBRARY.md +22 -2
- package/docs/README.md +1 -1
- package/package.json +1 -1
- package/skills/pixelkiln/SKILL.md +12 -0
- package/skills/pixelkiln/references/pixellab.md +2 -1
- package/skills/pixelkiln/references/tiles.md +198 -0
package/README.md
CHANGED
|
@@ -280,7 +280,7 @@ ceiling and a live quote before each paid call. Compare the adapters in the [pro
|
|
|
280
280
|
pixelkiln pack --style base
|
|
281
281
|
# Stable declared cells in an existing sheet.
|
|
282
282
|
pixelkiln mount --style ground
|
|
283
|
-
#
|
|
283
|
+
# Atlas + engine metadata (tiled, godot, ldtk); --merge-connected joins sets that share a terrain.
|
|
284
284
|
pixelkiln export --style ground --only terrain --format tiled
|
|
285
285
|
```
|
|
286
286
|
|
package/dist/index.cjs
CHANGED
|
@@ -210,6 +210,7 @@ __export(index_exports, {
|
|
|
210
210
|
chooseTilesetSheetReading: () => chooseTilesetSheetReading,
|
|
211
211
|
clientFromEnv: () => clientFromEnv,
|
|
212
212
|
colorDistance: () => colorDistance,
|
|
213
|
+
connectedGroup: () => connectedGroup,
|
|
213
214
|
countNumberedDescriptions: () => countNumberedDescriptions,
|
|
214
215
|
createArtifactBundleManifest: () => createArtifactBundleManifest,
|
|
215
216
|
createGalleryEditHandler: () => createGalleryEditHandler,
|
|
@@ -313,6 +314,7 @@ __export(index_exports, {
|
|
|
313
314
|
mediaExtension: () => mediaExtension,
|
|
314
315
|
mediaTypeFromExtension: () => mediaTypeFromExtension,
|
|
315
316
|
memberPath: () => memberPath,
|
|
317
|
+
mergeConnectedTerrain: () => mergeConnectedTerrain,
|
|
316
318
|
mergePalettes: () => mergePalettes,
|
|
317
319
|
mountSprites: () => mountSprites,
|
|
318
320
|
mountStyle: () => mountStyle,
|
|
@@ -20561,6 +20563,45 @@ function mountStyle(lock, styleId, manifestDir, mount, cells, sources = {}, outp
|
|
|
20561
20563
|
// src/pipeline/connected-sets.ts
|
|
20562
20564
|
var key2 = (spec) => `${spec.styleId}/${spec.assetId}`;
|
|
20563
20565
|
var SIDES = ["lower", "upper"];
|
|
20566
|
+
function connectedGroup(start, specs) {
|
|
20567
|
+
const byKey = new Map(specs.map((spec) => [key2(spec), spec]));
|
|
20568
|
+
const neighbours = /* @__PURE__ */ new Map();
|
|
20569
|
+
const link = (a, b) => {
|
|
20570
|
+
if (!neighbours.has(a)) neighbours.set(a, /* @__PURE__ */ new Set());
|
|
20571
|
+
neighbours.get(a).add(b);
|
|
20572
|
+
};
|
|
20573
|
+
for (const spec of specs) {
|
|
20574
|
+
for (const side of SIDES) {
|
|
20575
|
+
const other = spec.terrainConnect?.[side];
|
|
20576
|
+
if (!other) continue;
|
|
20577
|
+
link(key2(spec), key2(other.spec));
|
|
20578
|
+
link(key2(other.spec), key2(spec));
|
|
20579
|
+
}
|
|
20580
|
+
}
|
|
20581
|
+
const seen = /* @__PURE__ */ new Set();
|
|
20582
|
+
const queue = [key2(start)];
|
|
20583
|
+
while (queue.length) {
|
|
20584
|
+
const next = queue.pop();
|
|
20585
|
+
if (seen.has(next)) continue;
|
|
20586
|
+
seen.add(next);
|
|
20587
|
+
for (const other of neighbours.get(next) ?? []) queue.push(other);
|
|
20588
|
+
}
|
|
20589
|
+
const members = [...seen].map((id) => byKey.get(id)).filter((spec) => spec !== void 0).sort((a, b) => a.assetId.localeCompare(b.assetId));
|
|
20590
|
+
const ordered = [];
|
|
20591
|
+
const placed = /* @__PURE__ */ new Set();
|
|
20592
|
+
const place = (spec) => {
|
|
20593
|
+
if (placed.has(key2(spec))) return;
|
|
20594
|
+
placed.add(key2(spec));
|
|
20595
|
+
for (const side of SIDES) {
|
|
20596
|
+
const other = spec.terrainConnect?.[side];
|
|
20597
|
+
const parent = other ? byKey.get(key2(other.spec)) : void 0;
|
|
20598
|
+
if (parent) place(parent);
|
|
20599
|
+
}
|
|
20600
|
+
ordered.push(spec);
|
|
20601
|
+
};
|
|
20602
|
+
for (const spec of members) place(spec);
|
|
20603
|
+
return ordered;
|
|
20604
|
+
}
|
|
20564
20605
|
function describe(prompt, side) {
|
|
20565
20606
|
const parsed = prompt ? parseTerrainDescriptions(prompt) : null;
|
|
20566
20607
|
const text = parsed?.[side];
|
|
@@ -29398,6 +29439,7 @@ async function workspaceStatus(ws, dir) {
|
|
|
29398
29439
|
chooseTilesetSheetReading,
|
|
29399
29440
|
clientFromEnv,
|
|
29400
29441
|
colorDistance,
|
|
29442
|
+
connectedGroup,
|
|
29401
29443
|
countNumberedDescriptions,
|
|
29402
29444
|
createArtifactBundleManifest,
|
|
29403
29445
|
createGalleryEditHandler,
|
|
@@ -29501,6 +29543,7 @@ async function workspaceStatus(ws, dir) {
|
|
|
29501
29543
|
mediaExtension,
|
|
29502
29544
|
mediaTypeFromExtension,
|
|
29503
29545
|
memberPath,
|
|
29546
|
+
mergeConnectedTerrain,
|
|
29504
29547
|
mergePalettes,
|
|
29505
29548
|
mountSprites,
|
|
29506
29549
|
mountStyle,
|