@anime-studio/director 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/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 -6076
- package/dist/direct.js.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `check()`: direct() plus document validation, continuity and motion checks.
|
|
3
|
+
*/
|
|
4
|
+
import { validateScene, validateSequence, layoutShots, compileScene, screenPoint, multiply as multiplyMat, viewMatrix, cameraAt, actorPlacement, apply, actorPose, anchorPosition, propPlacement } from "@anime-studio/core";
|
|
5
|
+
import { direct, blocks0 } from "./episode.js";
|
|
6
|
+
import { pictureIssues } from "./pictures.js";
|
|
7
|
+
import { speakerId } from "./shared.js";
|
|
8
|
+
import { Timeline } from "./timeline.js";
|
|
9
|
+
export function check(staging, lines, kit, opts = {}) {
|
|
10
|
+
let out;
|
|
11
|
+
try {
|
|
12
|
+
out = direct(staging, lines, kit);
|
|
13
|
+
}
|
|
14
|
+
catch (e) {
|
|
15
|
+
return [{ severity: "error", where: "staging", message: e.message }];
|
|
16
|
+
}
|
|
17
|
+
const issues = [...out.issues];
|
|
18
|
+
const assets = { characters: kit.characters };
|
|
19
|
+
for (const [id, doc] of Object.entries(out.scenes)) {
|
|
20
|
+
const v = validateScene(doc, assets);
|
|
21
|
+
for (const i of v.issues)
|
|
22
|
+
issues.push({ severity: i.severity === "warning" ? "warning" : "error", where: `scene ${id} ${i.path}`, message: i.message });
|
|
23
|
+
}
|
|
24
|
+
const sv = validateSequence(out.sequence);
|
|
25
|
+
for (const i of sv.issues)
|
|
26
|
+
issues.push({ severity: "error", where: `sequence ${i.path}`, message: i.message });
|
|
27
|
+
// Shots that read as a blink, and white flashes too close together.
|
|
28
|
+
{
|
|
29
|
+
let t = 0, lastFlash = -Infinity;
|
|
30
|
+
for (const sh of out.sequence.shots) {
|
|
31
|
+
const d = sh.duration ?? 0;
|
|
32
|
+
if (d < 0.4 && (sh.speed ?? 1) === 1)
|
|
33
|
+
issues.push({ severity: "error", where: `sequence at ${t.toFixed(2)} s`, message: `a shot of "${sh.scene}" lasts ${d.toFixed(2)} s: it reads as a blink` });
|
|
34
|
+
const white = sh.transition && (sh.transition.type === "flash" || ((sh.transition.color ?? "").toLowerCase() === "#ffffff"));
|
|
35
|
+
if (white) {
|
|
36
|
+
if (t - lastFlash < 2)
|
|
37
|
+
issues.push({ severity: "error", where: `sequence at ${t.toFixed(2)} s`, message: `a white flash ${(t - lastFlash).toFixed(2)} s after another: the screen blinks` });
|
|
38
|
+
lastFlash = t;
|
|
39
|
+
}
|
|
40
|
+
t += d;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
const time = new Timeline(lines);
|
|
44
|
+
// The picture on the beat: every live shot's scene is laid out so that its time 0 falls on the
|
|
45
|
+
// block's start (a transition that overlaps shots never pulls what follows early: the mouths
|
|
46
|
+
// would move before the voices). Replays and rewinds are shown out of their time on purpose.
|
|
47
|
+
for (const sh of layoutShots(out.sequence, (id) => out.scenes[id].duration)) {
|
|
48
|
+
const block = staging.blocks.find((b) => b.id === sh.sceneId);
|
|
49
|
+
const src = out.sequence.shots[sh.index];
|
|
50
|
+
if (!block || src.muteSpeech || (src.speed ?? 1) !== 1)
|
|
51
|
+
continue;
|
|
52
|
+
const drift = sh.start - sh.from - blocks0(staging, time, block);
|
|
53
|
+
if (Math.abs(drift) > 0.02)
|
|
54
|
+
issues.push({ severity: "error", where: `sequence at ${sh.start.toFixed(2)} s`, message: `the shot of "${block.id}" runs ${Math.abs(drift).toFixed(2)} s ${drift < 0 ? "early" : "late"} against the dialogue (its scene's time 0 should fall on the block's start)` });
|
|
55
|
+
}
|
|
56
|
+
// Every speaking cast member is in the block where they speak.
|
|
57
|
+
for (const l of lines) {
|
|
58
|
+
const id = speakerId(kit, l.speaker);
|
|
59
|
+
if (!id)
|
|
60
|
+
continue;
|
|
61
|
+
const block = staging.blocks.find((b) => !b.insert && l.i >= b.from && l.i < b.to);
|
|
62
|
+
const replayed = staging.cuts?.some((c) => time.at(c) <= l.s && (c.until ? time.at(c.until) : time.at({ line: c.line, end: true })) >= l.e);
|
|
63
|
+
if (block && !replayed && !block.cast.some((c) => c.id === id))
|
|
64
|
+
issues.push({ severity: "error", where: `line ${l.i}`, message: `${l.speaker} speaks but is not in block "${block.id}"` });
|
|
65
|
+
}
|
|
66
|
+
// Whoever speaks must be in the frame (camera rigs are evaluated, not guessed).
|
|
67
|
+
const W = kit.width ?? 1920, H = kit.height ?? 1080;
|
|
68
|
+
const compiled = new Map();
|
|
69
|
+
for (const l of lines) {
|
|
70
|
+
const id = speakerId(kit, l.speaker);
|
|
71
|
+
const block = staging.blocks.find((b) => !b.insert && l.i >= b.from && l.i < b.to);
|
|
72
|
+
if (!id || !block || !block.cast.some((c) => c.id === id) || !out.scenes[block.id])
|
|
73
|
+
continue;
|
|
74
|
+
const replayed = staging.cuts?.some((c) => time.at(c) <= l.s && (c.until ? time.at(c.until) : time.at({ line: c.line, end: true })) >= l.e);
|
|
75
|
+
if (replayed)
|
|
76
|
+
continue;
|
|
77
|
+
try {
|
|
78
|
+
if (!compiled.has(block.id))
|
|
79
|
+
compiled.set(block.id, compileScene(out.scenes[block.id], assets));
|
|
80
|
+
const sc = compiled.get(block.id);
|
|
81
|
+
const t0 = blocks0(staging, time, block);
|
|
82
|
+
const [x, y] = screenPoint(sc, id, Math.max(0, (l.s + l.e) / 2 - t0));
|
|
83
|
+
if (x < W * 0.06 || x > W * 0.94 || y < H * 0.03 || y > H)
|
|
84
|
+
issues.push({ severity: "error", where: `line ${l.i}`, message: `${l.speaker} speaks out of the frame or at its edge (head at x ${Math.round(x)}, y ${Math.round(y)}): change the camera so the speaker is in shot` });
|
|
85
|
+
}
|
|
86
|
+
catch {
|
|
87
|
+
// validation already reports scenes that do not compile
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
// What the pictures show: characters past the edge of the set, faces covered by something.
|
|
91
|
+
for (const block of staging.blocks) {
|
|
92
|
+
const doc = out.scenes[block.id];
|
|
93
|
+
if (!doc)
|
|
94
|
+
continue;
|
|
95
|
+
try {
|
|
96
|
+
if (!compiled.has(block.id))
|
|
97
|
+
compiled.set(block.id, compileScene(doc, assets));
|
|
98
|
+
issues.push(...pictureIssues(compiled.get(block.id), block, kit, time, blocks0(staging, time, block)));
|
|
99
|
+
issues.push(...motionIssues(compiled.get(block.id), block, kit, time, blocks0(staging, time, block), opts.strict ? 1 / (kit.fps ?? 30) : 0.1));
|
|
100
|
+
}
|
|
101
|
+
catch {
|
|
102
|
+
// validation already reports scenes that do not compile
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
return issues;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Checks of the motion, sampled finely: someone appearing inside the frame (they must come in from
|
|
109
|
+
* outside it, or through a door); walking backwards or looking back while walking; a speaker who does
|
|
110
|
+
* not move for more than two seconds; a limb turning more than 120° from one frame to the next (a
|
|
111
|
+
* spin); a held object jumping (changing hands, or going round); a hand over the face outside the
|
|
112
|
+
* gestures made for it.
|
|
113
|
+
*/
|
|
114
|
+
function motionIssues(sc, block, kit, time, t0, dt) {
|
|
115
|
+
const issues = [];
|
|
116
|
+
const W = kit.width ?? 1920, H = kit.height ?? 1080;
|
|
117
|
+
const cast = new Set(block.cast.map((c) => c.id));
|
|
118
|
+
const lineAt = (t) => time.lines.filter((l) => l.s <= t0 + t).pop()?.i ?? block.from;
|
|
119
|
+
const reported = new Set();
|
|
120
|
+
const report = (severity, key, t, message) => {
|
|
121
|
+
if (reported.has(key))
|
|
122
|
+
return;
|
|
123
|
+
reported.add(key);
|
|
124
|
+
issues.push({ severity, where: `block ${block.id}`, message: `t ${(t0 + t).toFixed(2)} (line ${lineAt(t)}): ${message}` });
|
|
125
|
+
};
|
|
126
|
+
const opacity = (id, t) => {
|
|
127
|
+
const tr = sc.doc.tracks?.[`actors.${id}.opacity`];
|
|
128
|
+
if (!tr?.length)
|
|
129
|
+
return 1;
|
|
130
|
+
let v = tr[0][1];
|
|
131
|
+
for (const [k, val] of tr)
|
|
132
|
+
if (k <= t)
|
|
133
|
+
v = val;
|
|
134
|
+
return v;
|
|
135
|
+
};
|
|
136
|
+
const onScreen = (id, t) => {
|
|
137
|
+
const actor = sc.actors.find((a) => a.id === id);
|
|
138
|
+
const m = multiplyMat(viewMatrix(sc, cameraAt(sc, t), actor.def.parallax ?? 1), actorPlacement(actor, t));
|
|
139
|
+
const h = (actor.rig.anchors.head ? actor.rig.anchors.head.at[1] : -200);
|
|
140
|
+
const pts = [apply(m, [0, 0]), apply(m, [0, h])];
|
|
141
|
+
return pts.some(([x, y]) => x > -20 && x < W + 20 && y > -20 && y < H + 20);
|
|
142
|
+
};
|
|
143
|
+
const FACE_CLIPS = ["think", "facepalm", "cry", "drink", "phone", "smoke", "scared", "laugh"];
|
|
144
|
+
const speaking = (id) => time.lines.filter((l) => l.s >= t0 && l.s < t0 + sc.duration && speakerId(kit, l.speaker) === id);
|
|
145
|
+
for (const actor of sc.actors.filter((a) => cast.has(a.id))) {
|
|
146
|
+
const height = kit.cast[actor.id]?.rig?.height ?? 300;
|
|
147
|
+
const bones = actor.rig.bones.filter((b) => /^(arm|leg)[FB][12]$/.test(b.id));
|
|
148
|
+
let prev;
|
|
149
|
+
const held = sc.props.filter((p) => p.grabs.some((g) => g.actor === actor.id));
|
|
150
|
+
// An actor on twos changes every n frames: compare its drawings (a step of whole drawings), or
|
|
151
|
+
// every held frame would read as a stop and every change as twice the speed.
|
|
152
|
+
const drawing = actor.twos > 1 ? actor.twos / sc.fps : 0;
|
|
153
|
+
const step = drawing ? Math.ceil(dt / drawing - 1e-6) * drawing : dt;
|
|
154
|
+
for (let t = 0; t < sc.duration; t += step) {
|
|
155
|
+
const op = opacity(actor.id, t);
|
|
156
|
+
const pose = actorPose(sc, actor, t);
|
|
157
|
+
const pl = actorPlacement(actor, t);
|
|
158
|
+
// Each limb's direction: in 3D on a 2.5D rig (a limb swinging through pointing at the camera
|
|
159
|
+
// turns fast on screen, not in the body), else on screen.
|
|
160
|
+
const r3 = actor.rig.rig3d, f3 = pose.frame3d;
|
|
161
|
+
const dir = new Map(bones.map((b) => {
|
|
162
|
+
const i = r3?.byIndex.get(b.index);
|
|
163
|
+
if (r3 && f3 && i !== undefined) {
|
|
164
|
+
const B = r3.bones[i], R = f3.rot[i], v = [B.to[0] - B.from[0], B.to[1] - B.from[1], B.to[2] - B.from[2]];
|
|
165
|
+
return [b.index, [R[0] * v[0] + R[1] * v[1] + R[2] * v[2], R[3] * v[0] + R[4] * v[1] + R[5] * v[2], R[6] * v[0] + R[7] * v[1] + R[8] * v[2]]];
|
|
166
|
+
}
|
|
167
|
+
return [b.index, [pose.world[b.index][0], pose.world[b.index][1], 0]];
|
|
168
|
+
}));
|
|
169
|
+
const ang = new Map([...dir].map(([k, v]) => {
|
|
170
|
+
const l = Math.hypot(...v) || 1;
|
|
171
|
+
return [k, [v[0] / l, v[1] / l, v[2] / l]];
|
|
172
|
+
}));
|
|
173
|
+
const det = pl[0] * pl[3] - pl[1] * pl[2];
|
|
174
|
+
// Held props relative to the holding hand (a fast gesture moves both; a jump moves the prop alone).
|
|
175
|
+
const handAt = (g) => (actor.rig.anchors[g.anchor] ? anchorPosition(sc, actor.id, g.anchor, t, pose) : [pl[4], pl[5]]);
|
|
176
|
+
const props = new Map(held.flatMap((p) => {
|
|
177
|
+
const g = p.grabs.find((g) => g.actor === actor.id && g.start <= t && g.end > t);
|
|
178
|
+
if (!g)
|
|
179
|
+
return [];
|
|
180
|
+
const pp = propPlacementAt(sc, p, t), h = handAt(g.fit ? { anchor: actor.rig.anchors.hand ? "hand" : g.anchor } : g);
|
|
181
|
+
return [[p.id, [pp[0] - h[0], pp[1] - h[1]]]];
|
|
182
|
+
}));
|
|
183
|
+
if (prev) {
|
|
184
|
+
// Appearing inside the frame.
|
|
185
|
+
if (prev.op <= 0.01 && op > 0.01 && onScreen(actor.id, t))
|
|
186
|
+
report("error", `appear:${actor.id}:${Math.round(t)}`, t, `${actor.id} appears inside the frame: come in from outside the camera's view (enter from a side beyond it, or through a door: a mark with \`door\`)`);
|
|
187
|
+
if (op > 0.01) {
|
|
188
|
+
// Walking backwards (moving one way while facing the other) — not one carried: lifted onto
|
|
189
|
+
// someone, held by them or set down, it does not walk.
|
|
190
|
+
const vx = (pl[4] - prev.x) / (t - prev.t);
|
|
191
|
+
const faceLeft = pl[0] * pl[3] - pl[1] * pl[2] < 0 || pl[0] < 0;
|
|
192
|
+
const mk = (actor.mounts ?? []).filter((k) => k.t <= t).pop();
|
|
193
|
+
const carried = !!mk && (mk.on !== null || t <= mk.t + mk.blend + dt);
|
|
194
|
+
if (Math.abs(vx) > 60 && (vx > 0) === faceLeft && !carried)
|
|
195
|
+
report("error", `back:${actor.id}:${Math.round(t)}`, t, `${actor.id} walks backwards (moving ${vx > 0 ? "right" : "left"} while facing ${faceLeft ? "left" : "right"})`);
|
|
196
|
+
const head = pose.state.controls.head;
|
|
197
|
+
if (Math.abs(vx) > 60 && typeof head === "string")
|
|
198
|
+
report("warning", `look:${actor.id}:${Math.round(t)}`, t, `${actor.id} walks with the head turned (${head}): one looks where one goes`);
|
|
199
|
+
// A limb going round.
|
|
200
|
+
for (const [b, a] of prev.det * det < 0 ? [] : ang) {
|
|
201
|
+
const q = prev.ang.get(b);
|
|
202
|
+
if (!q)
|
|
203
|
+
continue;
|
|
204
|
+
const d = (Math.acos(Math.max(-1, Math.min(1, a[0] * q[0] + a[1] * q[1] + a[2] * q[2]))) * 180) / Math.PI;
|
|
205
|
+
// Sampled every frame, a turn faster than ~2500°/s is a limb going round (a fast run swings
|
|
206
|
+
// the arms at half that); sampled coarsely only a near half turn can be told.
|
|
207
|
+
if (dt <= 1 / 20 ? d / dt > 2500 : d > 165)
|
|
208
|
+
report("error", `spin:${actor.id}`, t, `${actor.id}'s ${actor.rig.bones[b].id} turns ${Math.round(d)}° in one step: a limb goes round (take the short way)`);
|
|
209
|
+
}
|
|
210
|
+
// A held object jumping.
|
|
211
|
+
for (const [id, p] of props) {
|
|
212
|
+
const q = prev.props.get(id);
|
|
213
|
+
if (q && Math.hypot(p[0] - q[0], p[1] - q[1]) > 0.35 * height * Math.hypot(pl[0], pl[1]))
|
|
214
|
+
report("error", `jump:${actor.id}:${id}`, t, `"${id}" jumps in ${actor.id}'s hands (changing hands or going round): an object changes hands only by a beat`);
|
|
215
|
+
}
|
|
216
|
+
// A hand over the face outside the gestures for it.
|
|
217
|
+
const face = actor.rig.anchors.face ?? actor.rig.anchors.head;
|
|
218
|
+
if (face && !actor.clips.some((c) => FACE_CLIPS.includes(c.clip) && c.start <= t && c.end > t) && !props.size) {
|
|
219
|
+
const fp = apply(multiplyMat(pose.world[face.bone], actor.rig.bones[face.bone].setupWorldInv), face.at);
|
|
220
|
+
for (const hn of ["handF", "handB"]) {
|
|
221
|
+
const hb = actor.rig.boneIndex.get(hn);
|
|
222
|
+
if (hb === undefined)
|
|
223
|
+
continue;
|
|
224
|
+
const hp = [pose.world[hb][4], pose.world[hb][5]];
|
|
225
|
+
if (Math.hypot(hp[0] - fp[0], hp[1] - fp[1]) < height * 0.05)
|
|
226
|
+
report("warning", `face:${actor.id}:${Math.round(t)}`, t, `${actor.id}'s hand is over the face outside a face gesture`);
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
prev = { t, ang, x: pl[4], op, props, det };
|
|
232
|
+
}
|
|
233
|
+
// A speaker who stays still.
|
|
234
|
+
for (const l of speaking(actor.id)) {
|
|
235
|
+
if (l.e - l.s < 2)
|
|
236
|
+
continue;
|
|
237
|
+
const a = l.s - t0, z = Math.min(sc.duration, l.e - t0);
|
|
238
|
+
const pts = (t) => {
|
|
239
|
+
const pose = actorPose(sc, actor, t);
|
|
240
|
+
return ["handF", "handB", "head"].map((n) => actor.rig.boneIndex.get(n)).filter((i) => i !== undefined).map((i) => [pose.world[i][4], pose.world[i][5]]);
|
|
241
|
+
};
|
|
242
|
+
const ref = pts(a);
|
|
243
|
+
let most = 0;
|
|
244
|
+
for (let t = a; t < z; t += 0.2)
|
|
245
|
+
pts(t).forEach((p, i) => (most = Math.max(most, Math.hypot(p[0] - ref[i][0], p[1] - ref[i][1]))));
|
|
246
|
+
if (most < 4)
|
|
247
|
+
report("warning", `still:${actor.id}:${l.i}`, a, `${actor.id} speaks line ${l.i} for ${(l.e - l.s).toFixed(1)} s without moving (no hand, head or body motion)`);
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
return issues;
|
|
251
|
+
}
|
|
252
|
+
/** Channel values blended (each angle the short way from `a` towards `b`). */
|
|
253
|
+
export function blendValues(a, b, u) {
|
|
254
|
+
const out = {};
|
|
255
|
+
for (const bone of new Set([...Object.keys(a), ...Object.keys(b)])) {
|
|
256
|
+
const v = {};
|
|
257
|
+
for (const k of ["rotation", "turn", "spread"]) {
|
|
258
|
+
const x = a[bone]?.[k] ?? 0, y0 = b[bone]?.[k] ?? 0, y = y0 + 360 * Math.round((x - y0) / 360);
|
|
259
|
+
v[k] = x + (y - x) * u;
|
|
260
|
+
}
|
|
261
|
+
out[bone] = v;
|
|
262
|
+
}
|
|
263
|
+
return out;
|
|
264
|
+
}
|
|
265
|
+
/** A prop's place at a moment (scene px). */
|
|
266
|
+
function propPlacementAt(sc, p, t) {
|
|
267
|
+
const pl = propPlacement(sc, p, t);
|
|
268
|
+
return [pl.x, pl.y];
|
|
269
|
+
}
|
|
270
|
+
//# sourceMappingURL=check.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check.js","sourceRoot":"","sources":["../../src/direct/check.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,QAAQ,IAAI,WAAW,EAAE,UAAU,EAAE,QAAQ,EAAE,cAAc,EAAE,KAAK,EAAE,SAAS,EAAE,cAAc,EAAoB,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAE/O,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MA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AAG,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC;YAC/F,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;QACzB,CAAC;QACD,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAChB,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED,6CAA6C;AAC7C,SAAS,eAAe,CAAC,EAAmC,EAAE,CAAqD,EAAE,CAAS;IAC5H,MAAM,EAAE,GAAG,aAAa,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IACnC,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;AACtB,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Contact between actors: hits, giving, high fives, hugs, carrying someone.
|
|
3
|
+
*/
|
|
4
|
+
import type { BlockScene } from "./scene.js";
|
|
5
|
+
/**
|
|
6
|
+
* A punch: the attacker dashes in (speed lines), punches; impact frames, a burst, a jolt; the
|
|
7
|
+
* target is thrown back spinning and lands on the back (inside the set), dizzy — or, with `ko`,
|
|
8
|
+
* knocked out (a ghost floats up, "K.O.").
|
|
9
|
+
*/
|
|
10
|
+
export declare function hit(this: BlockScene, attacker: string, target: string, at: number, o?: {
|
|
11
|
+
ko?: boolean;
|
|
12
|
+
until?: number;
|
|
13
|
+
}): void;
|
|
14
|
+
/** Comes (or stays) within `gap` of someone, facing them; returns the time they stand there. */
|
|
15
|
+
export declare function approach(this: BlockScene, actor: string, other: string, gap: number, at: number): number;
|
|
16
|
+
export declare function shoulderHeight(this: BlockScene, actor: string): number;
|
|
17
|
+
/** Hands a held prop to someone: both reach out, the prop changes hands between them. */
|
|
18
|
+
export declare function give(this: BlockScene, giver: string, to: string, prop: string, at: number): void;
|
|
19
|
+
/** A high five: both near hands up, meeting above between them (a slap, a sparkle). */
|
|
20
|
+
export declare function highFive(this: BlockScene, a: string, b: string, at: number): void;
|
|
21
|
+
/** A hug: close together, each one's arms around the other's back; hearts. */
|
|
22
|
+
export declare function hug(this: BlockScene, a: string, b: string, at: number, until: number): void;
|
|
23
|
+
/**
|
|
24
|
+
* Carries someone on the back (piggyback): the rider behind the carrier's shoulders, arms around
|
|
25
|
+
* the neck, head and chest showing behind the carrier's head; set down beside them at `until`.
|
|
26
|
+
*/
|
|
27
|
+
export declare function carry(this: BlockScene, carrier: string, rider: string, at: number, until?: number): void;
|
|
28
|
+
//# sourceMappingURL=contact.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contact.d.ts","sourceRoot":"","sources":["../../src/direct/contact.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAI1C;;;;GAIG;AACH,wBAAgB,GAAG,CAAC,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,GAAE;IAAE,EAAE,CAAC,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAO,QA4D3H;AAED,gGAAgG;AAChG,wBAAgB,QAAQ,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,UAiB/F;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,UAG7D;AAED,yFAAyF;AACzF,wBAAgB,IAAI,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAqBzF;AAED,uFAAuF;AACvF,wBAAgB,QAAQ,CAAC,IAAI,EAAE,UAAU,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAiB1E;AAED,8EAA8E;AAC9E,wBAAgB,GAAG,CAAC,IAAI,EAAE,UAAU,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,QAqBpF;AAED;;;GAGG;AACH,wBAAgB,KAAK,CAAC,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,QAyCjG"}
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
import { r3 } from "./shared.js";
|
|
2
|
+
import { closest } from "./vocabulary.js";
|
|
3
|
+
/**
|
|
4
|
+
* A punch: the attacker dashes in (speed lines), punches; impact frames, a burst, a jolt; the
|
|
5
|
+
* target is thrown back spinning and lands on the back (inside the set), dizzy — or, with `ko`,
|
|
6
|
+
* knocked out (a ghost floats up, "K.O.").
|
|
7
|
+
*/
|
|
8
|
+
export function hit(attacker, target, at, o = {}) {
|
|
9
|
+
if (!this.present.includes(target))
|
|
10
|
+
return this.issue("error", `${attacker} cannot hit "${target}": not in block "${this.block.id}"${closest(target, this.present)}`);
|
|
11
|
+
// (Carried on someone's back, the target is where the carrier is.)
|
|
12
|
+
const carried = this.carriedAt(target, at);
|
|
13
|
+
const xa = this.xAt(attacker, at), xv = carried ? this.xAt(carried.vehicle, at) : this.xAt(target, at);
|
|
14
|
+
const dir = xv >= xa ? 1 : -1;
|
|
15
|
+
const A = this.member(attacker).rig, V = this.member(target).rig;
|
|
16
|
+
const sa = this.scaleOf(attacker), sv = this.scaleOf(target);
|
|
17
|
+
const close = xv - dir * 0.5 * (A.extent.front * sa + V.extent.back * sv);
|
|
18
|
+
let t = at;
|
|
19
|
+
this.face(attacker, dir > 0 ? "right" : "left", at);
|
|
20
|
+
if (Math.abs(close - xa) > 40) {
|
|
21
|
+
const dash = 0.35;
|
|
22
|
+
this.walk(attacker, close, at, dash, { clip: this.hasClip(attacker, "run") ? "run" : "walk", ease: "easeIn" });
|
|
23
|
+
this.push({ at: this.t(at), action: "fx", type: "speedLines", duration: dash + 0.1, angle: dir > 0 ? 0 : 180 });
|
|
24
|
+
this.sfx("dash", at);
|
|
25
|
+
t = at + dash;
|
|
26
|
+
}
|
|
27
|
+
if (this.hasClip(attacker, "punch"))
|
|
28
|
+
this.play(attacker, "punch", t, 0.9, { fadeIn: 0.05 });
|
|
29
|
+
const hitT = t + 0.28;
|
|
30
|
+
this.closeOK.push({ a: attacker, b: target, t0: at - 0.2, t1: hitT + 1.4 });
|
|
31
|
+
// The hit.
|
|
32
|
+
this.push({ at: this.t(hitT), action: "fx", type: "impactFrame", duration: 0.12 });
|
|
33
|
+
this.sfx("hit", hitT);
|
|
34
|
+
this.push({ at: this.t(hitT), action: "fx", type: "burst", actor: target, duration: 0.35, scale: 1.2 });
|
|
35
|
+
this.push({ at: this.t(hitT), action: "shake", duration: 0.8, amount: 20, frequency: 22 });
|
|
36
|
+
// Sitting, lying, down already or riding: knocked off that first (never thrown while still on a
|
|
37
|
+
// seat, nor one fall stacked on another).
|
|
38
|
+
this.dropOff(target, hitT, 0.3);
|
|
39
|
+
this.standUp(target, hitT, 0.4);
|
|
40
|
+
if (this.hasControl(target, "emotion"))
|
|
41
|
+
this.push({ at: this.t(hitT), actor: target, action: "pose", control: "emotion", value: "scared", duration: 0.05 });
|
|
42
|
+
// Thrown back, spinning, onto the back — kept inside the set.
|
|
43
|
+
const facing = this.facing(target, hitT) ? 1 : -1;
|
|
44
|
+
const g = this.lying(target, facing, "back");
|
|
45
|
+
const [bx0, , bx1] = this.setDef.bounds ?? [0, 0, this.kit.width ?? 1920, 0];
|
|
46
|
+
const height = V.height * sv;
|
|
47
|
+
const land = Math.max(bx0 + height * 0.8, Math.min(bx1 - height * 0.8, xv + dir * height * 0.9));
|
|
48
|
+
const y = this.groundY(target, hitT);
|
|
49
|
+
const fly = 0.85;
|
|
50
|
+
// The limbs fly with the body (`knocked`, held until the landing) and lie in the K.O. pose.
|
|
51
|
+
const lyingClip = this.knockedLimbs(target, hitT, fly);
|
|
52
|
+
this.slide(target, land, hitT, fly);
|
|
53
|
+
this.set(target, "y", Math.round(y - height * 0.6), hitT, fly * 0.4, "easeOut");
|
|
54
|
+
this.set(target, "y", Math.round(y - g.offset[1]), hitT + fly * 0.4, fly * 0.6, "easeIn");
|
|
55
|
+
this.set(target, "rotation", r3(g.rotation + (g.rotation > 0 ? 360 : -360)), hitT, fly, "easeOut");
|
|
56
|
+
this.set(target, "rotation", g.rotation, hitT + fly + 0.001, 0);
|
|
57
|
+
this.bendNeck(target, g.neck, hitT + fly, 0.2);
|
|
58
|
+
this.shadow(target, hitT, { hide: true }, 0.2);
|
|
59
|
+
this.rests.push({ actor: target, kind: "fallen", on: null, t0: hitT, t1: Infinity, y, ...(lyingClip ? { clip: lyingClip } : {}) });
|
|
60
|
+
if (this.anticipation > 0)
|
|
61
|
+
this.squash(target, hitT + fly, { ...g, dir: facing, y });
|
|
62
|
+
this.push({ at: this.t(hitT + fly), action: "fx", type: "dust", actor: target, anchor: "origin", scale: 2 });
|
|
63
|
+
this.push({ at: this.t(hitT + fly), action: "fx", type: "stars", actor: target, scale: 1.3 });
|
|
64
|
+
this.push({ at: this.t(hitT + fly), action: "shake", duration: 0.4, amount: 10, frequency: 22 });
|
|
65
|
+
this.sfx("land", hitT + fly);
|
|
66
|
+
if (o.ko) {
|
|
67
|
+
const poses = (this.kit.characters[this.characterOf(target)]?.controls?.emotion?.poses) ?? {};
|
|
68
|
+
if (poses.dead || poses.sleep)
|
|
69
|
+
this.push({ at: this.t(hitT + fly + 0.3), actor: target, action: "pose", control: "emotion", value: poses.dead ? "dead" : "sleep", duration: 0.05 });
|
|
70
|
+
this.push({ at: this.t(hitT + 0.05), action: "fx", type: "caption", text: "K.O.", style: "ko", duration: 1.3 });
|
|
71
|
+
this.push({ at: this.t(hitT + fly + 0.6), action: "fx", type: "ghost", actor: target, anchor: "origin", duration: 3.5 });
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
/** Comes (or stays) within `gap` of someone, facing them; returns the time they stand there. */
|
|
75
|
+
export function approach(actor, other, gap, at) {
|
|
76
|
+
const xo = this.xAt(other, at), xa = this.xAt(actor, at);
|
|
77
|
+
const side = xa <= xo ? -1 : 1;
|
|
78
|
+
const x = xo + side * gap;
|
|
79
|
+
// They walk over from the beat's moment; the interaction happens when they get there.
|
|
80
|
+
let t = at;
|
|
81
|
+
if (Math.abs(xa - x) > 20) {
|
|
82
|
+
// At most 1.6 s: running when it is far.
|
|
83
|
+
const walkSpeed = (this.member(actor)?.speed?.walk ?? 170) * this.scaleOf(actor);
|
|
84
|
+
const dur = Math.min(1.6, Math.max(0.5, Math.abs(xa - x) / walkSpeed));
|
|
85
|
+
const fast = Math.abs(xa - x) / dur > walkSpeed * 1.4 && this.hasClip(actor, "run");
|
|
86
|
+
this.walk(actor, x, at, dur, { clip: fast ? "run" : "walk" });
|
|
87
|
+
t = at + dur;
|
|
88
|
+
}
|
|
89
|
+
this.face(actor, side < 0 ? "right" : "left", t);
|
|
90
|
+
this.face(other, side < 0 ? "left" : "right", t);
|
|
91
|
+
return t;
|
|
92
|
+
}
|
|
93
|
+
export function shoulderHeight(actor) {
|
|
94
|
+
const rig = this.member(actor)?.rig;
|
|
95
|
+
return Math.abs(rig?.shoulder.F[1] ?? -120) * this.scaleOf(actor);
|
|
96
|
+
}
|
|
97
|
+
/** Hands a held prop to someone: both reach out, the prop changes hands between them. */
|
|
98
|
+
export function give(giver, to, prop, at) {
|
|
99
|
+
if (!this.present.includes(to))
|
|
100
|
+
return this.issue("error", `${giver} cannot give to "${to}": not in block "${this.block.id}"${closest(to, this.present)}`);
|
|
101
|
+
const st = this.propStates.get(prop);
|
|
102
|
+
if (!st?.heldBy.some((h) => h.actor === giver && h.t1 === Infinity))
|
|
103
|
+
return this.issue("error", `${giver} cannot give "${prop}": not holding it`);
|
|
104
|
+
const gap = this.pairGap(giver, to) * 0.95;
|
|
105
|
+
const from = at;
|
|
106
|
+
at = this.approach(giver, to, gap, at);
|
|
107
|
+
this.closeOK.push({ a: giver, b: to, t0: from - 0.2, t1: at + 2 });
|
|
108
|
+
const mid = (this.xAt(giver, at) + this.xAt(to, at)) / 2;
|
|
109
|
+
const y = this.groundY(giver, at) - Math.min(this.shoulderHeight(giver), this.shoulderHeight(to)) * 0.82;
|
|
110
|
+
// The giver reaches out with the hand that holds it; a hung prop is taken hanging, in the
|
|
111
|
+
// receiver's far hand when it is free (the near one stays free).
|
|
112
|
+
const side = this.hangOf(prop) ? this.hangSide(to, at + 0.5, prop) : "F";
|
|
113
|
+
const chainOf = (actor, sd) => (this.hasChain(actor, `hand${sd}`) ? `hand${sd}` : "handF");
|
|
114
|
+
for (const [actor, hand] of [[giver, chainOf(giver, this.hand(prop, at).side)], [to, chainOf(to, side)]])
|
|
115
|
+
if (this.hasChain(actor, hand)) {
|
|
116
|
+
this.reach(actor, hand, [Math.round(mid), Math.round(y)], at, 0.4);
|
|
117
|
+
this.reach(actor, hand, null, at + 1.1, 0.4);
|
|
118
|
+
}
|
|
119
|
+
this.release(prop, at + 0.5);
|
|
120
|
+
this.grab(to, prop, at + 0.5, side);
|
|
121
|
+
}
|
|
122
|
+
/** A high five: both near hands up, meeting above between them (a slap, a sparkle). */
|
|
123
|
+
export function highFive(a, b, at) {
|
|
124
|
+
const gap = this.pairGap(a, b) * 0.95;
|
|
125
|
+
const from = at;
|
|
126
|
+
at = this.approach(a, b, gap, at) + 0.3;
|
|
127
|
+
this.closeOK.push({ a, b, t0: from - 0.2, t1: at + 1.2 });
|
|
128
|
+
const mid = (this.xAt(a, at) + this.xAt(b, at)) / 2;
|
|
129
|
+
const y = this.groundY(a, at) - Math.max(this.shoulderHeight(a), this.shoulderHeight(b)) * 1.45;
|
|
130
|
+
for (const actor of [a, b])
|
|
131
|
+
if (this.hasChain(actor, "handF")) {
|
|
132
|
+
this.reach(actor, "handF", [Math.round(mid), Math.round(y + 40)], at - 0.3, 0.2);
|
|
133
|
+
this.reach(actor, "handF", [Math.round(mid), Math.round(y)], at - 0.1, 0.1);
|
|
134
|
+
this.reach(actor, "handF", null, at + 0.4, 0.35);
|
|
135
|
+
}
|
|
136
|
+
this.push({ at: this.t(at), action: "fx", type: "impact", x: Math.round(mid), y: Math.round(y), scale: 0.8 });
|
|
137
|
+
this.push({ at: this.t(at), action: "fx", type: "sparkle", x: Math.round(mid), y: Math.round(y - 20), scale: 1 });
|
|
138
|
+
this.sfx("clap", at);
|
|
139
|
+
for (const actor of [a, b])
|
|
140
|
+
if (this.hasControl(actor, "emotion"))
|
|
141
|
+
this.push({ at: this.t(at), actor, action: "pose", control: "emotion", value: "joy", duration: 0.2 });
|
|
142
|
+
}
|
|
143
|
+
/** A hug: close together, each one's arms around the other's back; hearts. */
|
|
144
|
+
export function hug(a, b, at, until) {
|
|
145
|
+
const close = (this.pairGap(a, b) - 20) * 0.45;
|
|
146
|
+
const arrive = this.approach(a, b, close, at);
|
|
147
|
+
until += arrive - at;
|
|
148
|
+
this.closeOK.push({ a, b, t0: at - 0.2, t1: until + 1 });
|
|
149
|
+
at = arrive;
|
|
150
|
+
const xa = this.xAt(a, at), xb = this.xAt(b, at);
|
|
151
|
+
const y = (who) => this.groundY(who, at) - this.shoulderHeight(who) * 0.85;
|
|
152
|
+
for (const [actor, other] of [[a, b], [b, a]]) {
|
|
153
|
+
const xo = actor === a ? xb : xa, dir = xo > (actor === a ? xa : xb) ? 1 : -1;
|
|
154
|
+
const back = xo + dir * (this.member(other)?.rig.extent.back ?? 50) * this.scaleOf(other) * 0.5;
|
|
155
|
+
for (const chain of ["handF", "handB"])
|
|
156
|
+
if (this.hasChain(actor, chain)) {
|
|
157
|
+
this.reach(actor, chain, [Math.round(back), Math.round(y(other) + (chain === "handB" ? -10 : 10))], at, 0.4);
|
|
158
|
+
this.reach(actor, chain, null, until, 0.4);
|
|
159
|
+
}
|
|
160
|
+
this.holds.push({ actor, t0: at, t1: until });
|
|
161
|
+
if (this.hasControl(actor, "emotion"))
|
|
162
|
+
this.push({ at: this.t(at), actor, action: "pose", control: "emotion", value: "joy", duration: 0.3 });
|
|
163
|
+
}
|
|
164
|
+
this.push({ at: this.t(at + 0.3), action: "fx", type: "hearts", actor: a, duration: 1.6 });
|
|
165
|
+
this.sfx("hug", at);
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Carries someone on the back (piggyback): the rider behind the carrier's shoulders, arms around
|
|
169
|
+
* the neck, head and chest showing behind the carrier's head; set down beside them at `until`.
|
|
170
|
+
*/
|
|
171
|
+
export function carry(carrier, rider, at, until) {
|
|
172
|
+
if (!this.present.includes(rider))
|
|
173
|
+
return this.issue("error", `${carrier} cannot carry "${rider}": not in block "${this.block.id}"${closest(rider, this.present)}`);
|
|
174
|
+
const anchors = (this.kit.characters[this.characterOf(carrier)]?.anchors ?? {});
|
|
175
|
+
if (!anchors.head)
|
|
176
|
+
return this.issue("error", `${carrier} cannot carry anyone: the rig has no "head" anchor`);
|
|
177
|
+
const arrive = this.approach(rider, carrier, (this.member(carrier)?.rig.extent.front ?? 60) * this.scaleOf(carrier) * 0.5, at);
|
|
178
|
+
if (until !== undefined)
|
|
179
|
+
until += arrive - at;
|
|
180
|
+
this.closeOK.push({ a: carrier, b: rider, t0: at - 0.2, t1: (until ?? Infinity) + 1 });
|
|
181
|
+
at = arrive;
|
|
182
|
+
const hip = this.hipOf(rider);
|
|
183
|
+
const headH = (this.member(carrier)?.rig.height ?? 300) * this.scaleOf(carrier) * 0.12;
|
|
184
|
+
this.face(rider, this.facing(carrier, at) ? "right" : "left", at);
|
|
185
|
+
// On the back (piggyback): the rider's hips behind the carrier's shoulders, a little lower than
|
|
186
|
+
// the head, so the rider's head and chest show behind the carrier's head.
|
|
187
|
+
const sr = this.scaleOf(rider);
|
|
188
|
+
const behind = (this.member(carrier)?.rig.extent.back ?? 60) * this.scaleOf(carrier) * 1.1;
|
|
189
|
+
const D = [-behind / sr, (headH * 0.4) / sr];
|
|
190
|
+
this.push({ at: this.t(at), actor: rider, action: "mount", on: carrier, anchor: "head", point: [r3(hip[0] - D[0]), r3(hip[1] - D[1])], duration: 0.5 });
|
|
191
|
+
// Arms around the carrier's neck.
|
|
192
|
+
const neck = { actor: carrier, anchor: "head" };
|
|
193
|
+
if (this.hasChain(rider, "handF"))
|
|
194
|
+
this.reach(rider, "handF", neck, at + 0.3, 0.3);
|
|
195
|
+
// Legs around the carrier, held by the carrier's hands.
|
|
196
|
+
const cAnchors = Object.keys((this.kit.characters[this.characterOf(carrier)]?.anchors ?? {}));
|
|
197
|
+
for (const [foot, hand] of [["footF", "hand"], ["footB", "handB"]])
|
|
198
|
+
if (this.hasChain(rider, foot) && cAnchors.includes(hand))
|
|
199
|
+
this.reach(rider, foot, { actor: carrier, anchor: hand }, at + 0.2, 0.3);
|
|
200
|
+
// Drawn behind the carrier while carried (a stepped depth track: back to its own when set down).
|
|
201
|
+
const riderZ = this.actors.find((x) => x.id === rider)?.z ?? 2;
|
|
202
|
+
const carrierZ = this.actors.find((x) => x.id === carrier)?.z ?? 2;
|
|
203
|
+
if (riderZ >= carrierZ) {
|
|
204
|
+
this.set(rider, "z", carrierZ - 0.05, at);
|
|
205
|
+
if (until !== undefined)
|
|
206
|
+
this.set(rider, "z", riderZ, until);
|
|
207
|
+
}
|
|
208
|
+
this.holds.push({ actor: rider, t0: at, t1: until ?? Infinity });
|
|
209
|
+
if (this.hasControl(rider, "emotion"))
|
|
210
|
+
this.push({ at: this.t(at + 0.4), actor: rider, action: "pose", control: "emotion", value: "joy", duration: 0.3 });
|
|
211
|
+
this.sfx("jump", at);
|
|
212
|
+
this.rides.push({ rider, vehicle: carrier, t0: at, t1: until ?? Infinity });
|
|
213
|
+
if (until !== undefined) {
|
|
214
|
+
for (const chain of ["handF", "footF", "footB"])
|
|
215
|
+
if (this.hasChain(rider, chain))
|
|
216
|
+
this.reach(rider, chain, null, until, 0.3);
|
|
217
|
+
this.push({ at: this.t(until), actor: rider, action: "mount", on: null, duration: 0.5 });
|
|
218
|
+
const side = this.facing(carrier, until) ? 1 : -1;
|
|
219
|
+
this.slide(rider, this.xAt(carrier, until) + side * this.pairGap(carrier, rider), until, 0.5);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
//# sourceMappingURL=contact.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contact.js","sourceRoot":"","sources":["../../src/direct/contact.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAC9B,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC;;;;GAIG;AACH,MAAM,UAAU,GAAG,CAAmB,QAAgB,EAAE,MAAc,EAAE,EAAU,EAAE,CAAC,GAAqC,EAAE;IAC1H,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC;QAAE,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,GAAG,QAAQ,gBAAgB,MAAM,oBAAoB,IAAI,CAAC,KAAK,CAAC,EAAE,IAAI,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IACtK,mEAAmE;IACnE,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IAC3C,MAAM,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,EAAE,CAAC,EAAE,EAAE,GAAG,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IACvG,MAAM,GAAG,G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KAAK,EAAE,GAAG,CAAC,CAAC;IAChG,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dialogue: turning heads and bodies towards the one spoken to, who speaks, talking clips.
|
|
3
|
+
*/
|
|
4
|
+
import type { Line } from "../types.js";
|
|
5
|
+
import type { BlockScene } from "./scene.js";
|
|
6
|
+
export declare function canTurn(this: BlockScene, actor: string, abs: number): boolean;
|
|
7
|
+
/**
|
|
8
|
+
* A 2.5D rig turns its head (not its body) towards someone: the head's drawn angle nearest to
|
|
9
|
+
* looking their way, at most 75° from the body's (mirrored drawings look the other way); the eyes
|
|
10
|
+
* follow them.
|
|
11
|
+
*/
|
|
12
|
+
export declare function turnHead(this: BlockScene, actor: string, target: string, abs: number): void;
|
|
13
|
+
export declare function turnTowards(this: BlockScene, actor: string, x: number, abs: number): void;
|
|
14
|
+
/** Walking at a moment (or about to: a walk starting within `pad` seconds). */
|
|
15
|
+
export declare function walkingAt(this: BlockScene, actor: string, t: number, pad?: number): boolean;
|
|
16
|
+
export declare function speakerOf(this: BlockScene, l: Line): string[];
|
|
17
|
+
export declare function addressed(this: BlockScene, l: Line, speaker: string): string | undefined;
|
|
18
|
+
export declare function dialogue(this: BlockScene, noTurn: Set<number>): void;
|
|
19
|
+
//# sourceMappingURL=dialogue.d.ts.map
|