@plupin/character 0.4.0 → 0.6.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 +15 -2
- package/dist/blob.js +3 -1
- package/dist/body-presets.d.ts +9 -8
- package/dist/canvas.js +2 -2
- package/dist/{chunk-ew73g2v7.js → chunk-phwn2cn7.js} +6 -4
- package/dist/{chunk-rqenm9tn.js → chunk-s083mv4f.js} +9 -8
- package/dist/{chunk-7ry0n8cw.js → chunk-wryfx2sg.js} +377 -233
- package/dist/{chunk-vy9w8as2.js → chunk-x8f5p1qg.js} +42 -12
- package/dist/dance-clips.d.ts +27 -0
- package/dist/ik-skeleton.d.ts +98 -0
- package/dist/index.js +3 -3
- package/dist/listing.js +2 -2
- package/dist/plup3d.d.ts +9 -1
- package/dist/pose.js +1 -1
- package/dist/skin-native.d.ts +11 -5
- package/dist/three.d.ts +3 -0
- package/dist/three.js +1674 -319
- package/dist/wear3d.d.ts +7 -1
- package/package.json +1 -1
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
|
-
/**
|
|
42
|
-
export declare function
|
|
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-
|
|
24
|
+
} from "./chunk-x8f5p1qg.js";
|
|
24
25
|
export {
|
|
25
26
|
silhouetteAt,
|
|
27
|
+
figureTorsoSpan,
|
|
26
28
|
figureTorsoRadiusAt,
|
|
27
29
|
figureTorsoPoint,
|
|
28
30
|
figureHeadRadiusAt,
|
package/dist/body-presets.d.ts
CHANGED
|
@@ -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
|
|
112
|
-
readonly
|
|
113
|
-
readonly
|
|
114
|
-
readonly
|
|
115
|
-
readonly
|
|
116
|
-
readonly
|
|
117
|
-
readonly
|
|
118
|
-
readonly
|
|
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-
|
|
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-
|
|
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-
|
|
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:
|
|
188
|
-
armLength: { min: 0.
|
|
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.
|
|
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
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
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: {
|