pixelkiln 0.100.0 → 0.101.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.
- package/dist/cli.js +74 -0
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +74 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +419 -46
- package/dist/index.d.ts +419 -46
- package/dist/index.js +74 -0
- package/dist/index.js.map +1 -1
- package/docs/ENDPOINTS.md +25 -1
- package/docs/MANIFEST.md +5 -0
- package/package.json +1 -1
- package/schema/manifest.schema.json +52 -0
- package/schema/recipe.schema.json +26 -0
package/dist/cli.js
CHANGED
|
@@ -1335,6 +1335,12 @@ function specHash(spec, styleImageHashes, providerOptionIdentity = spec.provider
|
|
|
1335
1335
|
tileType: spec.tileType,
|
|
1336
1336
|
tileView: spec.tileView,
|
|
1337
1337
|
tileFeature: spec.tileFeature,
|
|
1338
|
+
// `tiles` shape options added in November 2026, each only when set.
|
|
1339
|
+
buildingRoofProfile: spec.buildingRoofProfile,
|
|
1340
|
+
tileElevation: spec.tileElevation,
|
|
1341
|
+
tileStepSlope: spec.tileStepSlope,
|
|
1342
|
+
tileBoundaryAmplitude: spec.tileBoundaryAmplitude,
|
|
1343
|
+
tileBoundarySeed: spec.tileBoundarySeed,
|
|
1338
1344
|
outlineMode: spec.outlineMode,
|
|
1339
1345
|
isometricTileSize: spec.isometricTileSize,
|
|
1340
1346
|
isometricTileShape: spec.isometricTileShape,
|
|
@@ -2363,6 +2369,33 @@ var StyleObjectSchema = z.object({
|
|
|
2363
2369
|
* Wall storey height as its own camera angle in degrees (5-90),
|
|
2364
2370
|
* decoupled from the ground's pitch. */
|
|
2365
2371
|
buildingWallAngle: z.number().min(5).max(90).optional(),
|
|
2372
|
+
/**
|
|
2373
|
+
* `tileFeature: "building"` with `buildingLayout: "materials"` only. The
|
|
2374
|
+
* shape of the roof pieces' edges: `gable` (a straight slope, the API
|
|
2375
|
+
* default) or `round` (curved).
|
|
2376
|
+
*/
|
|
2377
|
+
buildingRoofProfile: z.enum(["gable", "round"]).optional(),
|
|
2378
|
+
/**
|
|
2379
|
+
* `tileFeature: "tileset"` on square_topdown, isometric or oblique tiles.
|
|
2380
|
+
* Terrain height in pixels, 0 to 12: raises the first terrain into a
|
|
2381
|
+
* plateau with a cliff face down to the second. The API refuses a height
|
|
2382
|
+
* that does not fit the tile's top face and wall at its size and view.
|
|
2383
|
+
*/
|
|
2384
|
+
tileElevation: z.number().int().min(0).max(12).optional(),
|
|
2385
|
+
/**
|
|
2386
|
+
* `tileFeature: "tileset"` with `tileElevation` above 0. How far the drop
|
|
2387
|
+
* spreads sideways: 0 a cliff straight down (the default) to 2 a gentle
|
|
2388
|
+
* slope.
|
|
2389
|
+
*/
|
|
2390
|
+
tileStepSlope: z.number().min(0).max(2).optional(),
|
|
2391
|
+
/**
|
|
2392
|
+
* `tileFeature: "tileset"` only. How far the border between the terrains
|
|
2393
|
+
* meanders instead of running straight, 0 (the default) to 0.3. Tiles
|
|
2394
|
+
* still connect seamlessly.
|
|
2395
|
+
*/
|
|
2396
|
+
tileBoundaryAmplitude: z.number().min(0).max(0.3).optional(),
|
|
2397
|
+
/** `tileFeature: "tileset"` with `tileBoundaryAmplitude`. Which meander: another number gives a different border. */
|
|
2398
|
+
tileBoundarySeed: z.number().int().min(0).optional(),
|
|
2366
2399
|
/**
|
|
2367
2400
|
* `tiles` generator only. How tile edges are drawn.
|
|
2368
2401
|
*
|
|
@@ -7730,6 +7763,11 @@ var PixelLabClient = class {
|
|
|
7730
7763
|
if (args.buildingFloorDescription) body.building_floor_description = args.buildingFloorDescription;
|
|
7731
7764
|
if (args.buildingFloor2Description) body.building_floor2_description = args.buildingFloor2Description;
|
|
7732
7765
|
if (args.buildingWallAngle != null) body.building_wall_angle = args.buildingWallAngle;
|
|
7766
|
+
if (args.roofProfile) body.roof_profile = args.roofProfile;
|
|
7767
|
+
if (args.elevation != null) body.elevation = args.elevation;
|
|
7768
|
+
if (args.stepSlope != null) body.step_slope = args.stepSlope;
|
|
7769
|
+
if (args.boundaryAmplitude != null) body.boundary_amplitude = args.boundaryAmplitude;
|
|
7770
|
+
if (args.boundarySeed != null) body.boundary_seed = args.boundarySeed;
|
|
7733
7771
|
if (args.outlineMode) body.outline_mode = args.outlineMode;
|
|
7734
7772
|
if (args.seed != null) body.seed = args.seed;
|
|
7735
7773
|
if (args.styleImages?.length) body.style_images = args.styleImages;
|
|
@@ -10336,6 +10374,7 @@ var PixelLabProvider = class _PixelLabProvider {
|
|
|
10336
10374
|
`vfx sprite ${sprite.file} is ${sprite.width}x${sprite.height}; PixelLab's VFX artist takes up to ${VFX_ARTIST_MAX_SPRITE}x${VFX_ARTIST_MAX_SPRITE} (crop or pad it; never rescale pixel art)`
|
|
10337
10375
|
);
|
|
10338
10376
|
}
|
|
10377
|
+
if (spec.generator === "tiles") this.validateTileOptions(spec);
|
|
10339
10378
|
const members = spec.revision?.sourceMembers;
|
|
10340
10379
|
if (spec.revision && members && !MEMBER_SET_REVISION_MODES.includes(spec.revision.mode)) {
|
|
10341
10380
|
throw new Error(
|
|
@@ -10607,6 +10646,31 @@ var PixelLabProvider = class _PixelLabProvider {
|
|
|
10607
10646
|
);
|
|
10608
10647
|
}
|
|
10609
10648
|
}
|
|
10649
|
+
/** Where `/create-tiles-pro`'s newer shape options apply; elsewhere the API ignores or refuses them. */
|
|
10650
|
+
validateTileOptions(spec) {
|
|
10651
|
+
const tilesetOnly = {
|
|
10652
|
+
tileElevation: spec.tileElevation,
|
|
10653
|
+
tileStepSlope: spec.tileStepSlope,
|
|
10654
|
+
tileBoundaryAmplitude: spec.tileBoundaryAmplitude,
|
|
10655
|
+
tileBoundarySeed: spec.tileBoundarySeed
|
|
10656
|
+
};
|
|
10657
|
+
const set = Object.entries(tilesetOnly).filter(([, value]) => value != null).map(([field]) => field);
|
|
10658
|
+
if (set.length && spec.tileFeature !== "tileset") {
|
|
10659
|
+
throw new Error(`PixelLab tiles: ${set.join(", ")} shape a connectable terrain set; set tileFeature: "tileset"`);
|
|
10660
|
+
}
|
|
10661
|
+
if (spec.tileElevation != null && spec.tileElevation > 0 && spec.tileType && !["square_topdown", "isometric", "oblique"].includes(spec.tileType)) {
|
|
10662
|
+
throw new Error(`PixelLab tiles: tileElevation raises a plateau on square_topdown, isometric or oblique tiles, not "${spec.tileType}"`);
|
|
10663
|
+
}
|
|
10664
|
+
if (spec.tileStepSlope != null && !(spec.tileElevation != null && spec.tileElevation > 0)) {
|
|
10665
|
+
throw new Error("PixelLab tiles: tileStepSlope spreads the drop of a raised terrain; set tileElevation above 0");
|
|
10666
|
+
}
|
|
10667
|
+
if (spec.tileBoundarySeed != null && spec.tileBoundaryAmplitude == null) {
|
|
10668
|
+
throw new Error("PixelLab tiles: tileBoundarySeed picks tileBoundaryAmplitude's meander; set both or neither");
|
|
10669
|
+
}
|
|
10670
|
+
if (spec.buildingRoofProfile && !(spec.tileFeature === "building" && spec.buildingLayout === "materials")) {
|
|
10671
|
+
throw new Error(`PixelLab tiles: buildingRoofProfile shapes a building kit's roof pieces; set tileFeature: "building" with buildingLayout: "materials"`);
|
|
10672
|
+
}
|
|
10673
|
+
}
|
|
10610
10674
|
/** `/create-tileset`'s own rules, beyond the enums both terrain endpoints share. */
|
|
10611
10675
|
validateTopDownTerrain(spec) {
|
|
10612
10676
|
if (spec.terrainShapeStyle && spec.terrainMode === "pro") {
|
|
@@ -11497,6 +11561,11 @@ var PixelLabProvider = class _PixelLabProvider {
|
|
|
11497
11561
|
buildingFloorDescription: spec.buildingFloorDescription,
|
|
11498
11562
|
buildingFloor2Description: spec.buildingFloor2Description,
|
|
11499
11563
|
buildingWallAngle: spec.buildingWallAngle,
|
|
11564
|
+
roofProfile: spec.buildingRoofProfile,
|
|
11565
|
+
elevation: spec.tileElevation,
|
|
11566
|
+
stepSlope: spec.tileStepSlope,
|
|
11567
|
+
boundaryAmplitude: spec.tileBoundaryAmplitude,
|
|
11568
|
+
boundarySeed: spec.tileBoundarySeed,
|
|
11500
11569
|
outlineMode: spec.outlineMode,
|
|
11501
11570
|
seed: spec.seed,
|
|
11502
11571
|
// TilesProStyleImage is flat and wants the reference's real dimensions,
|
|
@@ -14629,6 +14698,11 @@ async function resolveSpecs(loaded, filter) {
|
|
|
14629
14698
|
buildingFloorDescription: generator === "tiles" ? style.buildingFloorDescription : void 0,
|
|
14630
14699
|
buildingFloor2Description: generator === "tiles" ? style.buildingFloor2Description : void 0,
|
|
14631
14700
|
buildingWallAngle: generator === "tiles" ? style.buildingWallAngle : void 0,
|
|
14701
|
+
buildingRoofProfile: generator === "tiles" ? style.buildingRoofProfile : void 0,
|
|
14702
|
+
tileElevation: generator === "tiles" ? style.tileElevation : void 0,
|
|
14703
|
+
tileStepSlope: generator === "tiles" ? style.tileStepSlope : void 0,
|
|
14704
|
+
tileBoundaryAmplitude: generator === "tiles" ? style.tileBoundaryAmplitude : void 0,
|
|
14705
|
+
tileBoundarySeed: generator === "tiles" ? style.tileBoundarySeed : void 0,
|
|
14632
14706
|
outlineMode: generator === "tiles" ? style.outlineMode : void 0,
|
|
14633
14707
|
terrainLowerDescription: generator === "terrain" ? terrainLowerDescription : void 0,
|
|
14634
14708
|
terrainUpperDescription: generator === "terrain" ? terrainUpperDescription : void 0,
|