rig-parts 2.54.0 → 2.56.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/README.md CHANGED
@@ -64,7 +64,7 @@ from it by max 1 level, 0 px over 40 (<code>--lead-in</code>). Frame 29 (2.417 s
64
64
  closed eye: the blink holds for 0.084 s, one 12 fps frame rounded up; the painting is
65
65
  shown at half size, resampled and written by this package's PNG codec (nothing here
66
66
  encodes JPEG). <code>rig-parts sheet</code> made the contact sheet. Its
67
- <code>expected/</code> is this port's own build (<a href="examples/demo/README.md">examples/demo</a>).
67
+ <code>expected/</code> is this port's own build (<a href="https://github.com/rig-c/parts/blob/main/examples/demo/README.md">examples/demo</a>).
68
68
  </em></p>
69
69
 
70
70
  <p align="center"><em>
@@ -74,7 +74,7 @@ with its proposal used unedited — the only hand corrections are four
74
74
  <code>assemble.patches</code>, each answering an <code>uncovered hole</code> line.
75
75
  <code>check</code> passes 9 of 9 with every mesh on the lattice and with every mesh
76
76
  switched to the contour mode. It has no reference output: its <code>expected/</code>
77
- is this port's own build (<a href="examples/scarf/README.md">examples/scarf</a>).
77
+ is this port's own build (<a href="https://github.com/rig-c/parts/blob/main/examples/scarf/README.md">examples/scarf</a>).
78
78
  </em></p>
79
79
 
80
80
  <p align="center"><em>
@@ -86,6 +86,11 @@ until issue #227, which took the clasped-hands painting off display). Their
86
86
  this port to.
87
87
  </em></p>
88
88
 
89
+ One rig can also carry **alternate drawings** as named sets — an outfit swap, or
90
+ mouth shapes (visemes) for speech — cut from extra paintings you supply, and the
91
+ player switches a set by name: see `assemble.alternates` in
92
+ [AUTHORING §3](docs/AUTHORING.md#3-configjson-field-by-field).
93
+
89
94
  ## What it takes in
90
95
 
91
96
  - **One painting** — a PNG of one character that a rig can be cut from: front view,
@@ -126,6 +131,10 @@ page** (issue #2):
126
131
  | `check/` | both gate files verbatim, the idle's frames and their `geometry.json` (skinned vertices per frame), `contact.png`, `motion_heat.png`, `check.json` (with `pack_mode`, the `--page-edges` and `--pack-shape` the page was packed under) |
127
132
  | `idle.png`, `idle-indexed.png`, `idle.gif` | with `--loop`: the idle as a lossless APNG (the exactness record), an indexed APNG with one shared palette (the small one) and a GIF; the last two print their palette error |
128
133
 
134
+ Beside the skeleton data rig-c writes `check/build/skeleton.model.json`, the compiled
135
+ model document. [@rig-c/play](https://github.com/rig-c/play) loads that file and
136
+ draws the rig in a browser, as plain DOM elements or on one canvas.
137
+
129
138
  The last lines of a green build are the pack line, printed beside the Spine example
130
139
  export's `spineboy.png` as a yardstick (a reference, not a bar), and the three
131
140
  artifact paths — here for `examples/reference-sample`:
@@ -168,11 +177,13 @@ atlas written by anything else would have no oracle behind it.
168
177
  | --- | --- | --- |
169
178
  | painting + See-through layers → parts and specs | **rig-parts** (npm `@rig-c/parts`) | the merge of two runs, the measurements, the rig spec and motion spec |
170
179
  | specs → Spine skeleton data | **[@rig-c/core](https://github.com/rig-c/core)** (npm dependency `@rig-c/core`) | compile, the gate (rigc's own validator in an install; the round trip through `spine-core` where the runtime is beside it, as in this repository's CI), the named assertions, the packer, the renderer |
171
- | skeleton data → a page | **[rig-play](https://github.com/rig-c/play)** (npm `@rig-c/play`; formerly spine-html), a sibling project | a DOM renderer; rigc's `rig-play` profile is its policy, and every build here is gated under that profile as well as under `spine` |
180
+ | compiled model → a page | **[rig-play](https://github.com/rig-c/play)** (npm `@rig-c/play`; formerly spine-html), a sibling project | the browser player: it loads the compiled model document and draws it as DOM elements or on one canvas; rigc's `rig-play` profile is its policy, and every build here is gated under that profile as well as under `spine` |
172
181
 
173
182
  rig-parts never writes Spine data itself. Everything on disk under `check/build/`
174
183
  was written by rig-c after its own gate passed.
175
184
 
185
+ Next stops: [@rig-c/review](https://github.com/rig-c/review) is where a person looks at a build and answers, and [@rig-c/create](https://github.com/rig-c/create) drives the whole cycle with an agent.
186
+
176
187
  ## Getting See-through layers
177
188
 
178
189
  See-through is required; how you run it is not. rig-parts does not vendor, embed or
@@ -215,7 +226,7 @@ box at its exact size (`st_input_head.png`). Pure raster, no GPU.
215
226
  ### The optional ComfyUI adapter
216
227
 
217
228
  For a user who has a ComfyUI box, two
218
- commands drive it; nothing else in the pipeline needs one:
229
+ commands make the painting and the layers on it; nothing else in the pipeline needs one:
219
230
 
220
231
  ```sh
221
232
  rig-parts comfy paint --config config.json --out <dir> --host http://<box>:8188
@@ -290,25 +301,8 @@ rig-parts build --config config.json --source painting.png --full layers/full --
290
301
 
291
302
  At each step the config holds only what that step reads; the one table of what
292
303
  that is, step by step, is [docs/AUTHORING.md §4](docs/AUTHORING.md#4-the-command-order).
293
- The command-order controls exercise the hand-copy route above on each fetched
294
- example from a config holding only what the first step reads (`RL01`). The optional
295
- `--write-config` forms below save the proposed fields; `RL01` does not exercise
296
- that flag. On `demo` the
297
- proposal pasted uncorrected stops at the last step, naming its `bottomwear` on
298
- `CHECK_TIP_OVER_ROOT` — the correction its tracked config records there, the two outer
299
- skirt chains moved (issue #227, [its README](examples/demo/README.md)); on `scarf`,
300
- since issue #262, it builds green, and on `wind` too. `wind`'s config declares the cloth
301
- recipe and its limbs, so the block runs on it again with that `cloth` block authored,
302
- `--cloth config.json` on the drafting `propose` line and its tracked `keypoints.json` on both
303
- `propose --parts` lines (`RL05`): it pastes `limbs` and `constraints` with the rest and gives
304
- back the tracked config, section for section ([its README](examples/wind/README.md)).
305
- On `demo`, which tracks the pose file it was painted on, the block runs again with
306
- `--keypoints` on both `propose --parts` lines (`RL03`): the proposal then also drafts
307
- `limbs`, the step's list carries them, and the run ends where `RL01` ends. The joints
308
- are that pose file scaled to the painting, not read off it, so this shows what the
309
- loop carries, not where the joints are. On `wind`, which tracks the joints read off its
310
- painting (`keypoints.json`), `RL03` runs with those. The list as it stood before issue #375, four
311
- sections, stops at `--from-config` naming every limb part (`RL04`).
304
+ How the selftest runs this block on each example is in
305
+ [CONTRIBUTING.md](https://github.com/rig-c/parts/blob/main/CONTRIBUTING.md#the-readme-loop-as-the-selftest-runs-it).
312
306
 
313
307
  `propose` is deliberately not a step of `build`: the proposal is a draft to correct
314
308
  against its overlay, and a config with bones is `build`'s input. `rig`, `check` and
@@ -325,11 +319,17 @@ Command details and config saving are in the [command reference](docs/AUTHORING.
325
319
  | command | does |
326
320
  | --- | --- |
327
321
  | `inputs` | [Prepare the two See-through input images](docs/AUTHORING.md#command-reference) |
328
- | `comfy` | [Drive an optional ComfyUI painting or layer job](docs/AUTHORING.md#command-reference) |
322
+ | `comfy` | [Drive optional ComfyUI jobs: painting, layers, matte and plate](docs/AUTHORING.md#command-reference) |
329
323
  | `layers` | [Inspect wrapper layers or a PSD](docs/AUTHORING.md#command-reference) |
324
+ | `head-crop-preflight` | [Report what a head box would clip, before the head run](docs/AUTHORING.md#command-reference) |
330
325
  | `sheet` | [Make a contact sheet](docs/AUTHORING.md#command-reference) |
331
326
  | `assemble` | [Merge layers into measured parts](docs/AUTHORING.md#command-reference) |
327
+ | `check-parts` | [Check assembled parts' integrity and write a report](docs/AUTHORING.md#check-parts) |
328
+ | `diff-components` | [List every place the stacked parts differ from the painting](docs/AUTHORING.md#whole-figure-difference-inventory) |
332
329
  | `diff-drafts` | [Compare two assemble outputs](docs/AUTHORING.md#command-reference) |
330
+ | `depth-prepare` | [Write one depth-model input image per part](docs/DEPTH.md#1-prepare-one-inference-image-per-part) |
331
+ | `depth-bind` | [Bind a depth map to its prepared input](docs/DEPTH.md#3-bind-every-map-to-its-prepared-input) |
332
+ | `depth-apply` | [Apply depth maps to the parts as depth sheets](docs/DEPTH.md#4-apply-the-maps-as-depth-sheets) |
333
333
  | `edited-part` | [Record an edited part receipt](docs/AUTHORING.md#edited-rig-space-parts-assembleedited_parts-issue-1278) |
334
334
  | `external-receipt` | [Record or verify an external mask](docs/AUTHORING.md#external-mask-receipt) |
335
335
  | `propose` | [Draft or inspect a character config](docs/AUTHORING.md#command-reference) |
@@ -347,6 +347,14 @@ Command details and config saving are in the [command reference](docs/AUTHORING.
347
347
  | `retune` | [Revise constraints and idle in a gated rig](docs/AUTHORING.md#command-reference) |
348
348
  | `guide` | [Read the installed authoring reference](docs/AUTHORING.md#command-reference) |
349
349
 
350
+ ## Depth-driven rigging
351
+
352
+ [docs/DEPTH.md](docs/DEPTH.md) is the feature page for a person: what a depth-driven turn gives you, the two stages that make the sheets, how to pick a painting and how to judge the result.
353
+ See the [depth-driven rigging reference](docs/AUTHORING.md#depth-driven-rigging) for sampled head and body turns and unit-depth precedence.
354
+
355
+ ### Per-layer depth input
356
+
357
+ See the [per-layer depth input contract](docs/AUTHORING.md#per-layer-depth-input) for opt-in sheets, calibration and their consumers.
350
358
 
351
359
  ## What it does not do
352
360
 
@@ -359,10 +367,13 @@ These are limits of the approach, stated so nobody reads more into a green run:
359
367
  sheets, consumed by the shipped 2.5D head-turn producer through [config.turn.roles](docs/AUTHORING.md#3-configjson-field-by-field). A layer that is in front of another in one place and behind it in another is drawn
360
368
  right in the still (the painting's own pixels are projected onto it) and wrong once
361
369
  it moves.
362
- - **No expression or lip-sync, and no jiggle.** The mouth is one layer; there is no
363
- mouth-shape set and no expression axis, and nothing here proposes, keys or judges a
364
- soft region. An expression that moves the face's parts, and a jiggle, can be built on
365
- the rig it writes ([below](#what-can-be-built-on-top)); lip-sync cannot.
370
+ - **No expression axis, no lip-sync from audio, and no jiggle.** The base rig's mouth is
371
+ one layer. Mouth shapes exist only as alternate sets you paint and declare
372
+ (`assemble.alternates`, [AUTHORING §3](docs/AUTHORING.md#3-configjson-field-by-field)),
373
+ switched by name or keyed by hand in a named animation; nothing here draws them or
374
+ reads speech, and nothing here proposes, keys or judges a soft region. An expression
375
+ that moves the face's parts, and a jiggle, can be built on the rig it writes
376
+ ([below](#what-can-be-built-on-top)).
366
377
  - **Occluded pixels are See-through's synthesis**, not the artist's. How much of a rig
367
378
  that is, is below.
368
379
  - **No success rate is claimed.** Ten characters have been measured stage by stage
@@ -408,9 +419,9 @@ for each — a config fragment, the `check` lines it passes with, and its limit:
408
419
  named by `motion.animations_from` are built and gated beside the idle on every build. Keys
409
420
  carry core motion fields, including raw `curve` control points in absolute time/value
410
421
  coordinates ([core key format](https://github.com/rig-c/core/blob/main/docs/AUTHORING.md#45-keys--times-values-curves));
411
- the linked recipe includes a core-gated example. One
412
- attachment per slot, so a part moves, turns and scales but is never swapped for another
413
- image; `check` measures the idle alone.
422
+ the linked recipe includes a core-gated example. Without
423
+ an alternate set a slot holds one image, so a part moves, turns and scales but is not
424
+ swapped for another; `check` measures the idle alone.
414
425
  - [**A soft region driven by physics**](docs/AUTHORING.md#recipe-a-soft-region-driven-by-physics)
415
426
  (a bust, the hips): a bone the config authors, a contour-mode region that hands it the patch,
416
427
  and a `physics` constraint on it; `examples/reference-sample` carries one. Under its slow
@@ -467,7 +478,7 @@ beside `rig-parts` for the transition, the same launcher under both names. On np
467
478
  both compatibility names stay published beside `@rig-c/parts` at every version, as aliases
468
479
  carrying the same files with only the `name` in `package.json` changed, so a
469
480
  project that depends on either keeps receiving every release; a new
470
- install names `@rig-c/parts` ([RELEASING.md](RELEASING.md), *The registry side*). `@rig-c/core`
481
+ install names `@rig-c/parts` ([RELEASING.md](https://github.com/rig-c/parts/blob/main/RELEASING.md), *The registry side*). `@rig-c/core`
471
482
  comes with it as a dependency, providing the `rigc` command. No Spine runtime does: since
472
483
  rig-c 2.0 the installed `rigc` gates every build with its own validator over the
473
484
  compiled model document, and `rigc --version` says `entry: cli_core.ts —
@@ -481,42 +492,8 @@ MIT; see [NOTICE.md](NOTICE.md) for third-party terms and the Spine runtime lice
481
492
 
482
493
  ## Development
483
494
 
484
- ```sh
485
- bun install
486
- bun run typecheck # tsc --noEmit, strict
487
- bun run lint # one rule: no explicit any
488
- bun run fetch-examples # the public examples' paintings and layers, into examples/*/inputs (needs a network); each file held to its blob id at the pinned commit, a stale one replaced by name
489
- bun run selftest # every gate's controls; with the examples fetched, build on each of them against its expected/
490
- bun run selftest -- --summary-json summary.json # also write rig-selftest-summary/1 (per-suite PASS/FAIL/SKIP counts, holes, partial flag and exit)
491
- bun run smoke # pack, install into an empty directory, run from the install (needs a network)
492
- ```
493
-
494
- `bun run selftest -- --summary-json <file>` writes a machine-readable summary (`spec: "rig-selftest-summary/1"`, `tool: "rig-parts"`) derived from the same `RunTally` that prints the console summary: `exit` (`0 | 1 | 2`), `partial` (`boolean`), `only` (`string[] | null`), `faults`, `totals` (`suites`, `ran`, `skipped_suites`, `controls`, `passed`, `failed`, `skipped`, `holes`), per-suite `suites` entries (`suite`, `ran`, `controls`, `passed`, `failed`, `skipped`, `status`, `reason`), `skips` (`{ suite, name, reason, hole }`), and `holes` (`{ suite, name, reason }`). See [AUTHORING §8](docs/AUTHORING.md#machine-readable-selftest-summary---summary-json-issue-725) for the full shape.
495
-
496
- The generated `foot-ownership` suite can be run alone with
497
- `bun run selftest -- --only foot-ownership` (exit 2 means a green partial run,
498
- not a full-tree verdict). Issue #638's revised acceptance requires zero foreign-leg
499
- components and reports historical own-cap components separately; it was changed
500
- after measurement, and the historical case did not pass the original second-island
501
- 1% bar. Issue #637 additionally preserves assigned own-cap connections under covers:
502
- the generated default is now one connected component, retaining the historical
503
- own-cap pixels and their bridge. The controls require both historical measurements
504
- and current connected ownership, with no foreign-leg pixels.
505
- [AUTHORING's limb section](docs/AUTHORING.md#limbs-cut-at-their-joints-limbs-issue-349)
506
- records the generated default-cap case and its preservation controls.
507
-
508
- [CLAUDE.md](CLAUDE.md) is the doctrine, [CONTRIBUTING.md](CONTRIBUTING.md) the
509
- practice, [RELEASING.md](RELEASING.md) the cut, [docs/STABILITY.md](docs/STABILITY.md)
510
- the interface it holds.
511
-
512
- ## Depth-driven rigging
513
-
514
- [docs/DEPTH.md](docs/DEPTH.md) is the feature page for a person: what a depth-driven turn gives you, the two stages that make the sheets, how to pick a painting and how to judge the result.
515
- See the [depth-driven rigging reference](docs/AUTHORING.md#depth-driven-rigging) for sampled head and body turns and unit-depth precedence.
516
-
517
- ### Per-layer depth input
518
-
519
- See the [per-layer depth input contract](docs/AUTHORING.md#per-layer-depth-input) for opt-in sheets, calibration and their consumers.
495
+ `bun install`, then `bun run typecheck`, `bun run lint` and `bun run selftest`.
496
+ [CONTRIBUTING.md](https://github.com/rig-c/parts/blob/main/CONTRIBUTING.md) has every command and what a change has to clear; [CLAUDE.md](https://github.com/rig-c/parts/blob/main/CLAUDE.md) is the doctrine, [RELEASING.md](https://github.com/rig-c/parts/blob/main/RELEASING.md) the cut, [docs/STABILITY.md](docs/STABILITY.md) the interface it holds.
520
497
 
521
498
  ## Licence
522
499
 
package/docs/AUTHORING.md CHANGED
@@ -23,14 +23,14 @@ A path this page names that the installed package does not hold — anything und
23
23
  `bun run` names — is in the repository, https://github.com/rig-c/parts; the package holds the files
24
24
  `package.json` lists under `files` (`npm pack --dry-run` prints them).
25
25
 
26
- For repository changes, run `bun run selftest:pre` on an ordinary Nova slot,
26
+ For repository changes, run `bun run selftest:pre` on an ordinary slot of the remote job pool,
27
27
  beside the change's targeted suites (or add them with
28
28
  `bun run selftest:pre -- --only rig,propose`). Its fixed minimum forms are demo's
29
29
  AE02, TY12/TY16, one demo build with CH04/CH05 goldens, and declaration ownership
30
30
  plus RT14, accounting and the family-memory check. It uses one worker and needs
31
31
  demo's pinned inputs. Missing inputs, SKIPs and HOLEs cannot pass. Its result
32
32
  covers those forms only: **the full forms and full-tree verdict belong to PR CI**.
33
- [CONTRIBUTING](../CONTRIBUTING.md#before-you-open-a-pull-request) records their
33
+ [CONTRIBUTING](https://github.com/rig-c/parts/blob/main/CONTRIBUTING.md#before-you-open-a-pull-request) records their
34
34
  historical derivation, the selected forms and the separate pre/ordinary-PARTIAL
35
35
  exit contracts.
36
36
 
@@ -1538,6 +1538,71 @@ and no byte moves; a build that passes under it writes the same bytes as
1538
1538
  without it. Of the public examples, every config holds no drawn shape except
1539
1539
  `scarf`, whose four patches `trace_parts` would refuse.
1540
1540
 
1541
+ ### Outfit alternates
1542
+
1543
+ Keep the base rig config and add an entry to `assemble.alternates` for the
1544
+ second painting. Use a painting on the base canvas and a full run containing
1545
+ the layers for the changed parts. Reuse the base head run if the selected head
1546
+ art is unchanged. In this example the outfit replaces three clothing pieces
1547
+ and both arm segments and hides the base hairpin.
1548
+
1549
+ ```json
1550
+ {
1551
+ "name": "outfit_b",
1552
+ "source": "painting_b.png",
1553
+ "full": "full_b",
1554
+ "head": "head",
1555
+ "parts": ["topwear", "bottomwear", "shoes", "upperarm_r", "forearm_r"],
1556
+ "hides": ["hairpin"]
1557
+ }
1558
+ ```
1559
+
1560
+ Use the existing limb joints when the painting has the same arm pose. The
1561
+ `assemble.alternates` field above describes `drawn` and `skeleton` for a
1562
+ different painted pose. Build with the base `--source`, `--full`, and
1563
+ `--head` inputs and use `--all-sets` to check each alternate in its setup pose.
1564
+ Use `check --set outfit_b` to inspect this outfit on its own.
1565
+
1566
+ For sleeves and overgarments, check the layer that feeds the limb cut.
1567
+
1568
+ - List every segment of a replaced limb in `parts`. Partial coverage or hiding
1569
+ a limb segment is refused by [`CONFIG_LIMB_SET_JOINTS`](#CONFIG_LIMB_SET_JOINTS).
1570
+ If the arm should keep its base art, omit all its segments from both
1571
+ `parts` and `hides`.
1572
+ - If a sleeve should move with the arm, its layer must carry both segments
1573
+ and cover the elbow cut. A speck removed as ghost pixels can trigger
1574
+ [`ASSEMBLE_PART_OPAQUE`](#ASSEMBLE_PART_OPAQUE). A wrist-only layer can
1575
+ leave the upper segment empty
1576
+ ([`ASSEMBLE_LIMB_PIXELS`](#ASSEMBLE_LIMB_PIXELS)). A gap at the elbow leaves
1577
+ the joint without art
1578
+ ([`ASSEMBLE_LIMB_JOINT_ON_ART`](#ASSEMBLE_LIMB_JOINT_ON_ART)).
1579
+ [Alternate part layers](#alternate-part-layers-assemblealternatesilayers-issue-666)
1580
+ shows how to select a corrected sleeve layer.
1581
+ - A required layer missing from the alternate run triggers
1582
+ [`ASSEMBLE_ALT_INPUT_PRESENT`](#ASSEMBLE_ALT_INPUT_PRESENT). An alternate
1583
+ painting with different canvas dimensions triggers
1584
+ [`ASSEMBLE_ALT_CANVAS_SIZE`](#ASSEMBLE_ALT_CANVAS_SIZE).
1585
+
1586
+ An outfit and a mouth viseme can share the build. In the synthetic outfit
1587
+ fixture, the outfit and the `a` viseme bind disjoint slots. The consumer can
1588
+ combine their slot maps in either order. For overlapping slots, merging two
1589
+ slot maps with object spread gives the later map precedence on the shared
1590
+ slots. This is a consumer-side merge. The fixture measures it with a sleeve
1591
+ override map. For keyed visemes, see the `motion.animations_from` field above.
1592
+
1593
+ The synthetic fixture in selftest `BU173` builds the base rig, then builds it
1594
+ with the outfit and three viseme sets. The first four rows have the same
1595
+ SHA-256 of the serialized JSON value in both builds. The last row is the new
1596
+ skirt attachment, triangulated for the alternate art.
1597
+
1598
+ | JSON value measured by BU173 | SHA-256 |
1599
+ | --- | --- |
1600
+ | Base bones and drawn rest pose | `337b27f126c6e023fc89975a8336f6e238e6d88efcd43e4a4bdb2c4bb530afdf` |
1601
+ | Face axis | `eae7351e1206641929b2625359ced7ba31d065756272319b09bc83da50b82498` |
1602
+ | Idle animation | `87b6a843d36cd4a46fff474ab10e6874a7667f819bfa12d674e75e7dcf70667c` |
1603
+ | Base skirt mesh (24 vertices, 30 triangles) | `9c9bca3e0270160bc557248a250f7e015012161e7f1be7460b4bcb368b917925` |
1604
+ | Alternate skirt mesh (30 vertices, 40 triangles) | `e15b4ba5a013495d23fe945c7aafb980a12351cdc9ca067b4904ce0d48059701` |
1605
+
1541
1606
  ### Alternate part layers (`assemble.alternates[i].layers`, issue #666)
1542
1607
 
1543
1608
  A gesture run may hold a raised arm only in a layer the author added, while
@@ -5564,7 +5629,7 @@ outline lies right of every removed pixel, and an image of only that silhouette
5564
5629
  none of the 15,070 — `ASSEMBLE_UNDER_EMPTY` [observed]. Producing a hand-supplied PNG is the
5565
5630
  author's; for a receipted plate route (issue #1230), run in order: (1) `rig-parts assemble --source <painting.png> --full <dir> [--head <dir>] --config <config.json> [--requirements <file.json>] --emit-fill-masks <masks-dir>` to write `<masks-dir>/<into>.png` on the painting's grid (`[255, 255, 255, 255]` where `(polygon ∩ from alpha > 0)`, overlap band included, and `[0, 0, 0, 0]` elsewhere; where a region take or a busy-visible figure mask reads requirements, `--emit-fill-masks` reads `config.requirements` and optional `--requirements` by the same rule as `--out`); (2) `rig-parts comfy plate --mode occluder --painting <painting.png> --occluder <masks-dir>/<into>.png --out <plate-dir>`; and (3) set `"under": {"plate": "<plate-dir>"}` on `assemble.cuts[i]` and re-run `rig-parts assemble` (or `build`).
5566
5631
 
5567
- **Splitting a horizontal hem between two plan layers (`assemble.edge_splits`, issue #1231).** `assemble.edge_splits` (`[{ "over": "<part>", "under": "<part>", "band": [x0, y0, x1, y1] }, ...]`) takes `assemble.plan` part names only (`over !== under`), so a part made by `assemble.cuts` is refused with `CONFIG_NAME_RESOLVES`. Its effect is a horizontal hem split between two plan layers on the rig grid inside `band` (`x0 < x1`, `y0 < y1`, upper bounds exclusive; `ASSEMBLE_PAINTING_BAND_INSIDE` when the box reaches outside the rig canvas), applied after ghost clean-up and rig-space resampling and before projection: per column `x` in `x0 .. x1 - 1`, `y*` is the first row in `y0 .. y1 - 1` (with `y + 1 < H`) with the largest vertical painting RGB step `max(|R(x,y) - R(x,y+1)|, |G(x,y) - G(x,y+1)|, |B(x,y) - B(x,y+1)|)` among rows where `over` has `alpha >= 128` (`EDGE_SPLIT_OVER_ALPHA`; columns with no such row are skipped), and for every row strictly below `y*` inside `band` (`y* + 1 .. y1 - 1`), where `over` has `alpha >= 128`, `over` is cleared to `[0, 0, 0, 0]` and `under` takes the painting's RGB there with `alpha = 255`, and where `over` has `0 < alpha < 128`, `over` is cleared to `[0, 0, 0, 0]`. It transfers static plan-layer ownership along a painted horizontal hem; it does not close a `cuts` seam that opens in motion.
5632
+ **Splitting a horizontal hem between two plan layers (`assemble.edge_splits`, issue #1231).** `assemble.edge_splits` (`[{ "over": "<part>", "under": "<part>", "band": [x0, y0, x1, y1] }, ...]`) takes `assemble.plan` part names only (`over !== under`), so a part made by `assemble.cuts` is refused with `CONFIG_NAME_RESOLVES`. Its effect is a horizontal hem split between two plan layers on the rig grid inside `band` (`x0 < x1`, `y0 < y1`, upper bounds exclusive; `ASSEMBLE_PAINTING_BAND_INSIDE` when the box reaches outside the rig canvas), applied after ghost clean-up and rig-space resampling and before projection: per column `x` in `x0 .. x1 - 1`, `y*` is the first row in `y0 .. y1 - 1` (with `y + 1 < H`) with the largest vertical painting RGB step `max(|R(x,y) - R(x,y+1)|, |G(x,y) - G(x,y+1)|, |B(x,y) - B(x,y+1)|)` among rows where `over` has `alpha >= 128` (`EDGE_SPLIT_ALPHA`; columns with no such row are skipped), and for every row strictly below `y*` inside `band` (`y* + 1 .. y1 - 1`), where `over` has `alpha >= 128`, `over` is cleared to `[0, 0, 0, 0]` and `under` takes the painting's RGB there with `alpha = 255`, and where `over` has `0 < alpha < 128`, `over` is cleared to `[0, 0, 0, 0]`. It transfers static plan-layer ownership along a painted horizontal hem; it does not close a `cuts` seam that opens in motion.
5568
5633
 
5569
5634
  **A layer the author made** (issue #256). A cut covers a piece one polygon over a
5570
5635
  planned part can take. When the piece is a layer you made by hand outside the tool — a
@@ -6779,7 +6844,7 @@ writes `parts-check.json` and reads no rig, motion or plate. Exit 0 records inpu
6779
6844
  integrity. Quality classes without measurements remain named HOLEs.
6780
6845
  [STABILITY](STABILITY.md#parts-stage-integrity-report) defines the binding and
6781
6846
  closed diagnostic vocabulary. Base and alternate `scene.figure_mask` remain
6782
- outside the consumed inputs pending [#1177](https://github.com/rig-c/parts/issues/1177).
6847
+ outside the consumed inputs.
6783
6848
 
6784
6849
  | rule | means | change |
6785
6850
  | --- | --- | --- |
@@ -6969,6 +7034,8 @@ Renderer metadata and exact raster reads use the promised `@rig-c/core/render-sh
6969
7034
 
6970
7035
  The body-root bar counts stock partitions `gapOpen` plus `ghostA` or `ghostB` owned by the pair's UNDER-owned drawing in resolved draw order on each active frame, comparing their summed cells against the unchanged strict floor `px > round(max(box width, box height) / cell)` on the original raw kind boxes (their union when both kinds contribute), never the narrowed partition boxes; `gapCovered` and OVER-owned ghost cells do not count (issue #711). The metric mode is `gap-open+under-ghost`; rows retain the exact partition counts, UNDER owner and counted total in `cells`, including excluded and under-floor readings. Missing partitions, inconsistent sums or unavailable ownership are named `FRAMES_SIDECAR` refusals, never inferred zero. An active rendered environment fails `CHECK_SEAM_OVER_MOTION` above that floor, setting overall PASS false and exits 1. Existing internal-joint and explicit-only pairs remain warnings: their PASS, exit status and bar count are unchanged; reference worlds remain informational. The root bar is counted once, and absence is not a zero or a PASS. No whole-box alpha exemption or consumer compositor is used. This gate samples the supplied animations at 12 fps, not another motion or player scene.
6971
7036
 
7037
+ <a id="openings-inside-the-figure-on-undeclared-layer-pairs-issue-933"></a>
7038
+
6972
7039
  **Openings inside the figure on undeclared layer pairs** (issue #933). Declared `SEAM_OVER_MOTION` reads only limb segments at a cut joint, proven body-root pairs, and explicit `--requirements` or `motion_seams` declarations — `0` pairs on `demo`, `reference-demo`, `reference-sample` and `scarf`, and `10` of `63` setup-overlapping pairs (`alpha >= 128`) on `wind`. An upper layer sliding off a lower layer where the lower layer lacks opaque art under it opens a sliver of transparent canvas (`alpha == 0`) inside the figure while declared `SEAM_OVER_MOTION` stays `SKIP`. To read openings inside the figure across every undeclared setup-overlapping (`alpha >= 128`) layer pair in `rig.json` draw order (`under` drawn before `above`, so `"<above>"` is the part above the opening), `readFigurePairOpenings` evaluates on each animation frame at 12 fps (`scale = 1 / cell`, so one raster cell is `cell` world units on a side — about `2.2` to `2.5` world units on the public examples) the cells inside both drawings' posed overlap bounding box and inside the pair's own posed hole-filled union (`fillHoles(a ∪ b)`, so a pocket closed only by a third part does not count against `a|b`) that are transparent across the whole skeleton (`alpha == 0`), covered at setup (`t = 0`) by both `under` and `above` (`setup.a0[p] >= 128 && setup.b0[p] >= 128`), and not already transparent at the setup pose (`setup.any0[p] === 0`, so a deliberate gap between arm and body present at rest is art, not a motion opening). A frame opening exceeds the one-cell floor when `found_cells > allowed_cells`, where `found_cells` is the open cell count and `allowed_cells = round(max(box width, box height) / cell)` on the opening's world box (`[x0, y0, x1, y1]`). Each run prints a status line (`figure_openings: CLEAR — …`, `figure_openings: WARN — …` followed by one `WARN opening` line per pair and animation above the floor, or `figure_openings: SKIP — <reason>` when there is no `parts.json`, no animation, or no undeclared setup-overlapping pair) and writes `figure_openings` in `check.json` whenever the reader ran (`status !== "SKIP"`). Each warning names the pair `"<a>|<b>"`, the part above (`above "<above>"`) and under (`under "<under>"`), the worst frame (`frame <index>`), `found <found_cells> cell(s)`, `<= <allowed_cells> cell(s) allowed` in `<w>x<h> world units at <cell> world units/cell`. Measured wall-time cost inside `check`: `0.4 s` of `186.2 s` (`0.2 %`) on `wind` (`53` undeclared pairs, `1` animation) and `0.7 s` of `41.2 s` (`1.7 %`) on `scarf` (`67` undeclared pairs, `8` animations).
6973
7040
 
6974
7041
  | example | slots | total slot pairs | setup-overlapping pairs (`alpha >= 128`) | declared `SEAM_OVER_MOTION` pairs | undeclared pairs read | cell (`idle`, world units) | setup interior `alpha == 0` holes (cells / components) | `figure_openings` (`idle` warnings / all-animation warnings) | worst opening (`pair`, `above`, `animation`, `frame`, `found_cells` vs `allowed_cells` in `box` at `cell`) |
@@ -7001,7 +7068,7 @@ and stay absent).
7001
7068
 
7002
7069
  | rule | means | change |
7003
7070
  | --- | --- | --- |
7004
- | <a id="SCENE_FILE"></a><a id="SCENE_SPEC"></a><a id="SCENE_FIELD_PRESENT"></a><a id="SCENE_FIELD_TYPE"></a><a id="SCENE_KEY_KNOWN"></a>`SCENE_FILE`, `SCENE_SPEC`, `SCENE_FIELD_PRESENT`, `SCENE_FIELD_TYPE`, `SCENE_KEY_KNOWN` | the scene file is missing, not a JSON object, not `spine-parts-scene/1`, or a field is missing, of the wrong type or not one the format reads (`canvas` two positive integers; `characters` at least one, each `id`, `build`, `offset` — an offset is never assumed (0, 0) — optional `scale` as a positive finite number, and optional `canvas_clip` as literal `true`; `order` a list of strings). `note`, `*_note` (strings) and `x-…` (any value) are read by nothing | the field |
7071
+ | <a id="SCENE_FILE"></a><a id="SCENE_SPEC"></a><a id="SCENE_FIELD_PRESENT"></a><a id="SCENE_FIELD_TYPE"></a><a id="SCENE_KEY_KNOWN"></a>`SCENE_FILE`, `SCENE_SPEC`, `SCENE_FIELD_PRESENT`, `SCENE_FIELD_TYPE`, `SCENE_KEY_KNOWN` | the scene file is missing, not a JSON object, not `spine-parts-scene/1`, or a field is missing, of the wrong type or not one the format reads (`canvas` two positive integers; `characters` at least one, each `id`, `build`, `offset` — an offset is never assumed (0, 0) — optional `scale` as a positive finite number, and optional `canvas_clip` and `placement_pivot` as literal `true`; `order` a list of strings). `note`, `*_note` (strings) and `x-…` (any value) are read by nothing | the field |
7005
7072
  | <a id="SCENE_ID_UNIQUE"></a><a id="SCENE_ID_FORM"></a>`SCENE_ID_UNIQUE`, `SCENE_ID_FORM` | an `id` repeated, empty, or holding `:` — the separator of a prefixed name — or `/`, `\` or a leading `.`, because an id begins every image file of its character | another id |
7006
7073
  | <a id="SCENE_EDITOR_RECEIPT"></a>`SCENE_EDITOR_RECEIPT` | `scene.plate.editor_receipts` has a malformed ledger or receipt (issue #966) | use `{receipts: [{file, sha256, from_sha256, editor}], required?}` with the same shape rules as assemble editor receipts |
7007
7074
  | <a id="SCENE_EDITOR_RECEIPT_FILE"></a>`SCENE_EDITOR_RECEIPT_FILE` | a plate receipt names a missing file | supply the edited image relative to the scene file |
@@ -7018,7 +7085,12 @@ and stay absent).
7018
7085
  | <a id="SCENE_BUILD_FIELD_KNOWN"></a>`SCENE_BUILD_FIELD_KNOWN` | a build's `rig.json` or `motion.json` carries a key compose does not know how to prefix or place, or a root with a transform of its own | a rig `build` wrote; a rig written by something else is `check`'s to measure (§7, *Measuring a rig rig-parts did not assemble*), not compose's to merge |
7019
7086
  | <a id="SCENE_RIG_SCALE_AGREES"></a>`SCENE_RIG_SCALE_AGREES` | the characters' `parts.json` `scale_rig_per_source` differ (each named) | one `assemble.rig_scale` for every character; `characters[].scale` sizes a placed character, it does not make two `rig_scale`s one |
7020
7087
  | <a id="SCENE_SCALE_EXACT"></a>`SCENE_SCALE_EXACT` | a character at a `scale` other than 1 carries something no per-character value can scale: a physics constraint with a nonzero `wind` or `gravity`, or a physics track keying `wind` or `gravity` with a nonzero value (Spine applies both through the skeleton's `referenceScale`, which the composed skeleton holds once for every character), a track whose `property` compose does not know to be a length or not, or a translate key whose `v` is neither a list of numbers nor a map of them | `scale` 1 for that character, or rebuild it at another `assemble.rig_scale` |
7021
- | <a id="SCENE_DURATION_AGREES"></a>`SCENE_DURATION_AGREES` | the characters' idles are of different durations (each named), or `scene.animations.idle.duration` differs from the composed idle | declare the same duration; compose never stretches or retimes either side |
7088
+ | <a id="SCENE_DURATION_AGREES"></a>`SCENE_DURATION_AGREES` | with no `idle_repeats`, the characters' idles are of different durations (each named), or `scene.animations.idle.duration` differs from the composed idle | declare the same duration; compose preserves the original key timing |
7089
+ | <a id="SCENE_REPEAT_COUNT"></a>`SCENE_REPEAT_COUNT` | a character declares an invalid `idle_repeats` value | declare a safe integer of 2 or more, or omit the field to use one source period |
7090
+ | <a id="SCENE_REPEAT_IDLE_REQUIRED"></a>`SCENE_REPEAT_IDLE_REQUIRED` | a character opts in but the scene declares no `animations.idle` | declare the scene idle and its duration |
7091
+ | <a id="SCENE_REPEAT_DURATION"></a>`SCENE_REPEAT_DURATION` | in an opted-in scene, the declared idle duration differs from a character's source period times its playback count, including a count of one for a character without `idle_repeats` | use the exact finite, positive product for every character |
7092
+ | <a id="SCENE_REPEAT_SOURCE_LOOP_CLOSES"></a>`SCENE_REPEAT_SOURCE_LOOP_CLOSES` | a repeated source idle has a loop flag other than `true`, or its original gated keyed poses at the start and stored end do not close or cannot be read | use a closed source idle with `loop: true` and correct the named pose channel |
7093
+ | <a id="SCENE_REPEAT_KEY_SEAM"></a>`SCENE_REPEAT_KEY_SEAM` | a repeated source timeline cannot be spliced on its effective key clock, for example because of a setup gap, an unequal boundary state or left limit, or a reset at the boundary | author a timeline that starts at effective time zero and closes continuously, with any explicit reset strictly inside the source period and separate on Core's playback clock |
7022
7094
  | <a id="CE_COMPILE_ANIMATION_GROUP_UNKNOWN"></a>`CE_COMPILE_ANIMATION_GROUP_UNKNOWN` | a scene track names no own declared group, including inherited object names such as `constructor` | name an explicitly declared final group; prototype properties are not groups |
7023
7095
  | <a id="SCENE_ANIMATION_NAME_FREE"></a>`SCENE_ANIMATION_NAME_FREE` | a scene clip name already belongs to an imported character animation | choose a new name; only shared `idle` can be extended |
7024
7096
  | <a id="SCENE_DIAL_RANGE_DECLARED"></a>`SCENE_DIAL_RANGE_DECLARED` | a keyed slider has no readable explicit `from` and `max` bounds, or its bounds are reversed; the bone and slider are named | declare both finite bounds with `from <= max`; no limits are invented |
@@ -7026,6 +7098,10 @@ and stay absent).
7026
7098
  | <a id="SCENE_DIAL_KEY_DECLARED"></a>`SCENE_DIAL_KEY_DECLARED` | a scene key uses `derive` on a slider's input property, including one that also carries a raw `v`; derived slider inputs are not a supported scene dial dialect | declare an explicit numeric `v` for the named dial, within the named slider's own range; group member values are checked separately |
7027
7099
  | <a id="SCENE_ANIMATION_LOOP_CLOSES"></a>`SCENE_ANIMATION_LOOP_CLOSES` | the gated posed samples at 0 and the scene clip's declared duration differ, for a new clip or an idle extension | close the posed bone, slot, geometry, alpha, clip and draw-order state; comparison omits physics simulation only and never wraps the endpoint to zero |
7028
7100
  | <a id="SCENE_ANIMATION_POSE_READABLE"></a>`SCENE_ANIMATION_POSE_READABLE` | Core cannot read or pose the compiled scene clip for its endpoint comparison | correct the construct named by Core; unreadable poses never count as closed and no scene is emitted |
7101
+ | <a id="SCENE_PIVOT_NAME_FREE"></a>`SCENE_PIVOT_NAME_FREE` | an opted-in character's source build already has a bone named `placement` that resolves to the generated name | rename the source bone or omit `placement_pivot` |
7102
+ | <a id="SCENE_PIVOT_DECLARED"></a>`SCENE_PIVOT_DECLARED` | a scene track keys an unresolved `<id>:placement` directly or through a bone group, and the character has not opted in | declare `"placement_pivot": true` on the named character |
7103
+ | <a id="SCENE_PIVOT_UNUSED"></a>`SCENE_PIVOT_UNUSED` | an opted-in character has no scene-authored translation key on its generated pivot | add a `translate`, `translatex` or `translatey` track with a key on `<id>:placement` in `animations`, or omit `placement_pivot` |
7104
+ | <a id="SCENE_PIVOT_TRACK"></a>`SCENE_PIVOT_TRACK` | a scene track keys a property other than translation on `<id>:placement`, or keys the generated `<id>:root` carrier | key translation on `<id>:placement` and leave the carrier unkeyed |
7029
7105
  | <a id="SCENE_CHARACTER_INSIDE_CANVAS"></a>`SCENE_CHARACTER_INSIDE_CANVAS` | a character without `canvas_clip` has placed part bounds that leave the canvas | adjust its scale, offset or canvas, or declare `canvas_clip: true` for intentional overflow |
7030
7106
  | <a id="SCENE_CHARACTER_CLIP_BOUNDS"></a>`SCENE_CHARACTER_CLIP_BOUNDS` | a character with `canvas_clip: true` has nonfinite placed part bounds | check the build's part bounds and the scene's scale and offset |
7031
7107
  | <a id="SCENE_CHARACTER_CLIP_UNUSED"></a>`SCENE_CHARACTER_CLIP_UNUSED` | a character with `canvas_clip: true` has placed part bounds wholly inside or flush with the canvas | omit `canvas_clip` or place the character so its bounds cross a canvas edge |
@@ -7812,10 +7888,14 @@ single-character path (§4, steps 0–9) on its own, already isolated input to a
7812
7888
  | `plates[].name` | the layer's bone, slot and attachment name and exact `order` token. Names must be unique, nonempty and distinct from `root`, legacy `plate`, shared `idle`, every character id and every prefixed character bone/slot/animation (`SCENE_PLATE_NAME_UNIQUE`, `SCENE_PLATE_NAME_FREE`; a name refused by either does not also draw a cascaded `SCENE_ORDER_COMPLETE`). Emitted image files and packed atlas regions are named by 0-based declaration index (`scene-plate.<index>.png`, atlas region `scene-plate.<index>`, Spine attachment `path: "scene-plate.<index>"`), separately from character images (`SCENE_IMAGE_NAME_FREE` on any collision) — so **reordering `plates[]` renames the `scene-plate.<index>` atlas regions** even when `plates[].name` and `order` are unchanged |
7813
7889
  | `characters[].scale` | optional, a positive number; absent is 1, and 1 composes to the bytes a scene without the key writes. The character's size on the canvas, about its stage's top-left corner: a rig px `p` lands at canvas px `scale * p + offset` (issue #197). A character scaled up past its art is drawn soft — the art is not resampled; rebuild it at a higher `assemble.rig_scale` if that matters |
7814
7890
  | `characters[].canvas_clip` | optional literal `true` for intentional overflow (issue #1491). The placed part bounds must be finite, extend past at least one canvas edge and overlap the canvas with positive width and height. Omitting the key requires containment, with flush edges allowed. Every explicit value other than `true` is `SCENE_FIELD_TYPE` |
7891
+ | `characters[].placement_pivot` | optional literal `true` (issue #1498). Generates an identity `<id>:placement` under `root` and requires a scene-authored `translate`, `translatex` or `translatey` key on it. Every explicit value other than `true` is `SCENE_FIELD_TYPE` |
7892
+ | `characters[].idle_repeats` | optional safe integer of 2 or more (issue #1511). Counts total plays of this character's source idle within an explicit `scene.animations.idle`. Its declared duration must equal `idle_repeats * source idle duration` exactly. In the same scene, each character without the key must fill the duration once. In `scene.json`, `characters[].idle_duration` gives the source period, `characters[].idle_repeats` appears on opted-in rows, and top-level `idle_duration` gives the scene period |
7815
7893
  | `characters[].accept` | optional, a list of bar names: the bars this character's own check may have failed and still be composed (issue #203). `compose --accept <bar>[,<bar>…]` is the same list for every character; the two are joined, so the command line applies to every character and a character's list adds to it. Each name is one of the bars `check`'s summary names, less the gate — `loop`, `seam`, `BREATH_VISIBLE`, `BLINK_NO_HOLE`, `CHAIN_LAG`, `TIP_OVER_ROOT`, `STILL_REGIONS_DARK`, `TEXTURE_STRETCH`, `ANIMATIONS_DO_NOT_FOLD` (issue #320), `STRESS_OFF_CHAIN` (issue #347), `SEAM_OVER_MOTION` (the body-root bar, issue #686); anything else is `SCENE_ACCEPT_KNOWN`. When `check/check.json` declares `spec: "rig-parts-check/1"`, `compose` reads its `bar_outcomes` for the bars whose outcome status is `FAIL` in the report's order (issue #1373); without that spec it keeps the legacy `barsNotMet` reading. A build is taken when every bar its `check.json` failed is named; its gate red, a declared requirement not PASS, or a bar not named is `SCENE_BUILD_GREEN` as before. **It is for looking, not for shipping:** the `[compose]` line says which failing bars were accepted, `scene.json` records them as the character's `accepted`, the composed rig's own check measures them again and reports them as it finds them, and the run exits 1 even when that check is PASS (a composed rig has no `parts.json`, so the seam and four judgement lines say SKIP there). A list that accepts nothing — every build green — composes to the bytes a scene without one writes |
7816
- | `animations` | optional map by scene clip name, each value a rigc `MotionAnimation` (`duration`, `tracks`, optional `loop`, `note`, and core timeline collections). Names resolve against the final scene without another prefix or unit conversion: `plate`, declared named plate bones and `<id>:<bone>`, including generated dials. A new name adds; `idle` appends tracks/timelines to the composed idle, preserving its metadata and every existing character track, deform and physics constraint. Its duration must exactly equal the composed idle (`SCENE_DURATION_AGREES`); no retiming. An imported animation name cannot be replaced (`SCENE_ANIMATION_NAME_FREE`). Absent declaration preserves legacy bytes and output paths (issue #1346) |
7894
+ | `animations` | optional map by scene clip name, each value a rigc `MotionAnimation` (`duration`, `tracks`, optional `loop`, `note`, and core timeline collections). Names resolve against the final scene without another prefix or unit conversion: `root`, `plate`, declared named plate bones and `<id>:<bone>`, including generated dials. Keying `root` moves the whole scene. A new name adds a clip. `idle` appends tracks and timelines once to the composed idle, preserving character metadata and physics constraints. Its duration must exactly equal the composed idle (`SCENE_DURATION_AGREES`, or `SCENE_REPEAT_DURATION` when a character opts in to repetition). Imported animation names are reserved (`SCENE_ANIMATION_NAME_FREE`). Absent declaration preserves legacy bytes and output paths (issue #1346) |
7817
7895
  | `order` | the draw order, back to front: a character id (its slots not named elsewhere, in its own order) or one `<id>:<slot>`. Every slot of every character is drawn exactly once. Interleaving is written by naming slots: `["a", "b:arm_l", "b"]` draws `b`'s left arm between `a` and the rest of `b` |
7818
7896
 
7897
+ A `root` key moves plates together with figures. For layered travel, key the plate bones and the character's `<id>:placement` bone enabled by `placement_pivot`.
7898
+
7819
7899
  Named plates join `order` exactly once, wherever their tokens occur: for example
7820
7900
  `["backdrop", "left", "middle", "right", "foreground"]`. Character tokens still
7821
7901
  expand only their slots not explicitly named elsewhere. Duplicate plate or slot
@@ -7919,6 +7999,20 @@ the core player hint; it does not waive this scene closure requirement. A new
7919
7999
  named clip does not layer character idle automatically; extend `idle` when its
7920
8000
  breathing/blink/deform/physics payload must remain in that take.
7921
8001
 
8002
+ For a repeated idle, compose checks the original gated source's keyed pose at
8003
+ zero and at the stored playback end without wrapping. It shifts source idle
8004
+ keys and absolute Bezier time handles by whole source periods, keeping one key
8005
+ at a shared endpoint and the following segment's outgoing curve. It carries
8006
+ physics through the splice and repeats only explicit interior reset keys.
8007
+ Prefixed side clips keep their timing. The composed idle also closes at its
8008
+ stored playback end.
8009
+
8010
+ The synthetic seam control compares physics tip displacement vectors into and
8011
+ out of each internal splice and the outer wrap against a native one-period loop
8012
+ with matched carrier placement, clock and history. A planted reset fails the
8013
+ vector comparison. Keyed pose checks around each internal splice catch defects
8014
+ even when the outer endpoints close.
8015
+
7922
8016
  What is composed:
7923
8017
 
7924
8018
  - **Images are `<id>.<file>`, not `<id>:<file>`.** rig-c names an atlas region
@@ -7958,8 +8052,10 @@ What is composed:
7958
8052
  offset only when it is not 1, and the `[compose]` line always prints it.
7959
8053
  - **The plate** is a region on the bone `plate` under `root`, the first slot, its
7960
8054
  image at canvas (0, 0).
7961
- - **One `idle`** holds every character's tracks; the characters' idles must be of one
7962
- duration. Constraints and `stops` entries are carried in character order with their
8055
+ - **One `idle`** holds every character's tracks over the shared scene duration.
8056
+ Source idles can differ in duration. Each fills the scene idle in one period
8057
+ or, with `idle_repeats`, in exactly the declared number of periods.
8058
+ Constraints and `stops` entries are carried in character order with their
7963
8059
  `invariants.detached`; `invariants.idleDrivesMeshes` once, when any character
7964
8060
  declares it.
7965
8061
  - **Every animation beside a character's idle** — what `motion.animations_from`
@@ -8060,15 +8156,17 @@ What is composed:
8060
8156
  image, provenance, note, bone, slot, size, `sha256` of the PNG's bytes as compose read them — issue #1183, additive —
8061
8157
  and `judged_by: "nothing"`), `plates` when `scene.plates` is declared (each named plate's declaration, bone, slot, size, `sha256` and `judged_by: "nothing"`; the `[compose]` header line also names them in declaration order as `<N> named plate(s): <name>, ...`, and prints `no plate` only when neither `plate` nor `plates[]` is present), per character
8062
8158
  its build, offset, `scale` (only when it is not 1), `rig_size`, `rig_scale`, placed bounds (the union of its part
8063
- boxes, canvas px), `canvas_clip: true` and `clipped_bounds` for opted-in characters,
8159
+ boxes, canvas px), `canvas_clip: true` and `clipped_bounds` for clipped characters,
8160
+ `placement_pivot` with the generated bone name for characters that declare a pivot,
8064
8161
  shift and what it moved (`shifted`: the first-level bones, the
8065
- regions on `root`, the count of weights bound to `root`), its counts and `accepted`
8162
+ regions on source `root`, the count of weights bound to source `root`), its counts
8163
+ (including any generated pivot and carrier in `bones`) and `accepted`
8066
8164
  (the failing bars of its own check that an accept list took, only when there are any), and the
8067
8165
  order —
8068
8166
  as declared and as the slot list it expands to, `judged_by: "nothing"`.
8069
8167
 
8070
- A scene of one character at offset (0, 0) on a canvas of its own size, with no
8071
- plate, composes to that character's own build renamed only: on both public
8168
+ A default scene of one character at offset (0, 0) on a canvas of its own size,
8169
+ with no plate, composes to that character's own build renamed only: on both public
8072
8170
  examples `rig.json`, `motion.json`, every image, the atlas, the packed page and
8073
8171
  every idle frame are byte-identical once `<id>:` and `<id>.` are taken off, and
8074
8172
  `skeleton.json` and `skeleton.model.json` equal as values but for Spine's `path`
@@ -8084,6 +8182,39 @@ character's input arrives isolated); a composed `parts.json`, so the bars that
8084
8182
  read See-through tags are measured per character by its own `build`, not over the
8085
8183
  scene; a rig `build` did not write.
8086
8184
 
8185
+ #### Animate a character's placement (issue #1498)
8186
+
8187
+ Set `"placement_pivot": true` on a character and key `<id>:placement` in
8188
+ `animations`. For a character with `"id": "figure"`, this is a track for a
8189
+ one-second idle extension whose pose returns to setup at both ends.
8190
+
8191
+ ```json
8192
+ {
8193
+ "bone": "figure:placement",
8194
+ "property": "translate",
8195
+ "keys": [{ "t": 0, "v": [0, 0] }, { "t": 0.5, "v": [4, 0] }, { "t": 1, "v": [0, 0] }]
8196
+ }
8197
+ ```
8198
+
8199
+ Use `translate` for `[x, y]` or `translatex` and `translatey` for single values.
8200
+ The values are offsets in final scene pixels, x right and y up. The character's
8201
+ placement scale applies to its setup art and imported tracks. These authored
8202
+ translation values are already in scene units. The authored scene idle duration,
8203
+ posed endpoint and rig-c checks apply. Check previews use the existing size
8204
+ and sampling limits.
8205
+
8206
+ The identity pivot sits under shared `root` and parents the character's original
8207
+ first-level bones. Their setup offset and scale still apply once. When the
8208
+ source has root-bound slots or mesh weights, the unkeyed identity child
8209
+ `<id>:root` under the pivot carries them with their existing setup placement.
8210
+ This lets an idle translate mesh-driving descendants through a parent while
8211
+ Core's A15 continues to check direct idle keys on mesh drivers. Plates and
8212
+ other characters retain their own parentage. Imported clips that key the source
8213
+ root still draw `SCENE_ROOT_SHARED`. An authored key on the shared `root` still
8214
+ targets the whole scene. Named plates that collide with a generated bone draw
8215
+ `SCENE_PLATE_NAME_FREE`. An undeclared target keeps Core's
8216
+ `CE_COMPILE_ANIMATION_BONE_UNKNOWN`.
8217
+
8087
8218
  #### Canvas framing for intentional overflow (issue #1491)
8088
8219
 
8089
8220
  `bounds` is the full placed part-box union. `clipped_bounds` is its intersection
@@ -8118,9 +8249,10 @@ every character in the declared draw order.
8118
8249
  A fully green compose writes `compose-run.json` at the `--out` root, beside
8119
8250
  `scene.json`, with spec `rig-compose-run/1`. It removes a previous record before
8120
8251
  the stage begins, including before stage option validation; a refused input,
8121
- rig-c gate, check or accepted failing character leaves no record. Scenes without
8122
- canvas clipping retain the existing rig, scene report and check bytes and paths.
8123
- Core's separate `check/build/run.json` retains its own clocks.
8252
+ rig-c gate, check or accepted failing character leaves no record. With neither
8253
+ canvas clipping nor a placement pivot declared, the existing rig, scene report
8254
+ and check bytes and paths are stable. Core's separate `check/build/run.json`
8255
+ retains its own clocks.
8124
8256
 
8125
8257
  The fixed top-level key order is `spec`, `scene`, `characters`, `plate`, `plates`:
8126
8258
 
@@ -8131,6 +8263,10 @@ The fixed top-level key order is `spec`, `scene`, `characters`, `plate`, `plates
8131
8263
  | `plate` | legacy plate `{path, sha256}`, with its image path as declared relative to the scene file, or `null` when absent |
8132
8264
  | `plates` | every named plate `{name, path, sha256}`, sorted by `name` in code-unit order; image paths as declared relative to the scene file; `[]` when absent |
8133
8265
 
8266
+ The raw `scene.sha256` binds the placement pivot declaration and its authored
8267
+ tracks. A pivot adds no receipt field. The `placement` entry retains its canvas
8268
+ clipping fields and key order when both options are used together.
8269
+
8134
8270
  The character file inventory is exactly `check/check.json` (admission verdict),
8135
8271
  `parts.json` (rig dimensions, scale and art bounds), `rig/rig.json` (structure,
8136
8272
  skins and references), `rig/motion.json` (animation), and each distinct image
package/docs/MIGRATION.md CHANGED
@@ -28,10 +28,10 @@ bytes, named in *Since 1.0.0-rc.1*: the skinning envelope's reference (#169).
28
28
  | --- | --- | --- |
29
29
  | npm package | the former name | `rig-parts`; the alias `spine-parts` is published beside it at every version, the same files with only the `name` in `package.json` changed |
30
30
  | command | the former name | `rig-parts`; the install also keeps the alias `spine-parts` as a second command on the same launcher, for the transition |
31
- | repository | the former repository name (GitHub redirects it) | `firejune/rig-parts` |
31
+ | repository | the former repository name (GitHub redirects it) | `rig-c/parts` (then `firejune/rig-parts`, moved after 1.5.3; *After 1.5.3* below) |
32
32
  | selftest variables | the `SPINE_PARTS_` names | `RIG_PARTS_CORPUS`, `RIG_PARTS_SELFTEST_JOBS`, each read first, with the former `SPINE_PARTS_` name read when it is not set |
33
33
  | spec ids of the files authors write and this package writes | `spine-parts-requirements/1`, `spine-parts-scene/1`, `spine-parts-keypoints/1`, `spine-parts-bonemap/1`, `spine-parts-basis/1`, `spine-parts-scene-report/1` | unchanged: they name a file format, not the tool, so a file written before the rename still reads |
34
- | public examples repository | `spine-parts-examples` | unchanged (it keeps the name it was published under) |
34
+ | public examples repository | the former examples repository name (GitHub redirects it) | `rig-c/examples` |
35
35
 
36
36
  What to do: install with `npm install -g @rig-c/parts` and write `rig-parts` in scripts.
37
37
  A script or a dependant that names the alias `spine-parts` keeps working and keeps
package/docs/PAINTING.md CHANGED
@@ -200,7 +200,7 @@ and chosen to be the next public example — a character for a wind demo, where
200
200
  and cloth move by physics under a side gust. It is the public example `wind`: its
201
201
  painting, See-through layers and generation record are in
202
202
  [rig-c/examples](https://github.com/rig-c/examples) (`wind/`), and its config,
203
- proposal and build are [`examples/wind`](../examples/wind/README.md). The block:
203
+ proposal and build are [`examples/wind`](https://github.com/rig-c/parts/blob/main/examples/wind/README.md). The block:
204
204
 
205
205
  ```json
206
206
  "generation": {