@rig-c/parts 1.64.0 → 1.66.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 +5 -4
- package/cli.ts +60 -21
- package/docs/AUTHORING.md +166 -26
- package/docs/MIGRATION.md +11 -0
- package/docs/STABILITY.md +17 -5
- package/package.json +1 -1
- package/skills/rig-parts/SKILL.md +1 -1
- package/src/assemble.ts +86 -7
- package/src/build.ts +20 -4
- package/src/check.ts +537 -18
- package/src/clothconfig.ts +3 -2
- package/src/config.ts +32 -5
- package/src/layers.ts +62 -0
- package/src/parts.ts +90 -32
- package/src/propose.ts +35 -1
- package/src/rig.ts +54 -8
- package/tools/configwrite.ts +3 -3
package/docs/STABILITY.md
CHANGED
|
@@ -59,9 +59,9 @@ defaults are the help's too, and none is guessed from the art.
|
|
|
59
59
|
| `propose` | `--parts`, `--source`, `--out`; optional `--compare` or `--from-config` (one of them), `--keypoints`, `--person` and `--wrist-snap` (each with `--keypoints`), `--full`, `--head` (the turn control's depths; not with `--from-config`), `--grid-rule` (`figure` or `part`, the drafted lattice's spacing; not with `--from-config`), `--cloth` (a config whose `cloth` block is the recipe, issue #364; not with `--from-config`), `--write-config` (existing config for an ordinary proposal, issue #356; a new file with `--cloth`, issue #537; not with `--from-config` — additive: without it nothing `propose` writes changes), `--from` (the config the recipe is changed from, only with `--write-config`, issue #571 — additive: without it nothing `--write-config` writes changes), `--only-missing` (only with `--parts` and `--write-config`, not with `--cloth` or `--from-config`, issue #671 — additive: without it nothing `--write-config` writes changes) |
|
|
60
60
|
| `compare` | `--left`, `--right`; optional `--map` |
|
|
61
61
|
| `rig` | `--config`, `--parts`, `--out`; optional `--idle-keys` (ctl, direct), `--page-edges` (pot, free), `--pack-shape` (rect, polygon) |
|
|
62
|
-
| `check` | `--rig`, `--out`; optional `--parts`, `--source`, `--page-edges`, `--pack-shape`, `--requirements`, `--seam-pairs`, `--keep-stills`, `--set` or `--all-sets` (issue #454), `--environment` (issue #538, additive) |
|
|
62
|
+
| `check` | `--rig`, `--out`; optional `--parts`, `--source`, `--page-edges`, `--pack-shape`, `--requirements`, `--seam-pairs`, `--keep-stills`, `--set` or `--all-sets` (issue #454), `--environment` (issue #538, additive), `--wind-band` (issue #590, additive) |
|
|
63
63
|
| `loop` | `--frames`, `--out`; optional `--palette` |
|
|
64
|
-
| `build` | `--config`, `--source`, `--full`, `--out`; optional `--head` (as for `assemble`), `--seam`, `--project`, `--page-edges`, `--pack-shape`, `--loop`, `--lead-in`, `--requirements`, `--idle-keys`, `--seam-pairs`, `--keep-stills`, `--alt` (as for `assemble`, issue #454), `--set` or `--all-sets` (as for `check`, issue #454), `--environment` (as for `check`, issue #538, additive) |
|
|
64
|
+
| `build` | `--config`, `--source`, `--full`, `--out`; optional `--head` (as for `assemble`), `--seam`, `--project`, `--page-edges`, `--pack-shape`, `--loop`, `--lead-in`, `--requirements`, `--idle-keys`, `--seam-pairs`, `--keep-stills`, `--alt` (as for `assemble`, issue #454), `--set` or `--all-sets` (as for `check`, issue #454), `--environment` (as for `check`, issue #538, additive), `--wind-band` (as for `check`, issue #590, additive) |
|
|
65
65
|
| `compose` | `--scene`, `--out`; optional `--requirements`, `--accept` |
|
|
66
66
|
| `mesh-draft` | `--config`, `--parts`, `--out`; optional `--requirements`, `--idle-keys` (ctl, direct), `--page-edges` (pot, free), `--pack-shape` (rect, polygon), `--more-triangles` |
|
|
67
67
|
| `mesh-stats` | `--config`, `--parts` (issue #566, additive: prints, writes nothing) |
|
|
@@ -137,7 +137,8 @@ part name, `[i]` an entry of a list):
|
|
|
137
137
|
- **limbs.<limb>.front** — required: `parts` (own segment parts, issue #664), `after` (a produced part)
|
|
138
138
|
- **limbs.<limb>.layout** — exactly one of `before`, `after`; optional: `parts` (own consecutive segment-part references, issue #647)
|
|
139
139
|
- **limbs.<limb>.layout.before**, **limbs.<limb>.layout.after** — exactly one typed target: `limb` or `part`
|
|
140
|
-
- **limbs.<limb>.segments[i]** — required: `part`, `from`, `bone`; required below a joint (i > 0): `joint`; optional below a joint: `range`, `cap`, `edge`, `cap_shape`, `cut_band`
|
|
140
|
+
- **limbs.<limb>.segments[i]** — required: `part`, `from`, `bone`; required below a joint (i > 0): `joint`; optional below a joint: `range`, `cap`, `edge`, `cap_shape`, `cut_band`, `hybrid`
|
|
141
|
+
- **limbs.<limb>.segments[i].hybrid** — required: `part`; optional: `width` (issue #399; lower segments only, replaces cut-cap options, one source and two adjacent rigid carriers)
|
|
141
142
|
- **bones[i]**, a single bone — required: `name`, `parent`, `at`; optional: `tip`, `inherit`
|
|
142
143
|
- **bones[i]**, a chain — required: `chain`, `parent`, `points`, `tip`; optional: `link_inherit`
|
|
143
144
|
- **stops[i]** — required: `chain`, `against`, `at`, `inward`, `outward`; optional: `links`, `lower` (issue #404)
|
|
@@ -202,7 +203,7 @@ every number) are AUTHORING §3's tables, and the loader refuses any other by na
|
|
|
202
203
|
| `parts.json`, `parts/<name>.png` | `assemble`, `build` | one record per part: `from` (`<run>:<tag>` with a See-through v3 tag, `<run>:author:<label>` for a layer the author made — issue #256, read by no role rule — or `painting:<name>` for a patch), `cut_from` on a cut's piece only (the plan part it was cut from, issue #230), `limb` on a limb segment's part only (issue #349: `name`, `segment`, `of`, `bone`, and below a joint `joint`, `range` when the config segment declares one (issue #360), and `cap` — `at`, `width`, `radius`, `box`, `layer_px`, `image_px` with a cap image, `image_layer` after it when that image was a hidden-art layer — issue #359, `<run>:<layer>:hidden` — `missing_px`, `short_px` (`left`, `right`) after it only when `missing_px` is above 0 (issue #557, additive), `excluded_px` after them only on a subset set's limb part whose cap the set exclusion took a pixel of (issue #603, additive: each pixel taken out of the count it was in, so the cap's counts are the written PNG's), then `shape` and `upper_px` under the segment's `cap_shape` — `upper_px` without the shape only when the upper segment gave a pixel (issue #557, additive) — and after them `lower_px`, `lower_kept_px` and `lower_missing_px` under `cap_shape: "ball"` (issue #579, additive), and `edge`, `feather_radius` and `feathered_px` under its `edge`, and `cut_band`, `cut_offset`, `cut_at`, `cut_crossed`, `joint_crossed`, `band_px` and `stroke_luma_max` (when the band has a split) under its `cut_band`, issue #360), the box `x`, `y`, `w`, `h` (rig px), the pixel counts `src/parts.ts` documents (`opaque_px`, `visible_px`, `occluded_px`, `projected_core_px`, `source_px_taken`, `visible_not_projected_px`, `refused_drift_px`, `merged_px` — on a subset set's limb part counted after the set exclusion, issue #603 — `seam_override_px`, and `fringe_pushed_back` when not empty); `rig_size`, `scale_rig_per_source`, `ghost_px`, `recomposite`, and `scene` (`figure_alpha_above`, `figure_px`, `figure_mask`) under `config.scene` only, with the figure's mask `figure_rig.png` beside the recomposite (issue #242); `single_run_pad` (`file_size`, `side`, `left`, `top`) last, only for one run whose file is not the `seethrough.resolution` square (issue #366) |
|
|
203
204
|
| `rig/rig.json`, `rig/motion.json`, `rig/images/` | `rig`, `build`, `compose` | rig-c's rig spec and motion spec, `spec` `rigc-rig/1` and `rigc-motion/1`: the format is rig-c's, and this package writes only what rig-c's parser accepts; a bone carries `inherit` only where config.bones declares one, rig-c's mode name as written (issue #348) |
|
|
204
205
|
| `rig/mesh_report.json` | `rig`, `build` | one row per mesh: `part`, `vertices`, `triangles`, `hull`, `bones` (the sorted names the attachment's weights bind in the written `rig.json`, in every mode — since 1.49.1 (issue #536) a rig with `turn` or `stops` names the twins and `<link>_d` bones there, where the row named the segment bones they replace: a fix of a wrong name, not a format change; a rig with neither writes the bytes it wrote), `max_influences`, `mean_influences`, `art_coverage`, then `grid` (a lattice); or `mode` "explicit" with `image_sha256` and `region_sha256` (the verified guards; counts and coverage are measured from the supplied mesh, no legacy generator report is adopted); `mode` "contour" with `params`, `contour`, `regions` (`params.maxEdge` and `contour.outlineCut` only when the mesh declares `contour.maxEdge`; `params.bridges` and `contour.bridges` — `islands`, `units`, `joins`, and `faint` only when an island was left out as faint — only when it declares `contour.bridges`); or `mode` "influence" with `influence` (as declared), `reach` (`farthest`, `at`, `nearest`, `capped`, `widest`) and `lattice` (rig-c's `SegmentsLatticeReport`: `cols`, `rows`, `artCells`, `keptCells`, `passes`, `islands`) (issue #378); or `mode` "auto" with `settings`, `source`, `result`, `residuals`, `worst_residual`, `worst_region`, `motion_amplitude`, `termination`, `weights`, `regions`, `deformation`, `quality_report` (rig-c's `mesh-quality-report/1` document whole), `motion_report`, and, only when they apply, `stray_cleared` (after `source`, when `source.stray` is declared), `skinning_residual` and `replay` (`AutoMeshReport` in `src/rig.ts`); in every mode, `exponent` when the mesh declares one (after `grid`, or after `mode`); `influences`, as declared, when a lattice or contour mesh declares it (after `exponent`, or where `exponent` would be); `stray` and `stray_cleared` when a lattice mesh declares `stray` (after `influences`, or where `influences` would be); `ribs` when a contour or auto mesh declares them (after `exponent`, or after `mode`), and then `contour.ribs` (`source.contour.ribs` in the automatic mode) |
|
|
205
|
-
| `check/check.json` and the rest of `check/` | `check`, `build`, `compose` | the reference's fields in its order (`gate_spine_html_green`, `rigc_entry`, `pack_mode`, `environment` after it under `--environment` only (issue #538, additive: `path` as given, `sha256`, `steps`), `loop_max_diff`, the seam figures — `seam_mean`, `seam_px_over_40`, `seam_px_over_80` and, from issue #216, `seam_frame_scale`, the frame scale the bar divides the count by), `loop_physics` after `loop_max_diff` when the rig declares a physics constraint, `seam_border` after the seam figures when `parts.json` declares a scene (issue #242), `seam_pairs` after the seam figures when the seam bar fails or `--seam-pairs` asks (each row's picture under `check/seam/`; `--keep-stills` leaves the setup-pose still and its `frames.json` under `check/setup_still/`), then the judgement lines (`BREATH_VISIBLE`, `BLINK_NO_HOLE`, `CHAIN_LAG`, `TIP_OVER_ROOT`, `STILL_REGIONS_DARK`, `TEXTURE_STRETCH`), `ANIMATIONS_DO_NOT_FOLD` after them when `motion.json` holds an animation, the idle included — on every rig with an idle since issue #333 (issues #320, #363: `status`, `animations`, `fps`, `physics_left_out`, `folding` — each `animation`, `slot`, `attachment`, `frames`, `worst_frame`, `worst_triangles`, `triangles`, `physics_on`, `physics_off`, `physics_constraints`, `declared`, `line` — `folding_undeclared`, `declared_not_folding`, `bar`), `FEET_STAY_LEVEL` after it when a `footwear` part rides a bone that hangs from another and `motion.json` holds an animation (issue #348: `status`, `reason` on a SKIP only, `animations`, `fps`, `physics_left_out`, `bar_degrees`, `bar`, `feet` — each `part`, `bone`, `hangs_from`, `status`, `frames_posed`, `worst`), `LIMB_ONE_BONE` after it (and after `STRESS_OFF_CHAIN` where that is written) when `parts.json` holds a limb segment's part (issue #349: `status`, `parts` — each `part`, `limb`, `bone`, `status`, `others`), `SEAM_OVER_RANGE` after it when a limb record carries a `range` (issue #360: `status`, `frame_scale`, `physics_left_out`, `bar` — `mean`, `rig_px_over_40`, `level` — and `joints`, each `part`, `limb`, `segment`, `joint`, `bone`, `range`, `at`, `radius`, `under_px`, `status`, `poses` — each `degrees`, `status`, `mean`, `px_over_40`, `px_over_80`, `rig_px_over_40`, and `step_px` (`left`, `right`) only on a joint whose cap record carries `short_px` (issue #557, additive) — and `unread` on a joint not read), `SEAM_OVER_MOTION` after it when `parts.json` holds a limb segment or `--requirements` a `seam` (issue #493 retains existing pair warnings; issue #686 gates GAP on proven body-root pairs only (gap-only; mixed ghost remains INFO until rig-c/core#1555 supplies owners): `status` — `WARN`, `CLEAR`, `SKIP` or `FAIL` — `reason` on a SKIP only, `fps`, `floor`, `pairs` — each `pair`, `a`, `b`, `declared`, optional `root` (`limb`, `bone`, `parent`) on a proven body-root pair, and `unread` on a pair not read — `animations`, `warnings`, `rows` — each `pair`, `animation`, `status`, `drawn`, `banded`, `opens`, `px`, `max_px`, `under_floor`, and only on new-root rows stock `gapOpen` plus UNDER-owned `ghostA`/`ghostB` cells selected by resolved per-frame draw order gate their summed count against the unchanged strict one-cell floor on the original raw kind boxes (their union when both kinds contribute), never narrowed partition boxes, while `gapCovered` and OVER-owned ghost cells are excluded (issue #711); `cells` retains partition counts, UNDER owner and counted total, `worst` retains frame/count/cell/box, and `roots` retains status, mode `gap-open+under-ghost`, ghost_owner `resolved-draw-order`, pairs, failed, reason and optional unmeasured bindings; eligible candidates whose valid setup bands are all zero retain a named unmeasured root and SKIP bar, including when no pair is selected; measured root FAIL wins over SKIP, while measured PASS plus an unmeasured root remains SKIP; every eligible body drawing with stock setup `banded > 0` is selected, including both when a parent is shared; issue #708 resolves a body slot on its exact generated turn child to the same named carrier only after unique identity-bone/control/per-part-transform proof, without changing pair identity, setup selection or the direct-carrier path; setup-only observation preserves the authored motion and default drawing, root-free inputs add no setup compile/render, and no animation remains SKIP rather than a measured zero; existing internal pair warnings and their exits are unchanged; issue #591 adds optional `worlds` on physics rigs with readable declared pairs and animations: `default` and `still`, each `wind`, `gravity`, `status` (`REPORTED` or `SKIP`), `reason` on SKIP, `dir` only when rendered (relative to check.json: `seam_motion/default` or `seam_motion/still`, the complete retained render with frames.json and each animation's raw seam.json), and `rows` — pair, animation, status, drawn, banded, `gap` and `ghost`, each `max_px` and `worst` only; worst carries `index`, `px`, `cell`, `box`. Per-frame hits stay in the raw sidecars. These raw reference readings add no bar or warning and leave the custom environment reading unchanged), `CLOTH_SETTLES` after it when the rig declares a physics constraint and has an idle (issue #501, a warning and not a bar: `status` — `WARN` or `CLEAR` — `fps`, `frames`, `duration`, `floor_rig_px_per_s`, `floor`, `levers`, `warnings`, `rows` — each `tip`, `root`, `links`, `point`, `settles_at`, `max_rig_px_per_s`, `min_rig_px_per_s`), `RECOMPOSITE_HOLES` (its first figure `declared_scene` when `parts.json` declares a scene), `SETUP_POSE_VS_SOURCE`, `skipped`, `config` under `build` only (issue #607, additive: `path` as `--config` was typed, `sha256` of the bytes the build read; `check` and `compose` read no config and write none), a `requirements` block under `--requirements` (or `build`'s `config.requirements`) — `file` first from issue #556, additive: `path` as typed or declared, `sha256`, `keys` — and `PASS`; `check/build/skeleton.json`, `.atlas` and `.png` are the packed artifact rig-c writes. Missing stock partitions or resolved owner are named refusals, never zero. No whole-box exemption or consumer compositor remains; internal warnings and reference raw readings are unchanged. |
|
|
206
|
+
| `check/check.json` and the rest of `check/` | `check`, `build`, `compose` | the reference's fields in its order (`gate_spine_html_green`, `rigc_entry`, `pack_mode`, `environment` after it under `--environment` only (issue #538, additive: `path` as given, `sha256`, `steps`), `loop_max_diff`, the seam figures — `seam_mean`, `seam_px_over_40`, `seam_px_over_80` and, from issue #216, `seam_frame_scale`, the frame scale the bar divides the count by), `loop_physics` after `loop_max_diff` when the rig declares a physics constraint, `seam_border` after the seam figures when `parts.json` declares a scene (issue #242), `seam_pairs` after the seam figures when the seam bar fails or `--seam-pairs` asks (each row's picture under `check/seam/`; `--keep-stills` leaves the setup-pose still and its `frames.json` under `check/setup_still/`), then the judgement lines (`BREATH_VISIBLE`, `BLINK_NO_HOLE`, `CHAIN_LAG`, `TIP_OVER_ROOT`, `STILL_REGIONS_DARK`, `TEXTURE_STRETCH`), `ANIMATIONS_DO_NOT_FOLD` after them when `motion.json` holds an animation, the idle included — on every rig with an idle since issue #333 (issues #320, #363: `status`, `animations`, `fps`, `physics_left_out`, `folding` — each `animation`, `slot`, `attachment`, `frames`, `worst_frame`, `worst_triangles`, `triangles`, `physics_on`, `physics_off`, `physics_constraints`, `declared`, `line` — `folding_undeclared`, `declared_not_folding`, `bar`), `FEET_STAY_LEVEL` after it when a `footwear` part rides a bone that hangs from another and `motion.json` holds an animation (issue #348: `status`, `reason` on a SKIP only, `animations`, `fps`, `physics_left_out`, `bar_degrees`, `bar`, `feet` — each `part`, `bone`, `hangs_from`, `status`, `frames_posed`, `worst`), `LIMB_ONE_BONE` after it (and after `STRESS_OFF_CHAIN` where that is written) when `parts.json` holds a limb segment's part (issue #349: `status`, `parts` — each `part`, `limb`, `bone`, `status`, `others`), `SEAM_OVER_RANGE` after it when a limb record carries a `range` (issue #360: `status`, `frame_scale`, `physics_left_out`, `bar` — `mean`, `rig_px_over_40`, `level` — and `joints`, each `part`, `limb`, `segment`, `joint`, `bone`, `range`, `at`, `radius`, `under_px`, `status`, `poses` — each `degrees`, `status`, `mean`, `px_over_40`, `px_over_80`, `rig_px_over_40`, and `step_px` (`left`, `right`) only on a joint whose cap record carries `short_px` (issue #557, additive) — and `unread` on a joint not read), `SEAM_OVER_MOTION` after it when `parts.json` holds a limb segment or `--requirements` a `seam` (issue #493 retains existing pair warnings; issue #686 gates GAP on proven body-root pairs only (gap-only; mixed ghost remains INFO until rig-c/core#1555 supplies owners): `status` — `WARN`, `CLEAR`, `SKIP` or `FAIL` — `reason` on a SKIP only, `fps`, `floor`, `pairs` — each `pair`, `a`, `b`, `declared`, optional `root` (`limb`, `bone`, `parent`) on a proven body-root pair, and `unread` on a pair not read — `animations`, `warnings`, `rows` — each `pair`, `animation`, `status`, `drawn`, `banded`, `opens`, `px`, `max_px`, `under_floor`, and only on new-root rows stock `gapOpen` plus UNDER-owned `ghostA`/`ghostB` cells selected by resolved per-frame draw order gate their summed count against the unchanged strict one-cell floor on the original raw kind boxes (their union when both kinds contribute), never narrowed partition boxes, while `gapCovered` and OVER-owned ghost cells are excluded (issue #711); `cells` retains partition counts, UNDER owner and counted total, `worst` retains frame/count/cell/box, and `roots` retains status, mode `gap-open+under-ghost`, ghost_owner `resolved-draw-order`, pairs, failed, reason and optional unmeasured bindings; eligible candidates whose valid setup bands are all zero retain a named unmeasured root and SKIP bar, including when no pair is selected; measured root FAIL wins over SKIP, while measured PASS plus an unmeasured root remains SKIP; every eligible body drawing with stock setup `banded > 0` is selected, including both when a parent is shared; issue #708 resolves a body slot on its exact generated turn child to the same named carrier only after unique identity-bone/control/per-part-transform proof, without changing pair identity, setup selection or the direct-carrier path; setup-only observation preserves the authored motion and default drawing, root-free inputs add no setup compile/render, and no animation remains SKIP rather than a measured zero; existing internal pair warnings and their exits are unchanged; issue #591 adds optional `worlds` on physics rigs with readable declared pairs and animations: `default` and `still`, each `wind`, `gravity`, `status` (`REPORTED` or `SKIP`), `reason` on SKIP, `dir` only when rendered (relative to check.json: `seam_motion/default` or `seam_motion/still`, the complete retained render with frames.json and each animation's raw seam.json), and `rows` — pair, animation, status, drawn, banded, `gap` and `ghost`, each `max_px` and `worst` only; worst carries `index`, `px`, `cell`, `box`. Per-frame hits stay in the raw sidecars. These raw reference readings add no bar or warning and leave the custom environment reading unchanged), `CLOTH_SETTLES` after it when the rig declares a physics constraint and has an idle (issue #501, a warning and not a bar: `status` — `WARN` or `CLEAR` — `fps`, `frames`, `duration`, `floor_rig_px_per_s`, `floor`, `levers`, `warnings`, `rows` — each `tip`, `root`, `links`, `point`, `settles_at`, `max_rig_px_per_s`, `min_rig_px_per_s`), `RECOMPOSITE_HOLES` (its first figure `declared_scene` when `parts.json` declares a scene), `SETUP_POSE_VS_SOURCE`, `WIND_BAND` after it under `--wind-band` only (issue #590, additive: `status` `"REPORTED"`, `spec` `"rig-parts-wind-band/1"`, `path` as given, `sha256`, `steady_wind_only` `true`, `gravity` `[0, 1]`, `min`, `max`, `step`, `steps`, `fps`, `animations`, `max_gap`, `max_ghost`, `holds_from`, `holds_to`, `pairs_holding_all`, and `pairs` — each `pair`, `a`, `b`, `holds_all`, `holds_from`, `holds_to`, `first_break_below`, `first_break_above`, `worst_gap`, `worst_ghost`, `steps`), `skipped`, `config` under `build` only (issue #607, additive: `path` as `--config` was typed, `sha256` of the bytes the build read; `check` and `compose` read no config and write none), a `requirements` block under `--requirements` (or `build`'s `config.requirements`) — `file` first from issue #556, additive: `path` as typed or declared, `sha256`, `keys` — and `PASS`; `check/build/skeleton.json`, `.atlas` and `.png` are the packed artifact rig-c writes. Missing stock partitions or resolved owner are named refusals, never zero. No whole-box exemption or consumer compositor remains; internal warnings and reference raw readings are unchanged. |
|
|
206
207
|
| `layers.json`, `<index>_<name>.png` | `layers --export` | the wrapper form `layers` reads (issue #359): `width`, `height`, then `layers` — each `name`, `filename`, `left`, `top`, `right`, `bottom`, `depth_median` (the input's own; `null` for a PSD, the manifest's order then being the draw order) — drawn layers in draw order, then the hidden-art layers; a PNG's name is its index and its layer's name, and the manifest, not the file name, says which layer it is |
|
|
207
208
|
| the template `.psd` | `layers --template` | one empty layer per name `templateLayerNames` (`src/layers.ts`) holds, bottom first; the same canvas writes the same bytes |
|
|
208
209
|
| `proposal.json`, `render/landmarks*.png` | `propose` | the config's four rig sections, `constraints` with `--cloth` (issue #364: a physics constraint per tree link named `<bone>_physics`, a dangling end's `<bone>_translate`, and a skirt swing's transforms `<swing>_<tree>`), `turn` with `--full`/`--head`, `proposed_rig_scale` (issue #354), and `notes` |
|
|
@@ -274,7 +275,7 @@ no parent rows. Hashes and names are deterministic.
|
|
|
274
275
|
Files authors write for this package, each with a spec id the reader holds:
|
|
275
276
|
`spine-parts-requirements/1` (`check --requirements`), `spine-parts-scene/1`
|
|
276
277
|
(`compose --scene`), `spine-parts-keypoints/1` (`propose --keypoints`),
|
|
277
|
-
`spine-parts-bonemap/1` (`compare --map`); and one another tool writes, read as that tool defines it: rig-c/review's `rig-review-mesh-edit/1` (`remesh --delta`). The spec ids keep the package's former
|
|
278
|
+
`spine-parts-bonemap/1` (`compare --map`), `rig-parts-wind-band/1` (`check --wind-band`, `build --wind-band`, issue #590, additive); and one another tool writes, read as that tool defines it: rig-c/review's `rig-review-mesh-edit/1` (`remesh --delta`). The spec ids of files that existed before the rename keep the package's former
|
|
278
279
|
name on purpose: they name a file format, not the tool, and a file written before
|
|
279
280
|
the rename still reads. They do not change at 1.0.
|
|
280
281
|
|
|
@@ -369,3 +370,14 @@ fetched, the `chain` suite builds each of them and holds `parts.json`
|
|
|
369
370
|
(`CH02`), `rig.json`, `motion.json` and `mesh_report.json` (`CH03`),
|
|
370
371
|
`check.json` (`CH04`) and the gate file (`CH05`) to its tracked `expected/`,
|
|
371
372
|
field by field, with the tolerances `CH07` plants against.
|
|
373
|
+
|
|
374
|
+
### Opt-in hybrid provenance (issue #399)
|
|
375
|
+
|
|
376
|
+
A lower rigid limb piece may carry `limb.hybrid` instead of `limb.cap`:
|
|
377
|
+
`{part, upper, width, radius, at, axis}`. Its generated mesh carries
|
|
378
|
+
`limb.band`: `{upper, width, radius, at, axis}`. Their source, joint, lower
|
|
379
|
+
carrier and measured geometry must agree; the lower rigid piece alone carries
|
|
380
|
+
`range`. The default limb records and byte contracts are unchanged. The
|
|
381
|
+
existing `LIMB_ONE_BONE` line checks ordinary segments as before; the band
|
|
382
|
+
requires exactly its two adjacent carriers. `SEAM_OVER_RANGE` uses the stored
|
|
383
|
+
radius and existing rest-art comparison, without changing its bar.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rig-c/parts",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.66.0",
|
|
4
4
|
"description": "AI-authored 2D character parts from one anime painting and its See-through layer decomposition: measured parts, weighted-mesh rig specs, verified through rig-c before anything is written. A CLI for agents that cannot see the image.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -125,7 +125,7 @@ under that.
|
|
|
125
125
|
6. Correct against `render/landmarks.png` and `note:` lines; a
|
|
126
126
|
`coverage … not checked` line is a bone no check read (the line says why),
|
|
127
127
|
and `basis.json` beside the proposal says what each bone rests on — check
|
|
128
|
-
the `ratio` bones and any with a `fallback` first. `propose
|
|
128
|
+
the `ratio` bones and any with a `fallback` first. `rig-parts propose --parts work/rig --source <painting> --out work
|
|
129
129
|
--from-config config.json` (with the same `--keypoints`) until it prints no
|
|
130
130
|
`LINT` line. `rig-parts compare
|
|
131
131
|
--left work/proposal.json --right config.json` lists what the correction changed,
|
package/src/assemble.ts
CHANGED
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
import { sourceLimbTarget, nearestTargetPart } from './limbownership.ts';
|
|
103
103
|
import { type ArmSplit, type BoneEntry, type CharacterConfig, type ControlSkeleton, controlSkeletonOf, type Cut, type EarlyConfig, type Extend, type Limb, type Patch, type PlanEntry, type Run, type SeeThrough } from './config.ts';
|
|
104
104
|
import { type Problem, refuseIfAny } from './errors.ts';
|
|
105
|
-
import { figuresPhrase, implausibleRules, type Layer, type LayerFigures, layerFigures, type LayerSet, NEAR_WHITE_MIN, OPAQUE_ALPHA_ABOVE, ruleSummary } from './layers.ts';
|
|
105
|
+
import { CORE_ALPHA, figuresPhrase, implausibleRules, type Layer, type LayerFigures, layerFigures, type LayerSet, NEAR_WHITE_MIN, OPAQUE_ALPHA_ABOVE, ruleSummary } from './layers.ts';
|
|
106
106
|
import { padToSquare, squarePad } from './inputs.ts';
|
|
107
107
|
import { type CapRecord, type LimbRecord, PAINTING_RUN, type PartRecord, type PartsFile, type RecompositeRecord, type SceneRecord, type SingleRunPad } from './parts.ts';
|
|
108
108
|
import { assignCrossedLimbs, assignOverlappingHands, type BonePlace, bonePlaces, capBox, coveredRadius, type CutPlacement, featherWeight, halfWidthAbout, inDisc, jointLine, type JointLine, jointOffsets, limbPolyline, limbRun, luma601, nearestLimb, nearestOnLine, offLineFigure, pastJoint, placeCut, polylineDist2, segmentOf } from './limbs.ts';
|
|
@@ -133,8 +133,6 @@ const f32 = Math.fround;
|
|
|
133
133
|
// the reference's constants, each named once
|
|
134
134
|
// ---------------------------------------------------------------------------
|
|
135
135
|
|
|
136
|
-
/** Alpha at or above this is "opaque" for ownership, projection cores and the seam override. `>= 250`, not `== 255`: See-through leaves alpha-254 speckle. */
|
|
137
|
-
export const CORE_ALPHA = 250;
|
|
138
136
|
/** A ghost component is kept when its area is at least this many pixels … */
|
|
139
137
|
export const GHOST_MIN_AREA = 40;
|
|
140
138
|
/** … and at least this fraction of the layer's largest component. */
|
|
@@ -160,7 +158,7 @@ export const CROP_PROBE_ALPHA = 128;
|
|
|
160
158
|
/** Alpha at or above this in a later plan part keeps `growRim`'s ring off the pixel. */
|
|
161
159
|
export const FRONT_ALPHA = 128;
|
|
162
160
|
/** A painting pixel whose min channel is above this is "near-white" (the faithful rim and seam guard). Defined beside the layer reader, which applies the same test to a layer's colour (`layerFigures`). */
|
|
163
|
-
export { NEAR_WHITE_MIN };
|
|
161
|
+
export { CORE_ALPHA, NEAR_WHITE_MIN };
|
|
164
162
|
/** The seam override acts where the flat composite differs from the painting by more than this, max channel. */
|
|
165
163
|
export const SEAM_LIMIT = 60;
|
|
166
164
|
/** `--propose-plan` drops a tag with fewer run-space opaque pixels than this after ghost clean-up. */
|
|
@@ -4041,6 +4039,11 @@ function cutLimbs(
|
|
|
4041
4039
|
const at = parts.findIndex((q) => q.limb === l && q.segment === k);
|
|
4042
4040
|
const upAt = parts.findIndex((q) => q.limb === l && q.segment === k - 1);
|
|
4043
4041
|
const upper = rasters[upAt];
|
|
4042
|
+
if (sg.hybrid !== undefined) {
|
|
4043
|
+
// Geometry only: the band replaces the cap, and never reads hidden fill.
|
|
4044
|
+
parts[at].record.cap = { at: [...line.at], width: w3, radius, box, layer_px: 0, missing_px: 0 };
|
|
4045
|
+
return;
|
|
4046
|
+
}
|
|
4044
4047
|
// Issue #359: the lower segment's part's hidden-art layer is its cap when the segment names no cap image; with one named, a refusal.
|
|
4045
4048
|
const hidden = hiddenOf(sg.from);
|
|
4046
4049
|
if (hidden !== null && sg.cap !== undefined) {
|
|
@@ -4204,7 +4207,76 @@ function cutLimbs(
|
|
|
4204
4207
|
parts[at].record.cap = cap;
|
|
4205
4208
|
capFrom[at] = from;
|
|
4206
4209
|
const c = counts.find((q) => q.of === sg.from);
|
|
4207
|
-
if (c !== undefined) c.joints.push({ limb: l, joint: String(sg.joint), part: sg.part, upper: segs[k - 1].part, cap, from: sg.from, upperFrom: upFrom, half: pyRound(half, 3), shortInHalf });
|
|
4210
|
+
if (c !== undefined && sg.hybrid === undefined) c.joints.push({ limb: l, joint: String(sg.joint), part: sg.part, upper: segs[k - 1].part, cap, from: sg.from, upperFrom: upFrom, half: pyRound(half, 3), shortInHalf });
|
|
4211
|
+
});
|
|
4212
|
+
}
|
|
4213
|
+
refuseIfAny(problems);
|
|
4214
|
+
// Issue #399: transfer the continuous source band after the cut control has
|
|
4215
|
+
// measured its joint. Remove its caps: only immutable source pixels enter the band.
|
|
4216
|
+
for (const l of names) {
|
|
4217
|
+
const segs = limbs[l].segments;
|
|
4218
|
+
segs.forEach((sg, k) => {
|
|
4219
|
+
if (sg.hybrid === undefined || k === 0) return;
|
|
4220
|
+
const object = `config.limbs.${l}.segments[${k}].hybrid`;
|
|
4221
|
+
if (sg.from !== segs[k - 1].from) {
|
|
4222
|
+
problems.push({ code: 'ASSEMBLE_HYBRID_SOURCE', object, detail: `takes "${sg.from}" below and "${segs[k - 1].from}" above; one continuous source layer is required — select the same layer for both rigid neighbours` });
|
|
4223
|
+
return;
|
|
4224
|
+
}
|
|
4225
|
+
const line = (lines.get(l) as Array<JointLine | null>)[k] as JointLine;
|
|
4226
|
+
const source = builtOf(sg.from) as Built;
|
|
4227
|
+
const li = names.indexOf(l), own = owners.get(sg.from) as Int32Array;
|
|
4228
|
+
const art = (x: number, y: number): boolean => x >= 0 && y >= 0 && x < W && y < H && own[y * W + x] === li && source.r.data[(y * W + x) * 4 + 3] > OPAQUE_ALPHA_ABOVE;
|
|
4229
|
+
const run = limbRun(line, art, [0, 0, W - 1, H - 1]);
|
|
4230
|
+
const width = sg.hybrid.width ?? (run === null ? 0 : 2 * halfWidthAbout(run));
|
|
4231
|
+
const upper = places.get(segs[k - 1].bone) as BonePlace;
|
|
4232
|
+
const lower = places.get(sg.bone) as BonePlace;
|
|
4233
|
+
const reach = (p: readonly number[]): number => Math.abs((p[0] - line.at[0]) * line.axis[0] + (p[1] - line.at[1]) * line.axis[1]);
|
|
4234
|
+
const end = lower.end;
|
|
4235
|
+
const prev = k > 1 ? segs[k - 1].hybrid?.width : undefined;
|
|
4236
|
+
if (run === null || !(width > 0) || end === null || width / 2 >= Math.min(reach(upper.at), reach(end)) || (prev !== undefined && (prev + width) / 2 >= reach(upper.at))) {
|
|
4237
|
+
problems.push({ code: 'ASSEMBLE_HYBRID_WIDTH', object, detail: `width ${width} rig px at [${line.at.join(', ')}]; a positive art crossing and a band strictly inside both bone spans, without adjacent-band overlap, are required` });
|
|
4238
|
+
return;
|
|
4239
|
+
}
|
|
4240
|
+
const upAt = parts.findIndex((q) => q.limb === l && q.segment === k - 1 && q.record.band === undefined);
|
|
4241
|
+
const loAt = parts.findIndex((q) => q.limb === l && q.segment === k && q.record.band === undefined);
|
|
4242
|
+
const earlier = parts.filter((q) => q.limb === l && q.record.band !== undefined);
|
|
4243
|
+
const overlap = earlier.find((q) => {
|
|
4244
|
+
const h = q.record.band as NonNullable<LimbRecord['band']>;
|
|
4245
|
+
for (let y = 0; y < H; y++) for (let x = 0; x < W; x++) {
|
|
4246
|
+
if (!art(x, y)) continue;
|
|
4247
|
+
const d = Math.abs((x + 0.5 - h.at[0]) * h.axis[0] + (y + 0.5 - h.at[1]) * h.axis[1]);
|
|
4248
|
+
if (d <= h.width / 2 + 1 && Math.abs(jointOffsets(line, x, y).along) <= width / 2 + 1) return true;
|
|
4249
|
+
}
|
|
4250
|
+
return false;
|
|
4251
|
+
});
|
|
4252
|
+
if (overlap !== undefined) {
|
|
4253
|
+
problems.push({ code: 'ASSEMBLE_HYBRID_OVERLAP', object, detail: `overlaps band "${overlap.part}" on source art; disjoint joint bands are required — reduce their widths` });
|
|
4254
|
+
return;
|
|
4255
|
+
}
|
|
4256
|
+
const r = newRaster(W, H), region = newMask(W, H);
|
|
4257
|
+
for (let y = 0; y < H; y++) for (let x = 0; x < W; x++) {
|
|
4258
|
+
const p = y * W + x;
|
|
4259
|
+
if (own[p] !== li) continue;
|
|
4260
|
+
const along = jointOffsets(line, x, y).along;
|
|
4261
|
+
// One source pixel of overlap at each boundary keeps bilinear samples
|
|
4262
|
+
// opaque. The overlap is wholly bound to the matching rigid carrier.
|
|
4263
|
+
if (Math.abs(along) <= width / 2 + 1) {
|
|
4264
|
+
r.data.set(source.r.data.subarray(p * 4, p * 4 + 4), p * 4);
|
|
4265
|
+
region.data[p] = source.region === null ? 1 : source.region.data[p];
|
|
4266
|
+
}
|
|
4267
|
+
if (along > -width / 2) { rasters[upAt].data.fill(0, p * 4, p * 4 + 4); regions[upAt].data[p] = 0; }
|
|
4268
|
+
if (along < width / 2) { rasters[loAt].data.fill(0, p * 4, p * 4 + 4); regions[loAt].data[p] = 0; }
|
|
4269
|
+
}
|
|
4270
|
+
const base = parts[loAt].record;
|
|
4271
|
+
const geometry = { upper: segs[k - 1].bone, width, radius: (base.cap as CapRecord).radius, at: [...line.at] as [number, number], axis: [...line.axis] as [number, number] };
|
|
4272
|
+
delete base.cap;
|
|
4273
|
+
base.hybrid = { part: sg.hybrid.part, ...geometry };
|
|
4274
|
+
capFrom[loAt] = null;
|
|
4275
|
+
parts.push({ limb: l, segment: k, part: sg.hybrid.part, of: sg.from, record: { name: l, segment: k, of: base.of, bone: sg.bone, joint: sg.joint, band: geometry } });
|
|
4276
|
+
pieces.push({ ...source, r, region, merged: mergedIn(source, region) });
|
|
4277
|
+
capFrom.push(null);
|
|
4278
|
+
// Existing piece objects refer to the same raster and mask.
|
|
4279
|
+
for (const i of [upAt, loAt]) (pieces[i] as Built).merged = mergedIn(pieces[i] as Built, regions[i]);
|
|
4208
4280
|
});
|
|
4209
4281
|
}
|
|
4210
4282
|
refuseIfAny(problems);
|
|
@@ -5140,7 +5212,13 @@ export function driftBodies(part: string, from: string, refused: Mask, minPx: nu
|
|
|
5140
5212
|
* `drift: "topwear" refuses 196 px of full:topwear (its colour more than 90
|
|
5141
5213
|
* off the painting, max channel), in a body of 196 px at 16,12 14x14 (at
|
|
5142
5214
|
* least 150 px past a 5x5 opening); by the plan's draw order "face" holds 196
|
|
5143
|
-
* px of it (the top-most part at alpha >= 250), drawn in front of
|
|
5215
|
+
* px of it (the top-most part at alpha >= 250), "face" drawn in front of
|
|
5216
|
+
* "topwear"; informational: no gate reads this. Swapping the plan order of the
|
|
5217
|
+
* parts named here can clear it (when only the front one differs from the
|
|
5218
|
+
* painting) or move it to the other part (when both do): swap, rebuild and read
|
|
5219
|
+
* this line again; if it moves, removing it needs different input layers. At
|
|
5220
|
+
* rest, the seam pass repaints the holder's pixels that pass its rule from the
|
|
5221
|
+
* painting`.
|
|
5144
5222
|
* When `behind` is non-empty (issue #351), names the part(s) drawn behind
|
|
5145
5223
|
* `part` whose colour is within `DRIFT_LIMIT` of the painting.
|
|
5146
5224
|
*/
|
|
@@ -5156,7 +5234,8 @@ export function driftLine(d: DriftBodies): string {
|
|
|
5156
5234
|
: '';
|
|
5157
5235
|
return (
|
|
5158
5236
|
`drift: "${d.part}" refuses ${d.refusedPx} px of ${d.from} (its colour more than ${DRIFT_LIMIT} off the painting, max channel), in ${held} (at least ${fmtPx(d.minPx)} px past a ${BODY_KERNEL}x${BODY_KERNEL} opening); ` +
|
|
5159
|
-
`by the plan's draw order ${d.holders.map((h) => `"${h.part}" holds ${h.px} px`).join(', ')} of it (the top-most part at alpha >= ${CORE_ALPHA})${frontClause}${behindClause}`
|
|
5237
|
+
`by the plan's draw order ${d.holders.map((h) => `"${h.part}" holds ${h.px} px`).join(', ')} of it (the top-most part at alpha >= ${CORE_ALPHA})${frontClause}${behindClause}; ` +
|
|
5238
|
+
"informational: no gate reads this. Swapping the plan order of the parts named here can clear it (when only the front one differs from the painting) or move it to the other part (when both do): swap, rebuild and read this line again; if it moves, removing it needs different input layers. At rest, the seam pass repaints the holder's pixels that pass its rule from the painting"
|
|
5160
5239
|
);
|
|
5161
5240
|
}
|
|
5162
5241
|
|
package/src/build.ts
CHANGED
|
@@ -73,7 +73,7 @@ import {
|
|
|
73
73
|
splitSchedule,
|
|
74
74
|
untestedIntervals,
|
|
75
75
|
} from './autoreplay.ts';
|
|
76
|
-
import { besideIdleLine, checkSummaryLine, inputFileRecord, type InputFileRecord, CLOTH_LINE, type ClothLine, clothWarnText, frameRuns, MOTION_SEAM_LINE, type MotionSeamLine, type MotionSeamPlant, motionSeamWarnText, FOLD_LINE, type FoldsLine, LEVEL_LINE, type LevelLine, LIMB_LINE, type LimbLine, STRESS_LINE, SWEEP_LINE, type SweepLine, buildGateLines, causeLines, environmentLine, IDLE_FPS, IDLE_MAX_PX, maxRgbDiff, REQUIREMENTS_DIR, type CheckReport, type PackLine, DEFAULT_PACK_SHAPE, DEFAULT_PAGE_EDGES, GATE_PROFILE, JUDGEMENT_LINES, type JudgementLine, packedBuildArgs, packedBuildLabel, type PackMode, readCheckEnvironment, type PackShape, type PageEdges, readFrameSet, rigcFailed, rigcIdentity, rigcRanClause, REPORTED_LINES, type ReportedLine, type RigcRunner, runCheck, SEAM_DIR, SEAM_MEAN_BAR, seamPairText, seamRigPxText, SOURCE_LINE, SEAM_PX_BAR, SEAM_PX_LEVEL, SEAM_PX_LEVEL_HIGH, SPINEBOY_YARDSTICK, STILL_DIR } from './check.ts';
|
|
76
|
+
import { besideIdleLine, checkSummaryLine, inputFileRecord, type InputFileRecord, CLOTH_LINE, type ClothLine, clothWarnText, frameRuns, MOTION_SEAM_LINE, type MotionSeamLine, type MotionSeamPlant, motionSeamWarnText, FOLD_LINE, type FoldsLine, LEVEL_LINE, type LevelLine, LIMB_LINE, type LimbLine, STRESS_LINE, SWEEP_LINE, type SweepLine, buildGateLines, causeLines, environmentLine, IDLE_FPS, IDLE_MAX_PX, maxRgbDiff, REQUIREMENTS_DIR, type CheckReport, type PackLine, DEFAULT_PACK_SHAPE, DEFAULT_PAGE_EDGES, GATE_PROFILE, JUDGEMENT_LINES, type JudgementLine, packedBuildArgs, packedBuildLabel, type PackMode, readCheckEnvironment, readWindBand, type PackShape, type PageEdges, readFrameSet, rigcFailed, rigcIdentity, rigcRanClause, REPORTED_LINES, type ReportedLine, type RigcRunner, runCheck, SEAM_DIR, SEAM_MEAN_BAR, seamPairText, seamRigPxText, SOURCE_LINE, SEAM_PX_BAR, SEAM_PX_LEVEL, SEAM_PX_LEVEL_HIGH, SPINEBOY_YARDSTICK, STILL_DIR, WIND_BAND_LINE, windBandLines } from './check.ts';
|
|
77
77
|
import { type Cut, type Extend, type Limb, loadConfigAndAnimations, loadConfigWithBytes, loadEarlyConfig, type Patch, type PlanEntry } from './config.ts';
|
|
78
78
|
import { coreCompileGuideLine, failLine, PartsError, type Problem, refuseIfAny } from './errors.ts';
|
|
79
79
|
import type { MeshQualityReport, MotionSchedule } from 'rig-c/mesh';
|
|
@@ -476,6 +476,10 @@ export function assembleStage(input: AssembleStageInput, outs: AssembleOutputs,
|
|
|
476
476
|
const hidesSet = new Set(alt.hides ?? []);
|
|
477
477
|
const declaredSlots = alt.parts !== undefined ? alt.parts.filter((p) => !hidesSet.has(p)) : baseSlots.filter((p) => !hidesSet.has(p));
|
|
478
478
|
const coveredSet = new Set(declaredSlots);
|
|
479
|
+
const generatedBands: string[] = [];
|
|
480
|
+
for (const limb of Object.values(fields.limbs ?? {})) if (limb.segments.every((sg) => coveredSet.has(sg.part))) {
|
|
481
|
+
for (const sg of limb.segments) if (sg.hybrid !== undefined) { coveredSet.add(sg.hybrid.part); generatedBands.push(sg.hybrid.part); }
|
|
482
|
+
}
|
|
479
483
|
let rawCuts = alt.cuts !== undefined ? alt.cuts : fields.cuts.filter((c) => coveredSet.has(c.into) && coveredSet.has(c.from)).map((c) => ({ ...c, under: undefined }));
|
|
480
484
|
let altLimbs: Record<string, Limb> = {};
|
|
481
485
|
if (fields.limbs !== undefined) {
|
|
@@ -688,7 +692,7 @@ export function assembleStage(input: AssembleStageInput, outs: AssembleOutputs,
|
|
|
688
692
|
altBuilt.push({
|
|
689
693
|
record: {
|
|
690
694
|
name: alt.name,
|
|
691
|
-
...(alt.parts === undefined ? {} : { parts: [...alt.parts] }),
|
|
695
|
+
...(alt.parts === undefined ? {} : { parts: [...alt.parts, ...generatedBands.filter((n) => !(alt.parts as string[]).includes(n))] }),
|
|
692
696
|
...(alt.hides === undefined || alt.hides.length === 0 ? (altFront.size === 0 ? {} : { hides: [...altFront] }) : { hides: [...alt.hides, ...[...altFront].filter((p) => !(alt.hides as string[]).includes(p))] }),
|
|
693
697
|
...(altFront.size === 0 ? {} : { front: [...altFront] }),
|
|
694
698
|
slots,
|
|
@@ -1588,6 +1592,11 @@ export interface CheckStageInput {
|
|
|
1588
1592
|
* with the physics on is posed under; absent, no render argument and no byte of `check.json` moves.
|
|
1589
1593
|
*/
|
|
1590
1594
|
environment?: string;
|
|
1595
|
+
/**
|
|
1596
|
+
* `check --wind-band <spec.json>` (issue #590): a `rig-parts-wind-band/1` steady-wind sweep specification;
|
|
1597
|
+
* absent, no sweep runs and no byte of `check.json` moves.
|
|
1598
|
+
*/
|
|
1599
|
+
windBand?: string;
|
|
1591
1600
|
}
|
|
1592
1601
|
|
|
1593
1602
|
/**
|
|
@@ -1816,7 +1825,7 @@ export function checkStage(input: CheckStageInput, rigc: RigcRunner, bin: string
|
|
|
1816
1825
|
const entryLine = versionLines.find((l) => l.startsWith('entry:'));
|
|
1817
1826
|
log(` ${rigcIdentity(bin, v)}${entryLine === undefined ? '' : `; ${entryLine}`}`);
|
|
1818
1827
|
const mode: PackMode = { pageEdges: input.pageEdges ?? DEFAULT_PAGE_EDGES, packShape: input.packShape ?? DEFAULT_PACK_SHAPE };
|
|
1819
|
-
const r = runCheck(input.rig, input.out, rigc, input.parts, mode, input.source, input.requirements, input.seamPairs === true, input.keepStills === true, input.set, input.allSets === true, input.environment, input.requirementsAs, input.config);
|
|
1828
|
+
const r = runCheck(input.rig, input.out, rigc, input.parts, mode, input.source, input.requirements, input.seamPairs === true, input.keepStills === true, input.set, input.allSets === true, input.environment, input.requirementsAs, input.config, input.windBand);
|
|
1820
1829
|
if (r.figures.environment !== undefined) log(` ${environmentLine(r.figures.environment)}`);
|
|
1821
1830
|
log(` gate rig-play (rigc ${packedBuildLabel(mode)}), verbatim:`);
|
|
1822
1831
|
for (const l of r.gateHtml) log(l);
|
|
@@ -1873,6 +1882,8 @@ export function checkStage(input: CheckStageInput, rigc: RigcRunner, bin: string
|
|
|
1873
1882
|
}
|
|
1874
1883
|
const vsSource = fig[SOURCE_LINE];
|
|
1875
1884
|
if (vsSource !== undefined) log(` ${judgementLine(SOURCE_LINE, vsSource)}`);
|
|
1885
|
+
const windBand = fig[WIND_BAND_LINE];
|
|
1886
|
+
if (windBand !== undefined) for (const l of windBandLines(windBand)) log(` ${l}`);
|
|
1876
1887
|
if (r.requirements !== null) {
|
|
1877
1888
|
for (const [name, line] of Object.entries(r.requirements.lines)) log(` ${requirementText(name, line)}`);
|
|
1878
1889
|
log(` ${summaryText(r.requirements.summary)}`);
|
|
@@ -2162,6 +2173,8 @@ export interface BuildInput {
|
|
|
2162
2173
|
allSets?: boolean;
|
|
2163
2174
|
/** `--environment <file>`, forwarded to the check as `check` takes it (issue #538): read before assemble runs, so a schedule check would refuse is refused first; absent, nothing moves. */
|
|
2164
2175
|
environment?: string;
|
|
2176
|
+
/** `--wind-band <spec.json>`, forwarded to the check as `check` takes it (issue #590): read before assemble runs, so a spec check would refuse is refused first; absent, nothing moves. */
|
|
2177
|
+
windBand?: string;
|
|
2165
2178
|
}
|
|
2166
2179
|
|
|
2167
2180
|
/** What `build` does with one flag `check` takes: hands it to its check stage, takes it as its own, or refuses it because build supplies the value itself. */
|
|
@@ -2189,6 +2202,7 @@ export const CHECK_FLAGS_IN_BUILD: Readonly<Record<string, CheckFlagInBuild>> =
|
|
|
2189
2202
|
'--seam-pairs': { as: 'forwarded' },
|
|
2190
2203
|
'--keep-stills': { as: 'forwarded' },
|
|
2191
2204
|
'--environment': { as: 'forwarded' },
|
|
2205
|
+
'--wind-band': { as: 'forwarded' },
|
|
2192
2206
|
};
|
|
2193
2207
|
|
|
2194
2208
|
/** The requirements file build's check reads (issue #556): `read` is where it is opened, `recorded` what `check.json` names it by. */
|
|
@@ -2333,6 +2347,8 @@ export function build(input: BuildInput, run: BuildRunners, log: Log): BuildResu
|
|
|
2333
2347
|
if (req !== null) readRequirements(req.read);
|
|
2334
2348
|
// And the schedule (issue #538), by rigc's own reader, as check reads it.
|
|
2335
2349
|
if (input.environment !== undefined) readCheckEnvironment(input.environment);
|
|
2350
|
+
// And the steady-wind band spec (issue #590), as check reads it.
|
|
2351
|
+
if (input.windBand !== undefined) readWindBand(input.windBand);
|
|
2336
2352
|
stages.assemble(
|
|
2337
2353
|
{ source: input.source, full: input.full, head: input.head, config: input.config, seam: input.seam, project: input.project, ...(input.alts === undefined ? {} : { alts: input.alts }) },
|
|
2338
2354
|
{ partsJson: join(out, 'parts.json'), partsDir: join(out, 'parts'), recomposite: join(out, 'recomposite_rig.png'), errorMap: join(out, ERROR_MAP_FILE) },
|
|
@@ -2350,7 +2366,7 @@ export function build(input: BuildInput, run: BuildRunners, log: Log): BuildResu
|
|
|
2350
2366
|
|
|
2351
2367
|
let report: CheckReport;
|
|
2352
2368
|
try {
|
|
2353
|
-
report = stages.check({ rig: join(out, 'rig'), parts: out, out: join(out, 'check'), pageEdges: input.pageEdges, packShape: input.packShape, ...(req === null ? {} : { requirements: req.read, requirementsAs: req.recorded }), seamPairs: input.seamPairs === true, keepStills: input.keepStills === true, ...(input.set === undefined ? {} : { set: input.set }), allSets: input.allSets === true, ...(input.environment === undefined ? {} : { environment: input.environment }), ...(configRecord === null ? {} : { config: configRecord }) }, run.check, run.checkBin, prefixed('check'));
|
|
2369
|
+
report = stages.check({ rig: join(out, 'rig'), parts: out, out: join(out, 'check'), pageEdges: input.pageEdges, packShape: input.packShape, ...(req === null ? {} : { requirements: req.read, requirementsAs: req.recorded }), seamPairs: input.seamPairs === true, keepStills: input.keepStills === true, ...(input.set === undefined ? {} : { set: input.set }), allSets: input.allSets === true, ...(input.environment === undefined ? {} : { environment: input.environment }), ...(input.windBand === undefined ? {} : { windBand: input.windBand }), ...(configRecord === null ? {} : { config: configRecord }) }, run.check, run.checkBin, prefixed('check'));
|
|
2354
2370
|
} catch (err) {
|
|
2355
2371
|
return refused('check', err);
|
|
2356
2372
|
}
|