@anime-studio/kit 0.0.0-stage → 0.2.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.
Files changed (47) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +58 -2
  3. package/dist/cartoon.d.ts +368 -0
  4. package/dist/cartoon.d.ts.map +1 -0
  5. package/dist/cartoon.js +2815 -0
  6. package/dist/cartoon.js.map +1 -0
  7. package/dist/human.d.ts +165 -0
  8. package/dist/human.d.ts.map +1 -0
  9. package/dist/human.js +433 -0
  10. package/dist/human.js.map +1 -0
  11. package/dist/humanFront.d.ts +18 -0
  12. package/dist/humanFront.d.ts.map +1 -0
  13. package/dist/humanFront.js +137 -0
  14. package/dist/humanFront.js.map +1 -0
  15. package/dist/index.d.ts +9 -0
  16. package/dist/index.d.ts.map +1 -0
  17. package/dist/index.js +9 -0
  18. package/dist/index.js.map +1 -0
  19. package/dist/info.d.ts +96 -0
  20. package/dist/info.d.ts.map +1 -0
  21. package/dist/info.js +277 -0
  22. package/dist/info.js.map +1 -0
  23. package/dist/proportions.d.ts +37 -0
  24. package/dist/proportions.d.ts.map +1 -0
  25. package/dist/proportions.js +115 -0
  26. package/dist/proportions.js.map +1 -0
  27. package/dist/rig.d.ts +538 -0
  28. package/dist/rig.d.ts.map +1 -0
  29. package/dist/rig.js +1381 -0
  30. package/dist/rig.js.map +1 -0
  31. package/dist/room.d.ts +124 -0
  32. package/dist/room.d.ts.map +1 -0
  33. package/dist/room.js +217 -0
  34. package/dist/room.js.map +1 -0
  35. package/dist/util.d.ts +27 -0
  36. package/dist/util.d.ts.map +1 -0
  37. package/dist/util.js +29 -0
  38. package/dist/util.js.map +1 -0
  39. package/dist/views.d.ts +68 -0
  40. package/dist/views.d.ts.map +1 -0
  41. package/dist/views.js +92 -0
  42. package/dist/views.js.map +1 -0
  43. package/dist/volume.d.ts +105 -0
  44. package/dist/volume.d.ts.map +1 -0
  45. package/dist/volume.js +234 -0
  46. package/dist/volume.js.map +1 -0
  47. package/package.json +45 -3
@@ -0,0 +1,165 @@
1
+ /**
2
+ * Human characters from a short description (`HumanLook`): anime-style, on the kit skeleton
3
+ * (profile facing right, feet at y = 0), with a generated front view, switch hands, every kit clip
4
+ * (gestures, walk/run, the fighting set), emotions (plus `dead`, `determined`, `calm`, `excited`)
5
+ * and big-head proportions. Hair locks, headband tails, scarves and capes are spring bones, so they
6
+ * flow with every movement. `rigInfo(doc, { extent: { front: 85, back: 75 }, height: 470, depth: 26 })`
7
+ * measures it for the director.
8
+ */
9
+ import type { ToonDoc } from "@anime-studio/core";
10
+ export type HumanHair = "spiky" | "mane" | "messy" | "ponytail" | "cap" | "hood" | "short" | "curly";
11
+ export type HumanOutfit = "tee" | "hoodie" | "gi" | "coat" | "armor";
12
+ export interface HumanLook {
13
+ name: string;
14
+ skin: string;
15
+ hair: HumanHair;
16
+ hairColor: string;
17
+ hairTip?: string;
18
+ iris: string;
19
+ outfit: HumanOutfit;
20
+ top: string;
21
+ topDark?: string;
22
+ pants: string;
23
+ shoes: string;
24
+ accent?: string;
25
+ glasses?: boolean;
26
+ /** Glowing eyes (villains). */
27
+ glow?: boolean;
28
+ headband?: string;
29
+ scarf?: string;
30
+ cape?: string;
31
+ /** Broader shoulders and chest (villains, adults). */
32
+ bulk?: number;
33
+ }
34
+ export declare function humanCharacter(look: HumanLook): ToonDoc;
35
+ /** Extra clips of the human characters (all bones from the kit skeleton): stance, power, punch, knocked, read, facepalm, roll. */
36
+ export declare function humanClips(): {
37
+ knocked: {
38
+ duration: number;
39
+ tracks: {
40
+ "ik.footF.mix": number[][];
41
+ "ik.footB.mix": number[][];
42
+ "bones.hips.y": number[][];
43
+ "bones.head.rotation": (string | number)[][];
44
+ "bones.body.rotation": (string | number)[][];
45
+ "bones.armF1.rotation": number[][];
46
+ "bones.armF1.turn": number[][];
47
+ "bones.armF1.spread": number[][];
48
+ "bones.armF2.rotation": number[][];
49
+ "bones.legF1.rotation": number[][];
50
+ "bones.legF2.rotation": number[][];
51
+ "bones.legB1.rotation": number[][];
52
+ "bones.legB2.rotation": number[][];
53
+ "bones.footF.rotation": number[][];
54
+ "bones.footB.rotation": number[][];
55
+ };
56
+ };
57
+ down: {
58
+ duration: number;
59
+ tracks: {
60
+ "ik.footF.mix": number[][];
61
+ "ik.footB.mix": number[][];
62
+ "bones.hips.y": number[][];
63
+ "bones.body.rotation": (string | number)[][];
64
+ "bones.head.rotation": (string | number)[][];
65
+ "bones.head.turn": number[][];
66
+ "bones.armF1.rotation": (string | number)[][];
67
+ "bones.armF1.turn": number[][];
68
+ "bones.armF1.spread": number[][];
69
+ "bones.armF2.rotation": number[][];
70
+ "bones.legF1.rotation": (string | number)[][];
71
+ "bones.legF2.rotation": number[][];
72
+ "bones.legB1.rotation": (string | number)[][];
73
+ "bones.legB2.rotation": number[][];
74
+ "bones.footF.rotation": number[][];
75
+ "bones.footB.rotation": number[][];
76
+ };
77
+ };
78
+ rise: {
79
+ duration: number;
80
+ tracks: {
81
+ "ik.footF.mix": number[][];
82
+ "ik.footB.mix": number[][];
83
+ "bones.body.rotation": number[][];
84
+ "bones.head.rotation": number[][];
85
+ "bones.head.turn": number[][];
86
+ "bones.armF1.rotation": number[][];
87
+ "bones.armF2.rotation": number[][];
88
+ "bones.legF1.rotation": number[][];
89
+ "bones.legF2.rotation": number[][];
90
+ "bones.legB1.rotation": number[][];
91
+ "bones.legB2.rotation": number[][];
92
+ "bones.footF.rotation": number[][];
93
+ "bones.footB.rotation": number[][];
94
+ };
95
+ };
96
+ stance: {
97
+ duration: number;
98
+ clear: boolean;
99
+ loop: boolean;
100
+ tracks: {
101
+ "bones.hips.y": number[][];
102
+ "bones.body.rotation": number[][];
103
+ "bones.armF1.rotation": number[][];
104
+ "bones.armF2.rotation": number[][];
105
+ "bones.armB1.rotation": number[][];
106
+ "bones.armB2.rotation": number[][];
107
+ };
108
+ };
109
+ power: {
110
+ duration: number;
111
+ clear: boolean;
112
+ loop: boolean;
113
+ tracks: {
114
+ "bones.hips.y": number[][];
115
+ "bones.body.rotation": number[][];
116
+ "bones.head.rotation": number[][];
117
+ "bones.armF1.rotation": number[][];
118
+ "bones.armF2.rotation": number[][];
119
+ "bones.armB1.rotation": number[][];
120
+ "bones.armB2.rotation": number[][];
121
+ };
122
+ };
123
+ punch: {
124
+ duration: number;
125
+ clear: boolean;
126
+ tracks: {
127
+ "bones.body.rotation": (string | number)[][];
128
+ "bones.hips.y": number[][];
129
+ "bones.armF1.rotation": (string | number)[][];
130
+ "bones.armF2.rotation": (string | number)[][];
131
+ "bones.armB1.rotation": number[][];
132
+ "bones.armB2.rotation": number[][];
133
+ };
134
+ };
135
+ read: {
136
+ duration: number;
137
+ loop: boolean;
138
+ tracks: {
139
+ "bones.armF1.rotation": number[][];
140
+ "bones.armF2.rotation": number[][];
141
+ "bones.armB1.rotation": number[][];
142
+ "bones.armB2.rotation": number[][];
143
+ "bones.head.rotation": number[][];
144
+ };
145
+ };
146
+ facepalm: {
147
+ duration: number;
148
+ tracks: {
149
+ "bones.armF1.rotation": (string | number)[][];
150
+ "bones.armF2.rotation": (string | number)[][];
151
+ "bones.head.rotation": (string | number)[][];
152
+ "bones.body.rotation": number[][];
153
+ };
154
+ };
155
+ roll: {
156
+ duration: number;
157
+ clear: boolean;
158
+ tracks: {
159
+ "bones.body.rotation": (string | number)[][];
160
+ "bones.armF1.rotation": (string | number)[][];
161
+ "bones.armF2.rotation": (string | number)[][];
162
+ };
163
+ };
164
+ };
165
+ //# sourceMappingURL=human.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"human.d.ts","sourceRoot":"","sources":["../src/human.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAWlD,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,GAAG,UAAU,GAAG,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,CAAC;AACrG,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG,QAAQ,GAAG,IAAI,GAAG,MAAM,GAAG,OAAO,CAAC;AAErE,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,SAAS,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,WAAW,CAAC;IACpB,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,+BAA+B;IAC/B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,sDAAsD;IACtD,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAkMD,wBAAgB,cAAc,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO,CAiLvD;AAED,kIAAkI;AAClI,wBAAgB,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAIpB,QAAQ;QACR,KAAK;QACL,IAAI;QACJ,MAAM;YACJ,cAAc;YACd,qBAAqB;YACrB,sBAAsB;YACtB,sBAAsB;YACtB,sBAAsB;YACtB,sBAAsB;;;;QAKxB,QAAQ;QACR,KAAK;QACL,IAAI;QACJ,MAAM;YACJ,cAAc;YACd,qBAAqB;YACrB,qBAAqB;YACrB,sBAAsB;YACtB,sBAAsB;YACtB,sBAAsB;YACtB,sBAAsB;;;;QAKxB,QAAQ;QACR,KAAK;QACL,MAAM;YACJ,qBAAqB;YACrB,cAAc;YACd,sBAAsB;YACtB,sBAAsB;YACtB,sBAAsB;YACtB,sBAAsB;;;;QAOxB,QAAQ;QACR,IAAI;QACJ,MAAM;YACJ,sBAAsB;YACtB,sBAAsB;YACtB,sBAAsB;YACtB,sBAAsB;YACtB,qBAAqB;;;;QAKvB,QAAQ;QACR,MAAM;YACJ,sBAAsB;YACtB,sBAAsB;YACtB,qBAAqB;YACrB,qBAAqB;;;;QAKvB,QAAQ;QACR,KAAK;QACL,MAAM;YACJ,qBAAqB;YACrB,sBAAsB;YACtB,sBAAsB;;;EAI7B"}
package/dist/human.js ADDED
@@ -0,0 +1,433 @@
1
+ import { frontView } from "./humanFront.js";
2
+ import { withProportions } from "./proportions.js";
3
+ import { characterClips, emotions, handShapes, knockDownClips, limbBones, limbIk, mouthShapes } from "./rig.js";
4
+ import { aimForward, shade } from "./util.js";
5
+ const INK = "#1d1a2b";
6
+ const SW = 4;
7
+ const r = (n) => Math.round(n * 100) / 100;
8
+ const stroke = (w = SW) => `stroke="palette(ink)" stroke-width="${w}" stroke-linejoin="round" stroke-linecap="round"`;
9
+ // ------------------------------------------------------------------ face (profile)
10
+ const HEAD = "M-24 -404 C-26 -440 2 -456 28 -455 C52 -454 64 -436 62 -416 L69 -399 C70 -396 66 -394 62 -394 C63 -386 61 -376 53 -367 C44 -359 28 -358 15 -364 C2 -370 -22 -378 -24 -404 Z";
11
+ const EYE = [47, -404];
12
+ function eyes(look) {
13
+ const [x, y] = EYE;
14
+ const almond = (k = 1, lid = 0) => {
15
+ const top = y - 13 * k + lid;
16
+ return `<path d="M${x - 10} ${y - 4} Q${x - 2} ${top} ${x + 10} ${y - 6} Q${x + 9} ${y + 8 * k} ${x} ${y + 10 * k} Q${x - 8} ${y + 7 * k} ${x - 10} ${y - 4} Z" fill="#fff" stroke="palette(ink)" stroke-width="2.5"/>` +
17
+ `<path d="M${x - 12} ${y - 4} Q${x - 2} ${top - 3} ${x + 11} ${y - 7}" fill="none" stroke="palette(ink)" stroke-width="5.5" stroke-linecap="round"/>` +
18
+ `<path d="M${x - 11} ${y - 4} L${x - 16} ${y - 9}" stroke="palette(ink)" stroke-width="3" stroke-linecap="round"/>`;
19
+ };
20
+ const arc = (up) => `<path d="M${x - 11} ${y - 2} Q${x} ${y + (up ? -9 : 7)} ${x + 11} ${y - 3}" fill="none" stroke="palette(ink)" stroke-width="4.5" stroke-linecap="round"/>` +
21
+ (up ? "" : `<path d="M${x - 7} ${y + 3} l-3 5 M${x} ${y + 5} l-1 6 M${x + 6} ${y + 3} l1 5" stroke="palette(ink)" stroke-width="2.2" stroke-linecap="round"/>`);
22
+ const iris = look.glow
23
+ ? `<ellipse cx="${x + 3}" cy="${y + 1}" rx="6" ry="8.5" fill="palette(iris)"/><ellipse cx="${x + 3}" cy="${y + 1}" rx="2.4" ry="6" fill="#fff6c8"/>`
24
+ : `<ellipse cx="${x + 3}" cy="${y + 1}" rx="6" ry="8.5" fill="palette(iris)" stroke="palette(ink)" stroke-width="1.5"/>` +
25
+ `<ellipse cx="${x + 3.5}" cy="${y + 3}" rx="3.6" ry="5.4" fill="palette(irisDark)"/>` +
26
+ `<circle cx="${x + 1}" cy="${y - 3}" r="2.6" fill="#fff"/><circle cx="${x + 6}" cy="${y + 5}" r="1.3" fill="#fff"/>`;
27
+ // Anime "shining eyes": big, a huge iris, star highlights (moved, thrilled).
28
+ const star = (cx, cy, k) => `<path d="M${cx} ${cy - 5 * k} L${cx + 1.5 * k} ${cy - 1.5 * k} L${cx + 5 * k} ${cy} L${cx + 1.5 * k} ${cy + 1.5 * k} L${cx} ${cy + 5 * k} L${cx - 1.5 * k} ${cy + 1.5 * k} L${cx - 5 * k} ${cy} L${cx - 1.5 * k} ${cy - 1.5 * k} Z" fill="#fff"/>`;
29
+ const shine = almond(1.25) +
30
+ `<ellipse cx="${x + 2}" cy="${y + 1}" rx="8" ry="11" fill="palette(iris)" stroke="palette(ink)" stroke-width="1.5"/><ellipse cx="${x + 2.5}" cy="${y + 3}" rx="5" ry="7.5" fill="palette(irisDark)"/>` +
31
+ star(x - 1, y - 3, 1.3) + star(x + 5, y + 6, 0.8) + `<circle cx="${x + 6}" cy="${y - 5}" r="1.6" fill="#fff"/>`;
32
+ return {
33
+ open: almond(),
34
+ wide: almond(1.2),
35
+ shine,
36
+ half: almond(0.9, 7),
37
+ closed: arc(false),
38
+ happy: arc(true),
39
+ dead: `<path d="M${x - 8} ${y - 8} L${x + 8} ${y + 8} M${x + 8} ${y - 8} L${x - 8} ${y + 8}" stroke="palette(ink)" stroke-width="4.5" stroke-linecap="round"/>`,
40
+ iris,
41
+ };
42
+ }
43
+ function brows() {
44
+ const [x, y] = EYE;
45
+ const b = (dy, inner, outer) => `M${x - 12} ${y - 22 + dy + outer} Q${x - 1} ${y - 28 + dy} ${x + 11} ${y - 22 + dy + inner}`;
46
+ return { base: b(0, 0, 0), shapes: { up: b(-7, 0, 0), sad: b(-3, -5, 4), cross: b(3, 6, -3), smug: b(-2, 3, -2) } };
47
+ }
48
+ const CAP = "M60 -436 C56 -452 40 -460 26 -460 C-2 -460 -28 -444 -30 -410 C-30 -392 -24 -378 -14 -370 C-14 -382 -12 -396 -8 -412 C-2 -428 14 -440 34 -444 C46 -446 54 -444 60 -436 Z";
49
+ function hairArt(look) {
50
+ const h = hairShapes(look);
51
+ return look.hair === "hood" ? h : { ...h, cap: `<path d="${CAP}" fill="palette(hair)" ${stroke()}/><path d="M-20 -420 C-14 -436 0 -446 16 -450" fill="none" stroke="palette(hairShine)" stroke-width="4" stroke-linecap="round" opacity="0.7"/>` };
52
+ }
53
+ function hairShapes(look) {
54
+ const fill = `fill="palette(hair)" ${stroke()}`;
55
+ const tip = look.hairTip ? `fill="palette(hairTip)"` : "";
56
+ switch (look.hair) {
57
+ case "spiky":
58
+ return {
59
+ back: `<path d="M-26 -392 L-58 -420 L-30 -428 L-62 -458 L-22 -452 L-36 -492 L4 -470 L14 -508 L32 -470 L58 -490 L56 -456 L76 -458 L60 -436 C62 -440 50 -458 30 -458 C4 -458 -22 -446 -26 -416 Z" ${fill}/>` +
60
+ (look.hairTip ? `<path d="M-58 -420 L-44 -418 L-50 -428 Z M-62 -458 L-44 -452 L-48 -464 Z M-36 -492 L-22 -478 L-16 -486 Z M14 -508 L18 -484 L26 -486 Z" ${tip}/>` : ""),
61
+ front: `<path d="M18 -458 C40 -462 62 -452 66 -432 L58 -436 L62 -416 L48 -432 L44 -412 L36 -436 L26 -424 L24 -446 Z" ${fill}/>` +
62
+ (look.hairTip ? `<path d="M62 -416 L56 -428 L60 -430 Z M44 -412 L42 -424 L47 -426 Z" ${tip}/>` : ""),
63
+ locks: [],
64
+ };
65
+ case "mane":
66
+ // A huge white anime mane: spikes up and back, long locks down the back.
67
+ return {
68
+ back: `<path d="M-24 -380 L-96 -368 L-56 -396 L-118 -420 L-62 -430 L-112 -478 L-46 -462 L-60 -522 L-10 -486 L2 -544 L28 -488 L66 -528 L62 -474 L96 -478 L66 -444 C64 -448 52 -462 30 -462 C2 -462 -22 -448 -26 -414 Z" ${fill}/>` +
69
+ `<path d="M-70 -412 L-40 -418 M-52 -470 L-24 -460 M2 -520 L10 -484 M58 -500 L44 -474" stroke="palette(hairDark)" stroke-width="3" stroke-linecap="round"/>`,
70
+ front:
71
+ // Bangs stop above the eye (it must stay readable in close-ups).
72
+ `<path d="M14 -462 C42 -470 70 -458 74 -432 L64 -436 L68 -420 L54 -434 L50 -420 L42 -436 L32 -418 L26 -442 Z" ${fill}/>` +
73
+ `<path d="M54 -434 L52 -424 M64 -436 L66 -426" stroke="palette(hairDark)" stroke-width="2.5" stroke-linecap="round"/>`,
74
+ locks: [
75
+ { id: "lockA", from: [-30, -400], to: [-70, -300], d: "M-38 -404 C-60 -380 -74 -340 -78 -296 L-62 -320 L-64 -290 C-54 -330 -40 -366 -22 -396 Z" },
76
+ { id: "lockB", from: [-14, -392], to: [-36, -300], d: "M-22 -394 C-34 -370 -42 -338 -42 -300 L-30 -322 L-26 -296 C-24 -330 -16 -362 -6 -388 Z" },
77
+ ],
78
+ };
79
+ case "messy":
80
+ return {
81
+ back: `<path d="M-26 -398 L-44 -412 L-28 -424 L-40 -446 L-14 -444 L-8 -468 L14 -456 L34 -472 L42 -454 L62 -456 L58 -438 C56 -450 44 -460 28 -460 C2 -460 -20 -448 -26 -420 Z" ${fill}/>`,
82
+ front: `<path d="M20 -460 C42 -464 60 -454 64 -436 L54 -440 L56 -424 L44 -438 L38 -422 L30 -440 Z" ${fill}/>`,
83
+ locks: [],
84
+ };
85
+ case "ponytail":
86
+ return {
87
+ back: `<path d="M-26 -400 C-30 -442 0 -462 30 -462 C54 -462 66 -446 64 -428 L52 -440 C40 -446 8 -444 -2 -424 C-10 -412 -14 -400 -14 -384 Z" ${fill}/>` +
88
+ `<circle cx="-22" cy="-424" r="7" fill="palette(accent)" ${stroke(3)}/>`,
89
+ front: `<path d="M20 -462 C46 -466 66 -452 66 -430 C58 -438 50 -442 44 -440 C42 -430 36 -424 28 -420 C30 -432 28 -444 20 -450 Z" ${fill}/>`,
90
+ locks: [{ id: "tail", from: [-24, -426], to: [-62, -340], d: "M-24 -432 C-58 -430 -78 -396 -72 -350 C-70 -336 -58 -330 -52 -342 C-58 -372 -48 -400 -20 -416 Z" }],
91
+ };
92
+ case "cap":
93
+ return {
94
+ back: `<path d="M-26 -400 C-30 -436 -10 -452 14 -456 L-28 -380 Z" ${fill}/>`,
95
+ // A cap worn backwards: crown over the head, the visor sticking out behind.
96
+ front: `<path d="M-22 -420 C-22 -452 6 -470 34 -466 C56 -462 66 -446 64 -428 C40 -436 4 -436 -22 -420 Z" fill="palette(accent)" ${stroke()}/>` +
97
+ `<path d="M-20 -424 C-40 -424 -62 -418 -70 -410 C-56 -404 -36 -406 -18 -412 Z" fill="palette(accentDark)" ${stroke()}/>` +
98
+ `<circle cx="22" cy="-466" r="4" fill="palette(accentDark)" ${stroke(2)}/>` +
99
+ `<path d="M60 -430 L64 -412 L54 -424 Z" ${fill}/>`,
100
+ locks: [],
101
+ };
102
+ case "short":
103
+ // A buzz cut: the cap alone, a small fringe.
104
+ return { back: "", front: `<path d="M24 -458 C44 -460 60 -450 62 -436 L52 -440 L48 -432 L40 -442 L30 -436 Z" ${fill}/>`, locks: [] };
105
+ case "curly":
106
+ // A big round curly top (black power).
107
+ return {
108
+ back: `<path d="${Array.from({ length: 16 }, (_, i) => {
109
+ const a = Math.PI * 0.95 + (i / 15) * Math.PI * 1.15;
110
+ const rr = i % 2 ? 78 : 92;
111
+ return `${i ? "L" : "M"}${r(14 + Math.cos(a) * rr)} ${r(-426 + Math.sin(a) * rr * 0.86)}`;
112
+ }).join(" ")} L60 -420 C40 -440 0 -440 -24 -400 Z" ${fill}/>`,
113
+ front: `<path d="M20 -470 C46 -476 70 -462 72 -440 C62 -446 54 -446 46 -440 C40 -450 30 -452 20 -448 Z" ${fill}/>`,
114
+ locks: [],
115
+ };
116
+ case "hood":
117
+ // A crow hood with a beak-like visor (villains).
118
+ return {
119
+ back: `<path d="M-34 -380 C-48 -430 -24 -478 22 -482 C60 -484 80 -460 78 -430 C78 -414 72 -404 66 -398 L60 -420 C46 -446 4 -446 -8 -410 C-12 -396 -12 -384 -6 -372 Z" fill="palette(top)" ${stroke()}/>` +
120
+ `<path d="M-30 -408 L-62 -400 L-40 -420 L-72 -432 L-38 -440 Z" fill="palette(top)" ${stroke(3)}/>`,
121
+ front: `<path d="M18 -470 C50 -476 80 -458 78 -430 L96 -418 L72 -414 C66 -432 56 -446 40 -450 C30 -452 22 -448 16 -440 Z" fill="palette(topDark)" ${stroke()}/>`,
122
+ locks: [],
123
+ };
124
+ }
125
+ }
126
+ // ------------------------------------------------------------------ outfits
127
+ function outfitArt(look) {
128
+ const b = look.bulk ?? 1;
129
+ const back = r(-34 * b), front = r(40 + 6 * (b - 1) * 4);
130
+ const torso = `M${back} -330 C${r(back - 8)} -292 ${r(back - 6)} -244 ${r(back + 2)} -198 L${r(front - 2)} -196 C${r(front + 8)} -240 ${r(front + 10)} -290 ${front} -330 C${r(front * 0.4)} -342 ${r(back * 0.4)} -342 ${back} -330 Z`;
131
+ const top = `<path d="${torso}" fill="palette(top)" ${stroke()}/>`;
132
+ switch (look.outfit) {
133
+ case "tee":
134
+ return {
135
+ torso: top + `<path d="M-8 -334 Q8 -322 22 -334" fill="none" ${stroke(3)}/><path d="M${r(back + 2)} -214 L${r(front - 3)} -212" stroke="palette(topDark)" stroke-width="5" stroke-linecap="round"/>`,
136
+ sleeveF: `<path d="M8 -330 C26 -336 40 -320 36 -292 C26 -286 14 -288 6 -294 Z" fill="palette(top)" ${stroke()}/>`,
137
+ sleeveB: `<path d="M-14 -332 C2 -336 14 -322 10 -296 C0 -290 -12 -292 -18 -298 Z" fill="palette(topDark)" ${stroke()}/>`,
138
+ longSleeves: false,
139
+ };
140
+ case "hoodie":
141
+ return {
142
+ torso: top + `<path d="M-30 -332 C-44 -350 -40 -372 -24 -380 C-10 -366 -6 -346 -8 -334 Z" fill="palette(topDark)" ${stroke()}/>` +
143
+ `<path d="M2 -268 L28 -268 L26 -232 L4 -232 Z" fill="none" stroke="palette(topDark)" stroke-width="4"/><path d="M8 -332 L10 -300 M18 -332 L20 -302" stroke="palette(accent)" stroke-width="3" stroke-linecap="round"/>`,
144
+ sleeveF: "",
145
+ sleeveB: "",
146
+ longSleeves: true,
147
+ };
148
+ case "gi":
149
+ return {
150
+ torso: top + `<path d="M24 -330 L-2 -262 L10 -260 L34 -318 Z" fill="palette(topDark)" ${stroke(3)}/>` +
151
+ `<path d="M${r(back + 2)} -228 L${r(front - 1)} -226 L${r(front - 2)} -208 L${r(back + 3)} -210 Z" fill="palette(accent)" ${stroke(3)}/>`,
152
+ sleeveF: "",
153
+ sleeveB: "",
154
+ longSleeves: true,
155
+ };
156
+ case "coat":
157
+ return {
158
+ torso: top + `<path d="M26 -334 L8 -270 L24 -200 M-6 -338 L4 -300" fill="none" stroke="palette(topDark)" stroke-width="4" stroke-linecap="round"/>` +
159
+ `<path d="M-30 -330 C-36 -350 -20 -362 0 -356 L26 -350 C34 -346 36 -338 32 -330 Z" fill="palette(accent)" ${stroke()}/>`,
160
+ sleeveF: "",
161
+ sleeveB: "",
162
+ longSleeves: true,
163
+ };
164
+ case "armor":
165
+ return {
166
+ torso: top + `<path d="M${r(back + 4)} -300 C${r(back + 20)} -290 ${r(front - 20)} -290 ${r(front - 2)} -300 M${r(back + 4)} -262 C${r(back + 20)} -252 ${r(front - 20)} -252 ${r(front - 2)} -262" fill="none" stroke="palette(topDark)" stroke-width="5"/>` +
167
+ `<path d="M-40 -330 C-46 -356 -10 -372 18 -362 C38 -356 48 -342 44 -326 C20 -334 -16 -334 -40 -330 Z" fill="palette(topDark)" ${stroke()}/>` +
168
+ `<path d="M-30 -344 L-46 -366 L-24 -356 L-28 -380 L-8 -360 Z" fill="palette(topDark)" ${stroke(3)}/>`,
169
+ sleeveF: `<path d="M4 -336 C30 -348 52 -330 46 -300 C30 -292 10 -296 2 -306 Z" fill="palette(topDark)" ${stroke()}/>`,
170
+ sleeveB: `<path d="M-20 -338 C4 -346 22 -330 16 -302 C2 -296 -14 -298 -24 -308 Z" fill="palette(topDark)" ${stroke()}/>`,
171
+ longSleeves: true,
172
+ };
173
+ }
174
+ }
175
+ // ------------------------------------------------------------------ the builder
176
+ export function humanCharacter(look) {
177
+ const b = look.bulk ?? 1;
178
+ const hair = hairArt(look);
179
+ const out = outfitArt(look);
180
+ const eye = eyes(look);
181
+ const mouth = mouthShapes([52, -378], [61, -380], 0.55);
182
+ const brow = brows();
183
+ const sleeve = out.longSleeves ? "palette(top)" : "palette(skin)";
184
+ const sleeveFar = out.longSleeves ? "palette(topDark)" : "palette(skinDark)";
185
+ const extraBones = [];
186
+ const extraParts = [];
187
+ const physics = [{ type: "jiggle", bone: "body", stiffness: 0.75, damping: 0.6, translate: 0.04, squash: 0.03 }];
188
+ for (const l of hair.locks) {
189
+ const mid = [(l.from[0] + l.to[0]) / 2, (l.from[1] + l.to[1]) / 2];
190
+ extraBones.push({ id: `${l.id}1`, parent: "head", from: l.from, to: mid, mass: 0.3 }, { id: `${l.id}2`, parent: `${l.id}1`, from: mid, to: l.to, mass: 0.25 });
191
+ extraParts.push({ id: l.id, type: "skinned", path: l.d, bones: [`${l.id}1`, `${l.id}2`], fill: "palette(hair)", stroke: "palette(ink)", strokeWidth: SW, attrs: { "stroke-linejoin": "round" } });
192
+ physics.push({ type: "spring", bones: [`${l.id}1`, `${l.id}2`], stiffness: 0.35, damping: 0.25, gravity: [0, 260], inertia: 0.5 });
193
+ }
194
+ const flowing = [];
195
+ if (look.headband)
196
+ flowing.push({ id: "tails", parent: "head", from: [-24, -428], to: [-96, -404], color: "palette(headband)", z: "back", d: "M-22 -432 C-50 -436 -80 -424 -100 -398 L-86 -404 L-96 -386 C-70 -404 -46 -418 -22 -420 Z" });
197
+ if (look.scarf)
198
+ flowing.push({ id: "scarf", parent: "body", from: [-10, -330], to: [-110, -300], color: "palette(scarf)", z: "back", d: "M-8 -340 C-50 -344 -96 -330 -124 -296 L-104 -302 L-112 -280 C-84 -306 -44 -320 -6 -322 Z" });
199
+ if (look.cape)
200
+ flowing.push({ id: "cape", parent: "body", from: [-24, -330], to: [-90, -150], color: "palette(cape)", z: "back", d: "M-20 -334 C-60 -320 -96 -250 -110 -140 L-80 -160 L-70 -128 L-46 -158 L-30 -132 C-34 -200 -40 -270 -10 -322 Z" });
201
+ for (const f of flowing) {
202
+ const mid = [(f.from[0] + f.to[0]) / 2, (f.from[1] + f.to[1]) / 2];
203
+ extraBones.push({ id: `${f.id}1`, parent: f.parent, from: f.from, to: mid, mass: 0.3 }, { id: `${f.id}2`, parent: `${f.id}1`, from: mid, to: f.to, mass: 0.25 });
204
+ physics.push({ type: "spring", bones: [`${f.id}1`, `${f.id}2`], stiffness: 0.3, damping: 0.22, gravity: [0, 200], inertia: 0.6 });
205
+ }
206
+ const flowParts = (z) => flowing.filter((f) => f.z === z).map((f) => ({ id: f.id, type: "skinned", path: f.d, bones: [`${f.id}1`, `${f.id}2`], fill: f.color, stroke: "palette(ink)", strokeWidth: 3.5, attrs: { "stroke-linejoin": "round" } }));
207
+ const skeleton = [
208
+ { id: "root" },
209
+ { id: "ground" },
210
+ { id: "hips", parent: "root", from: [0, -200], to: [0, -210], mass: 2 },
211
+ { id: "body", parent: "hips", from: [0, -200], to: [8, -330], mass: 2 },
212
+ { id: "neck", parent: "body", from: [12, -330], to: [16, -360], mass: 1, limits: { rotation: [-25, 25] } },
213
+ { id: "head", parent: "neck", from: [16, -360], to: [30, -456], mass: 1.4, limits: { rotation: [-40, 40] } },
214
+ { id: "pupils", parent: "head", from: [EYE[0], EYE[1]] },
215
+ ...extraBones,
216
+ ...limbBones({
217
+ shoulderF: [16, -322], elbowF: [22, -262], handF: [24, -200],
218
+ shoulderB: [-6, -324], elbowB: [-10, -264], handB: [-8, -202],
219
+ hipF: [12, -200], kneeF: [17, -104], footF: [12, -12], toeF: 26,
220
+ hipB: [-8, -200], kneeB: [-3, -104], footB: [-8, -12], toeB: 26,
221
+ }),
222
+ ];
223
+ const doc = {
224
+ format: "toon",
225
+ version: 1,
226
+ name: look.name,
227
+ meta: { description: `${look.name}: anime-style human (profile, facing right)` },
228
+ palette: {
229
+ ink: INK,
230
+ skin: look.skin,
231
+ skinDark: shade(look.skin, 0.86),
232
+ hair: look.hairColor,
233
+ hairDark: shade(look.hairColor, 0.75),
234
+ hairShine: look.hairColor === "#eef3ff" ? "#ffffff" : shade(look.hairColor, 1.6),
235
+ hairTip: look.hairTip ?? look.hairColor,
236
+ iris: look.iris,
237
+ irisDark: shade(look.iris, 0.45),
238
+ top: look.top,
239
+ topDark: look.topDark ?? shade(look.top, 0.78),
240
+ pants: look.pants,
241
+ pantsDark: shade(look.pants, 0.78),
242
+ shoes: look.shoes,
243
+ accent: look.accent ?? "#e8414f",
244
+ accentDark: shade(look.accent ?? "#e8414f", 0.75),
245
+ headband: look.headband ?? "#e8414f",
246
+ scarf: look.scarf ?? "#e8414f",
247
+ cape: look.cape ?? "#2b2238",
248
+ mouth: "#7a2638",
249
+ blush: "#ff8f9e",
250
+ },
251
+ art: {
252
+ head: `<path d="${HEAD}" fill="palette(skin)" ${stroke()}/>` +
253
+ `<path d="M66 -398 L61 -394" stroke="palette(ink)" stroke-width="2.5" stroke-linecap="round"/>` +
254
+ `<path d="M8 -404 C2 -412 -4 -404 -2 -394 C0 -386 6 -384 10 -390" fill="palette(skin)" ${stroke(3)}/>` +
255
+ (look.glow ? "" : `<ellipse cx="42" cy="-386" rx="7" ry="3.5" fill="palette(blush)" opacity="0.45"/>`) +
256
+ (look.glasses ? `<path d="M34 -410 h24 v14 h-24 Z" fill="#cdeeff" fill-opacity="0.35" ${stroke(3)}/><path d="M34 -404 L10 -402" ${stroke(3)}/>` : ""),
257
+ neck: `<path d="M0 -326 L2 -368 L30 -368 L28 -326 Z" fill="palette(skinDark)" ${stroke()}/>`,
258
+ hairBack: hair.back,
259
+ hairCap: hair.cap ?? "",
260
+ band: look.headband
261
+ ? `<path d="M-30 -416 C-2 -434 32 -440 62 -432" fill="none" stroke="palette(ink)" stroke-width="16" stroke-linecap="round"/><path d="M-30 -416 C-2 -434 32 -440 62 -432" fill="none" stroke="palette(headband)" stroke-width="10" stroke-linecap="round"/>` +
262
+ `<path d="M24 -446 L52 -448 L54 -430 L26 -428 Z" fill="#c9ccd6" ${stroke(3)}/><path d="M32 -440 L46 -441 M33 -434 L47 -436" stroke="palette(ink)" stroke-width="2"/>`
263
+ : "",
264
+ hairFront: hair.front,
265
+ torso: out.torso,
266
+ sleeveF: out.sleeveF,
267
+ sleeveB: out.sleeveB,
268
+ ...Object.fromEntries(Object.entries(handShapes([24, -200], { r: 13, fill: "palette(skin)" })).map(([k, v]) => [`handF_${k}`, v])),
269
+ ...Object.fromEntries(Object.entries(handShapes([-8, -202], { r: 12, fill: "palette(skinDark)" })).map(([k, v]) => [`handB_${k}`, v])),
270
+ shoe: `<path d="M-14 -14 C-6 -20 14 -18 26 -10 C36 -6 38 2 34 6 L-16 6 C-20 0 -18 -8 -14 -14 Z" fill="palette(shoes)" ${stroke()}/><path d="M-17 2 H35" stroke="#fff" stroke-width="3"/>`,
271
+ eyeOpen: eye.open,
272
+ eyeWide: eye.wide,
273
+ eyeClosed: eye.closed,
274
+ eyeHappy: eye.happy,
275
+ eyeHalf: eye.half,
276
+ eyeDead: eye.dead,
277
+ eyeShine: eye.shine,
278
+ iris: eye.iris,
279
+ },
280
+ skeleton,
281
+ parts: [
282
+ { id: "shadow", type: "rigid", bone: "ground", art: `<ellipse cx="4" cy="2" rx="${r(66 * b)}" ry="10" fill="#000" opacity="0.2"/>` },
283
+ ...flowParts("back"),
284
+ { id: "legB", type: "hose", bones: ["legB1", "legB2"], width: [r(32 * b), 24], fill: "palette(pantsDark)", stroke: "palette(ink)", strokeWidth: SW },
285
+ { id: "shoeB", type: "rigid", bone: "footB", art: "shoe", space: "bone" },
286
+ { id: "armB", type: "hose", bones: ["armB1", "armB2"], width: [r(21 * b), 17], fill: sleeveFar, stroke: "palette(ink)", strokeWidth: SW },
287
+ { id: "handB", type: "switch", bone: "handB", variants: { open: "handB_open", fist: "handB_fist", point: "handB_point", grip: "handB_grip" }, default: "fist" },
288
+ { id: "sleeveB", type: "rigid", bone: "armB1", art: "sleeveB" },
289
+ ...extraParts,
290
+ { id: "hairBack", type: "rigid", bone: "head", art: "hairBack" },
291
+ { id: "legF", type: "hose", bones: ["legF1", "legF2"], width: [r(32 * b), 24], fill: "palette(pants)", stroke: "palette(ink)", strokeWidth: SW },
292
+ { id: "shoeF", type: "rigid", bone: "footF", art: "shoe", space: "bone" },
293
+ { id: "neck", type: "rigid", bone: "neck", art: "neck" },
294
+ { id: "torso", type: "rigid", bone: "body", art: "torso" },
295
+ { id: "head", type: "rigid", bone: "head", art: "head" },
296
+ { id: "hairCap", type: "rigid", bone: "head", art: "hairCap" },
297
+ { id: "band", type: "rigid", bone: "head", art: "band" },
298
+ { id: "mouth", type: "morph", bone: "head", fill: "palette(mouth)", stroke: "palette(ink)", strokeWidth: 2.5, attrs: { "stroke-linejoin": "round" }, base: mouth.base, shapes: mouth.shapes },
299
+ { id: "eyes", type: "switch", bone: "head", variants: { open: "eyeOpen", wide: "eyeWide", closed: "eyeClosed", happy: "eyeHappy", half: "eyeHalf", dead: "eyeDead", shine: "eyeShine" }, default: "open" },
300
+ { id: "pupils", type: "rigid", bone: "pupils", art: "iris", visibleWhen: { part: "eyes", variant: ["open", "wide", "half"] } },
301
+ { id: "brows", type: "morph", bone: "head", fill: "none", stroke: "palette(hairDark)", strokeWidth: 4.5, attrs: { "stroke-linecap": "round" }, base: brow.base, shapes: brow.shapes },
302
+ { id: "hairFront", type: "rigid", bone: "head", art: "hairFront" },
303
+ ...flowParts("front"),
304
+ { id: "armF", type: "hose", bones: ["armF1", "armF2"], width: [r(21 * b), 17], fill: sleeve, stroke: "palette(ink)", strokeWidth: SW },
305
+ { id: "handF", type: "switch", bone: "handF", variants: { open: "handF_open", fist: "handF_fist", point: "handF_point", grip: "handF_grip" }, default: "fist" },
306
+ { id: "sleeveF", type: "rigid", bone: "armF1", art: "sleeveF" },
307
+ ],
308
+ anchors: {
309
+ head: { bone: "head", at: [30, -410] },
310
+ // The centre of the face as drawn from the front (close-ups and front gestures aim here).
311
+ face: { bone: "head", at: [14, -404] },
312
+ hand: { bone: "handF", at: [24, -200] },
313
+ handB: { bone: "handB", at: [-8, -202] },
314
+ fist: { bone: "handF", at: [34, -200] },
315
+ },
316
+ ik: limbIk,
317
+ physics,
318
+ controls: {
319
+ mouth: { type: "viseme", part: "mouth" },
320
+ // The face looks along +x (a profile facing right): `forward` turns the head bone's rest
321
+ // direction (up the neck) there.
322
+ look: { type: "aim", targets: [{ bone: "head", forward: aimForward(skeleton, "head"), maxAngle: 14, weight: 0.35 }, { bone: "pupils", mode: "translate", radius: 3 }] },
323
+ emotion: emotions({
324
+ dead: { "parts.eyes.variant": "dead", "parts.mouth.morph.D": 0.6, "bones.head.rotation": 10 },
325
+ determined: { "parts.eyes.variant": "half", "parts.mouth.morph.frown": 0.4, "parts.brows.morph.cross": 1, "bones.head.rotation": 2 },
326
+ calm: { "parts.eyes.variant": "closed", "parts.brows.morph.cross": 0.4 },
327
+ excited: { "parts.eyes.variant": "shine", "parts.mouth.morph.grin": 0.9, "parts.brows.morph.up": 0.8, "bones.head.rotation": -6 },
328
+ }),
329
+ },
330
+ behaviors: [
331
+ { type: "blink", id: "blink", part: "eyes", open: "open", closed: "closed", interval: [2.2, 4.8], duration: 0.12 },
332
+ { type: "breathe", id: "breathe", bone: "body", amount: 0.012, period: 3.4 },
333
+ ],
334
+ clips: {
335
+ ...characterClips({
336
+ walk: { a: 30, lift: 18, dur: 0.66, bob: 4, lean: 2, armSwing: 26 },
337
+ // A cartoon run (`gait` flight, the leg's fractions of 188 px): a third of the cycle in the
338
+ // air, long steps, a deep down, the heel kicked up behind, a runner's arms.
339
+ run: { a: 56, lift: 26, dur: 0.6, bob: 10, lean: 12, armSwing: 44, crouch: 0.1, flight: 0.34, heel: 0.45, knee: 0.4, paw: 0.15, armStyle: "run", flat: true },
340
+ jump: 90,
341
+ hands: true,
342
+ // Hip to ankle and ankle to toe of the skeleton above (personality walks crouch, tiptoe).
343
+ leg: 188,
344
+ foot: 26,
345
+ }),
346
+ ...humanClips(),
347
+ },
348
+ };
349
+ // Anime proportions: a big head, a slightly shorter body.
350
+ return withProportions(frontView(doc, look, eye), { head: 1.32, torso: 0.94, legs: 0.92 });
351
+ }
352
+ /** Extra clips of the human characters (all bones from the kit skeleton): stance, power, punch, knocked, read, facepalm, roll. */
353
+ export function humanClips() {
354
+ return {
355
+ // Fighting stance: knees bent, fists up.
356
+ stance: {
357
+ duration: 1.6,
358
+ clear: true,
359
+ loop: true,
360
+ tracks: {
361
+ "bones.hips.y": [[0, 14], [0.8, 18], [1.6, 14]],
362
+ "bones.body.rotation": [[0, 6], [0.8, 8], [1.6, 6]],
363
+ "bones.armF1.rotation": [[0, -70], [0.8, -66], [1.6, -70]],
364
+ "bones.armF2.rotation": [[0, -110], [1.6, -110]],
365
+ "bones.armB1.rotation": [[0, -40], [1.6, -40]],
366
+ "bones.armB2.rotation": [[0, -120], [1.6, -120]],
367
+ },
368
+ },
369
+ // Charging power, eyes closed: arms down and back, fists clenched, chin down.
370
+ power: {
371
+ duration: 1.2,
372
+ clear: true,
373
+ loop: true,
374
+ tracks: {
375
+ "bones.hips.y": [[0, 10], [0.6, 12], [1.2, 10]],
376
+ "bones.body.rotation": [[0, -2], [0.6, -3], [1.2, -2]],
377
+ "bones.head.rotation": [[0, 8], [1.2, 8]],
378
+ "bones.armF1.rotation": [[0, 22], [0.6, 24], [1.2, 22]],
379
+ "bones.armF2.rotation": [[0, -30], [1.2, -30]],
380
+ "bones.armB1.rotation": [[0, 26], [1.2, 26]],
381
+ "bones.armB2.rotation": [[0, -30], [1.2, -30]],
382
+ },
383
+ },
384
+ // A straight punch: wind-up, thrust (fast), hold, recover.
385
+ punch: {
386
+ duration: 0.9,
387
+ clear: true,
388
+ tracks: {
389
+ "bones.body.rotation": [[0, 0], [0.18, -10, "easeOut"], [0.28, 16, "easeIn"], [0.6, 14], [0.9, 0]],
390
+ "bones.hips.y": [[0, 0], [0.18, 10], [0.28, 6], [0.9, 0]],
391
+ "bones.armF1.rotation": [[0, 0], [0.18, 50, "easeOut"], [0.28, -84, "easeIn"], [0.6, -82], [0.9, 0]],
392
+ "bones.armF2.rotation": [[0, 0], [0.18, -120, "easeOut"], [0.28, -4, "easeIn"], [0.6, -4], [0.9, 0]],
393
+ "bones.armB1.rotation": [[0, 0], [0.28, 40], [0.9, 0]],
394
+ "bones.armB2.rotation": [[0, 0], [0.28, -100], [0.9, 0]],
395
+ },
396
+ },
397
+ // Knocked down (the scene's `fall`): the same clips as `characterClips`, both hands free.
398
+ ...knockDownClips({ hands: true }),
399
+ // Holding a character sheet up to read it (sitting or standing).
400
+ read: {
401
+ duration: 2.4,
402
+ loop: true,
403
+ tracks: {
404
+ "bones.armF1.rotation": [[0, -48], [1.2, -52], [2.4, -48]],
405
+ "bones.armF2.rotation": [[0, -78], [1.2, -74], [2.4, -78]],
406
+ "bones.armB1.rotation": [[0, -40], [2.4, -40]],
407
+ "bones.armB2.rotation": [[0, -86], [2.4, -86]],
408
+ "bones.head.rotation": [[0, 10], [1.2, 12], [2.4, 10]],
409
+ },
410
+ },
411
+ // Facepalm: the hand up to the forehead, the head drops (held, then down again).
412
+ facepalm: {
413
+ duration: 1.6,
414
+ tracks: {
415
+ "bones.armF1.rotation": [[0, 0], [0.22, -144, "easeOut"], [1.3, -140], [1.6, 0]],
416
+ "bones.armF2.rotation": [[0, 0], [0.22, -25, "easeOut"], [1.3, -22], [1.6, 0]],
417
+ "bones.head.rotation": [[0, 0], [0.22, 14, "easeOut"], [0.5, 10], [0.8, 14], [1.3, 12], [1.6, 0]],
418
+ "bones.body.rotation": [[0, 0], [0.22, 6], [1.3, 6], [1.6, 0]],
419
+ },
420
+ },
421
+ // Throwing dice from a sitting position: hand back, then a flick forward.
422
+ roll: {
423
+ duration: 0.8,
424
+ clear: true,
425
+ tracks: {
426
+ "bones.body.rotation": [[0, 0], [0.25, -6], [0.4, 8, "easeIn"], [0.8, 0]],
427
+ "bones.armF1.rotation": [[0, 0], [0.25, 30, "easeOut"], [0.4, -70, "easeIn"], [0.8, -20]],
428
+ "bones.armF2.rotation": [[0, 0], [0.25, -90, "easeOut"], [0.4, -10, "easeIn"], [0.8, -30]],
429
+ },
430
+ },
431
+ };
432
+ }
433
+ //# sourceMappingURL=human.js.map