spine-parts 2.23.3 → 2.23.4
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/package.json +1 -1
- package/src/paintingedges.ts +5 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "spine-parts",
|
|
3
|
-
"version": "2.23.
|
|
3
|
+
"version": "2.23.4",
|
|
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": {
|
package/src/paintingedges.ts
CHANGED
|
@@ -66,6 +66,7 @@ import { type Mask, newMask, type Raster, RasterError } from './raster/types.ts'
|
|
|
66
66
|
* into it: on the inner ring (FRONT-owned, next to the line) it is at least
|
|
67
67
|
* that of its resolved outer-ring neighbours (a painted line just outside
|
|
68
68
|
* See-through's line is FRONT's outline, so what lies between is FRONT's too);
|
|
69
|
+
* on a busy-ground silhouette it also keeps the first inner ring's own alpha;
|
|
69
70
|
* deeper inside it is the greater of See-through's own alpha and the
|
|
70
71
|
* painting's (the ramp past the half line is filled; a light interior is never
|
|
71
72
|
* holed); farther out it is no more than its neighbour one ring nearer.
|
|
@@ -536,7 +537,10 @@ function applyPaintingEdges(
|
|
|
536
537
|
const q = decisions[k];
|
|
537
538
|
let alpha = q.matte;
|
|
538
539
|
if (q.inside && q.ring > 1) alpha = Math.max(q.own, q.matte);
|
|
539
|
-
else if (q.inside)
|
|
540
|
+
else if (q.inside) {
|
|
541
|
+
alpha = Math.max(alpha, neighbours(q, false, 1));
|
|
542
|
+
if (busy && q.behind === -1) alpha = Math.max(alpha, q.own);
|
|
543
|
+
}
|
|
540
544
|
else if (q.ring > 1) alpha = Math.min(alpha, neighbours(q, false, q.ring - 1));
|
|
541
545
|
if (alpha <= OPAQUE_ALPHA_ABOVE) alpha = 0;
|
|
542
546
|
else if (alpha >= 255 - OPAQUE_ALPHA_ABOVE) alpha = 255;
|