@plupin/character 0.4.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/blob.d.ts CHANGED
@@ -20,6 +20,7 @@ export interface Silhouette {
20
20
  hips: number;
21
21
  bust?: number;
22
22
  muscle?: number;
23
+ torsoHeight?: number;
23
24
  figure?: number;
24
25
  }
25
26
  export declare const ROUND: Silhouette;
@@ -38,8 +39,20 @@ export declare const FIGURE_HEAD_BASE_SCALE = 0.46;
38
39
  export declare const FIGURE_NECK_TOP_Y = 0.8;
39
40
  export declare const FIGURE_SHOULDER_Y = 0.64;
40
41
  export declare const FIGURE_HIP_Y = 0.17;
41
- /** Head scale and origin Y for a given `headSize` knob (0.55..1.25). */
42
- export declare function figureHeadMetrics(headSize?: number): {
42
+ /** Vertical landmarks for a given `torsoHeight` (0.45 = compact chibi, 1.0 = full runway anime). */
43
+ export declare function figureTorsoSpan(torsoHeight?: number): {
44
+ minY: number;
45
+ maxY: number;
46
+ centerY: number;
47
+ halfH: number;
48
+ neckTopY: number;
49
+ shoulderY: number;
50
+ hipY: number;
51
+ waistY: number;
52
+ bustY: number;
53
+ };
54
+ /** Head scale and origin Y for a given `headSize` (0.55..1.45) and `torsoHeight` (0.45..1.15). */
55
+ export declare function figureHeadMetrics(headSize?: number, torsoHeight?: number): {
43
56
  scale: number;
44
57
  originY: number;
45
58
  centerY: number;
package/dist/blob.js CHANGED
@@ -19,10 +19,12 @@ import {
19
19
  figureHeadRadiusAt,
20
20
  figureTorsoPoint,
21
21
  figureTorsoRadiusAt,
22
+ figureTorsoSpan,
22
23
  silhouetteAt
23
- } from "./chunk-vy9w8as2.js";
24
+ } from "./chunk-x8f5p1qg.js";
24
25
  export {
25
26
  silhouetteAt,
27
+ figureTorsoSpan,
26
28
  figureTorsoRadiusAt,
27
29
  figureTorsoPoint,
28
30
  figureHeadRadiusAt,
@@ -108,14 +108,15 @@ export declare const BODY_PRESETS: {
108
108
  readonly shape: "plup";
109
109
  readonly body: {
110
110
  readonly figure: 1;
111
- readonly headSize: 1.16;
112
- readonly shoulders: 0.78;
113
- readonly bust: 0.15;
114
- readonly waist: 0.84;
115
- readonly hips: 1.06;
116
- readonly legLength: 1.25;
117
- readonly armLength: 0.92;
118
- readonly muscle: 0.82;
111
+ readonly torsoHeight: 0.48;
112
+ readonly headSize: 1.32;
113
+ readonly shoulders: 0.72;
114
+ readonly bust: 0;
115
+ readonly waist: 0.78;
116
+ readonly hips: 0.86;
117
+ readonly legLength: 0.85;
118
+ readonly armLength: 0.68;
119
+ readonly muscle: 0.78;
119
120
  };
120
121
  };
121
122
  readonly chubby: {
package/dist/canvas.js CHANGED
@@ -6,14 +6,14 @@ import {
6
6
  clampBodyScale,
7
7
  nativePartOf,
8
8
  scaleBone
9
- } from "./chunk-ew73g2v7.js";
9
+ } from "./chunk-phwn2cn7.js";
10
10
  import {
11
11
  RIGS,
12
12
  clipLift,
13
13
  mergePoses,
14
14
  resolvePose,
15
15
  sampleClip
16
- } from "./chunk-7ry0n8cw.js";
16
+ } from "./chunk-wryfx2sg.js";
17
17
  import {
18
18
  FACE_STAMP_PALETTE,
19
19
  NAMED_FACES,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  RIGS
3
- } from "./chunk-7ry0n8cw.js";
3
+ } from "./chunk-wryfx2sg.js";
4
4
 
5
5
  // src/skin.ts
6
6
  var rect = (x, y, w, h) => ({ x, y, w, h });
@@ -184,11 +184,12 @@ var PLUP_BODY_LIMITS = {
184
184
  waist: { min: 0.48, max: 1.25 },
185
185
  hips: { min: 0.75, max: 1.55 },
186
186
  bust: { min: 0, max: 1.4 },
187
- legLength: { min: 1, max: 3 },
188
- armLength: { min: 0.8, max: 1.8 },
187
+ legLength: { min: 0.65, max: 3 },
188
+ armLength: { min: 0.55, max: 1.8 },
189
189
  muscle: { min: 0.7, max: 2.2 },
190
190
  shoulderHeight: { min: 0.2, max: 0.55 },
191
- headSize: { min: 0.55, max: 1.25 },
191
+ headSize: { min: 0.55, max: 1.45 },
192
+ torsoHeight: { min: 0.45, max: 1.15 },
192
193
  figure: { min: 0, max: 1 }
193
194
  };
194
195
  var CANONICAL_PLUP_BODY = {
@@ -201,6 +202,7 @@ var CANONICAL_PLUP_BODY = {
201
202
  muscle: 1,
202
203
  shoulderHeight: 0.34,
203
204
  headSize: 1,
205
+ torsoHeight: 1,
204
206
  figure: 0
205
207
  };
206
208
  function clampPlupBody(body) {
@@ -96,14 +96,15 @@ var BODY_PRESETS = {
96
96
  shape: "plup",
97
97
  body: {
98
98
  figure: 1,
99
- headSize: 1.16,
100
- shoulders: 0.78,
101
- bust: 0.15,
102
- waist: 0.84,
103
- hips: 1.06,
104
- legLength: 1.25,
105
- armLength: 0.92,
106
- muscle: 0.82
99
+ torsoHeight: 0.48,
100
+ headSize: 1.32,
101
+ shoulders: 0.72,
102
+ bust: 0,
103
+ waist: 0.78,
104
+ hips: 0.86,
105
+ legLength: 0.85,
106
+ armLength: 0.68,
107
+ muscle: 0.78
107
108
  }
108
109
  },
109
110
  chubby: {