@anime-studio/director 0.2.1 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/describe.d.ts +1 -1
- package/dist/direct/arcs.d.ts +17 -0
- package/dist/direct/arcs.d.ts.map +1 -0
- package/dist/direct/arcs.js +76 -0
- package/dist/direct/arcs.js.map +1 -0
- package/dist/direct/arms.d.ts +46 -0
- package/dist/direct/arms.d.ts.map +1 -0
- package/dist/direct/arms.js +233 -0
- package/dist/direct/arms.js.map +1 -0
- package/dist/direct/beat.d.ts +7 -0
- package/dist/direct/beat.d.ts.map +1 -0
- package/dist/direct/beat.js +339 -0
- package/dist/direct/beat.js.map +1 -0
- package/dist/direct/build.d.ts +7 -0
- package/dist/direct/build.d.ts.map +1 -0
- package/dist/direct/build.js +152 -0
- package/dist/direct/build.js.map +1 -0
- package/dist/direct/camera.d.ts +38 -0
- package/dist/direct/camera.d.ts.map +1 -0
- package/dist/direct/camera.js +279 -0
- package/dist/direct/camera.js.map +1 -0
- package/dist/direct/cast.d.ts +45 -0
- package/dist/direct/cast.d.ts.map +1 -0
- package/dist/direct/cast.js +172 -0
- package/dist/direct/cast.js.map +1 -0
- package/dist/direct/check.d.ts +17 -0
- package/dist/direct/check.d.ts.map +1 -0
- package/dist/direct/check.js +270 -0
- package/dist/direct/check.js.map +1 -0
- package/dist/direct/contact.d.ts +28 -0
- package/dist/direct/contact.d.ts.map +1 -0
- package/dist/direct/contact.js +222 -0
- package/dist/direct/contact.js.map +1 -0
- package/dist/direct/dialogue.d.ts +19 -0
- package/dist/direct/dialogue.d.ts.map +1 -0
- package/dist/direct/dialogue.js +110 -0
- package/dist/direct/dialogue.js.map +1 -0
- package/dist/direct/episode.d.ts +10 -0
- package/dist/direct/episode.d.ts.map +1 -0
- package/dist/direct/episode.js +286 -0
- package/dist/direct/episode.js.map +1 -0
- package/dist/direct/fixtures.d.ts +29 -0
- package/dist/direct/fixtures.d.ts.map +1 -0
- package/dist/direct/fixtures.js +147 -0
- package/dist/direct/fixtures.js.map +1 -0
- package/dist/direct/flight.d.ts +23 -0
- package/dist/direct/flight.d.ts.map +1 -0
- package/dist/direct/flight.js +110 -0
- package/dist/direct/flight.js.map +1 -0
- package/dist/direct/furniture.d.ts +59 -0
- package/dist/direct/furniture.d.ts.map +1 -0
- package/dist/direct/furniture.js +149 -0
- package/dist/direct/furniture.js.map +1 -0
- package/dist/direct/gestures.d.ts +31 -0
- package/dist/direct/gestures.d.ts.map +1 -0
- package/dist/direct/gestures.js +211 -0
- package/dist/direct/gestures.js.map +1 -0
- package/dist/direct/graphics.d.ts +20 -0
- package/dist/direct/graphics.d.ts.map +1 -0
- package/dist/direct/graphics.js +282 -0
- package/dist/direct/graphics.js.map +1 -0
- package/dist/direct/hand-holding.d.ts +28 -0
- package/dist/direct/hand-holding.d.ts.map +1 -0
- package/dist/direct/hand-holding.js +187 -0
- package/dist/direct/hand-holding.js.map +1 -0
- package/dist/direct/hiding.d.ts +19 -0
- package/dist/direct/hiding.d.ts.map +1 -0
- package/dist/direct/hiding.js +173 -0
- package/dist/direct/hiding.js.map +1 -0
- package/dist/direct/life.d.ts +67 -0
- package/dist/direct/life.d.ts.map +1 -0
- package/dist/direct/life.js +275 -0
- package/dist/direct/life.js.map +1 -0
- package/dist/direct/lighting.d.ts +22 -0
- package/dist/direct/lighting.d.ts.map +1 -0
- package/dist/direct/lighting.js +86 -0
- package/dist/direct/lighting.js.map +1 -0
- package/dist/direct/lying.d.ts +24 -0
- package/dist/direct/lying.d.ts.map +1 -0
- package/dist/direct/lying.js +205 -0
- package/dist/direct/lying.js.map +1 -0
- package/dist/direct/motion.d.ts +50 -0
- package/dist/direct/motion.d.ts.map +1 -0
- package/dist/direct/motion.js +270 -0
- package/dist/direct/motion.js.map +1 -0
- package/dist/direct/pictures.d.ts +24 -0
- package/dist/direct/pictures.d.ts.map +1 -0
- package/dist/direct/pictures.js +265 -0
- package/dist/direct/pictures.js.map +1 -0
- package/dist/direct/props-in-hand.d.ts +71 -0
- package/dist/direct/props-in-hand.d.ts.map +1 -0
- package/dist/direct/props-in-hand.js +285 -0
- package/dist/direct/props-in-hand.js.map +1 -0
- package/dist/direct/props.d.ts +32 -0
- package/dist/direct/props.d.ts.map +1 -0
- package/dist/direct/props.js +118 -0
- package/dist/direct/props.js.map +1 -0
- package/dist/direct/riding.d.ts +76 -0
- package/dist/direct/riding.d.ts.map +1 -0
- package/dist/direct/riding.js +290 -0
- package/dist/direct/riding.js.map +1 -0
- package/dist/direct/scene.d.ts +322 -0
- package/dist/direct/scene.d.ts.map +1 -0
- package/dist/direct/scene.js +287 -0
- package/dist/direct/scene.js.map +1 -0
- package/dist/direct/shared.d.ts +87 -0
- package/dist/direct/shared.d.ts.map +1 -0
- package/dist/direct/shared.js +42 -0
- package/dist/direct/shared.js.map +1 -0
- package/dist/direct/sitting.d.ts +62 -0
- package/dist/direct/sitting.d.ts.map +1 -0
- package/dist/direct/sitting.js +320 -0
- package/dist/direct/sitting.js.map +1 -0
- package/dist/direct/throws.d.ts +14 -0
- package/dist/direct/throws.d.ts.map +1 -0
- package/dist/direct/throws.js +89 -0
- package/dist/direct/throws.js.map +1 -0
- package/dist/direct/timeline.d.ts +23 -0
- package/dist/direct/timeline.d.ts.map +1 -0
- package/dist/direct/timeline.js +90 -0
- package/dist/direct/timeline.js.map +1 -0
- package/dist/direct/timing.d.ts +50 -0
- package/dist/direct/timing.d.ts.map +1 -0
- package/dist/direct/timing.js +138 -0
- package/dist/direct/timing.js.map +1 -0
- package/dist/direct/vocabulary.d.ts +33 -0
- package/dist/direct/vocabulary.d.ts.map +1 -0
- package/dist/direct/vocabulary.js +56 -0
- package/dist/direct/vocabulary.js.map +1 -0
- package/dist/direct.d.ts +8 -87
- package/dist/direct.d.ts.map +1 -1
- package/dist/direct.js +8 -6052
- package/dist/direct.js.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import { r3 } from "./shared.js";
|
|
2
|
+
export function hold(who, at, view = "profile") {
|
|
3
|
+
// Anyone already hand in hand with one of them joins: the whole chain steps together.
|
|
4
|
+
const group = new Set(who);
|
|
5
|
+
for (let grew = true; grew;) {
|
|
6
|
+
grew = false;
|
|
7
|
+
for (const p of this.handPairs)
|
|
8
|
+
if (p.t1 > at && group.has(p.a) !== group.has(p.b)) {
|
|
9
|
+
group.add(p.a).add(p.b);
|
|
10
|
+
grew = true;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
const order = [...group].sort((a, b) => this.xAt(a, at) - this.xAt(b, at));
|
|
14
|
+
// (With no time to step together before the beat, the hands meet when everyone is there.)
|
|
15
|
+
at = Math.max(at, this.gather(order, at, view));
|
|
16
|
+
for (const id of order)
|
|
17
|
+
this.face(id, "right", at);
|
|
18
|
+
for (let i = 1; i < order.length; i++)
|
|
19
|
+
this.holdPair(order[i - 1], order[i], at, view);
|
|
20
|
+
}
|
|
21
|
+
/** Shoulder of an arm in setup space (the back view moves the shoulders to the sides). */
|
|
22
|
+
export function shoulder(id, arm, view) {
|
|
23
|
+
const rig = this.member(id).rig;
|
|
24
|
+
const s = rig.shoulder[arm];
|
|
25
|
+
return view === "back" ? [s[0] + rig.backShoulder[arm][0], s[1] + rig.backShoulder[arm][1]] : s;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Distance between two neighbours holding hands (a left of b, scene px): heads (and, from behind,
|
|
29
|
+
* bodies) side by side without covering each other, unless the arms are too short for that.
|
|
30
|
+
*/
|
|
31
|
+
export function holdGap(a, b, view) {
|
|
32
|
+
const sa = this.scaleOf(a), sb = this.scaleOf(b);
|
|
33
|
+
const A = this.member(a).rig, B = this.member(b).rig;
|
|
34
|
+
// From behind the head is centred: half its width on each side.
|
|
35
|
+
const apart = view === "back"
|
|
36
|
+
? (((A.extent.front + A.extent.back) / 2) * sa + ((B.extent.front + B.extent.back) / 2) * sb) * 0.8
|
|
37
|
+
: (A.extent.front * sa + B.extent.back * sb) * 0.85;
|
|
38
|
+
const shoulders = this.shoulder(a, "F", view)[0] * sa - this.shoulder(b, "B", view)[0] * sb;
|
|
39
|
+
const reach = shoulders + (A.armLength.F * sa + B.armLength.B * sb) * 0.94 * 1.3;
|
|
40
|
+
return Math.max(60, Math.min(apart, reach));
|
|
41
|
+
}
|
|
42
|
+
/** Neighbours step together (around their centre) to holding distance, ending at `at`; returns when the last one is there. */
|
|
43
|
+
export function gather(order, at, view) {
|
|
44
|
+
const xs = [0];
|
|
45
|
+
for (let i = 1; i < order.length; i++)
|
|
46
|
+
xs.push(xs[i - 1] + this.holdGap(order[i - 1], order[i], view));
|
|
47
|
+
const centre = order.reduce((s, id) => s + this.xAt(id, at - 0.6), 0) / order.length;
|
|
48
|
+
const mid = xs.reduce((s, x) => s + x, 0) / xs.length;
|
|
49
|
+
// As the block opens (no time to step together before it), they are there already.
|
|
50
|
+
const opening = at - 0.6 < this.t0 + 0.05;
|
|
51
|
+
let there = at;
|
|
52
|
+
order.forEach((id, i) => {
|
|
53
|
+
const x = centre - mid + xs[i];
|
|
54
|
+
if (Math.abs(this.xAt(id, at - 0.6) - x) <= 6)
|
|
55
|
+
return;
|
|
56
|
+
const actor = this.actors.find((a) => a.id === id);
|
|
57
|
+
if (opening && actor && !this.walks.some((w) => w.actor === id)) {
|
|
58
|
+
actor.x = Math.round(x);
|
|
59
|
+
this.x0[id] = x;
|
|
60
|
+
}
|
|
61
|
+
else
|
|
62
|
+
there = Math.max(there, this.walk(id, x, at - 0.6, 0.6));
|
|
63
|
+
});
|
|
64
|
+
return there;
|
|
65
|
+
}
|
|
66
|
+
/** Hand in hand, computed in scene space so each character uses its own scale. */
|
|
67
|
+
export function holdPair(a, b, at, view) {
|
|
68
|
+
const ik = (id, chain) => (this.kit.characters[this.characterOf(id)]?.ik ?? []).some((k) => k.id === chain);
|
|
69
|
+
if (!ik(a, "handF") || !ik(b, "handB"))
|
|
70
|
+
return this.issue("warning", `${a} and ${b} cannot hold hands (IK chains handF / handB missing)`);
|
|
71
|
+
// A hung prop in a hand that is about to hold someone's goes into the other hand.
|
|
72
|
+
this.clearHand(a, "F", at);
|
|
73
|
+
this.clearHand(b, "B", at);
|
|
74
|
+
const A = this.member(a).rig, B = this.member(b).rig;
|
|
75
|
+
const sa = this.scaleOf(a), sb = this.scaleOf(b);
|
|
76
|
+
const pa = this.xAt(a, at), pb = this.xAt(b, at);
|
|
77
|
+
const shA = this.shoulder(a, "F", view), shB = this.shoulder(b, "B", view);
|
|
78
|
+
// Shoulders in scene space (y relative to the ground line).
|
|
79
|
+
const SA = [pa + shA[0] * sa, shA[1] * sa];
|
|
80
|
+
const SB = [pb + shB[0] * sb, shB[1] * sb];
|
|
81
|
+
// The hands meet between the shoulders (split by arm length), as low as the arms allow unstretched.
|
|
82
|
+
const LA = A.armLength.F * sa * 0.94, LB = B.armLength.B * sb * 0.94;
|
|
83
|
+
const mx = SA[0] + (SB[0] - SA[0]) * (LA / (LA + LB));
|
|
84
|
+
const top = Math.max(SA[1], SB[1]);
|
|
85
|
+
const drop = (L, dx, dy) => Math.sqrt(Math.max(0, L * L - dx * dx)) - dy;
|
|
86
|
+
const low = Math.max(18 * Math.min(sa, sb), Math.min((view === "back" ? 62 : 42) * Math.min(sa, sb), drop(LA, mx - SA[0], top - SA[1]), drop(LB, SB[0] - mx, top - SB[1])));
|
|
87
|
+
const M = [mx, top + low];
|
|
88
|
+
const arms = [
|
|
89
|
+
{ actor: a, chain: "handF", bones: ["armF1", "armF2"], target: [(M[0] - pa) / sa, M[1] / sa], rest: A.hand.F, shoulder: shA, len: A.armLength.F },
|
|
90
|
+
{ actor: b, chain: "handB", bones: ["armB1", "armB2"], target: [(M[0] - pb) / sb, M[1] / sb], rest: B.hand.B, shoulder: shB, len: B.armLength.B },
|
|
91
|
+
];
|
|
92
|
+
for (const arm of arms) {
|
|
93
|
+
const need = Math.hypot(arm.target[0] - arm.shoulder[0], arm.target[1] - arm.shoulder[1]);
|
|
94
|
+
const stretch = r3(Math.max(0, need / (arm.len * 0.94) - 1));
|
|
95
|
+
if (stretch > 0.6)
|
|
96
|
+
this.issue("error", `${a} and ${b} are too far apart to hold hands (${arm.actor}'s arm would stretch ${Math.round(stretch * 100)}%): hold them before they move apart`);
|
|
97
|
+
this.set(arm.actor, `ik.${arm.chain}.x`, r3(arm.target[0] - arm.rest[0]), at);
|
|
98
|
+
this.set(arm.actor, `ik.${arm.chain}.y`, r3(arm.target[1] - arm.rest[1]), at);
|
|
99
|
+
this.set(arm.actor, `ik.${arm.chain}.mix`, 1, at, 0.45, "sineInOut");
|
|
100
|
+
for (const bone of arm.bones)
|
|
101
|
+
this.set(arm.actor, `bones.${bone}.squash`, Math.min(0.6, stretch), at, 0.45, "sineInOut");
|
|
102
|
+
const already = this.holds.some((h) => h.actor === arm.actor && h.t1 === Infinity);
|
|
103
|
+
this.holds.push({ actor: arm.actor, t0: at, t1: Infinity });
|
|
104
|
+
if (!already) {
|
|
105
|
+
// The holding clip (and its busy window) last until the hands let go: settled when the block is built.
|
|
106
|
+
const n = this.script.length;
|
|
107
|
+
this.play(arm.actor, "hold", at, 60, { fadeIn: 0.4 });
|
|
108
|
+
if (this.script.length > n)
|
|
109
|
+
this.holdClips.push({ actor: arm.actor, t0: at, clip: this.script[n], busy: this.busy[this.busy.length - 1] });
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
for (const p of this.handPairs)
|
|
113
|
+
if (p.a === a && p.b === b && p.t1 === Infinity)
|
|
114
|
+
p.t1 = at;
|
|
115
|
+
this.handPairs.push({ a, b, t0: at, t1: Infinity });
|
|
116
|
+
// Whoever holds something in the near hand passes it to the other hand (a "heldHand" switch: near | far).
|
|
117
|
+
const ca = this.kit.characters[this.characterOf(a)];
|
|
118
|
+
if (ca?.parts?.some((p) => p.id === "heldHand"))
|
|
119
|
+
this.set(a, "parts.heldHand.variant", "far", at);
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Lets go of every hand held: the actor's arms come back, and so does the hand of each partner
|
|
123
|
+
* that held theirs (a partner still holding someone else keeps that hand). Returns the partners.
|
|
124
|
+
*/
|
|
125
|
+
export function releaseHands(actor, at) {
|
|
126
|
+
const partners = [];
|
|
127
|
+
for (const p of this.handPairs) {
|
|
128
|
+
if ((p.a !== actor && p.b !== actor) || p.t1 !== Infinity)
|
|
129
|
+
continue;
|
|
130
|
+
p.t1 = at;
|
|
131
|
+
const partner = p.a === actor ? p.b : p.a;
|
|
132
|
+
partners.push(partner);
|
|
133
|
+
// The partner's hand in this pair (the left one holds with the near hand, the right one with the far).
|
|
134
|
+
this.freeHand(partner, p.a === actor ? "handB" : "handF", at);
|
|
135
|
+
if (!this.handPairs.some((q) => (q.a === partner || q.b === partner) && q.t1 === Infinity))
|
|
136
|
+
for (const h of this.holds)
|
|
137
|
+
if (h.actor === partner && h.t1 === Infinity)
|
|
138
|
+
h.t1 = at;
|
|
139
|
+
}
|
|
140
|
+
for (const h of this.holds)
|
|
141
|
+
if (h.actor === actor && h.t1 === Infinity)
|
|
142
|
+
h.t1 = at;
|
|
143
|
+
this.freeHand(actor, "handF", at);
|
|
144
|
+
this.freeHand(actor, "handB", at);
|
|
145
|
+
if (this.kit.characters[this.characterOf(actor)]?.parts?.some((p) => p.id === "heldHand"))
|
|
146
|
+
this.set(actor, "parts.heldHand.variant", "near", at);
|
|
147
|
+
return partners;
|
|
148
|
+
}
|
|
149
|
+
/** An arm held out to someone's hand comes back (its IK off, its stretch gone). */
|
|
150
|
+
export function freeHand(actor, chain, at) {
|
|
151
|
+
this.set(actor, `ik.${chain}.mix`, 0, at, 0.4, "sineInOut");
|
|
152
|
+
for (const bone of [`arm${chain === "handF" ? "F" : "B"}1`, `arm${chain === "handF" ? "F" : "B"}2`])
|
|
153
|
+
this.set(actor, `bones.${bone}.squash`, 0, at, 0.4);
|
|
154
|
+
}
|
|
155
|
+
/** Hand-in-hand clips last until the hands let go (the end of the block at most). */
|
|
156
|
+
export function settleHolds() {
|
|
157
|
+
for (const h of this.holdClips) {
|
|
158
|
+
// The actor keeps holding while any pair of theirs begun by then is still open.
|
|
159
|
+
let end = h.t0;
|
|
160
|
+
for (let guard = 0; guard < 64; guard++) {
|
|
161
|
+
const open = this.handPairs.filter((p) => (p.a === h.actor || p.b === h.actor) && p.t0 <= end + 1e-6 && p.t1 > end + 1e-6);
|
|
162
|
+
if (!open.length)
|
|
163
|
+
break;
|
|
164
|
+
end = Math.max(...open.map((p) => p.t1));
|
|
165
|
+
}
|
|
166
|
+
end = Math.min(end, this.t1);
|
|
167
|
+
h.clip.duration = r3(Math.max(0.1, end - h.t0));
|
|
168
|
+
h.busy.t1 = end;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
/** After letting go, neighbours who stood hand in hand step back to their usual spacing. */
|
|
172
|
+
export function stepApart(who, at) {
|
|
173
|
+
const t = at + 0.25;
|
|
174
|
+
const order = [...who].sort((a, b) => this.xAt(a, t) - this.xAt(b, t));
|
|
175
|
+
const xs = [0];
|
|
176
|
+
for (let i = 1; i < order.length; i++)
|
|
177
|
+
xs.push(xs[i - 1] + Math.max(this.xAt(order[i], t) - this.xAt(order[i - 1], t), this.pairGap(order[i - 1], order[i], this.facing(order[i - 1], t), this.facing(order[i], t))));
|
|
178
|
+
const centre = order.reduce((s, id) => s + this.xAt(id, t), 0) / order.length;
|
|
179
|
+
const mid = xs.reduce((s, x) => s + x, 0) / xs.length;
|
|
180
|
+
order.forEach((id, i) => {
|
|
181
|
+
const x = centre - mid + xs[i];
|
|
182
|
+
const busy = this.walks.some((w) => w.actor === id && w.t1 > t && w.t0 < t + 0.7);
|
|
183
|
+
if (!busy && Math.abs(this.xAt(id, t) - x) > 6)
|
|
184
|
+
this.walk(id, x, t, 0.7);
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
//# sourceMappingURL=hand-holding.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hand-holding.js","sourceRoot":"","sources":["../../src/direct/hand-holding.ts"],"names":[],"mappings":"AA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AAE,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC;IAC9E,MAAM,GAAG,GAAG,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC;IACtD,KAAK,CAAC,OAAO,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,EAAE;QACtB,MAAM,CAAC,GAAG,MAAM,GAAG,GAAG,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC;QAC/B,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,KAAK,EAAE,IAAI,CAAC,CAAC,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC,EAAE,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC;QAClF,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC;YAAE,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC,CAAC;IAC3E,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { BlockScene } from "./scene.js";
|
|
2
|
+
/** Top (scene y) of a placed rig's drawing at a scene x (the shapes over that x). */
|
|
3
|
+
export declare function drawnTop(this: BlockScene, id: string, atX: number): number;
|
|
4
|
+
/** Top and bottom (scene y) of a placed rig's drawing over a scene x. */
|
|
5
|
+
export declare function drawnSpan(this: BlockScene, id: string, atX: number): [number, number];
|
|
6
|
+
/** Width (scene px) of a placed rig's drawing (its shapes' boxes). */
|
|
7
|
+
export declare function drawnWidth(this: BlockScene, id: string): number;
|
|
8
|
+
/**
|
|
9
|
+
* Hides behind something (a tree, a car, the sofa: a fixture, furniture, a vehicle or someone):
|
|
10
|
+
* walks there and stays behind it (drawn under it) until `until`; the check knows it is meant.
|
|
11
|
+
*/
|
|
12
|
+
export declare function hide(this: BlockScene, actor: string, behind: string, at: number, until?: number): void;
|
|
13
|
+
/** Peeks out from behind the hiding place: leans past its edge, then back (`until`, default 1.2 s). */
|
|
14
|
+
export declare function peek(this: BlockScene, actor: string, at: number, until?: number): void;
|
|
15
|
+
/** Two characters covering each other for more than half a second (not hand in hand). */
|
|
16
|
+
/** Invisible at an episode time (opacity track at 0: waiting to enter, gone after leaving). */
|
|
17
|
+
export declare function hiddenAt(this: BlockScene, actor: string, abs: number): boolean;
|
|
18
|
+
export declare function checkOverlaps(this: BlockScene): void;
|
|
19
|
+
//# sourceMappingURL=hiding.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hiding.d.ts","sourceRoot":"","sources":["../../src/direct/hiding.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAI1C,qFAAqF;AACrF,wBAAgB,QAAQ,CAAC,IAAI,EAAE,UAAU,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,UAEjE;AAED,yEAAyE;AACzE,wBAAgB,SAAS,CAAC,IAAI,EAAE,UAAU,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAUrF;AAED,sEAAsE;AACtE,wBAAgB,UAAU,CAAC,IAAI,EAAE,UAAU,EAAE,EAAE,EAAE,MAAM,UAOtD;AAED;;;GAGG;AACH,wBAAgB,IAAI,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,QAgD/F;AAED,uGAAuG;AACvG,wBAAgB,IAAI,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,QAsB/E;AAED,yFAAyF;AACzF,+FAA+F;AAC/F,wBAAgB,QAAQ,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,WAOpE;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,UAAU,QAsC7C"}
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hiding behind things and peeking, and the overlap checks between actors.
|
|
3
|
+
*/
|
|
4
|
+
import { markupBoxes } from "./pictures.js";
|
|
5
|
+
import { r3 } from "./shared.js";
|
|
6
|
+
import { closest } from "./vocabulary.js";
|
|
7
|
+
/** Top (scene y) of a placed rig's drawing at a scene x (the shapes over that x). */
|
|
8
|
+
export function drawnTop(id, atX) {
|
|
9
|
+
return this.drawnSpan(id, atX)[0];
|
|
10
|
+
}
|
|
11
|
+
/** Top and bottom (scene y) of a placed rig's drawing over a scene x. */
|
|
12
|
+
export function drawnSpan(id, atX) {
|
|
13
|
+
const a = this.actors.find((x) => x.id === id);
|
|
14
|
+
const doc = a && this.kit.characters[a.character];
|
|
15
|
+
const arts = (doc?.parts ?? []).filter((p) => p.space !== "bone").flatMap((p) => [p.art, ...Object.values(p.variants ?? {})]).filter(Boolean).map((x) => (x.trim().startsWith("<") ? x : (doc?.art?.[x] ?? "")));
|
|
16
|
+
if (!a)
|
|
17
|
+
return [-Infinity, Infinity];
|
|
18
|
+
const sc = a.scale ?? 1, lx = ((atX - a.x) / sc) * (a.flip ? -1 : 1);
|
|
19
|
+
const boxes = arts.flatMap(markupBoxes).filter((b) => b[0] <= lx && b[2] >= lx);
|
|
20
|
+
// The lower edge ignores flat shapes (a shadow on the floor, a thin rim).
|
|
21
|
+
const solid = boxes.filter((b) => b[3] - b[1] > (b[2] - b[0]) * 0.06);
|
|
22
|
+
return boxes.length ? [a.y + Math.min(...boxes.map((b) => b[1])) * sc, a.y + Math.max(...(solid.length ? solid : boxes).map((b) => b[3])) * sc] : [-Infinity, Infinity];
|
|
23
|
+
}
|
|
24
|
+
/** Width (scene px) of a placed rig's drawing (its shapes' boxes). */
|
|
25
|
+
export function drawnWidth(id) {
|
|
26
|
+
const a = this.actors.find((x) => x.id === id);
|
|
27
|
+
const doc = a && this.kit.characters[a.character];
|
|
28
|
+
const arts = (doc?.parts ?? []).filter((p) => p.space !== "bone").flatMap((p) => [p.art, ...Object.values(p.variants ?? {})]).filter(Boolean).map((x) => (x.trim().startsWith("<") ? x : (doc?.art?.[x] ?? "")));
|
|
29
|
+
const boxes = arts.flatMap(markupBoxes);
|
|
30
|
+
if (!boxes.length)
|
|
31
|
+
return 0;
|
|
32
|
+
return (Math.max(...boxes.map((b) => b[2])) - Math.min(...boxes.map((b) => b[0]))) * (a?.scale ?? 1);
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Hides behind something (a tree, a car, the sofa: a fixture, furniture, a vehicle or someone):
|
|
36
|
+
* walks there and stays behind it (drawn under it) until `until`; the check knows it is meant.
|
|
37
|
+
*/
|
|
38
|
+
export function hide(actor, behind, at, until) {
|
|
39
|
+
const target = this.actors.find((x) => x.id === behind);
|
|
40
|
+
if (!target)
|
|
41
|
+
return this.issue("error", `${actor} cannot hide behind "${behind}": not in block "${this.block.id}"${closest(behind, this.actors.map((x) => x.id))}`);
|
|
42
|
+
const x = this.xAt(behind, at);
|
|
43
|
+
let t = at;
|
|
44
|
+
if (Math.abs(this.xAt(actor, at) - x) > 20) {
|
|
45
|
+
const dur = Math.min(1.6, Math.max(0.5, Math.abs(this.xAt(actor, at) - x) / ((this.member(actor)?.speed?.walk ?? 170) * this.scaleOf(actor))));
|
|
46
|
+
this.walk(actor, x, at, dur);
|
|
47
|
+
t = at + dur;
|
|
48
|
+
}
|
|
49
|
+
// Drawn under what they hide behind while hiding (a stepped depth track).
|
|
50
|
+
const meZ = this.actors.find((x) => x.id === actor)?.z ?? 2;
|
|
51
|
+
if (meZ >= (target.z ?? 0)) {
|
|
52
|
+
this.set(actor, "z", (target.z ?? 0) - 0.05, t);
|
|
53
|
+
if (until !== undefined)
|
|
54
|
+
this.set(actor, "z", meZ, until);
|
|
55
|
+
}
|
|
56
|
+
// Behind something lower than the head (a table, a bush, a car): crouch until the head is below
|
|
57
|
+
// its top — the hips go down, the feet stay on the floor (knees bend), the back bends forward.
|
|
58
|
+
const rig = this.member(actor)?.rig, s = this.scaleOf(actor);
|
|
59
|
+
// The top of the head as drawn: the head (or face) anchor plus some hair above it.
|
|
60
|
+
const anchors = (this.kit.characters[this.characterOf(actor)]?.anchors ?? {});
|
|
61
|
+
const headY = (anchors.head ?? anchors.face)?.at[1];
|
|
62
|
+
const headTop = this.groundY(actor, at) + (headY !== undefined ? headY - (rig?.height ?? 300) * 0.16 : -(rig?.height ?? 300)) * s;
|
|
63
|
+
const [objTop, objBottom] = this.drawnSpan(behind, x);
|
|
64
|
+
const need = objTop + 24 - headTop; // scene px the head must go down (with a margin for tall hair)
|
|
65
|
+
let crouch = 0, lean = 0;
|
|
66
|
+
if (need > 0 && Number.isFinite(need)) {
|
|
67
|
+
// The hips stay above the object's lower edge (under a tablecloth or a car the floor shows).
|
|
68
|
+
const hipUp = Math.abs(this.hipOf(actor)[1]) * s;
|
|
69
|
+
const floor = this.groundY(actor, at);
|
|
70
|
+
// The pelvis and the shirt hem hang below the hip joint: keep a margin of about a tenth of the height.
|
|
71
|
+
const room = Number.isFinite(objBottom) && objBottom < floor ? hipUp - (floor - objBottom) - (rig?.height ?? 300) * s * 0.1 : hipUp;
|
|
72
|
+
crouch = Math.max(0, Math.min(need, (rig?.legLength?.F ?? 100) * s * 0.95, room));
|
|
73
|
+
this.set(actor, "bones.hips.y", r3(crouch / s), t, 0.3, "easeOut");
|
|
74
|
+
lean = need > crouch ? r3(Math.min(60, ((need - crouch) / ((rig?.height ?? 300) * s * 0.4)) * 70)) : 0;
|
|
75
|
+
if (lean)
|
|
76
|
+
this.set(actor, "bones.body.rotation", lean, t, 0.3, "easeOut");
|
|
77
|
+
// Arms folded in front, around the knees (hanging, they would show under the object).
|
|
78
|
+
const arms = [["armF1", -70], ["armF2", -80], ["armB1", -60], ["armB2", -80]];
|
|
79
|
+
for (const [bone, deg] of arms)
|
|
80
|
+
this.set(actor, `bones.${bone}.rotation`, deg, t, 0.3, "easeOut");
|
|
81
|
+
if (until !== undefined) {
|
|
82
|
+
this.set(actor, "bones.hips.y", 0, until, 0.3, "easeOut");
|
|
83
|
+
if (lean)
|
|
84
|
+
this.set(actor, "bones.body.rotation", 0, until, 0.3, "easeOut");
|
|
85
|
+
for (const [bone] of arms)
|
|
86
|
+
this.set(actor, `bones.${bone}.rotation`, 0, until, 0.3, "easeOut");
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
this.hidings.push({ actor, behind, t0: at, t1: until ?? Infinity, crouch, lean });
|
|
90
|
+
if (until !== undefined && this.hasControl(actor, "emotion"))
|
|
91
|
+
this.push({ at: this.t(until), actor, action: "pose", control: "emotion", value: "happy", duration: 0.3 });
|
|
92
|
+
void t;
|
|
93
|
+
}
|
|
94
|
+
/** Peeks out from behind the hiding place: leans past its edge, then back (`until`, default 1.2 s). */
|
|
95
|
+
export function peek(actor, at, until) {
|
|
96
|
+
const h = this.hidings.find((x) => x.actor === actor && x.t0 <= at && x.t1 > at);
|
|
97
|
+
if (!h)
|
|
98
|
+
return this.issue("error", `${actor} cannot peek: not hiding then (use "hide" first)`);
|
|
99
|
+
const back = until ?? at + 1.2;
|
|
100
|
+
// Crouching behind something low: the head pops up over its top (the back straight), then ducks
|
|
101
|
+
// back down into the same crouch — unless the hiding is over by then (they stand up for good).
|
|
102
|
+
if (h.crouch > 0) {
|
|
103
|
+
const s = this.scaleOf(actor);
|
|
104
|
+
this.set(actor, "bones.hips.y", 0, at, 0.25, "easeOut");
|
|
105
|
+
if (h.lean)
|
|
106
|
+
this.set(actor, "bones.body.rotation", 0, at, 0.25, "easeOut");
|
|
107
|
+
if (back < h.t1) {
|
|
108
|
+
this.set(actor, "bones.hips.y", r3(h.crouch / s), back, 0.25, "easeIn");
|
|
109
|
+
if (h.lean)
|
|
110
|
+
this.set(actor, "bones.body.rotation", h.lean, back, 0.25, "easeIn");
|
|
111
|
+
}
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
// Behind something tall: leans out past its edge, then back.
|
|
115
|
+
const x = this.xAt(h.behind, at);
|
|
116
|
+
const side = this.facing(actor, at) ? 1 : -1;
|
|
117
|
+
const out = x + side * (this.drawnWidth(h.behind) / 2 + (this.member(actor)?.rig.extent.front ?? 60) * this.scaleOf(actor) * 0.3);
|
|
118
|
+
this.slide(actor, out, at, 0.3);
|
|
119
|
+
this.slide(actor, x, back, 0.3);
|
|
120
|
+
}
|
|
121
|
+
/** Two characters covering each other for more than half a second (not hand in hand). */
|
|
122
|
+
/** Invisible at an episode time (opacity track at 0: waiting to enter, gone after leaving). */
|
|
123
|
+
export function hiddenAt(actor, abs) {
|
|
124
|
+
const tr = this.tracks[`actors.${actor}.opacity`];
|
|
125
|
+
if (!tr?.length)
|
|
126
|
+
return false;
|
|
127
|
+
const t = this.t(abs);
|
|
128
|
+
let v = tr[0][1];
|
|
129
|
+
for (const [k, val] of tr)
|
|
130
|
+
if (k <= t)
|
|
131
|
+
v = val;
|
|
132
|
+
return v <= 0.01;
|
|
133
|
+
}
|
|
134
|
+
export function checkOverlaps() {
|
|
135
|
+
const ids = this.present;
|
|
136
|
+
const reported = new Set();
|
|
137
|
+
for (let i = 0; i < ids.length; i++)
|
|
138
|
+
for (let j = i + 1; j < ids.length; j++) {
|
|
139
|
+
let run = 0;
|
|
140
|
+
for (let t = this.t0; t < this.t1; t += 0.25) {
|
|
141
|
+
const a = ids[i], b = ids[j];
|
|
142
|
+
const holding = this.holds.some((h) => (h.actor === a || h.actor === b) && h.t0 <= t && h.t1 > t);
|
|
143
|
+
const [l, r] = this.xAt(a, t) <= this.xAt(b, t) ? [a, b] : [b, a];
|
|
144
|
+
// On the far ground everyone is smaller (depthScale): they need less room.
|
|
145
|
+
const far = (id) => (this.crossed.has(id) && t >= this.crossed.get(id) ? (this.setDef.depthScale ?? 0.6) : 1);
|
|
146
|
+
const need = (this.pairGap(l, r, this.facing(l, t), this.facing(r, t)) - 20) * Math.max(far(l), far(r));
|
|
147
|
+
const gap = this.xAt(r, t) - this.xAt(l, t);
|
|
148
|
+
// Walking past someone is fine; standing on top of each other is not.
|
|
149
|
+
const moving = this.walks.some((w) => (w.actor === a || w.actor === b) && w.t0 <= t && w.t1 > t);
|
|
150
|
+
// Nobody covers anyone while one of them is not on screen (before entering, after leaving)
|
|
151
|
+
// or hides behind the other on purpose.
|
|
152
|
+
const hiding = this.hidings.some((h) => h.t0 <= t && h.t1 > t && ((h.actor === a && h.behind === b) || (h.actor === b && h.behind === a)));
|
|
153
|
+
if (hiding || this.hiddenAt(a, t) || this.hiddenAt(b, t)) {
|
|
154
|
+
run = 0;
|
|
155
|
+
continue;
|
|
156
|
+
}
|
|
157
|
+
// Side by side on the same sofa or bench is where they belong.
|
|
158
|
+
const ra = this.restAt(a, t), rb = this.restAt(b, t);
|
|
159
|
+
if (ra?.on && ra.on === rb?.on) {
|
|
160
|
+
run = 0;
|
|
161
|
+
continue;
|
|
162
|
+
}
|
|
163
|
+
run = !holding && !moving && gap < need * 0.7 ? run + 0.25 : 0;
|
|
164
|
+
const key = `${a}|${b}`;
|
|
165
|
+
if (run > 0.5 && !reported.has(key)) {
|
|
166
|
+
reported.add(key);
|
|
167
|
+
const line = this.time.lines.filter((x) => x.s <= t).pop()?.i ?? this.block.from;
|
|
168
|
+
this.issue("error", `around line ${line}: ${l} and ${r} cover each other (${Math.round(gap)} px apart, need ${Math.round(need)}): send them to different places or use "near"`);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}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ACX,CAAC;gBACD,GAAG,GAAG,CAAC,OAAO,IAAI,CAAC,MAAM,IAAI,GAAG,GAAG,IAAI,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;gBAC/D,MAAM,GAAG,GAAG,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;gBACxB,IAAI,GAAG,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;oBACpC,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;oBAClB,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC;oBACjF,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,eAAe,IAAI,KAAK,CAAC,QAAQ,CAAC,sBAAsB,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,mBAAmB,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,gDAAgD,CAAC,CAAC;gBAClL,CAAC;YACH,CAAC;QACH,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Life: blinks, saccades, accents and reactions (takes).
|
|
3
|
+
*/
|
|
4
|
+
import type { BlockScene } from "./scene.js";
|
|
5
|
+
/**
|
|
6
|
+
* A rig's eyes: the switch part its `blink` behaviour closes (else a switch part `eyes`), when it
|
|
7
|
+
* draws a closed variant — with its variants and default.
|
|
8
|
+
*/
|
|
9
|
+
export declare function eyesOf(this: BlockScene, actor: string): {
|
|
10
|
+
part: string;
|
|
11
|
+
open: string;
|
|
12
|
+
closed: string;
|
|
13
|
+
variants: string[];
|
|
14
|
+
def?: string;
|
|
15
|
+
} | undefined;
|
|
16
|
+
/** The emotion an actor shows at a moment (the last one posed). */
|
|
17
|
+
export declare function emotionAt(this: BlockScene, actor: string, abs: number): string | undefined;
|
|
18
|
+
/** The variant the eyes rest on at a moment: the current emotion's when its pose sets them, else the part's default. */
|
|
19
|
+
export declare function eyesAt(this: BlockScene, actor: string, abs: number): string;
|
|
20
|
+
/** Frames per drawing of an actor (its cast entry's `twos`, else the block's). */
|
|
21
|
+
export declare function drawingOf(this: BlockScene, actor: string): number;
|
|
22
|
+
/** Asleep, dead or out of sight: no eye or head life then. */
|
|
23
|
+
export declare function still(this: BlockScene, actor: string, abs: number): boolean;
|
|
24
|
+
export declare function inTake(this: BlockScene, actor: string, a: number, b: number): boolean;
|
|
25
|
+
/** The value a channel was last set to (by a `set` begun by then), if any. */
|
|
26
|
+
export declare function setBefore(this: BlockScene, actor: string, channel: string, abs: number): unknown;
|
|
27
|
+
/**
|
|
28
|
+
* The eyes blink on every head turn — a `face` (flip or in-between turn), a new `view`, a new
|
|
29
|
+
* gaze target — as animators do: closed for 3 frames (two drawings on twos) from a frame before
|
|
30
|
+
* the turn, then back to where they rest. One blink per turn (its in-betweens are one turn).
|
|
31
|
+
*/
|
|
32
|
+
export declare function blinks(this: BlockScene): void;
|
|
33
|
+
/**
|
|
34
|
+
* Listening or idle (not speaking, not walking), the gaze darts now and then: the pupils jump a
|
|
35
|
+
* little sideways (±2 px × life) for 0.12 s and back, every 1.4–2.6 s (seeded by the actor and
|
|
36
|
+
* the line: the same in every render). On the pupils bone, so the gaze keeps tracking its target.
|
|
37
|
+
*/
|
|
38
|
+
export declare function saccades(this: BlockScene): void;
|
|
39
|
+
/**
|
|
40
|
+
* The head nods on the stressed words of a spoken line — the longest word of each clause and the
|
|
41
|
+
* last word — +3° × life over 0.08 s and back over 0.16 s, on top of what the head does (direct
|
|
42
|
+
* tracks add to clips and poses); none closer than 0.35 s to the previous one.
|
|
43
|
+
*/
|
|
44
|
+
export declare function accents(this: BlockScene): void;
|
|
45
|
+
/**
|
|
46
|
+
* Once a blink or a take has set the eyes, they follow the emotions again: each later emotion
|
|
47
|
+
* sets them to its own eyes (or the default) as it crosses half weight, so a set variant never
|
|
48
|
+
* outlives the face it was drawn for.
|
|
49
|
+
*/
|
|
50
|
+
/**
|
|
51
|
+
* A take: anticipation (the body squashes 4% and leans 3° away from the target over 0.12 s, the
|
|
52
|
+
* eyes shut), then the reaction on the moment (the eyes wide, the body stretched 6% up and leaning
|
|
53
|
+
* 4° towards the target over 0.08 s, the head snapping to it, `surprised`), held 0.35 s and
|
|
54
|
+
* settled over 0.3 s. A double take glances at the target first, looks back away after 0.25 s
|
|
55
|
+
* and fires the full take 0.2 s later, 1.4× bigger. Sized by `animation.anticipation` (else 1).
|
|
56
|
+
*/
|
|
57
|
+
export declare function reaction(this: BlockScene, actor: string, at: number, o: {
|
|
58
|
+
double?: boolean;
|
|
59
|
+
target?: unknown;
|
|
60
|
+
line: number;
|
|
61
|
+
}): void;
|
|
62
|
+
/** Where an IK chain starts (its shoulder: the kit's rig info, else its first bone's joint) and its rest tip, in character space. */
|
|
63
|
+
export declare function chainJoints(this: BlockScene, actor: string, chain: string): {
|
|
64
|
+
rest?: [number, number];
|
|
65
|
+
root?: [number, number];
|
|
66
|
+
} | undefined;
|
|
67
|
+
//# sourceMappingURL=life.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"life.d.ts","sourceRoot":"","sources":["../../src/direct/life.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAI1C;;;GAGG;AACH,wBAAgB,MAAM,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE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