spine-rigc 0.35.1 → 0.36.1

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
@@ -590,8 +590,6 @@ the file are **findings** with codes rather than plausible values: a construct t
590
590
  spec format cannot hold (`point`, a `sequence` block, an unknown field
591
591
  on a bone, slot or constraint) is a blocker, the command exits non-zero, and both
592
592
  specs are still written — a spec plus a list of what is missing from it beats no spec.
593
- One thing it drops on purpose and says so: a path attachment's `lengths`, which is
594
- `PathConstraint`'s own measurement and which rigc re-measures.
595
593
 
596
594
  ⚠️ **Two values are not in a skeleton at all.**
597
595
 
@@ -633,9 +631,12 @@ bun tools/editor_roundtrip.ts --build build/ --editor /Applications/Spine.app/Co
633
631
 
634
632
  It prints the import and export exit codes, the validator's verdict on the
635
633
  export, every `diff` measure that moved, `check`'s mean MAE and worst drift per
636
- animation **for each skin the build declares** — one render-and-check block per
637
- skin, with a per-skin roll-up under them, because a rig's contested art lives in
638
- its named skins and a single un-skinned check draws none of it — and a
634
+ animation **for each skin the build and the export both declare** — one
635
+ render-and-check block per skin, with a per-skin roll-up under them, because a
636
+ rig's contested art lives in its named skins and a single un-skinned check draws
637
+ none of it; a skin only one side declares is a FAIL naming it as **lost** (or
638
+ **added**) **by the export**, with `diff`'s `attachments.skins` beside it, and is
639
+ rendered on neither side ([#801](https://github.com/firejune/rigc/issues/801)) — and a
639
640
  field-by-field list of what the editor rewrote. Every step quotes what its child
640
641
  said when that child did not do what it was for, the renderers included; a skin
641
642
  **neither** side can draw — a hit-box rig, say — is a **SKIP** naming that, not a
package/cli.ts CHANGED
@@ -2836,6 +2836,17 @@ function cmdExplain(flags: Record<string, string>): void {
2836
2836
  // relying on. Reading it by name means a change to the skins ORDER cannot turn
2837
2837
  // this line into a report about some other skin.
2838
2838
  const defaultSkin = result.skeleton.skins.find((skin) => skin.name === 'default');
2839
+ // ...and a skeleton may declare none (issue #801), in which case every
2840
+ // `attachments=[]` below is true and says nothing — so the line above the
2841
+ // column says where the placeholders are instead of letting it read as
2842
+ // "this rig has no art".
2843
+ if (defaultSkin === undefined) {
2844
+ const names = result.skeleton.skins.map((skin) => JSON.stringify(skin.name));
2845
+ console.log(
2846
+ ` (this skeleton declares no default skin, so the attachments column lists none; its placeholders are in ` +
2847
+ `${names.length === 0 ? 'no skin at all' : `the named skin(s) ${names.join(', ')}`})`,
2848
+ );
2849
+ }
2839
2850
  for (const s of result.skeleton.slots) {
2840
2851
  const atts = Object.keys(defaultSkin?.attachments[s.name] ?? {});
2841
2852
  console.log(
@@ -3039,7 +3050,10 @@ function cmdExplain(flags: Record<string, string>): void {
3039
3050
  const curve = attachments.find((att) => (att as { type?: string }).type === 'path') as
3040
3051
  | { lengths?: number[]; closed?: boolean; constantSpeed?: boolean }
3041
3052
  | undefined;
3042
- const lengths = curve?.lengths ?? [];
3053
+ // `vertexCount / 3` entries on both shapes since issue #804, so an open
3054
+ // path's curves are one fewer than its entries and its length is the last
3055
+ // CURVE's entry — the trailing one is the wrap-around curve nothing reads.
3056
+ const lengths = (curve?.lengths ?? []).slice(0, curve?.closed ? undefined : -1);
3043
3057
  console.log(
3044
3058
  ` ${c.name.padEnd(12)} slot=${slot.padEnd(12)} bones=[${(c.bones as string[]).join(', ')}] ` +
3045
3059
  `position=${c.position ?? 0} ${String(c.positionMode ?? 'percent')}/${String(c.spacingMode ?? 'length')}/${String(c.rotateMode ?? 'tangent')}`,