@algorisys/tinyfly 0.102.0 → 0.104.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.
@@ -60,7 +60,10 @@ export interface Capabilities {
60
60
  };
61
61
  character: {
62
62
  poses: string[];
63
+ dances: string[];
63
64
  expressions: string[];
65
+ /** `face.style`, independent of the pen's `look`. */
66
+ faceStyles: string[];
64
67
  gags: string[];
65
68
  /** `build` option */
66
69
  builds: string[];
@@ -13,14 +13,548 @@ import type { CharacterOptions } from './character';
13
13
  export interface CastMember {
14
14
  /** What to call them in a picker */
15
15
  label: string;
16
- /** `family` (ages and looks) or `work` (dressed for a job, from the occupations sheet) */
17
- group: 'family' | 'work';
16
+ /** A family, occupation, or colour anime preset. */
17
+ group: 'family' | 'work' | 'anime';
18
18
  /** Height next to an adult (1) */
19
19
  scale: number;
20
20
  /** Everything else about them */
21
21
  options: Omit<CharacterOptions, 'height'>;
22
22
  }
23
+ /** Colour anime starting points, using the same human rig, face fields, clothes and head turns as the original cast. */
24
+ export declare const ANIME_CAST: {
25
+ animeBoy: {
26
+ label: string;
27
+ group: "anime";
28
+ scale: number;
29
+ options: {
30
+ figure: "fluid";
31
+ look: "clean";
32
+ proportions: "thin";
33
+ build: "child";
34
+ headSize: number;
35
+ skin: string;
36
+ ink: string;
37
+ ears: true;
38
+ hands: "cartoon";
39
+ handStyle: "natural";
40
+ hair: {
41
+ style: "spiky";
42
+ color: string;
43
+ };
44
+ face: {
45
+ style: "anime";
46
+ iris: string;
47
+ lashes: false;
48
+ };
49
+ outfit: {
50
+ shirt: string;
51
+ trousers: string;
52
+ bottom: "shorts";
53
+ shoes: "boots";
54
+ };
55
+ };
56
+ };
57
+ animeGirl: {
58
+ label: string;
59
+ group: "anime";
60
+ scale: number;
61
+ options: {
62
+ figure: "fluid";
63
+ look: "clean";
64
+ proportions: "thin";
65
+ build: "child";
66
+ headSize: number;
67
+ skin: string;
68
+ ink: string;
69
+ ears: true;
70
+ hands: "cartoon";
71
+ handStyle: "natural";
72
+ hair: {
73
+ style: "bob";
74
+ color: string;
75
+ };
76
+ face: {
77
+ style: "anime";
78
+ iris: string;
79
+ };
80
+ outfit: {
81
+ shirt: string;
82
+ trousers: string;
83
+ bottom: "shorts";
84
+ shoes: "boots";
85
+ };
86
+ };
87
+ };
88
+ animeYoungMan: {
89
+ label: string;
90
+ group: "anime";
91
+ scale: number;
92
+ options: {
93
+ figure: "fluid";
94
+ look: "clean";
95
+ proportions: "thin";
96
+ build: "tall";
97
+ headSize: number;
98
+ skin: string;
99
+ ink: string;
100
+ ears: true;
101
+ hands: "cartoon";
102
+ handStyle: "natural";
103
+ hair: {
104
+ style: "spiky";
105
+ color: string;
106
+ };
107
+ face: {
108
+ style: "anime";
109
+ iris: string;
110
+ lashes: false;
111
+ };
112
+ outfit: {
113
+ shirt: string;
114
+ trousers: string;
115
+ sleeves: "long";
116
+ over: "hoodie";
117
+ overColor: string;
118
+ shoes: "boots";
119
+ };
120
+ };
121
+ };
122
+ animeYoungWoman: {
123
+ label: string;
124
+ group: "anime";
125
+ scale: number;
126
+ options: {
127
+ figure: "fluid";
128
+ look: "clean";
129
+ proportions: "thin";
130
+ build: "slim";
131
+ headSize: number;
132
+ skin: string;
133
+ ink: string;
134
+ ears: true;
135
+ hands: "cartoon";
136
+ handStyle: "natural";
137
+ hair: {
138
+ style: "highPonytail";
139
+ color: string;
140
+ };
141
+ face: {
142
+ style: "anime";
143
+ iris: string;
144
+ };
145
+ outfit: {
146
+ shirt: string;
147
+ trousers: string;
148
+ sleeves: "long";
149
+ shoes: "boots";
150
+ };
151
+ };
152
+ };
153
+ animeMan: {
154
+ label: string;
155
+ group: "anime";
156
+ scale: number;
157
+ options: {
158
+ figure: "fluid";
159
+ look: "clean";
160
+ proportions: "thin";
161
+ build: "broad";
162
+ headSize: number;
163
+ skin: string;
164
+ ink: string;
165
+ ears: true;
166
+ hands: "cartoon";
167
+ handStyle: "natural";
168
+ hair: {
169
+ style: "sidePart";
170
+ color: string;
171
+ };
172
+ face: {
173
+ style: "anime";
174
+ iris: string;
175
+ lashes: false;
176
+ };
177
+ outfit: {
178
+ shirt: string;
179
+ trousers: string;
180
+ sleeves: "long";
181
+ collar: true;
182
+ shoes: "boots";
183
+ };
184
+ };
185
+ };
186
+ animeWoman: {
187
+ label: string;
188
+ group: "anime";
189
+ scale: number;
190
+ options: {
191
+ figure: "fluid";
192
+ look: "clean";
193
+ proportions: "thin";
194
+ build: "standard";
195
+ headSize: number;
196
+ skin: string;
197
+ ink: string;
198
+ ears: true;
199
+ hands: "cartoon";
200
+ handStyle: "natural";
201
+ hair: {
202
+ style: "shoulderWaves";
203
+ color: string;
204
+ };
205
+ face: {
206
+ style: "anime";
207
+ iris: string;
208
+ };
209
+ outfit: {
210
+ shirt: string;
211
+ trousers: string;
212
+ sleeves: "long";
213
+ bottom: "skirt";
214
+ shoes: "boots";
215
+ };
216
+ };
217
+ };
218
+ animeOlderMan: {
219
+ label: string;
220
+ group: "anime";
221
+ scale: number;
222
+ options: {
223
+ figure: "fluid";
224
+ look: "clean";
225
+ proportions: "thin";
226
+ build: "stocky";
227
+ headSize: number;
228
+ skin: string;
229
+ ink: string;
230
+ ears: true;
231
+ hands: "cartoon";
232
+ handStyle: "natural";
233
+ hair: {
234
+ style: "receding";
235
+ color: string;
236
+ };
237
+ facialHair: {
238
+ style: "shortBoxed";
239
+ color: string;
240
+ };
241
+ face: {
242
+ style: "anime";
243
+ iris: string;
244
+ lashes: false;
245
+ ageLines: number;
246
+ };
247
+ outfit: {
248
+ shirt: string;
249
+ trousers: string;
250
+ sleeves: "long";
251
+ collar: true;
252
+ shoes: "boots";
253
+ };
254
+ };
255
+ };
256
+ animeOlderWoman: {
257
+ label: string;
258
+ group: "anime";
259
+ scale: number;
260
+ options: {
261
+ figure: "fluid";
262
+ look: "clean";
263
+ proportions: "thin";
264
+ build: "standard";
265
+ headSize: number;
266
+ skin: string;
267
+ ink: string;
268
+ ears: true;
269
+ hands: "cartoon";
270
+ handStyle: "natural";
271
+ hair: {
272
+ style: "topBun";
273
+ color: string;
274
+ };
275
+ face: {
276
+ style: "anime";
277
+ iris: string;
278
+ ageLines: number;
279
+ };
280
+ outfit: {
281
+ shirt: string;
282
+ trousers: string;
283
+ sleeves: "long";
284
+ over: "cardigan";
285
+ overColor: string;
286
+ shoes: "boots";
287
+ };
288
+ };
289
+ };
290
+ };
291
+ export type AnimeCastName = keyof typeof ANIME_CAST;
23
292
  export declare const CHARACTER_CAST: {
293
+ animeBoy: {
294
+ label: string;
295
+ group: "anime";
296
+ scale: number;
297
+ options: {
298
+ figure: "fluid";
299
+ look: "clean";
300
+ proportions: "thin";
301
+ build: "child";
302
+ headSize: number;
303
+ skin: string;
304
+ ink: string;
305
+ ears: true;
306
+ hands: "cartoon";
307
+ handStyle: "natural";
308
+ hair: {
309
+ style: "spiky";
310
+ color: string;
311
+ };
312
+ face: {
313
+ style: "anime";
314
+ iris: string;
315
+ lashes: false;
316
+ };
317
+ outfit: {
318
+ shirt: string;
319
+ trousers: string;
320
+ bottom: "shorts";
321
+ shoes: "boots";
322
+ };
323
+ };
324
+ };
325
+ animeGirl: {
326
+ label: string;
327
+ group: "anime";
328
+ scale: number;
329
+ options: {
330
+ figure: "fluid";
331
+ look: "clean";
332
+ proportions: "thin";
333
+ build: "child";
334
+ headSize: number;
335
+ skin: string;
336
+ ink: string;
337
+ ears: true;
338
+ hands: "cartoon";
339
+ handStyle: "natural";
340
+ hair: {
341
+ style: "bob";
342
+ color: string;
343
+ };
344
+ face: {
345
+ style: "anime";
346
+ iris: string;
347
+ };
348
+ outfit: {
349
+ shirt: string;
350
+ trousers: string;
351
+ bottom: "shorts";
352
+ shoes: "boots";
353
+ };
354
+ };
355
+ };
356
+ animeYoungMan: {
357
+ label: string;
358
+ group: "anime";
359
+ scale: number;
360
+ options: {
361
+ figure: "fluid";
362
+ look: "clean";
363
+ proportions: "thin";
364
+ build: "tall";
365
+ headSize: number;
366
+ skin: string;
367
+ ink: string;
368
+ ears: true;
369
+ hands: "cartoon";
370
+ handStyle: "natural";
371
+ hair: {
372
+ style: "spiky";
373
+ color: string;
374
+ };
375
+ face: {
376
+ style: "anime";
377
+ iris: string;
378
+ lashes: false;
379
+ };
380
+ outfit: {
381
+ shirt: string;
382
+ trousers: string;
383
+ sleeves: "long";
384
+ over: "hoodie";
385
+ overColor: string;
386
+ shoes: "boots";
387
+ };
388
+ };
389
+ };
390
+ animeYoungWoman: {
391
+ label: string;
392
+ group: "anime";
393
+ scale: number;
394
+ options: {
395
+ figure: "fluid";
396
+ look: "clean";
397
+ proportions: "thin";
398
+ build: "slim";
399
+ headSize: number;
400
+ skin: string;
401
+ ink: string;
402
+ ears: true;
403
+ hands: "cartoon";
404
+ handStyle: "natural";
405
+ hair: {
406
+ style: "highPonytail";
407
+ color: string;
408
+ };
409
+ face: {
410
+ style: "anime";
411
+ iris: string;
412
+ };
413
+ outfit: {
414
+ shirt: string;
415
+ trousers: string;
416
+ sleeves: "long";
417
+ shoes: "boots";
418
+ };
419
+ };
420
+ };
421
+ animeMan: {
422
+ label: string;
423
+ group: "anime";
424
+ scale: number;
425
+ options: {
426
+ figure: "fluid";
427
+ look: "clean";
428
+ proportions: "thin";
429
+ build: "broad";
430
+ headSize: number;
431
+ skin: string;
432
+ ink: string;
433
+ ears: true;
434
+ hands: "cartoon";
435
+ handStyle: "natural";
436
+ hair: {
437
+ style: "sidePart";
438
+ color: string;
439
+ };
440
+ face: {
441
+ style: "anime";
442
+ iris: string;
443
+ lashes: false;
444
+ };
445
+ outfit: {
446
+ shirt: string;
447
+ trousers: string;
448
+ sleeves: "long";
449
+ collar: true;
450
+ shoes: "boots";
451
+ };
452
+ };
453
+ };
454
+ animeWoman: {
455
+ label: string;
456
+ group: "anime";
457
+ scale: number;
458
+ options: {
459
+ figure: "fluid";
460
+ look: "clean";
461
+ proportions: "thin";
462
+ build: "standard";
463
+ headSize: number;
464
+ skin: string;
465
+ ink: string;
466
+ ears: true;
467
+ hands: "cartoon";
468
+ handStyle: "natural";
469
+ hair: {
470
+ style: "shoulderWaves";
471
+ color: string;
472
+ };
473
+ face: {
474
+ style: "anime";
475
+ iris: string;
476
+ };
477
+ outfit: {
478
+ shirt: string;
479
+ trousers: string;
480
+ sleeves: "long";
481
+ bottom: "skirt";
482
+ shoes: "boots";
483
+ };
484
+ };
485
+ };
486
+ animeOlderMan: {
487
+ label: string;
488
+ group: "anime";
489
+ scale: number;
490
+ options: {
491
+ figure: "fluid";
492
+ look: "clean";
493
+ proportions: "thin";
494
+ build: "stocky";
495
+ headSize: number;
496
+ skin: string;
497
+ ink: string;
498
+ ears: true;
499
+ hands: "cartoon";
500
+ handStyle: "natural";
501
+ hair: {
502
+ style: "receding";
503
+ color: string;
504
+ };
505
+ facialHair: {
506
+ style: "shortBoxed";
507
+ color: string;
508
+ };
509
+ face: {
510
+ style: "anime";
511
+ iris: string;
512
+ lashes: false;
513
+ ageLines: number;
514
+ };
515
+ outfit: {
516
+ shirt: string;
517
+ trousers: string;
518
+ sleeves: "long";
519
+ collar: true;
520
+ shoes: "boots";
521
+ };
522
+ };
523
+ };
524
+ animeOlderWoman: {
525
+ label: string;
526
+ group: "anime";
527
+ scale: number;
528
+ options: {
529
+ figure: "fluid";
530
+ look: "clean";
531
+ proportions: "thin";
532
+ build: "standard";
533
+ headSize: number;
534
+ skin: string;
535
+ ink: string;
536
+ ears: true;
537
+ hands: "cartoon";
538
+ handStyle: "natural";
539
+ hair: {
540
+ style: "topBun";
541
+ color: string;
542
+ };
543
+ face: {
544
+ style: "anime";
545
+ iris: string;
546
+ ageLines: number;
547
+ };
548
+ outfit: {
549
+ shirt: string;
550
+ trousers: string;
551
+ sleeves: "long";
552
+ over: "cardigan";
553
+ overColor: string;
554
+ shoes: "boots";
555
+ };
556
+ };
557
+ };
24
558
  boy: {
25
559
  label: string;
26
560
  group: "family";
@@ -4,11 +4,13 @@ import { GAITS } from './gaits';
4
4
  import { type HumanPoseName } from './species/human';
5
5
  import { type HumanGagName } from './species/human-motion';
6
6
  import { type GroundPoint } from './ground-path';
7
+ import { type HumanDanceName } from './human-dance';
7
8
  /**
8
9
  * Characters in world metres, for 3D scenes: a v2 character walks to a point
9
10
  * or along a path through points, turning to face the way first, its gait's
10
11
  * phase keyed with the distance so its feet stay planted; it faces things,
11
- * strikes poses and plays gags. It writes the scene object's tracks: `x`,
12
+ * spins full signed turns, dances native routines, strikes poses and plays
13
+ * gags. It writes the scene object's tracks: `x`,
12
14
  * `z`, `rotateY`, its walk (`walk`, `walking`, `gait`, which the character
13
15
  * object turns into the stepping pose as it draws) and pose fields.
14
16
  *
@@ -23,11 +25,19 @@ import { type GroundPoint } from './ground-path';
23
25
  * ```
24
26
  */
25
27
  export interface CharacterBeat3D {
26
- /** A gait to move in (`walk`, `run`, `sneak`, `strut`, `tired`, `bouncy`, `doubleBounce`, `shove`), `face`, `hold`, `pose`, `gag`, or `place` (put it at `to` at once, facing `toward`: where a ride left it) */
28
+ /** A gait, `face` (shortest turn), `spin` (signed/fractional turns), `dance`, `hold`, `pose`, `gag`, `place`, `say`, or `look`. */
27
29
  do: string;
30
+ /** `spin`: signed revolutions, default 1. Positive turns toward +x. */
31
+ turns?: number;
32
+ /** `dance`: a native human routine. */
33
+ dance?: HumanDanceName;
34
+ /** `dance`: tempo, beats per minute (default the style's tempo). */
35
+ bpm?: number;
36
+ /** `dance`: length in beats; defaults to one routine, or for * bpm / 60000 when for is given. With both, beats are fitted into for ms. */
37
+ beats?: number;
28
38
  /** When it starts, ms (default: when the beat before ends) */
29
39
  at?: number;
30
- /** How long it takes, ms (a move: default the distance at the gait's pace; a pose: default 500) */
40
+ /** Positive finite duration, ms: move defaults to distance at gait pace, pose to 500, spin to 1000. face consumes it even without turning. */
31
41
  for?: number;
32
42
  /** A move: where to, [x, z] metres */
33
43
  to?: GroundPoint;
@@ -46,7 +56,7 @@ export interface CharacterBeat3D {
46
56
  /** `look`: a point [x, z] (at eye height) or [x, y, z] to look at with the head and eyes, or `camera` for the viewer; `toward` as `face` takes it */
47
57
  look?: GroundPoint | [number, number, number] | 'camera';
48
58
  }
49
- export declare const CHARACTER_BEAT_3D_FIELDS: readonly ["do", "at", "for", "to", "through", "toward", "speed", "pose", "gag", "say", "look"];
59
+ export declare const CHARACTER_BEAT_3D_FIELDS: readonly ["do", "at", "for", "to", "through", "toward", "speed", "pose", "gag", "say", "look", "turns", "dance", "bpm", "beats"];
50
60
  /** How long a line takes to say, ms: by its length, never shorter than a beat. */
51
61
  export declare const speechLength: (text: string) => number;
52
62
  /**
@@ -0,0 +1,59 @@
1
+ import { type Character } from './character';
2
+ import { type DancePartner } from './dance-contact';
3
+ import { type HumanDanceName, type HumanDanceStyle } from './human-dance';
4
+ import type { Pose } from './rig/body-plan';
5
+ import type { GroundPoint } from './ground-path';
6
+ import type { Track } from '../engine/types';
7
+ export interface DanceCircleOptions {
8
+ /** Ground center [x,z], default [0,0]. */
9
+ center?: GroundPoint;
10
+ /** Positive radius in the same units as character height. */
11
+ radius: number;
12
+ /** Positive integer member count, default 8 for direct sampling; must match targets when baking. */
13
+ count?: number;
14
+ /** Beats per revolution, positive; default 32. */
15
+ beatsPerTurn?: number;
16
+ /** Initial angle in degrees: 0 places the first dancer along +z. */
17
+ angle?: number;
18
+ /** Clockwise viewed from above (+1, default), or counterclockwise (-1). */
19
+ direction?: 1 | -1;
20
+ /** Default inward; numeric heading in degrees (0 faces +z, 90 faces +x). */
21
+ facing?: 'inward' | 'outward' | 'tangent' | number;
22
+ /** Extra signed/fractional body revolutions per orbit, independent of travel. Default 0. */
23
+ spins?: number;
24
+ /** Local routine, default garba. */
25
+ style?: HumanDanceName | HumanDanceStyle;
26
+ /** Body used for contact geometry, default a human of height 1.7. Match the rendered build. */
27
+ character?: Character;
28
+ /** Base pose; formation heading overrides turn. Use the same base when rendering baked tracks. */
29
+ pose?: Pose;
30
+ /** Lock each support toe during its stance, then release smoothly. Default true. */
31
+ plantFeet?: boolean;
32
+ }
33
+ export interface DanceCircleMember extends DancePartner {
34
+ /** World heading in degrees, also included in pose.turn as quarter-turns. */
35
+ heading: number;
36
+ strike: number;
37
+ /** True only for a reachable plant at full stance weight; false during release or with planting disabled. */
38
+ planted: boolean;
39
+ }
40
+ /**
41
+ * A deterministic circle formation: world x/z travel, body heading and the
42
+ * local dance have separate phases. Sample by absolute beat, in any order.
43
+ * All placement units match the character's height (default 1.7 metres).
44
+ */
45
+ export declare function danceCircleAt(beat: number, options: DanceCircleOptions): DanceCircleMember[];
46
+ /**
47
+ * Bake a formation into ordinary scene tracks. With zero roll, heading uses
48
+ * rotateY; rolled poses keep heading in turn and set rotateY to zero so yaw
49
+ * precedes roll and grounding exactly as in direct sampling.
50
+ * Requires beats; bpm defaults to 120 (independent of style), start to 0 ms
51
+ * and samplesPerBeat to 16. Member count comes from targets.length. Keys are
52
+ * linear; unchanged base/rest pose fields are omitted, placement is retained.
53
+ */
54
+ export declare function danceCircleTracks(targets: string[], options: DanceCircleOptions & {
55
+ bpm?: number;
56
+ beats: number;
57
+ start?: number;
58
+ samplesPerBeat?: number;
59
+ }): Track[];