pixelkiln 0.67.0 → 0.68.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 +81 -2
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +86 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +434 -34
- package/dist/index.d.ts +434 -34
- package/dist/index.js +84 -2
- package/dist/index.js.map +1 -1
- package/docs/GENERATORS.md +31 -0
- package/docs/MANIFEST.md +1 -0
- package/docs/PIXELLAB.md +4 -1
- package/package.json +1 -1
- package/schema/manifest.schema.json +61 -0
- package/skills/pixelkiln/references/pixellab-roadmap.md +5 -2
- package/skills/pixelkiln/references/pixellab.md +7 -1
package/docs/GENERATORS.md
CHANGED
|
@@ -43,6 +43,37 @@ attempts in the [environment provider benchmark](./PROVIDER_BENCHMARK.md) were
|
|
|
43
43
|
opaque. `map` has no `noBackground` control in PixelKiln. Check alpha before
|
|
44
44
|
assuming the file can be placed directly over a map.
|
|
45
45
|
|
|
46
|
+
### Drawing into a scene
|
|
47
|
+
|
|
48
|
+
A `map` asset can declare a `scene`: an existing picture of the place the
|
|
49
|
+
object belongs in (a floor, a room, a level). PixelLab draws the object into
|
|
50
|
+
that scene and in its style, which is the one way to match a specific map's
|
|
51
|
+
look without a style image. The price is still one generation.
|
|
52
|
+
|
|
53
|
+
```jsonc
|
|
54
|
+
"barrel": {
|
|
55
|
+
"prompt": "a small wooden barrel",
|
|
56
|
+
"width": 64, "height": 64,
|
|
57
|
+
"scene": { "image": "maps/tavern-floor.png", "placement": { "oval": 0.3 } }
|
|
58
|
+
}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
- `scene.image` is a manifest-relative PNG. It can be another asset's output;
|
|
62
|
+
until that file exists, `plan` shows this asset as blocked. Its bytes are
|
|
63
|
+
part of the spec's identity, so a redrawn scene makes the object stale.
|
|
64
|
+
- `scene.placement` is where the object goes: `{ "oval": f }` or
|
|
65
|
+
`{ "rectangle": f }`, a region PixelLab generates covering `f` (0.05–0.95)
|
|
66
|
+
of the scene, or `{ "mask": "path.png" }`, a PNG the size of the scene,
|
|
67
|
+
white where the object goes and black for context. The default is
|
|
68
|
+
`{ "oval": 0.3 }`, PixelLab's own.
|
|
69
|
+
- PixelLab only. Other providers refuse `scene` when the manifest is resolved.
|
|
70
|
+
|
|
71
|
+
Unverified until a real call is billed: whether the scene has to match the
|
|
72
|
+
object's `width`/`height` or can be a larger picture; where an oval or a
|
|
73
|
+
rectangle sits, since the API takes no position (presumably centered); and
|
|
74
|
+
whether the result is the object alone or the object composited into the
|
|
75
|
+
scene. Check the first result before drawing a batch.
|
|
76
|
+
|
|
46
77
|
## `1dir`
|
|
47
78
|
|
|
48
79
|
`1dir` is the single-facing sibling of PixelLab's rotatable/animated object
|
package/docs/MANIFEST.md
CHANGED
|
@@ -68,6 +68,7 @@ not merely a label edit.
|
|
|
68
68
|
| `state` | object | `character` styles: a pose or outfit of another character asset. See [Characters](./CHARACTERS.md). |
|
|
69
69
|
| `animation` | object | `character` styles: a loop of another character asset in one direction. `directions` (a list, instead of `direction`) declares the loop for several directions at once and fills the unnamed flips with mirrors; see [One loop, several directions](./CHARACTERS.md#one-loop-several-directions). |
|
|
70
70
|
| `mirror` | string | Another asset of the same style flipped left to right, made locally at no cost. See [Mirrors](./CHARACTERS.md#mirrors). |
|
|
71
|
+
| `scene` | object | `map` styles, PixelLab only: draw this object into a scene image, in its style. `{ "image": "scene.png", "placement": { "oval": 0.3 } }`; `placement` is `oval` or `rectangle` (a fraction, 0.05–0.95) or `mask` (a PNG the size of the scene). See [Drawing into a scene](./GENERATORS.md#drawing-into-a-scene). |
|
|
71
72
|
| `batch` | object | `1dir` styles: rides along on another `1dir` asset's `item_descriptions` submission instead of generating on its own — `{ "of": "<leader asset id>", "index": <1-based slot> }`. See [`1dir`](./GENERATORS.md#1dir). |
|
|
72
73
|
| `pieces` | array | `uiAsset` styles: exact shape regions (`rounded_rect`/`circle`/`polygon`) the panel is composited from, each with a unique `id`. See [`uiAsset`](./GENERATORS.md#uiasset). |
|
|
73
74
|
| `elements` | string array | `uiAsset` styles: named, auto-positioned UI scaffolds (`button`, `health_bar`, `window`, ...). Combine with `pieces`; omit both for a plain full-canvas panel. See [`uiAsset`](./GENERATORS.md#uiasset). |
|
package/docs/PIXELLAB.md
CHANGED
|
@@ -175,5 +175,8 @@ scene composition (placing objects and characters into a map, in-scene
|
|
|
175
175
|
inpainting, export) is a separate PixelLab product surface this adapter does
|
|
176
176
|
not model at all — including PixelKiln's own `map` generator, which is
|
|
177
177
|
unrelated to PixelLab's "Map Workshop" despite the shared name: `map` returns
|
|
178
|
-
one static prop in one generation
|
|
178
|
+
one static prop in one generation. The one piece of style matching the public
|
|
179
|
+
`/map-objects` endpoint takes, drawing an object into an existing scene image,
|
|
180
|
+
is a `map` asset's `scene` field; see
|
|
181
|
+
[Drawing into a scene](./GENERATORS.md#drawing-into-a-scene). Use the
|
|
179
182
|
[manifest reference](./MANIFEST.md) for the fields PixelKiln supports today.
|
package/package.json
CHANGED
|
@@ -1456,6 +1456,67 @@
|
|
|
1456
1456
|
],
|
|
1457
1457
|
"additionalProperties": false
|
|
1458
1458
|
},
|
|
1459
|
+
"scene": {
|
|
1460
|
+
"type": "object",
|
|
1461
|
+
"properties": {
|
|
1462
|
+
"image": {
|
|
1463
|
+
"type": "string",
|
|
1464
|
+
"minLength": 1
|
|
1465
|
+
},
|
|
1466
|
+
"placement": {
|
|
1467
|
+
"anyOf": [
|
|
1468
|
+
{
|
|
1469
|
+
"type": "object",
|
|
1470
|
+
"properties": {
|
|
1471
|
+
"oval": {
|
|
1472
|
+
"type": "number",
|
|
1473
|
+
"minimum": 0.05,
|
|
1474
|
+
"maximum": 0.95
|
|
1475
|
+
}
|
|
1476
|
+
},
|
|
1477
|
+
"required": [
|
|
1478
|
+
"oval"
|
|
1479
|
+
],
|
|
1480
|
+
"additionalProperties": false
|
|
1481
|
+
},
|
|
1482
|
+
{
|
|
1483
|
+
"type": "object",
|
|
1484
|
+
"properties": {
|
|
1485
|
+
"rectangle": {
|
|
1486
|
+
"type": "number",
|
|
1487
|
+
"minimum": 0.05,
|
|
1488
|
+
"maximum": 0.95
|
|
1489
|
+
}
|
|
1490
|
+
},
|
|
1491
|
+
"required": [
|
|
1492
|
+
"rectangle"
|
|
1493
|
+
],
|
|
1494
|
+
"additionalProperties": false
|
|
1495
|
+
},
|
|
1496
|
+
{
|
|
1497
|
+
"type": "object",
|
|
1498
|
+
"properties": {
|
|
1499
|
+
"mask": {
|
|
1500
|
+
"type": "string",
|
|
1501
|
+
"minLength": 1
|
|
1502
|
+
}
|
|
1503
|
+
},
|
|
1504
|
+
"required": [
|
|
1505
|
+
"mask"
|
|
1506
|
+
],
|
|
1507
|
+
"additionalProperties": false
|
|
1508
|
+
}
|
|
1509
|
+
],
|
|
1510
|
+
"default": {
|
|
1511
|
+
"oval": 0.3
|
|
1512
|
+
}
|
|
1513
|
+
}
|
|
1514
|
+
},
|
|
1515
|
+
"required": [
|
|
1516
|
+
"image"
|
|
1517
|
+
],
|
|
1518
|
+
"additionalProperties": false
|
|
1519
|
+
},
|
|
1459
1520
|
"proportions": {
|
|
1460
1521
|
"anyOf": [
|
|
1461
1522
|
{
|
|
@@ -372,8 +372,11 @@ describing only the new terrain, and export the whole map (tilesets, full
|
|
|
372
372
|
composite, and every object as separate files). Demonstrated at length in
|
|
373
373
|
"Create Interior Maps," "PixelLab Map Workshop Tutorial," "How to Create
|
|
374
374
|
Destructible Environments in Seconds," and "Create a Full Side Scroller
|
|
375
|
-
Level." Zero pixelkiln analogue
|
|
376
|
-
collision with pixelkiln's own unrelated `map`
|
|
375
|
+
Level." Zero pixelkiln analogue for the scene editor itself — and see
|
|
376
|
+
pixellab.md for the naming collision with pixelkiln's own unrelated `map`
|
|
377
|
+
generator. The one part the public API exposes, `/map-objects` style matching
|
|
378
|
+
(`background_image` + `inpainting`), is closed: a `map` asset's `scene` field
|
|
379
|
+
(issue #216).
|
|
377
380
|
|
|
378
381
|
One concrete, recurring gotcha worth carrying into any future implementation:
|
|
379
382
|
default/generic object prompts in Map Workshop reliably come out oversized
|
|
@@ -270,7 +270,13 @@ of 4, no `strength`), at the Pro Flash tier instead of the Pro endpoints' 20–4
|
|
|
270
270
|
|
|
271
271
|
Do not confuse pixelkiln's `map` generator with PixelLab's own "Map
|
|
272
272
|
Workshop": `map` returns one static prop, icon, or building in a single
|
|
273
|
-
generation
|
|
273
|
+
generation. Its one scene concept is optional: a `map` asset's `scene` (`{
|
|
274
|
+
"image": "floor.png", "placement": { "oval": 0.3 } }`, or `rectangle`, or a
|
|
275
|
+
`mask` PNG the scene's size) draws the object into that picture, in its style,
|
|
276
|
+
still for one generation. The scene can be another asset's output; the object
|
|
277
|
+
is blocked until it exists and goes stale when it is redrawn. Whether the
|
|
278
|
+
result is the object alone or composited, and where an oval sits, are
|
|
279
|
+
unverified; look at the first result before a batch. Map Workshop (scene
|
|
274
280
|
composition — laying out a tile floor, placing characters and movable
|
|
275
281
|
objects, inpainting sections in place, exporting the result) is a distinct
|
|
276
282
|
PixelLab product surface this adapter does not model at all.
|