@plupin/character 0.3.0 → 0.4.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/anime-face.d.ts +17 -17
- package/dist/anime-face.js +1 -1
- package/dist/blob.d.ts +49 -11
- package/dist/blob.js +29 -1
- package/dist/body-presets.d.ts +105 -37
- package/dist/canvas.js +22 -3
- package/dist/{chunk-g1c0wdcj.js → chunk-7ry0n8cw.js} +386 -2
- package/dist/{chunk-sa2r1cxz.js → chunk-ew73g2v7.js} +13 -7
- package/dist/chunk-ewkkvpte.js +448 -0
- package/dist/{chunk-60p135hw.js → chunk-kf7f1tdx.js} +113 -9
- package/dist/{chunk-kber92gm.js → chunk-nx2wbkfn.js} +8 -2
- package/dist/{chunk-yd5zzkkg.js → chunk-rqenm9tn.js} +175 -1
- package/dist/chunk-vy9w8as2.js +196 -0
- package/dist/clips.d.ts +1 -1
- package/dist/index.js +5 -43
- package/dist/listing.js +39 -13
- package/dist/plup3d.d.ts +9 -58
- package/dist/png.d.ts +4 -3
- package/dist/pose.js +1 -1
- package/dist/skin-map.d.ts +3 -2
- package/dist/skin-map.js +3 -1
- package/dist/skin-native.d.ts +26 -8
- package/dist/three.d.ts +8 -1
- package/dist/three.js +1298 -404
- package/dist/wear3d.d.ts +19 -0
- package/dist/wearables.d.ts +114 -10
- package/dist/wearables.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-09c5tps4.js +0 -337
- package/dist/chunk-dpb0rnw9.js +0 -37
package/dist/png.d.ts
CHANGED
|
@@ -14,9 +14,10 @@
|
|
|
14
14
|
* A palette PNG or a 16-bit one is a different picture than the one the moderator approved once a
|
|
15
15
|
* second decoder is involved, so it is refused instead of converted.
|
|
16
16
|
*
|
|
17
|
-
* Inflate is `fflate`'s synchronous
|
|
18
|
-
* that four surfaces already call without awaiting, and a
|
|
19
|
-
* async and every caller with it.
|
|
17
|
+
* Inflate is `fflate`'s synchronous streaming `Unzlib` fed in bounded chunks: the renderer is a
|
|
18
|
+
* pure function (`renderListingPreview`) that four surfaces already call without awaiting, and a
|
|
19
|
+
* `DecompressionStream` would have made it async and every caller with it. Streaming chunk by chunk
|
|
20
|
+
* lets us abort immediately if a crafted IDAT expands beyond the image's scanlines.
|
|
20
21
|
*
|
|
21
22
|
* It checks structure and pixels, not chunk CRCs: zlib's own Adler-32 rejects a damaged IDAT, and
|
|
22
23
|
* the one thing a checksum would add here — "this file was edited after it was written" — is not a
|
package/dist/pose.js
CHANGED
package/dist/skin-map.d.ts
CHANGED
|
@@ -14,9 +14,10 @@ export declare const BODY_HEIGHT = 24;
|
|
|
14
14
|
export declare const FACE_COLUMN = 20;
|
|
15
15
|
export declare const FACE_ROW = 9;
|
|
16
16
|
import { type NamedFace } from "./faces";
|
|
17
|
-
/** `anime`
|
|
18
|
-
export declare const FACE_TYPES: readonly ["dot", "sparkle", "sleepy", "derp", "anime"];
|
|
17
|
+
/** `anime` (cute) and `ikemen` (handsome) are drawn at high resolution on the 3D body (`anime-face.ts`); pixel-only surfaces fall back to sparkle. */
|
|
18
|
+
export declare const FACE_TYPES: readonly ["dot", "sparkle", "sleepy", "derp", "anime", "ikemen"];
|
|
19
19
|
export type FaceType = (typeof FACE_TYPES)[number];
|
|
20
|
+
export declare const isHighResFace: (faceType: string | undefined) => faceType is "anime" | "ikemen";
|
|
20
21
|
/**
|
|
21
22
|
* The six the face rule picks from, plus every named face of the content films (`@plupin/character`
|
|
22
23
|
* faces): an emote forces one of those through `expression`, and the rule never picks them itself.
|
package/dist/skin-map.js
CHANGED
|
@@ -18,13 +18,14 @@ import {
|
|
|
18
18
|
composeSkin,
|
|
19
19
|
faceKeys,
|
|
20
20
|
faceStamp,
|
|
21
|
+
isHighResFace,
|
|
21
22
|
isNamedExpression,
|
|
22
23
|
paintEyesSmooth,
|
|
23
24
|
paintSkinDetailed,
|
|
24
25
|
randomSkin,
|
|
25
26
|
sanitizeSkin,
|
|
26
27
|
tintForName
|
|
27
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-nx2wbkfn.js";
|
|
28
29
|
import"./chunk-aa5nstet.js";
|
|
29
30
|
export {
|
|
30
31
|
tintForName,
|
|
@@ -33,6 +34,7 @@ export {
|
|
|
33
34
|
paintSkinDetailed,
|
|
34
35
|
paintEyesSmooth,
|
|
35
36
|
isNamedExpression,
|
|
37
|
+
isHighResFace,
|
|
36
38
|
faceStamp,
|
|
37
39
|
faceKeys,
|
|
38
40
|
composeSkin,
|
package/dist/skin-native.d.ts
CHANGED
|
@@ -104,18 +104,23 @@ export declare const BODY_SCALE_LIMITS: {
|
|
|
104
104
|
readonly max: 1.25;
|
|
105
105
|
};
|
|
106
106
|
};
|
|
107
|
-
/** The
|
|
107
|
+
/** The character body knobs, beyond the box rig's: silhouette, curves, limbs, bulk, and stylized figure mode. */
|
|
108
108
|
export declare const PLUP_BODY_LIMITS: {
|
|
109
109
|
readonly shoulders: {
|
|
110
|
-
readonly min: 0.
|
|
111
|
-
readonly max: 1.
|
|
110
|
+
readonly min: 0.65;
|
|
111
|
+
readonly max: 1.6;
|
|
112
112
|
};
|
|
113
113
|
readonly waist: {
|
|
114
|
-
readonly min: 0.
|
|
115
|
-
readonly max: 1.
|
|
114
|
+
readonly min: 0.48;
|
|
115
|
+
readonly max: 1.25;
|
|
116
116
|
};
|
|
117
117
|
readonly hips: {
|
|
118
118
|
readonly min: 0.75;
|
|
119
|
+
readonly max: 1.55;
|
|
120
|
+
};
|
|
121
|
+
/** Forward chest / bust fullness (0 flat/neutral, up to 1.4 full curvy bust). */
|
|
122
|
+
readonly bust: {
|
|
123
|
+
readonly min: 0;
|
|
119
124
|
readonly max: 1.4;
|
|
120
125
|
};
|
|
121
126
|
/** Leg length: 1 is Plup's stubs, 3 is a long-legged runway walker. */
|
|
@@ -127,25 +132,38 @@ export declare const PLUP_BODY_LIMITS: {
|
|
|
127
132
|
readonly min: 0.8;
|
|
128
133
|
readonly max: 1.8;
|
|
129
134
|
};
|
|
130
|
-
/** Arm and leg bulk
|
|
135
|
+
/** Arm, shoulder, chest and leg bulk (muscular / kekar build). */
|
|
131
136
|
readonly muscle: {
|
|
132
137
|
readonly min: 0.7;
|
|
133
|
-
readonly max:
|
|
138
|
+
readonly max: 2.2;
|
|
134
139
|
};
|
|
135
|
-
/** Where the arms come out, as a share of the body's height (
|
|
140
|
+
/** Where the arms come out on the round Plup, as a share of the body's height (films' rig puts them at 0.34). */
|
|
136
141
|
readonly shoulderHeight: {
|
|
137
142
|
readonly min: 0.2;
|
|
138
143
|
readonly max: 0.55;
|
|
139
144
|
};
|
|
145
|
+
/** Head size multiplier: lower (0.55–0.8) makes the sculpted body stand out like anime/Roblox; 1+ is chibi. */
|
|
146
|
+
readonly headSize: {
|
|
147
|
+
readonly min: 0.55;
|
|
148
|
+
readonly max: 1.25;
|
|
149
|
+
};
|
|
150
|
+
/** 0 = classic round Plup blob, 1 = stylized anime/chibi figure (round head + neck + sculpted torso). */
|
|
151
|
+
readonly figure: {
|
|
152
|
+
readonly min: 0;
|
|
153
|
+
readonly max: 1;
|
|
154
|
+
};
|
|
140
155
|
};
|
|
141
156
|
export interface PlupBody {
|
|
142
157
|
shoulders: number;
|
|
143
158
|
waist: number;
|
|
144
159
|
hips: number;
|
|
160
|
+
bust: number;
|
|
145
161
|
legLength: number;
|
|
146
162
|
armLength: number;
|
|
147
163
|
muscle: number;
|
|
148
164
|
shoulderHeight: number;
|
|
165
|
+
headSize: number;
|
|
166
|
+
figure: number;
|
|
149
167
|
}
|
|
150
168
|
export declare const CANONICAL_PLUP_BODY: PlupBody;
|
|
151
169
|
/** Clamp a Plup body the same way `clampBodyScale` clamps the rig's: missing or broken is canonical. */
|
package/dist/three.d.ts
CHANGED
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import { Group } from "three";
|
|
2
2
|
import { type Emote } from "./emote";
|
|
3
|
+
export { ANIME_FACE_SIZE, ANIME_FACE_UV, drawAnimeFace } from "./anime-face";
|
|
4
|
+
export { blobRadiusAt, buildBlobGeometry, buildFigureHeadGeometry, buildFigureTorsoGeometry, figureTorsoPoint, } from "./blob";
|
|
5
|
+
export { BODY_PRESETS } from "./body-presets";
|
|
6
|
+
export { AUTHORED_CLIPS } from "./clips";
|
|
3
7
|
export { buildWear } from "./dress";
|
|
8
|
+
export { EMOTES } from "./emote";
|
|
9
|
+
export { isHighResFace } from "./skin-map";
|
|
4
10
|
export type { WearKit, WornPiece } from "./wear3d";
|
|
11
|
+
export { hairVolume, isHairKey, isWearKey, WEARABLES, wearSlotOf } from "./wearables";
|
|
5
12
|
import { type ClipRef, type Pose } from "./pose";
|
|
6
|
-
export { type BodyShapeId, createPlup, type Expression, type PlupFace, type PlupHandle, type PlupOptions, type PlupSkin, } from "./plup3d";
|
|
13
|
+
export { type BodyShapeId, createPlup, type Expression, type PlupFace, type PlupHandle, type PlupOptions, type PlupSkin, toon, } from "./plup3d";
|
|
7
14
|
export type { RagdollMode } from "./ragdoll";
|
|
8
15
|
import { type RigId } from "./rig";
|
|
9
16
|
import { type BodyScale, type CharacterLook } from "./skin-native";
|