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/index.cjs CHANGED
@@ -1260,6 +1260,33 @@ var StyleObjectSchema = import_zod.z.object({
1260
1260
  * Wall storey height as its own camera angle in degrees (5-90),
1261
1261
  * decoupled from the ground's pitch. */
1262
1262
  buildingWallAngle: import_zod.z.number().min(5).max(90).optional(),
1263
+ /**
1264
+ * `tileFeature: "building"` with `buildingLayout: "materials"` only. The
1265
+ * shape of the roof pieces' edges: `gable` (a straight slope, the API
1266
+ * default) or `round` (curved).
1267
+ */
1268
+ buildingRoofProfile: import_zod.z.enum(["gable", "round"]).optional(),
1269
+ /**
1270
+ * `tileFeature: "tileset"` on square_topdown, isometric or oblique tiles.
1271
+ * Terrain height in pixels, 0 to 12: raises the first terrain into a
1272
+ * plateau with a cliff face down to the second. The API refuses a height
1273
+ * that does not fit the tile's top face and wall at its size and view.
1274
+ */
1275
+ tileElevation: import_zod.z.number().int().min(0).max(12).optional(),
1276
+ /**
1277
+ * `tileFeature: "tileset"` with `tileElevation` above 0. How far the drop
1278
+ * spreads sideways: 0 a cliff straight down (the default) to 2 a gentle
1279
+ * slope.
1280
+ */
1281
+ tileStepSlope: import_zod.z.number().min(0).max(2).optional(),
1282
+ /**
1283
+ * `tileFeature: "tileset"` only. How far the border between the terrains
1284
+ * meanders instead of running straight, 0 (the default) to 0.3. Tiles
1285
+ * still connect seamlessly.
1286
+ */
1287
+ tileBoundaryAmplitude: import_zod.z.number().min(0).max(0.3).optional(),
1288
+ /** `tileFeature: "tileset"` with `tileBoundaryAmplitude`. Which meander: another number gives a different border. */
1289
+ tileBoundarySeed: import_zod.z.number().int().min(0).optional(),
1263
1290
  /**
1264
1291
  * `tiles` generator only. How tile edges are drawn.
1265
1292
  *
@@ -3031,6 +3058,11 @@ var PixelLabClient = class {
3031
3058
  if (args.buildingFloorDescription) body.building_floor_description = args.buildingFloorDescription;
3032
3059
  if (args.buildingFloor2Description) body.building_floor2_description = args.buildingFloor2Description;
3033
3060
  if (args.buildingWallAngle != null) body.building_wall_angle = args.buildingWallAngle;
3061
+ if (args.roofProfile) body.roof_profile = args.roofProfile;
3062
+ if (args.elevation != null) body.elevation = args.elevation;
3063
+ if (args.stepSlope != null) body.step_slope = args.stepSlope;
3064
+ if (args.boundaryAmplitude != null) body.boundary_amplitude = args.boundaryAmplitude;
3065
+ if (args.boundarySeed != null) body.boundary_seed = args.boundarySeed;
3034
3066
  if (args.outlineMode) body.outline_mode = args.outlineMode;
3035
3067
  if (args.seed != null) body.seed = args.seed;
3036
3068
  if (args.styleImages?.length) body.style_images = args.styleImages;
@@ -5087,6 +5119,12 @@ function specHash(spec, styleImageHashes, providerOptionIdentity = spec.provider
5087
5119
  tileType: spec.tileType,
5088
5120
  tileView: spec.tileView,
5089
5121
  tileFeature: spec.tileFeature,
5122
+ // `tiles` shape options added in November 2026, each only when set.
5123
+ buildingRoofProfile: spec.buildingRoofProfile,
5124
+ tileElevation: spec.tileElevation,
5125
+ tileStepSlope: spec.tileStepSlope,
5126
+ tileBoundaryAmplitude: spec.tileBoundaryAmplitude,
5127
+ tileBoundarySeed: spec.tileBoundarySeed,
5090
5128
  outlineMode: spec.outlineMode,
5091
5129
  isometricTileSize: spec.isometricTileSize,
5092
5130
  isometricTileShape: spec.isometricTileShape,
@@ -6419,6 +6457,7 @@ var PixelLabProvider = class _PixelLabProvider {
6419
6457
  `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)`
6420
6458
  );
6421
6459
  }
6460
+ if (spec.generator === "tiles") this.validateTileOptions(spec);
6422
6461
  const members = spec.revision?.sourceMembers;
6423
6462
  if (spec.revision && members && !MEMBER_SET_REVISION_MODES.includes(spec.revision.mode)) {
6424
6463
  throw new Error(
@@ -6690,6 +6729,31 @@ var PixelLabProvider = class _PixelLabProvider {
6690
6729
  );
6691
6730
  }
6692
6731
  }
6732
+ /** Where `/create-tiles-pro`'s newer shape options apply; elsewhere the API ignores or refuses them. */
6733
+ validateTileOptions(spec) {
6734
+ const tilesetOnly = {
6735
+ tileElevation: spec.tileElevation,
6736
+ tileStepSlope: spec.tileStepSlope,
6737
+ tileBoundaryAmplitude: spec.tileBoundaryAmplitude,
6738
+ tileBoundarySeed: spec.tileBoundarySeed
6739
+ };
6740
+ const set = Object.entries(tilesetOnly).filter(([, value]) => value != null).map(([field]) => field);
6741
+ if (set.length && spec.tileFeature !== "tileset") {
6742
+ throw new Error(`PixelLab tiles: ${set.join(", ")} shape a connectable terrain set; set tileFeature: "tileset"`);
6743
+ }
6744
+ if (spec.tileElevation != null && spec.tileElevation > 0 && spec.tileType && !["square_topdown", "isometric", "oblique"].includes(spec.tileType)) {
6745
+ throw new Error(`PixelLab tiles: tileElevation raises a plateau on square_topdown, isometric or oblique tiles, not "${spec.tileType}"`);
6746
+ }
6747
+ if (spec.tileStepSlope != null && !(spec.tileElevation != null && spec.tileElevation > 0)) {
6748
+ throw new Error("PixelLab tiles: tileStepSlope spreads the drop of a raised terrain; set tileElevation above 0");
6749
+ }
6750
+ if (spec.tileBoundarySeed != null && spec.tileBoundaryAmplitude == null) {
6751
+ throw new Error("PixelLab tiles: tileBoundarySeed picks tileBoundaryAmplitude's meander; set both or neither");
6752
+ }
6753
+ if (spec.buildingRoofProfile && !(spec.tileFeature === "building" && spec.buildingLayout === "materials")) {
6754
+ throw new Error(`PixelLab tiles: buildingRoofProfile shapes a building kit's roof pieces; set tileFeature: "building" with buildingLayout: "materials"`);
6755
+ }
6756
+ }
6693
6757
  /** `/create-tileset`'s own rules, beyond the enums both terrain endpoints share. */
6694
6758
  validateTopDownTerrain(spec) {
6695
6759
  if (spec.terrainShapeStyle && spec.terrainMode === "pro") {
@@ -7580,6 +7644,11 @@ var PixelLabProvider = class _PixelLabProvider {
7580
7644
  buildingFloorDescription: spec.buildingFloorDescription,
7581
7645
  buildingFloor2Description: spec.buildingFloor2Description,
7582
7646
  buildingWallAngle: spec.buildingWallAngle,
7647
+ roofProfile: spec.buildingRoofProfile,
7648
+ elevation: spec.tileElevation,
7649
+ stepSlope: spec.tileStepSlope,
7650
+ boundaryAmplitude: spec.tileBoundaryAmplitude,
7651
+ boundarySeed: spec.tileBoundarySeed,
7583
7652
  outlineMode: spec.outlineMode,
7584
7653
  seed: spec.seed,
7585
7654
  // TilesProStyleImage is flat and wants the reference's real dimensions,
@@ -12130,6 +12199,11 @@ async function resolveSpecs(loaded, filter) {
12130
12199
  buildingFloorDescription: generator === "tiles" ? style.buildingFloorDescription : void 0,
12131
12200
  buildingFloor2Description: generator === "tiles" ? style.buildingFloor2Description : void 0,
12132
12201
  buildingWallAngle: generator === "tiles" ? style.buildingWallAngle : void 0,
12202
+ buildingRoofProfile: generator === "tiles" ? style.buildingRoofProfile : void 0,
12203
+ tileElevation: generator === "tiles" ? style.tileElevation : void 0,
12204
+ tileStepSlope: generator === "tiles" ? style.tileStepSlope : void 0,
12205
+ tileBoundaryAmplitude: generator === "tiles" ? style.tileBoundaryAmplitude : void 0,
12206
+ tileBoundarySeed: generator === "tiles" ? style.tileBoundarySeed : void 0,
12133
12207
  outlineMode: generator === "tiles" ? style.outlineMode : void 0,
12134
12208
  terrainLowerDescription: generator === "terrain" ? terrainLowerDescription : void 0,
12135
12209
  terrainUpperDescription: generator === "terrain" ? terrainUpperDescription : void 0,