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/index.js
CHANGED
|
@@ -819,6 +819,33 @@ var StyleObjectSchema = z.object({
|
|
|
819
819
|
* Wall storey height as its own camera angle in degrees (5-90),
|
|
820
820
|
* decoupled from the ground's pitch. */
|
|
821
821
|
buildingWallAngle: z.number().min(5).max(90).optional(),
|
|
822
|
+
/**
|
|
823
|
+
* `tileFeature: "building"` with `buildingLayout: "materials"` only. The
|
|
824
|
+
* shape of the roof pieces' edges: `gable` (a straight slope, the API
|
|
825
|
+
* default) or `round` (curved).
|
|
826
|
+
*/
|
|
827
|
+
buildingRoofProfile: z.enum(["gable", "round"]).optional(),
|
|
828
|
+
/**
|
|
829
|
+
* `tileFeature: "tileset"` on square_topdown, isometric or oblique tiles.
|
|
830
|
+
* Terrain height in pixels, 0 to 12: raises the first terrain into a
|
|
831
|
+
* plateau with a cliff face down to the second. The API refuses a height
|
|
832
|
+
* that does not fit the tile's top face and wall at its size and view.
|
|
833
|
+
*/
|
|
834
|
+
tileElevation: z.number().int().min(0).max(12).optional(),
|
|
835
|
+
/**
|
|
836
|
+
* `tileFeature: "tileset"` with `tileElevation` above 0. How far the drop
|
|
837
|
+
* spreads sideways: 0 a cliff straight down (the default) to 2 a gentle
|
|
838
|
+
* slope.
|
|
839
|
+
*/
|
|
840
|
+
tileStepSlope: z.number().min(0).max(2).optional(),
|
|
841
|
+
/**
|
|
842
|
+
* `tileFeature: "tileset"` only. How far the border between the terrains
|
|
843
|
+
* meanders instead of running straight, 0 (the default) to 0.3. Tiles
|
|
844
|
+
* still connect seamlessly.
|
|
845
|
+
*/
|
|
846
|
+
tileBoundaryAmplitude: z.number().min(0).max(0.3).optional(),
|
|
847
|
+
/** `tileFeature: "tileset"` with `tileBoundaryAmplitude`. Which meander: another number gives a different border. */
|
|
848
|
+
tileBoundarySeed: z.number().int().min(0).optional(),
|
|
822
849
|
/**
|
|
823
850
|
* `tiles` generator only. How tile edges are drawn.
|
|
824
851
|
*
|
|
@@ -2590,6 +2617,11 @@ var PixelLabClient = class {
|
|
|
2590
2617
|
if (args.buildingFloorDescription) body.building_floor_description = args.buildingFloorDescription;
|
|
2591
2618
|
if (args.buildingFloor2Description) body.building_floor2_description = args.buildingFloor2Description;
|
|
2592
2619
|
if (args.buildingWallAngle != null) body.building_wall_angle = args.buildingWallAngle;
|
|
2620
|
+
if (args.roofProfile) body.roof_profile = args.roofProfile;
|
|
2621
|
+
if (args.elevation != null) body.elevation = args.elevation;
|
|
2622
|
+
if (args.stepSlope != null) body.step_slope = args.stepSlope;
|
|
2623
|
+
if (args.boundaryAmplitude != null) body.boundary_amplitude = args.boundaryAmplitude;
|
|
2624
|
+
if (args.boundarySeed != null) body.boundary_seed = args.boundarySeed;
|
|
2593
2625
|
if (args.outlineMode) body.outline_mode = args.outlineMode;
|
|
2594
2626
|
if (args.seed != null) body.seed = args.seed;
|
|
2595
2627
|
if (args.styleImages?.length) body.style_images = args.styleImages;
|
|
@@ -4646,6 +4678,12 @@ function specHash(spec, styleImageHashes, providerOptionIdentity = spec.provider
|
|
|
4646
4678
|
tileType: spec.tileType,
|
|
4647
4679
|
tileView: spec.tileView,
|
|
4648
4680
|
tileFeature: spec.tileFeature,
|
|
4681
|
+
// `tiles` shape options added in November 2026, each only when set.
|
|
4682
|
+
buildingRoofProfile: spec.buildingRoofProfile,
|
|
4683
|
+
tileElevation: spec.tileElevation,
|
|
4684
|
+
tileStepSlope: spec.tileStepSlope,
|
|
4685
|
+
tileBoundaryAmplitude: spec.tileBoundaryAmplitude,
|
|
4686
|
+
tileBoundarySeed: spec.tileBoundarySeed,
|
|
4649
4687
|
outlineMode: spec.outlineMode,
|
|
4650
4688
|
isometricTileSize: spec.isometricTileSize,
|
|
4651
4689
|
isometricTileShape: spec.isometricTileShape,
|
|
@@ -5978,6 +6016,7 @@ var PixelLabProvider = class _PixelLabProvider {
|
|
|
5978
6016
|
`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)`
|
|
5979
6017
|
);
|
|
5980
6018
|
}
|
|
6019
|
+
if (spec.generator === "tiles") this.validateTileOptions(spec);
|
|
5981
6020
|
const members = spec.revision?.sourceMembers;
|
|
5982
6021
|
if (spec.revision && members && !MEMBER_SET_REVISION_MODES.includes(spec.revision.mode)) {
|
|
5983
6022
|
throw new Error(
|
|
@@ -6249,6 +6288,31 @@ var PixelLabProvider = class _PixelLabProvider {
|
|
|
6249
6288
|
);
|
|
6250
6289
|
}
|
|
6251
6290
|
}
|
|
6291
|
+
/** Where `/create-tiles-pro`'s newer shape options apply; elsewhere the API ignores or refuses them. */
|
|
6292
|
+
validateTileOptions(spec) {
|
|
6293
|
+
const tilesetOnly = {
|
|
6294
|
+
tileElevation: spec.tileElevation,
|
|
6295
|
+
tileStepSlope: spec.tileStepSlope,
|
|
6296
|
+
tileBoundaryAmplitude: spec.tileBoundaryAmplitude,
|
|
6297
|
+
tileBoundarySeed: spec.tileBoundarySeed
|
|
6298
|
+
};
|
|
6299
|
+
const set = Object.entries(tilesetOnly).filter(([, value]) => value != null).map(([field]) => field);
|
|
6300
|
+
if (set.length && spec.tileFeature !== "tileset") {
|
|
6301
|
+
throw new Error(`PixelLab tiles: ${set.join(", ")} shape a connectable terrain set; set tileFeature: "tileset"`);
|
|
6302
|
+
}
|
|
6303
|
+
if (spec.tileElevation != null && spec.tileElevation > 0 && spec.tileType && !["square_topdown", "isometric", "oblique"].includes(spec.tileType)) {
|
|
6304
|
+
throw new Error(`PixelLab tiles: tileElevation raises a plateau on square_topdown, isometric or oblique tiles, not "${spec.tileType}"`);
|
|
6305
|
+
}
|
|
6306
|
+
if (spec.tileStepSlope != null && !(spec.tileElevation != null && spec.tileElevation > 0)) {
|
|
6307
|
+
throw new Error("PixelLab tiles: tileStepSlope spreads the drop of a raised terrain; set tileElevation above 0");
|
|
6308
|
+
}
|
|
6309
|
+
if (spec.tileBoundarySeed != null && spec.tileBoundaryAmplitude == null) {
|
|
6310
|
+
throw new Error("PixelLab tiles: tileBoundarySeed picks tileBoundaryAmplitude's meander; set both or neither");
|
|
6311
|
+
}
|
|
6312
|
+
if (spec.buildingRoofProfile && !(spec.tileFeature === "building" && spec.buildingLayout === "materials")) {
|
|
6313
|
+
throw new Error(`PixelLab tiles: buildingRoofProfile shapes a building kit's roof pieces; set tileFeature: "building" with buildingLayout: "materials"`);
|
|
6314
|
+
}
|
|
6315
|
+
}
|
|
6252
6316
|
/** `/create-tileset`'s own rules, beyond the enums both terrain endpoints share. */
|
|
6253
6317
|
validateTopDownTerrain(spec) {
|
|
6254
6318
|
if (spec.terrainShapeStyle && spec.terrainMode === "pro") {
|
|
@@ -7139,6 +7203,11 @@ var PixelLabProvider = class _PixelLabProvider {
|
|
|
7139
7203
|
buildingFloorDescription: spec.buildingFloorDescription,
|
|
7140
7204
|
buildingFloor2Description: spec.buildingFloor2Description,
|
|
7141
7205
|
buildingWallAngle: spec.buildingWallAngle,
|
|
7206
|
+
roofProfile: spec.buildingRoofProfile,
|
|
7207
|
+
elevation: spec.tileElevation,
|
|
7208
|
+
stepSlope: spec.tileStepSlope,
|
|
7209
|
+
boundaryAmplitude: spec.tileBoundaryAmplitude,
|
|
7210
|
+
boundarySeed: spec.tileBoundarySeed,
|
|
7142
7211
|
outlineMode: spec.outlineMode,
|
|
7143
7212
|
seed: spec.seed,
|
|
7144
7213
|
// TilesProStyleImage is flat and wants the reference's real dimensions,
|
|
@@ -11689,6 +11758,11 @@ async function resolveSpecs(loaded, filter) {
|
|
|
11689
11758
|
buildingFloorDescription: generator === "tiles" ? style.buildingFloorDescription : void 0,
|
|
11690
11759
|
buildingFloor2Description: generator === "tiles" ? style.buildingFloor2Description : void 0,
|
|
11691
11760
|
buildingWallAngle: generator === "tiles" ? style.buildingWallAngle : void 0,
|
|
11761
|
+
buildingRoofProfile: generator === "tiles" ? style.buildingRoofProfile : void 0,
|
|
11762
|
+
tileElevation: generator === "tiles" ? style.tileElevation : void 0,
|
|
11763
|
+
tileStepSlope: generator === "tiles" ? style.tileStepSlope : void 0,
|
|
11764
|
+
tileBoundaryAmplitude: generator === "tiles" ? style.tileBoundaryAmplitude : void 0,
|
|
11765
|
+
tileBoundarySeed: generator === "tiles" ? style.tileBoundarySeed : void 0,
|
|
11692
11766
|
outlineMode: generator === "tiles" ? style.outlineMode : void 0,
|
|
11693
11767
|
terrainLowerDescription: generator === "terrain" ? terrainLowerDescription : void 0,
|
|
11694
11768
|
terrainUpperDescription: generator === "terrain" ? terrainUpperDescription : void 0,
|