@holtjs/craft 0.0.0-stage → 0.1.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/CHANGELOG.md +14 -0
- package/LICENSE +201 -0
- package/NOTICE +10 -0
- package/README.md +63 -2
- package/dist/atlas-Pc12eQsg.js +112 -0
- package/dist/atlas.d.ts +75 -0
- package/dist/atlas.js +1 -0
- package/dist/index.d.ts +154 -0
- package/dist/index.js +14 -0
- package/dist/inspect-NzY8Ac1j.js +466 -0
- package/dist/inspect.d.ts +36 -0
- package/dist/inspect.js +1 -0
- package/dist/pixel-D3jgByB5.js +728 -0
- package/dist/pixel.d.ts +79 -0
- package/dist/pixel.js +1 -0
- package/dist/rig3d-C3i7UL88.js +7257 -0
- package/dist/rig3d-DhTgbTbX.d.ts +605 -0
- package/dist/rig3d.d.ts +2 -0
- package/dist/rig3d.js +2 -0
- package/dist/tilemap-BFH4_JLe.js +266 -0
- package/dist/tilemap.d.ts +61 -0
- package/dist/tilemap.js +1 -0
- package/llms.txt +16 -0
- package/package.json +71 -4
- package/skills/craft/SKILL.md +93 -0
- package/skills/craft/references/subpaths.md +32 -0
|
@@ -0,0 +1,605 @@
|
|
|
1
|
+
declare const RIG_PRIMITIVE_SHAPES: readonly ['ellipsoid', 'box', 'cone', 'capsule', 'cylinder', 'torus'];
|
|
2
|
+
type RigPrimitiveShape = (typeof RIG_PRIMITIVE_SHAPES)[number];
|
|
3
|
+
/** A single lightweight 3D volume primitive attached in socket local space (or prop local space). */
|
|
4
|
+
interface RigPrimitiveSpec {
|
|
5
|
+
readonly shape: RigPrimitiveShape;
|
|
6
|
+
readonly pos: Vec3;
|
|
7
|
+
readonly size: Vec3;
|
|
8
|
+
readonly rot?: Vec3;
|
|
9
|
+
readonly color: string;
|
|
10
|
+
readonly shade?: 'ramp' | 'flat';
|
|
11
|
+
readonly outline?: boolean;
|
|
12
|
+
readonly group?: number;
|
|
13
|
+
}
|
|
14
|
+
/** Optional 2D pixel grid sprite for a cosmetic (e.g. 12x12 pixel art, 1-4 views). */
|
|
15
|
+
interface RigPixelSpriteSpec {
|
|
16
|
+
readonly width: number;
|
|
17
|
+
readonly height: number;
|
|
18
|
+
readonly anchorX: number;
|
|
19
|
+
readonly anchorY: number;
|
|
20
|
+
readonly palette: Readonly<Record<string, string>>;
|
|
21
|
+
readonly front: readonly string[];
|
|
22
|
+
readonly side?: readonly string[];
|
|
23
|
+
readonly back?: readonly string[];
|
|
24
|
+
}
|
|
25
|
+
/** Declarative socket-attached cosmetic contributed by a Data Pack or Mod (zero PNG sheet baking). */
|
|
26
|
+
interface RigCosmeticSpec {
|
|
27
|
+
readonly id: string;
|
|
28
|
+
readonly name: string;
|
|
29
|
+
readonly socket: RigSocketName;
|
|
30
|
+
readonly slot: RigCosmeticSlot;
|
|
31
|
+
readonly offset?: Vec3;
|
|
32
|
+
readonly rot?: Vec3;
|
|
33
|
+
readonly scale?: number;
|
|
34
|
+
readonly primitives?: readonly RigPrimitiveSpec[];
|
|
35
|
+
readonly pixels?: RigPixelSpriteSpec;
|
|
36
|
+
}
|
|
37
|
+
/** Declarative prop temporarily shown on a socket during a `RigClip` keyframe. */
|
|
38
|
+
interface RigPropInstance {
|
|
39
|
+
readonly socket: RigSocketName;
|
|
40
|
+
readonly offset?: Vec3;
|
|
41
|
+
readonly rot?: Vec3;
|
|
42
|
+
readonly scale?: number;
|
|
43
|
+
readonly primitives: readonly RigPrimitiveSpec[];
|
|
44
|
+
}
|
|
45
|
+
interface RigBonePoseOverride {
|
|
46
|
+
readonly pos?: Vec3;
|
|
47
|
+
readonly rot?: Vec3;
|
|
48
|
+
readonly scale?: Vec3;
|
|
49
|
+
}
|
|
50
|
+
interface RigKeyframe {
|
|
51
|
+
readonly at: number;
|
|
52
|
+
readonly ease?: RigEaseMode;
|
|
53
|
+
readonly bones?: Readonly<Partial<Record<RigBoneName, RigBonePoseOverride>>>;
|
|
54
|
+
readonly reach?: Readonly<Partial<Record<'armL' | 'armR', {
|
|
55
|
+
readonly target: Vec3;
|
|
56
|
+
readonly stretch?: boolean;
|
|
57
|
+
}>>>;
|
|
58
|
+
readonly eyes?: RigEyeMode;
|
|
59
|
+
readonly water?: number | null;
|
|
60
|
+
readonly props?: readonly RigPropInstance[];
|
|
61
|
+
}
|
|
62
|
+
/** Declarative bone-keyframe animation clip contributed by a Data Pack or Mod. */
|
|
63
|
+
interface RigClip {
|
|
64
|
+
readonly id: string;
|
|
65
|
+
readonly name: string;
|
|
66
|
+
readonly durationMs: number;
|
|
67
|
+
readonly fps: number;
|
|
68
|
+
readonly dirs: 1 | 4 | 8 | 16;
|
|
69
|
+
readonly loop: boolean;
|
|
70
|
+
readonly icon?: string;
|
|
71
|
+
readonly keyframes: readonly RigKeyframe[];
|
|
72
|
+
}
|
|
73
|
+
declare function validateRigPrimitiveList(raw: unknown, maxCount: number): {
|
|
74
|
+
ok: true;
|
|
75
|
+
list: RigPrimitiveSpec[];
|
|
76
|
+
} | {
|
|
77
|
+
ok: false;
|
|
78
|
+
code: string;
|
|
79
|
+
message: string;
|
|
80
|
+
};
|
|
81
|
+
declare function validateRigPixelSprite(raw: unknown, maxSize: number): {
|
|
82
|
+
ok: true;
|
|
83
|
+
pixels: RigPixelSpriteSpec;
|
|
84
|
+
} | {
|
|
85
|
+
ok: false;
|
|
86
|
+
code: string;
|
|
87
|
+
message: string;
|
|
88
|
+
};
|
|
89
|
+
declare function validateRigCosmetic(raw: unknown): {
|
|
90
|
+
ok: true;
|
|
91
|
+
cosmetic: RigCosmeticSpec;
|
|
92
|
+
} | {
|
|
93
|
+
ok: false;
|
|
94
|
+
code: string;
|
|
95
|
+
message: string;
|
|
96
|
+
};
|
|
97
|
+
declare function validateRigClip(raw: unknown): {
|
|
98
|
+
ok: true;
|
|
99
|
+
clip: RigClip;
|
|
100
|
+
} | {
|
|
101
|
+
ok: false;
|
|
102
|
+
code: string;
|
|
103
|
+
message: string;
|
|
104
|
+
};
|
|
105
|
+
/** Evaluate a declarative `RigClip` at normalized time `tNorm ∈ [0, 1]` and direction `dir16`. */
|
|
106
|
+
declare function evaluateRigClip(bodyOrKey: RigBodyKey | RigBodySpec, clip: RigClip, tNorm: number, dir16?: number): RigPoseState;
|
|
107
|
+
/** Compute the discrete frame count for compiling a `RigClip` into a sprite strip. */
|
|
108
|
+
declare function rigClipFrameCount(clip: RigClip): number;
|
|
109
|
+
declare const RIG_BODY_KEYS: readonly ['0', 'A', 'B', 'C', 'Y', 'K', 'M', 'G'];
|
|
110
|
+
type RigBodyKey = (typeof RIG_BODY_KEYS)[number];
|
|
111
|
+
declare const RIG_BODY_EYE_STYLES: readonly ['otter', 'big', 'cat', 'dot', 'blue'];
|
|
112
|
+
type RigBodyEyeStyle = (typeof RIG_BODY_EYE_STYLES)[number];
|
|
113
|
+
declare const RIG_BODY_TAIL_STYLES: readonly ['otter', 'cat', 'fluffy', 'curled', 'stub'];
|
|
114
|
+
type RigBodyTailStyle = (typeof RIG_BODY_TAIL_STYLES)[number];
|
|
115
|
+
declare const RIG_BODY_ATTACH_BONES: readonly ['head', 'chest', 'hips', 'tail0', 'armL', 'armR'];
|
|
116
|
+
type RigBodyAttachBone = (typeof RIG_BODY_ATTACH_BONES)[number];
|
|
117
|
+
interface RigBodyCustomColors {
|
|
118
|
+
readonly head?: string;
|
|
119
|
+
readonly torso?: string;
|
|
120
|
+
readonly belly?: string;
|
|
121
|
+
readonly muzzle?: string;
|
|
122
|
+
readonly mask?: string;
|
|
123
|
+
readonly nose?: string;
|
|
124
|
+
readonly blush?: string;
|
|
125
|
+
readonly ear?: string;
|
|
126
|
+
readonly earIn?: string;
|
|
127
|
+
readonly eye?: string;
|
|
128
|
+
readonly tail?: string;
|
|
129
|
+
readonly tailTip?: string;
|
|
130
|
+
readonly feet?: string;
|
|
131
|
+
readonly arm?: string;
|
|
132
|
+
}
|
|
133
|
+
interface RigBodyAttachment {
|
|
134
|
+
readonly bone: RigBodyAttachBone;
|
|
135
|
+
readonly primitives: readonly RigPrimitiveSpec[];
|
|
136
|
+
}
|
|
137
|
+
interface RigBodySpec {
|
|
138
|
+
readonly key: RigBodyKey;
|
|
139
|
+
/** Optional custom character ID when compiled from a Data Pack or Mod `RigCustomBodySpec`. */
|
|
140
|
+
readonly customId?: string;
|
|
141
|
+
readonly customName?: string;
|
|
142
|
+
readonly cat?: boolean;
|
|
143
|
+
readonly oneGroup?: boolean;
|
|
144
|
+
readonly head: {
|
|
145
|
+
readonly c: Vec3;
|
|
146
|
+
readonly r: Vec3;
|
|
147
|
+
readonly sq?: number;
|
|
148
|
+
};
|
|
149
|
+
readonly mask?: {
|
|
150
|
+
readonly c: Vec3;
|
|
151
|
+
readonly r: Vec3;
|
|
152
|
+
};
|
|
153
|
+
readonly muzzle: {
|
|
154
|
+
readonly c: Vec3;
|
|
155
|
+
readonly r: Vec3;
|
|
156
|
+
};
|
|
157
|
+
readonly nose: Vec3;
|
|
158
|
+
readonly noNose?: boolean;
|
|
159
|
+
readonly noBlush?: boolean;
|
|
160
|
+
readonly noWhiskers?: boolean;
|
|
161
|
+
readonly eye: {
|
|
162
|
+
readonly x: number;
|
|
163
|
+
readonly y: number;
|
|
164
|
+
readonly r: Vec3;
|
|
165
|
+
readonly small?: boolean;
|
|
166
|
+
readonly noHi?: boolean;
|
|
167
|
+
readonly hi2?: boolean;
|
|
168
|
+
};
|
|
169
|
+
readonly blush: {
|
|
170
|
+
readonly x: number;
|
|
171
|
+
readonly y: number;
|
|
172
|
+
};
|
|
173
|
+
readonly cheeks?: {
|
|
174
|
+
readonly x: number;
|
|
175
|
+
readonly y: number;
|
|
176
|
+
readonly z: number;
|
|
177
|
+
readonly r: Vec3;
|
|
178
|
+
};
|
|
179
|
+
readonly cowlick?: boolean;
|
|
180
|
+
readonly tufts?: {
|
|
181
|
+
readonly x: number;
|
|
182
|
+
readonly y: number;
|
|
183
|
+
readonly z: number;
|
|
184
|
+
readonly r: Vec3;
|
|
185
|
+
readonly rot: number;
|
|
186
|
+
};
|
|
187
|
+
readonly ear: {
|
|
188
|
+
readonly p: Vec3;
|
|
189
|
+
readonly r: Vec3;
|
|
190
|
+
readonly cone?: boolean;
|
|
191
|
+
readonly tilt?: number;
|
|
192
|
+
readonly hidden?: boolean;
|
|
193
|
+
};
|
|
194
|
+
readonly torso: {
|
|
195
|
+
readonly c: Vec3;
|
|
196
|
+
readonly r: Vec3;
|
|
197
|
+
readonly sq?: number;
|
|
198
|
+
};
|
|
199
|
+
readonly belly: {
|
|
200
|
+
readonly c: Vec3;
|
|
201
|
+
readonly r: Vec3;
|
|
202
|
+
};
|
|
203
|
+
readonly chestY: number;
|
|
204
|
+
readonly neckR: readonly [number, number];
|
|
205
|
+
readonly scarfY?: number;
|
|
206
|
+
readonly scarfDy?: number;
|
|
207
|
+
readonly hatPad?: number;
|
|
208
|
+
readonly phonesY?: number;
|
|
209
|
+
readonly runLean?: number;
|
|
210
|
+
readonly arm: {
|
|
211
|
+
readonly s: Vec3;
|
|
212
|
+
readonly paw: Vec3;
|
|
213
|
+
readonly len: number;
|
|
214
|
+
readonly r: number;
|
|
215
|
+
};
|
|
216
|
+
readonly hip: Vec3;
|
|
217
|
+
readonly leg: number;
|
|
218
|
+
readonly legR: number;
|
|
219
|
+
readonly tail: {
|
|
220
|
+
readonly base: Vec3;
|
|
221
|
+
readonly yaw: number;
|
|
222
|
+
readonly pitch: number;
|
|
223
|
+
readonly hidden?: boolean;
|
|
224
|
+
readonly segs?: ReadonlyArray<readonly [number, number, number, number, number?]>;
|
|
225
|
+
readonly tube?: ReadonlyArray<readonly [number, number, number, number?, number?]>;
|
|
226
|
+
};
|
|
227
|
+
/** Material overrides matching `otter3d.js` (`head`, `torso`, `belly`, `arm`, `leg`, `foot`, `nose`, `earIn`, `ears`, `muzzle`, `mark`). */
|
|
228
|
+
readonly mats?: {
|
|
229
|
+
readonly head?: number;
|
|
230
|
+
readonly torso?: number;
|
|
231
|
+
readonly belly?: number;
|
|
232
|
+
readonly arm?: number;
|
|
233
|
+
readonly leg?: number;
|
|
234
|
+
readonly foot?: number;
|
|
235
|
+
readonly nose?: number;
|
|
236
|
+
readonly earIn?: number;
|
|
237
|
+
readonly ears?: readonly [number, number];
|
|
238
|
+
readonly muzzle?: number;
|
|
239
|
+
readonly mark?: number;
|
|
240
|
+
};
|
|
241
|
+
readonly locks?: ReadonlyArray<readonly [number, number, number, Vec3, number, number]>;
|
|
242
|
+
/** Optional custom hex palette overrides for mod/pack-contributed playable characters. */
|
|
243
|
+
readonly customColors?: RigBodyCustomColors;
|
|
244
|
+
/** Optional custom eye stamp style for mod/pack-contributed playable characters. */
|
|
245
|
+
readonly customEyeStyle?: RigBodyEyeStyle;
|
|
246
|
+
/** Optional extra bone-attached 3D primitives (beaks, cheek fluff, antlers, flippers, antennae, etc.). */
|
|
247
|
+
readonly customExtras?: readonly RigBodyAttachment[];
|
|
248
|
+
}
|
|
249
|
+
/** Exact canonical proportions of all 8 Raft Deck character bodies. */
|
|
250
|
+
declare const RIG_BODIES: Readonly<Record<RigBodyKey, RigBodySpec>>;
|
|
251
|
+
declare function rigBodyKeyFromIndex(bodyIdx: number): RigBodyKey;
|
|
252
|
+
type Vec3 = readonly [number, number, number];
|
|
253
|
+
type MutVec3 = [number, number, number];
|
|
254
|
+
type Quat = [number, number, number, number];
|
|
255
|
+
type Mat4 = Float64Array;
|
|
256
|
+
declare const RIG_BONE_NAMES: readonly ['root', 'hips', 'chest', 'neck', 'head', 'armL', 'armR', 'legL', 'legR', 'tail0', 'tail1', 'tail2'];
|
|
257
|
+
type RigBoneName = (typeof RIG_BONE_NAMES)[number];
|
|
258
|
+
declare const RIG_SOCKET_NAMES: readonly ['headTop', 'face', 'earL', 'earR', 'neck', 'back', 'waist', 'handL', 'handR'];
|
|
259
|
+
type RigSocketName = (typeof RIG_SOCKET_NAMES)[number];
|
|
260
|
+
declare const RIG_COSMETIC_SLOTS: readonly ['hat', 'face', 'neck', 'back', 'hand', 'other'];
|
|
261
|
+
type RigCosmeticSlot = (typeof RIG_COSMETIC_SLOTS)[number];
|
|
262
|
+
declare const RIG_EYE_MODES: readonly ['open', 'happy', 'shut', 'squeeze'];
|
|
263
|
+
type RigEyeMode = (typeof RIG_EYE_MODES)[number];
|
|
264
|
+
declare const RIG_EASE_MODES: readonly ['linear', 'easeInOut', 'easeOut', 'step'];
|
|
265
|
+
type RigEaseMode = (typeof RIG_EASE_MODES)[number];
|
|
266
|
+
/** Shared projection constants matching `assets/otters3d/otter3d.js` (`makeCamera(32, 13, 29)`). */
|
|
267
|
+
declare const RIG_MODEL_SCALE = 0.93;
|
|
268
|
+
declare const RIG_CELL_SIZE = 32;
|
|
269
|
+
declare const RIG_CAMERA_ELEV_DEG = 13;
|
|
270
|
+
declare const RIG_CAMERA_GROUND_Y = 29;
|
|
271
|
+
declare const RIG_DUO_VIEW = 2;
|
|
272
|
+
declare const RIG_COS_E: number;
|
|
273
|
+
declare const RIG_SIN_E: number;
|
|
274
|
+
declare const RIG_LIMITS: {
|
|
275
|
+
readonly maxCosmeticPrimitives: 16;
|
|
276
|
+
readonly maxCosmeticPixelSize: 24;
|
|
277
|
+
readonly maxCustomBodyExtras: 12;
|
|
278
|
+
readonly maxCustomBodyPrimitives: 24;
|
|
279
|
+
readonly maxDecorPrimitives: 24;
|
|
280
|
+
readonly maxDecorPixelSize: 48;
|
|
281
|
+
readonly maxClipKeyframes: 16;
|
|
282
|
+
readonly maxClipProps: 4;
|
|
283
|
+
readonly maxClipDurationMs: 12000;
|
|
284
|
+
readonly minClipDurationMs: 120;
|
|
285
|
+
readonly maxClipFps: 12;
|
|
286
|
+
readonly minClipFps: 2;
|
|
287
|
+
readonly maxClipNameLen: 48;
|
|
288
|
+
};
|
|
289
|
+
declare function quatIdentity(): Quat;
|
|
290
|
+
declare function quatMul(a: Quat, b: Quat): Quat;
|
|
291
|
+
declare function quatFromEuler(rx: number, ry: number, rz: number, order?: 'XYZ' | 'YXZ'): Quat;
|
|
292
|
+
declare function quatFromAxisAngle(axis: Vec3, angle: number): Quat;
|
|
293
|
+
declare function quatFromUnitVectors(from: Vec3, to: Vec3): Quat;
|
|
294
|
+
declare function mat4Compose(pos: Vec3, q: Quat, scale: Vec3, out?: Mat4): Mat4;
|
|
295
|
+
declare function mat4Mul(a: Mat4, b: Mat4, out?: Mat4): Mat4;
|
|
296
|
+
declare function mat4Invert(m: Mat4, out?: Mat4): Mat4 | null;
|
|
297
|
+
declare function mat4TransformPoint(m: Mat4, p: Vec3): MutVec3;
|
|
298
|
+
declare function mat4TransformDir(m: Mat4, v: Vec3): MutVec3;
|
|
299
|
+
interface RigBoneTransform {
|
|
300
|
+
pos: MutVec3;
|
|
301
|
+
quat: Quat;
|
|
302
|
+
scale: MutVec3;
|
|
303
|
+
world: Mat4;
|
|
304
|
+
}
|
|
305
|
+
interface RigPoseState {
|
|
306
|
+
readonly body: RigBodySpec;
|
|
307
|
+
readonly bones: Record<RigBoneName, RigBoneTransform>;
|
|
308
|
+
torsoScale: MutVec3;
|
|
309
|
+
bellyScale: MutVec3;
|
|
310
|
+
eyeMode: RigEyeMode;
|
|
311
|
+
water: number;
|
|
312
|
+
shadow: boolean;
|
|
313
|
+
yaw: number;
|
|
314
|
+
props: readonly RigPropInstance[];
|
|
315
|
+
}
|
|
316
|
+
interface SocketDefinition {
|
|
317
|
+
readonly name: RigSocketName;
|
|
318
|
+
readonly bone: RigBoneName;
|
|
319
|
+
readonly localPos: Vec3;
|
|
320
|
+
readonly refBone: RigBoneName;
|
|
321
|
+
readonly refLocalPos: Vec3;
|
|
322
|
+
}
|
|
323
|
+
interface ProjectedPoint2D {
|
|
324
|
+
readonly x: number;
|
|
325
|
+
readonly y: number;
|
|
326
|
+
readonly depth: number;
|
|
327
|
+
readonly frontness: number;
|
|
328
|
+
readonly worldY: number;
|
|
329
|
+
}
|
|
330
|
+
interface ProjectedSocket2D {
|
|
331
|
+
readonly socket: RigSocketName;
|
|
332
|
+
readonly x: number;
|
|
333
|
+
readonly y: number;
|
|
334
|
+
readonly depth: number;
|
|
335
|
+
readonly behind: boolean;
|
|
336
|
+
readonly angle: number;
|
|
337
|
+
readonly facing: 'front' | 'sideL' | 'sideR' | 'back';
|
|
338
|
+
readonly visible: boolean;
|
|
339
|
+
}
|
|
340
|
+
/** Build a fresh rest-pose skeleton state for any built-in or mod-contributed Raft Deck character body. */
|
|
341
|
+
declare function createRigState(bodyOrKey: RigBodyKey | RigBodySpec, yaw?: number): RigPoseState;
|
|
342
|
+
/** Recompute all 12 bone world matrices in parent-before-child topological order. */
|
|
343
|
+
declare function updateRigMatrices(state: RigPoseState): void;
|
|
344
|
+
/** Aim an arm bone (`armL` or `armR`) toward a chest-space target point, matching `otter3d.js` `reach()`. */
|
|
345
|
+
declare function reachArm(state: RigPoseState, side: 'armL' | 'armR', target: Vec3, stretch?: boolean): void;
|
|
346
|
+
/** Compute the canonical socket definitions for a given body type (auto-fitted to head/torso/arm proportions). */
|
|
347
|
+
declare function getBodySockets(bodyOrKey: RigBodyKey | RigBodySpec): Readonly<Record<RigSocketName, SocketDefinition>>;
|
|
348
|
+
/** Project a 3D world-space point into Deck's 32x32 sprite cell (`elev = 13°`, `ground = 29`). */
|
|
349
|
+
declare function projectWorldPoint2D(worldPt: Vec3): ProjectedPoint2D;
|
|
350
|
+
/** Project any canonical socket of a posed `RigPoseState` to 2D sprite coordinates, depth, tilt & facing. */
|
|
351
|
+
declare function projectSocket2D(state: RigPoseState, socketName: RigSocketName): ProjectedSocket2D;
|
|
352
|
+
/** Project all 9 sockets at once for a given posed rig state. */
|
|
353
|
+
declare function projectAllSockets2D(state: RigPoseState): Record<RigSocketName, ProjectedSocket2D>;
|
|
354
|
+
declare const RIG_DECOR_GROUPS: readonly ['office', 'pet', 'nature', 'decor', 'game'];
|
|
355
|
+
type RigDecorGroup = (typeof RIG_DECOR_GROUPS)[number];
|
|
356
|
+
declare const RIG_BODY_CATEGORIES: readonly ['animal', 'character'];
|
|
357
|
+
type RigBodyCategory = (typeof RIG_BODY_CATEGORIES)[number];
|
|
358
|
+
interface RigCustomBodyDefaultColors {
|
|
359
|
+
readonly fur?: string;
|
|
360
|
+
readonly belly?: string;
|
|
361
|
+
readonly scarf?: string | null;
|
|
362
|
+
}
|
|
363
|
+
/** Declarative playable character contributed by a Data Pack or Mod (works like built-in otters & cats). */
|
|
364
|
+
interface RigCustomBodySpec {
|
|
365
|
+
readonly id: string;
|
|
366
|
+
readonly name: string;
|
|
367
|
+
readonly base: RigBodyKey;
|
|
368
|
+
readonly category: RigBodyCategory;
|
|
369
|
+
readonly head?: {
|
|
370
|
+
readonly c?: Vec3;
|
|
371
|
+
readonly r?: Vec3;
|
|
372
|
+
readonly sq?: number;
|
|
373
|
+
};
|
|
374
|
+
readonly torso?: {
|
|
375
|
+
readonly c?: Vec3;
|
|
376
|
+
readonly r?: Vec3;
|
|
377
|
+
readonly sq?: number;
|
|
378
|
+
};
|
|
379
|
+
readonly belly?: {
|
|
380
|
+
readonly c?: Vec3;
|
|
381
|
+
readonly r?: Vec3;
|
|
382
|
+
};
|
|
383
|
+
readonly muzzle?: {
|
|
384
|
+
readonly c?: Vec3;
|
|
385
|
+
readonly r?: Vec3;
|
|
386
|
+
};
|
|
387
|
+
readonly mask?: {
|
|
388
|
+
readonly c: Vec3;
|
|
389
|
+
readonly r: Vec3;
|
|
390
|
+
} | null;
|
|
391
|
+
readonly nose?: Vec3 | null;
|
|
392
|
+
readonly ear?: {
|
|
393
|
+
readonly p?: Vec3;
|
|
394
|
+
readonly r?: Vec3;
|
|
395
|
+
readonly cone?: boolean;
|
|
396
|
+
readonly tilt?: number;
|
|
397
|
+
readonly hidden?: boolean;
|
|
398
|
+
};
|
|
399
|
+
readonly eye?: {
|
|
400
|
+
readonly x?: number;
|
|
401
|
+
readonly y?: number;
|
|
402
|
+
readonly r?: Vec3;
|
|
403
|
+
readonly style?: RigBodyEyeStyle;
|
|
404
|
+
};
|
|
405
|
+
readonly blush?: {
|
|
406
|
+
readonly x?: number;
|
|
407
|
+
readonly y?: number;
|
|
408
|
+
readonly hidden?: boolean;
|
|
409
|
+
};
|
|
410
|
+
readonly tail?: {
|
|
411
|
+
readonly hidden?: boolean;
|
|
412
|
+
readonly style?: RigBodyTailStyle;
|
|
413
|
+
};
|
|
414
|
+
readonly colors?: RigBodyCustomColors;
|
|
415
|
+
readonly defaultColors?: RigCustomBodyDefaultColors;
|
|
416
|
+
readonly extras?: readonly RigBodyAttachment[];
|
|
417
|
+
}
|
|
418
|
+
/** Declarative placeable/world decor prop contributed by a Data Pack or Mod (zero PNG upload required). */
|
|
419
|
+
interface RigDecorPropSpec {
|
|
420
|
+
readonly id: string;
|
|
421
|
+
readonly name: string;
|
|
422
|
+
readonly group: RigDecorGroup;
|
|
423
|
+
readonly tilesW: number;
|
|
424
|
+
readonly tilesD: number;
|
|
425
|
+
readonly frameW: number;
|
|
426
|
+
readonly frameH: number;
|
|
427
|
+
readonly dirs: 1 | 4;
|
|
428
|
+
readonly baseY: number;
|
|
429
|
+
readonly solidMask: number;
|
|
430
|
+
readonly underlay?: boolean;
|
|
431
|
+
readonly scale?: number;
|
|
432
|
+
readonly offset?: Vec3;
|
|
433
|
+
readonly primitives?: readonly RigPrimitiveSpec[];
|
|
434
|
+
readonly pixels?: RigPixelSpriteSpec;
|
|
435
|
+
readonly light?: {
|
|
436
|
+
readonly tone: 'warm' | 'cream' | 'aqua' | 'arcadeCyan' | 'arcadePink' | 'beacon' | 'ktv';
|
|
437
|
+
readonly r: number;
|
|
438
|
+
readonly flicker?: boolean;
|
|
439
|
+
};
|
|
440
|
+
readonly place?: {
|
|
441
|
+
readonly x: number;
|
|
442
|
+
readonly y: number;
|
|
443
|
+
readonly dir?: number;
|
|
444
|
+
};
|
|
445
|
+
}
|
|
446
|
+
/** Strictly validate a Data Pack or Mod playable character spec (`RigCustomBodySpec`). */
|
|
447
|
+
declare function validateRigCustomBody(raw: unknown): {
|
|
448
|
+
ok: true;
|
|
449
|
+
body: RigCustomBodySpec;
|
|
450
|
+
} | {
|
|
451
|
+
ok: false;
|
|
452
|
+
code: string;
|
|
453
|
+
message: string;
|
|
454
|
+
};
|
|
455
|
+
/** Compile a validated `RigCustomBodySpec` into a full `RigBodySpec` runnable by `createRigState` / `renderRigPose`. */
|
|
456
|
+
declare function compileCustomBodySpec(spec: RigCustomBodySpec): RigBodySpec;
|
|
457
|
+
/** Strictly validate a declarative procedural decor prop (`RigDecorPropSpec`) for Data Packs or Sandboxed Mods. */
|
|
458
|
+
declare function validateRigDecorProp(raw: unknown): {
|
|
459
|
+
ok: true;
|
|
460
|
+
prop: RigDecorPropSpec;
|
|
461
|
+
} | {
|
|
462
|
+
ok: false;
|
|
463
|
+
code: string;
|
|
464
|
+
message: string;
|
|
465
|
+
};
|
|
466
|
+
declare const BUILTIN_ANIM_FRAMES: Readonly<Record<string, {
|
|
467
|
+
readonly frames: number;
|
|
468
|
+
readonly dirs: number;
|
|
469
|
+
}>>;
|
|
470
|
+
/** Evaluate any built-in Deck animation at `(bodyOrKey, anim, frame, dir16)` to get exact 3D bone transforms & sockets. */
|
|
471
|
+
declare function evaluateBuiltinPose(bodyOrKey: RigBodyKey | RigBodySpec, anim: string, frame?: number, dir16?: number): RigPoseState;
|
|
472
|
+
type Rgb = readonly [number, number, number];
|
|
473
|
+
type Ramp4 = readonly [Rgb, Rgb, Rgb, Rgb];
|
|
474
|
+
interface RigLookColors {
|
|
475
|
+
readonly fur: {
|
|
476
|
+
readonly fur: Rgb;
|
|
477
|
+
readonly shade: Rgb;
|
|
478
|
+
};
|
|
479
|
+
readonly belly: Rgb;
|
|
480
|
+
readonly scarf?: Rgb | null;
|
|
481
|
+
}
|
|
482
|
+
declare function parseHexRgb(hex: string): Rgb;
|
|
483
|
+
/** Auto-derive a Deck-style 4-shade pixel ramp `[light, base, shade, outline]` from any base `#rrggbb` color. */
|
|
484
|
+
declare function derivePixelRamp(hex: string): Ramp4;
|
|
485
|
+
interface RenderedRigCell {
|
|
486
|
+
readonly width: number;
|
|
487
|
+
readonly height: number;
|
|
488
|
+
readonly rgba: Uint8ClampedArray;
|
|
489
|
+
}
|
|
490
|
+
interface CompiledRigStrip {
|
|
491
|
+
readonly width: number;
|
|
492
|
+
readonly height: number;
|
|
493
|
+
readonly frames: number;
|
|
494
|
+
readonly cellSize: number;
|
|
495
|
+
readonly rgba: Uint8ClampedArray;
|
|
496
|
+
}
|
|
497
|
+
declare const DEFAULT_RIG_COLORS: RigLookColors;
|
|
498
|
+
/** Render any posed `RigPoseState` (+ look colors & optional 3D cosmetics) to a crisp 32x32 RGBA pixel cell. */
|
|
499
|
+
declare function renderRigPose(state: RigPoseState, opts?: {
|
|
500
|
+
colors?: RigLookColors;
|
|
501
|
+
cosmetics?: readonly RigCosmeticSpec[];
|
|
502
|
+
cellSize?: number;
|
|
503
|
+
ss?: number;
|
|
504
|
+
}): RenderedRigCell;
|
|
505
|
+
/** Lazily compile an entire declarative `RigClip` into a horizontal 32x32 RGBA sprite strip for `(body, look, dir16)`. */
|
|
506
|
+
declare function renderRigClipStrip(bodyOrKey: RigBodyKey | RigBodySpec, clip: RigClip, dir16?: number, opts?: {
|
|
507
|
+
colors?: RigLookColors;
|
|
508
|
+
cosmetics?: readonly RigCosmeticSpec[];
|
|
509
|
+
cellSize?: number;
|
|
510
|
+
ss?: number;
|
|
511
|
+
}): CompiledRigStrip;
|
|
512
|
+
/** Lazily compile all frames of a built-in animation (`idle`, `walk`, `run`, `swim`, `sit`, ...) for a custom body at `dir16`. */
|
|
513
|
+
declare function renderBodyAnimStrip(bodyOrKey: RigBodyKey | RigBodySpec, anim: string, dir16?: number, opts?: {
|
|
514
|
+
colors?: RigLookColors;
|
|
515
|
+
cosmetics?: readonly RigCosmeticSpec[];
|
|
516
|
+
cellSize?: number;
|
|
517
|
+
ss?: number;
|
|
518
|
+
}): CompiledRigStrip;
|
|
519
|
+
/** Render a standalone declarative cosmetic (either 3D primitives or 2D pixel grid) centered at `(size/2, size/2)`. */
|
|
520
|
+
declare function renderCosmeticSprite(cosmetic: RigCosmeticSpec, dir16?: number, opts?: {
|
|
521
|
+
size?: number;
|
|
522
|
+
ss?: number;
|
|
523
|
+
}): RenderedRigCell;
|
|
524
|
+
/** Alpha-composite a cosmetic sprite onto a target RGBA buffer at socket pixel `(cx, cy)` (rounded, nearest-neighbor). */
|
|
525
|
+
declare function compositeSpriteRgba(dst: Uint8ClampedArray, dstW: number, dstH: number, src: RenderedRigCell, cx: number, cy: number, behind?: boolean): void;
|
|
526
|
+
/** Render one directional frame (`dir4 ∈ 0..3`) of a declarative `RigDecorPropSpec` (3D primitives or 2D pixel grid). */
|
|
527
|
+
declare function renderDecorPropSprite(spec: RigDecorPropSpec, dir4?: number, opts?: {
|
|
528
|
+
ss?: number;
|
|
529
|
+
}): RenderedRigCell;
|
|
530
|
+
/** Compile a 1-dir or 4-dir declarative `RigDecorPropSpec` into a horizontal `(frameW * dirs) × frameH` RGBA spritesheet. */
|
|
531
|
+
declare function renderDecorPropSheet(spec: RigDecorPropSpec, opts?: {
|
|
532
|
+
ss?: number;
|
|
533
|
+
}): {
|
|
534
|
+
readonly width: number;
|
|
535
|
+
readonly height: number;
|
|
536
|
+
readonly frameW: number;
|
|
537
|
+
readonly frameH: number;
|
|
538
|
+
readonly dirs: 1 | 4;
|
|
539
|
+
readonly rgba: Uint8ClampedArray;
|
|
540
|
+
};
|
|
541
|
+
/** Helper for debugging/verification: evaluate rest pose of a built-in or custom body at dir16. */
|
|
542
|
+
declare function renderBodyRestPreview(bodyOrKey: RigBodyKey | RigBodySpec, dir16?: number, colors?: RigLookColors): RenderedRigCell;
|
|
543
|
+
interface DirectionalSheetRowSpec {
|
|
544
|
+
/** Clip name (`'idle'`, `'walk'`, `'run'`, etc.) or a custom declarative `RigClip`. */
|
|
545
|
+
readonly clip: string | RigClip;
|
|
546
|
+
/** Row identifier in output metadata (defaults to clip string or `clip.id`). */
|
|
547
|
+
readonly name?: string;
|
|
548
|
+
}
|
|
549
|
+
interface BakeCharacterSheetOptions {
|
|
550
|
+
readonly cellSize?: number;
|
|
551
|
+
readonly ss?: number;
|
|
552
|
+
/** Directions to bake: `4` = `[S(0), E(4), N(8), W(12)]`, `8` = `0,2,4,6,8,10,12,14`. Default `4`. */
|
|
553
|
+
readonly dirs?: 4 | 8;
|
|
554
|
+
readonly rows?: readonly DirectionalSheetRowSpec[];
|
|
555
|
+
readonly colors?: RigLookColors;
|
|
556
|
+
readonly cosmetics?: readonly RigCosmeticSpec[];
|
|
557
|
+
readonly bakeNormals?: boolean;
|
|
558
|
+
}
|
|
559
|
+
interface CharacterFrameMeta {
|
|
560
|
+
readonly key: string;
|
|
561
|
+
readonly clip: string;
|
|
562
|
+
readonly dirIndex: number;
|
|
563
|
+
readonly dir16: number;
|
|
564
|
+
readonly frame: number;
|
|
565
|
+
readonly x: number;
|
|
566
|
+
readonly y: number;
|
|
567
|
+
readonly w: number;
|
|
568
|
+
readonly h: number;
|
|
569
|
+
readonly sockets: Readonly<Record<RigSocketName, ProjectedSocket2D>>;
|
|
570
|
+
}
|
|
571
|
+
interface BakedCharacterSheet {
|
|
572
|
+
readonly width: number;
|
|
573
|
+
readonly height: number;
|
|
574
|
+
readonly cellSize: number;
|
|
575
|
+
readonly columns: number;
|
|
576
|
+
readonly rowCount: number;
|
|
577
|
+
readonly rgba: Uint8ClampedArray;
|
|
578
|
+
readonly normalRgba?: Uint8ClampedArray;
|
|
579
|
+
readonly frames: readonly CharacterFrameMeta[];
|
|
580
|
+
}
|
|
581
|
+
/**
|
|
582
|
+
* Bake a complete multi-direction (`4-dir` S/E/N/W or `8-dir`) × multi-animation pixel-art character spritesheet
|
|
583
|
+
* with per-frame projected 2D socket coordinates (`handR`, `handL`, `headTop`, `back`, ...) and optional Sobel normal map.
|
|
584
|
+
*/
|
|
585
|
+
declare function bakeDirectionalCharacterSheet(bodyOrCustom: RigBodyKey | RigBodySpec | RigCustomBodySpec, opts?: BakeCharacterSheetOptions): BakedCharacterSheet;
|
|
586
|
+
declare const GRAVEYARD_PRESETS: {
|
|
587
|
+
readonly keeperBody: RigCustomBodySpec;
|
|
588
|
+
readonly zombieBody: RigCustomBodySpec;
|
|
589
|
+
readonly cosmetics: {
|
|
590
|
+
readonly ironAxe: RigCosmeticSpec;
|
|
591
|
+
readonly blazingTorch: RigCosmeticSpec;
|
|
592
|
+
};
|
|
593
|
+
readonly clips: {
|
|
594
|
+
readonly chop: RigClip;
|
|
595
|
+
readonly shamble: RigClip;
|
|
596
|
+
};
|
|
597
|
+
readonly props: {
|
|
598
|
+
readonly tombstone: RigDecorPropSpec;
|
|
599
|
+
readonly woodenChest: RigDecorPropSpec;
|
|
600
|
+
readonly stoneFurnace: RigDecorPropSpec;
|
|
601
|
+
readonly arrowTower: RigDecorPropSpec;
|
|
602
|
+
readonly ancientPine: RigDecorPropSpec;
|
|
603
|
+
};
|
|
604
|
+
};
|
|
605
|
+
export { RigBoneName as $, RigDecorGroup as A, RigBodyAttachBone as At, RIG_BONE_NAMES as B, RigClip as Bt, BUILTIN_ANIM_FRAMES as C, reachArm as Ct, RigBodyCategory as D, RIG_BODY_EYE_STYLES as Dt, RIG_DECOR_GROUPS as E, RIG_BODY_ATTACH_BONES as Et, Mat4 as F, RigBodySpec as Ft, RIG_COS_E as G, RigPrimitiveSpec as Gt, RIG_CAMERA_GROUND_Y as H, RigKeyframe as Ht, MutVec3 as I, RigBodyTailStyle as It, RIG_EYE_MODES as J, rigClipFrameCount as Jt, RIG_DUO_VIEW as K, RigPropInstance as Kt, ProjectedPoint2D as L, rigBodyKeyFromIndex as Lt, compileCustomBodySpec as M, RigBodyCustomColors as Mt, validateRigCustomBody as N, RigBodyEyeStyle as Nt, RigCustomBodyDefaultColors as O, RIG_BODY_KEYS as Ot, validateRigDecorProp as P, RigBodyKey as Pt, RIG_SOCKET_NAMES as Q, validateRigPrimitiveList as Qt, ProjectedSocket2D as R, RIG_PRIMITIVE_SHAPES as Rt, parseHexRgb as S, quatMul as St, RIG_BODY_CATEGORIES as T, RIG_BODIES as Tt, RIG_CELL_SIZE as U, RigPixelSpriteSpec as Ut, RIG_CAMERA_ELEV_DEG as V, RigCosmeticSpec as Vt, RIG_COSMETIC_SLOTS as W, RigPrimitiveShape as Wt, RIG_MODEL_SCALE as X, validateRigCosmetic as Xt, RIG_LIMITS as Y, validateRigClip as Yt, RIG_SIN_E as Z, validateRigPixelSprite as Zt, renderRigPose as _, projectWorldPoint2D as _t, GRAVEYARD_PRESETS as a, RigSocketName as at, RigLookColors as b, quatFromUnitVectors as bt, DEFAULT_RIG_COLORS as c, createRigState as ct, renderBodyAnimStrip as d, mat4Invert as dt, RigBoneTransform as et, renderBodyRestPreview as f, mat4Mul as ft, renderRigClipStrip as g, projectSocket2D as gt, renderDecorPropSprite as h, projectAllSockets2D as ht, DirectionalSheetRowSpec as i, RigPoseState as it, RigDecorPropSpec as j, RigBodyAttachment as jt, RigCustomBodySpec as k, RIG_BODY_TAIL_STYLES as kt, RenderedRigCell as l, getBodySockets as lt, renderDecorPropSheet as m, mat4TransformPoint as mt, BakedCharacterSheet as n, RigEaseMode as nt, bakeDirectionalCharacterSheet as o, SocketDefinition as ot, renderCosmeticSprite as p, mat4TransformDir as pt, RIG_EASE_MODES as q, evaluateRigClip as qt, CharacterFrameMeta as r, RigEyeMode as rt, CompiledRigStrip as s, Vec3 as st, BakeCharacterSheetOptions as t, RigCosmeticSlot as tt, compositeSpriteRgba as u, mat4Compose as ut, Ramp4 as v, quatFromAxisAngle as vt, evaluateBuiltinPose as w, updateRigMatrices as wt, derivePixelRamp as x, quatIdentity as xt, Rgb as y, quatFromEuler as yt, Quat as z, RigBonePoseOverride as zt };
|
package/dist/rig3d.d.ts
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { $ as RigBoneName, A as RigDecorGroup, At as RigBodyAttachBone, B as RIG_BONE_NAMES, Bt as RigClip, C as BUILTIN_ANIM_FRAMES, Ct as reachArm, D as RigBodyCategory, Dt as RIG_BODY_EYE_STYLES, E as RIG_DECOR_GROUPS, Et as RIG_BODY_ATTACH_BONES, F as Mat4, Ft as RigBodySpec, G as RIG_COS_E, Gt as RigPrimitiveSpec, H as RIG_CAMERA_GROUND_Y, Ht as RigKeyframe, I as MutVec3, It as RigBodyTailStyle, J as RIG_EYE_MODES, Jt as rigClipFrameCount, K as RIG_DUO_VIEW, Kt as RigPropInstance, L as ProjectedPoint2D, Lt as rigBodyKeyFromIndex, M as compileCustomBodySpec, Mt as RigBodyCustomColors, N as validateRigCustomBody, Nt as RigBodyEyeStyle, O as RigCustomBodyDefaultColors, Ot as RIG_BODY_KEYS, P as validateRigDecorProp, Pt as RigBodyKey, Q as RIG_SOCKET_NAMES, Qt as validateRigPrimitiveList, R as ProjectedSocket2D, Rt as RIG_PRIMITIVE_SHAPES, S as parseHexRgb, St as quatMul, T as RIG_BODY_CATEGORIES, Tt as RIG_BODIES, U as RIG_CELL_SIZE, Ut as RigPixelSpriteSpec, V as RIG_CAMERA_ELEV_DEG, Vt as RigCosmeticSpec, W as RIG_COSMETIC_SLOTS, Wt as RigPrimitiveShape, X as RIG_MODEL_SCALE, Xt as validateRigCosmetic, Y as RIG_LIMITS, Yt as validateRigClip, Z as RIG_SIN_E, Zt as validateRigPixelSprite, _ as renderRigPose, _t as projectWorldPoint2D, a as GRAVEYARD_PRESETS, at as RigSocketName, b as RigLookColors, bt as quatFromUnitVectors, c as DEFAULT_RIG_COLORS, ct as createRigState, d as renderBodyAnimStrip, dt as mat4Invert, et as RigBoneTransform, f as renderBodyRestPreview, ft as mat4Mul, g as renderRigClipStrip, gt as projectSocket2D, h as renderDecorPropSprite, ht as projectAllSockets2D, i as DirectionalSheetRowSpec, it as RigPoseState, j as RigDecorPropSpec, jt as RigBodyAttachment, k as RigCustomBodySpec, kt as RIG_BODY_TAIL_STYLES, l as RenderedRigCell, lt as getBodySockets, m as renderDecorPropSheet, mt as mat4TransformPoint, n as BakedCharacterSheet, nt as RigEaseMode, o as bakeDirectionalCharacterSheet, ot as SocketDefinition, p as renderCosmeticSprite, pt as mat4TransformDir, q as RIG_EASE_MODES, qt as evaluateRigClip, r as CharacterFrameMeta, rt as RigEyeMode, s as CompiledRigStrip, st as Vec3, t as BakeCharacterSheetOptions, tt as RigCosmeticSlot, u as compositeSpriteRgba, ut as mat4Compose, v as Ramp4, vt as quatFromAxisAngle, w as evaluateBuiltinPose, wt as updateRigMatrices, x as derivePixelRamp, xt as quatIdentity, y as Rgb, yt as quatFromEuler, z as Quat, zt as RigBonePoseOverride } from "./rig3d-DhTgbTbX.js";
|
|
2
|
+
export { BUILTIN_ANIM_FRAMES, BakeCharacterSheetOptions, BakedCharacterSheet, CharacterFrameMeta, CompiledRigStrip, DEFAULT_RIG_COLORS, DirectionalSheetRowSpec, GRAVEYARD_PRESETS, type Mat4, type MutVec3, type ProjectedPoint2D, type ProjectedSocket2D, type Quat, RIG_BODIES, RIG_BODY_ATTACH_BONES, RIG_BODY_CATEGORIES, RIG_BODY_EYE_STYLES, RIG_BODY_KEYS, RIG_BODY_TAIL_STYLES, RIG_BONE_NAMES, RIG_CAMERA_ELEV_DEG, RIG_CAMERA_GROUND_Y, RIG_CELL_SIZE, RIG_COSMETIC_SLOTS, RIG_COS_E, RIG_DECOR_GROUPS, RIG_DUO_VIEW, RIG_EASE_MODES, RIG_EYE_MODES, RIG_LIMITS, RIG_MODEL_SCALE, RIG_PRIMITIVE_SHAPES, RIG_SIN_E, RIG_SOCKET_NAMES, type Ramp4, RenderedRigCell, type Rgb, type RigBodyAttachBone, type RigBodyAttachment, type RigBodyCategory, type RigBodyCustomColors, type RigBodyEyeStyle, type RigBodyKey, type RigBodySpec, type RigBodyTailStyle, type RigBoneName, type RigBonePoseOverride, type RigBoneTransform, type RigClip, type RigCosmeticSlot, type RigCosmeticSpec, type RigCustomBodyDefaultColors, type RigCustomBodySpec, type RigDecorGroup, type RigDecorPropSpec, type RigEaseMode, type RigEyeMode, type RigKeyframe, type RigLookColors, type RigPixelSpriteSpec, type RigPoseState, type RigPrimitiveShape, type RigPrimitiveSpec, type RigPropInstance, type RigSocketName, type SocketDefinition, type Vec3, bakeDirectionalCharacterSheet, compileCustomBodySpec, compositeSpriteRgba, createRigState, derivePixelRamp, evaluateBuiltinPose, evaluateRigClip, getBodySockets, mat4Compose, mat4Invert, mat4Mul, mat4TransformDir, mat4TransformPoint, parseHexRgb, projectAllSockets2D, projectSocket2D, projectWorldPoint2D, quatFromAxisAngle, quatFromEuler, quatFromUnitVectors, quatIdentity, quatMul, reachArm, renderBodyAnimStrip, renderBodyRestPreview, renderCosmeticSprite, renderDecorPropSheet, renderDecorPropSprite, renderRigClipStrip, renderRigPose, rigBodyKeyFromIndex, rigClipFrameCount, updateRigMatrices, validateRigClip, validateRigCosmetic, validateRigCustomBody, validateRigDecorProp, validateRigPixelSprite, validateRigPrimitiveList };
|
package/dist/rig3d.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { h as BUILTIN_ANIM_FRAMES, i as DEFAULT_RIG_COLORS, t as GRAVEYARD_PRESETS, at as RIG_BODIES, ot as RIG_BODY_ATTACH_BONES, _ as RIG_BODY_CATEGORIES, st as RIG_BODY_EYE_STYLES, ct as RIG_BODY_KEYS, lt as RIG_BODY_TAIL_STYLES, k as RIG_BONE_NAMES, A as RIG_CAMERA_ELEV_DEG, j as RIG_CAMERA_GROUND_Y, M as RIG_CELL_SIZE, N as RIG_COSMETIC_SLOTS, P as RIG_COS_E, v as RIG_DECOR_GROUPS, F as RIG_DUO_VIEW, I as RIG_EASE_MODES, L as RIG_EYE_MODES, R as RIG_LIMITS, z as RIG_MODEL_SCALE, S as RIG_PRIMITIVE_SHAPES, B as RIG_SIN_E, V as RIG_SOCKET_NAMES, n as bakeDirectionalCharacterSheet, y as compileCustomBodySpec, a as compositeSpriteRgba, H as createRigState, p as derivePixelRamp, g as evaluateBuiltinPose, C as evaluateRigClip, U as getBodySockets, W as mat4Compose, G as mat4Invert, K as mat4Mul, q as mat4TransformDir, J as mat4TransformPoint, m as parseHexRgb, Y as projectAllSockets2D, X as projectSocket2D, Z as projectWorldPoint2D, Q as quatFromAxisAngle, $ as quatFromEuler, et as quatFromUnitVectors, tt as quatIdentity, nt as quatMul, rt as reachArm, o as renderBodyAnimStrip, s as renderBodyRestPreview, c as renderCosmeticSprite, l as renderDecorPropSheet, u as renderDecorPropSprite, d as renderRigClipStrip, f as renderRigPose, ut as rigBodyKeyFromIndex, w as rigClipFrameCount, it as updateRigMatrices, T as validateRigClip, E as validateRigCosmetic, b as validateRigCustomBody, x as validateRigDecorProp, D as validateRigPixelSprite, O as validateRigPrimitiveList } from "./rig3d-C3i7UL88.js";
|
|
2
|
+
import "./tilemap-BFH4_JLe.js";
|