@anime-studio/director 0.3.0 → 0.5.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,205 @@
|
|
|
1
|
+
import { r3 } from "./shared.js";
|
|
2
|
+
/** Lies down face up on furniture (`bed` anchor, else `seat`), a set place (mark with `seat` and `lie`) or the ground; head towards the back. */
|
|
3
|
+
export function lie(actor, on, at, sleep = false) {
|
|
4
|
+
if (this.ridingAt(actor, at))
|
|
5
|
+
return this.issue("error", `${actor} cannot lie down: riding then (dismount first)`);
|
|
6
|
+
const rest = this.restAt(actor, at);
|
|
7
|
+
if (rest?.kind === "lie" && rest.on === on) {
|
|
8
|
+
if (sleep && !rest.sleep)
|
|
9
|
+
this.fallAsleep(actor, rest, at);
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
const place = this.restPlace(actor, on, "lie");
|
|
13
|
+
if (!place)
|
|
14
|
+
return;
|
|
15
|
+
this.standUp(actor, at, 1.6);
|
|
16
|
+
// Characters that tuck in (a turtle into its shell, a hedgehog curling up) do that instead.
|
|
17
|
+
if (this.tucks(actor)) {
|
|
18
|
+
if ("furniture" in place) {
|
|
19
|
+
const anchor = this.furniturePoint(place.furniture, "bed") ? "bed" : "seat";
|
|
20
|
+
const bed = this.furniturePoint(place.furniture, anchor);
|
|
21
|
+
if (!bed)
|
|
22
|
+
return this.issue("error", `"${place.furniture}" has no "bed" or "seat" anchor to lie on`);
|
|
23
|
+
if (Math.abs(this.xAt(actor, at - 0.9) - bed[0]) > 30)
|
|
24
|
+
at = Math.max(at, this.walk(actor, bed[0], at - 0.9, 0.8) + 0.1);
|
|
25
|
+
this.push({ at: this.t(at), actor, action: "mount", on: place.furniture, anchor, point: [0, 0], duration: 0.5 });
|
|
26
|
+
this.coverUp(place.furniture, at);
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
if (place.x !== undefined && Math.abs(this.xAt(actor, at - 0.9) - place.x) > 30)
|
|
30
|
+
at = Math.max(at, this.walk(actor, place.x, at - 0.9, 0.8) + 0.1);
|
|
31
|
+
if (place.h)
|
|
32
|
+
this.set(actor, "y", Math.round(this.groundY(actor, at) - place.h), at, 0.5, "sineInOut");
|
|
33
|
+
}
|
|
34
|
+
this.push({ at: this.t(at + 0.2), actor, action: "pose", control: "tuck", value: "in", duration: 0.4 });
|
|
35
|
+
const r = { actor, kind: "lie", on, t0: at, t1: Infinity, y: this.groundY(actor, at), tuck: true };
|
|
36
|
+
this.rests.push(r);
|
|
37
|
+
if (sleep)
|
|
38
|
+
this.fallAsleep(actor, r, at);
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
const rig = this.member(actor)?.rig;
|
|
42
|
+
const s = this.scaleOf(actor);
|
|
43
|
+
const hip = this.hipOf(actor);
|
|
44
|
+
// The back rests on the surface, not the spine: about half the body's depth.
|
|
45
|
+
const back = this.depthOf(actor, "back");
|
|
46
|
+
if ("furniture" in place) {
|
|
47
|
+
// With a `pillow` anchor the head goes on it (any body length); else the hips go on `bed` / `seat`.
|
|
48
|
+
const head = (this.kit.characters[this.characterOf(actor)]?.anchors ?? {}).head?.at;
|
|
49
|
+
const anchor = this.furniturePoint(place.furniture, "pillow") && head ? "pillow" : this.furniturePoint(place.furniture, "bed") ? "bed" : "seat";
|
|
50
|
+
const bed = this.furniturePoint(place.furniture, anchor);
|
|
51
|
+
if (!bed)
|
|
52
|
+
return this.issue("error", `"${place.furniture}" has no "bed" or "seat" anchor to lie on`);
|
|
53
|
+
const dir = this.facing(place.furniture, at) ? 1 : -1;
|
|
54
|
+
if (Math.abs(this.xAt(actor, at - 0.9) - bed[0]) > 30)
|
|
55
|
+
at = Math.max(at, this.walk(actor, bed[0], at - 0.9, 0.8) + 0.1);
|
|
56
|
+
this.face(actor, dir > 0 ? "right" : "left", at);
|
|
57
|
+
const g = this.lying(actor, dir, "back");
|
|
58
|
+
this.set(actor, "rotation", g.rotation, at, 0.6, "sineInOut");
|
|
59
|
+
// On the pillow: the back of the head; on the bed: the back at the hips.
|
|
60
|
+
const point = anchor === "pillow" ? [g.head[0] + g.normal[0] * back, g.head[1] + g.normal[1] * back] : g.contact;
|
|
61
|
+
this.bendNeck(actor, g.neck, at, 0.6);
|
|
62
|
+
this.push({ at: this.t(at), actor, action: "mount", on: place.furniture, anchor, point, duration: 0.6 });
|
|
63
|
+
this.shadow(actor, at, { hide: true }, 0.4);
|
|
64
|
+
this.coverUp(place.furniture, at);
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
const dir = this.facing(actor, at) ? 1 : -1;
|
|
68
|
+
const g = this.lying(actor, dir, "back");
|
|
69
|
+
// Rotated about the feet, the back (at the hips) must land on the place.
|
|
70
|
+
if (place.x !== undefined) {
|
|
71
|
+
const x = place.x - g.offset[0];
|
|
72
|
+
if (Math.abs(this.xAt(actor, at - 0.9) - x) > 30)
|
|
73
|
+
at = Math.max(at, this.walk(actor, x, at - 0.9, 0.8) + 0.1);
|
|
74
|
+
this.face(actor, dir > 0 ? "right" : "left", at);
|
|
75
|
+
}
|
|
76
|
+
const y = this.groundY(actor, at);
|
|
77
|
+
this.set(actor, "rotation", g.rotation, at, 0.6, "sineInOut");
|
|
78
|
+
this.set(actor, "y", Math.round(y - place.h - g.offset[1]), at, 0.6, "sineInOut");
|
|
79
|
+
this.bendNeck(actor, g.neck, at, 0.6);
|
|
80
|
+
this.shadow(actor, at, { hide: true }, 0.4);
|
|
81
|
+
}
|
|
82
|
+
const r = { actor, kind: "lie", on, t0: at, t1: Infinity, y: this.groundY(actor, at) };
|
|
83
|
+
this.rests.push(r);
|
|
84
|
+
if (sleep)
|
|
85
|
+
this.fallAsleep(actor, r, at);
|
|
86
|
+
}
|
|
87
|
+
/** The blanket of a bed comes over whoever lies down (pulled up after they settle). */
|
|
88
|
+
export function coverUp(furniture, at) {
|
|
89
|
+
const c = this.furnitureOf.get(furniture)?.cover;
|
|
90
|
+
if (!c)
|
|
91
|
+
return;
|
|
92
|
+
// Pulled up from the foot of the bed: in quickly, sliding into place.
|
|
93
|
+
const x = this.xAt(furniture, at), foot = this.facing(furniture, at) ? 1 : -1;
|
|
94
|
+
this.set(c, "x", Math.round(x + foot * 70 * this.furnitureOf.get(furniture).scale), at + 0.4, 0);
|
|
95
|
+
this.set(c, "opacity", 1, at + 0.4, 0.12, "easeOut");
|
|
96
|
+
this.set(c, "x", Math.round(x), at + 0.4, 0.45, "easeOut");
|
|
97
|
+
}
|
|
98
|
+
/** …and goes when the last one gets up. */
|
|
99
|
+
export function uncover(furniture, actor, at) {
|
|
100
|
+
const c = this.furnitureOf.get(furniture)?.cover;
|
|
101
|
+
const others = this.rests.some((r) => r.kind === "lie" && r.on === furniture && r.actor !== actor && r.t0 <= at && r.t1 > at);
|
|
102
|
+
if (c && !others)
|
|
103
|
+
this.set(c, "opacity", 0, at, 0.3, "easeIn");
|
|
104
|
+
}
|
|
105
|
+
/** A rig with a `tuck` pose control (poses `out` / `in`) tucks in to lie down or sleep. */
|
|
106
|
+
export function tucks(actor) {
|
|
107
|
+
const c = this.kit.characters[this.characterOf(actor)]?.controls?.tuck;
|
|
108
|
+
return c?.type === "pose" && !!c.poses?.in;
|
|
109
|
+
}
|
|
110
|
+
/** Eyes closed ("sleep" emotion) and floating Zzz until they get up. */
|
|
111
|
+
export function fallAsleep(actor, rest, at) {
|
|
112
|
+
rest.sleep = true;
|
|
113
|
+
if (this.kit.characters[this.characterOf(actor)]?.controls?.emotion?.poses?.sleep)
|
|
114
|
+
this.push({ at: this.t(at + 0.4), actor, action: "pose", control: "emotion", value: "sleep", duration: 0.5 });
|
|
115
|
+
}
|
|
116
|
+
/** Zzz over every sleeper, one after the other, while they sleep. */
|
|
117
|
+
export function snores() {
|
|
118
|
+
for (const r of this.rests.filter((x) => x.sleep)) {
|
|
119
|
+
const end = Math.min(r.t1, this.t1);
|
|
120
|
+
// Tucked in: from the rig's `tuck` anchor, else just above the tucked body.
|
|
121
|
+
const tuckAnchor = r.tuck && (this.kit.characters[this.characterOf(r.actor)]?.anchors ?? {}).tuck;
|
|
122
|
+
for (let t = r.t0 + 0.9; t + 0.5 < end; t += 2.6) {
|
|
123
|
+
if (!r.tuck || tuckAnchor)
|
|
124
|
+
this.push({ at: this.t(t), action: "fx", type: "zzz", actor: r.actor, ...(tuckAnchor ? { anchor: "tuck" } : {}) });
|
|
125
|
+
else
|
|
126
|
+
this.push({ at: this.t(t), action: "fx", type: "zzz", x: Math.round(this.xAt(r.actor, t)), y: Math.round(this.groundY(r.actor, t) - (this.member(r.actor)?.rig.height ?? 200) * 0.35 * this.scaleOf(r.actor)) });
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
/** Trips and falls (standing), or falls off what they ride. */
|
|
131
|
+
export function fallDown(actor, at, side) {
|
|
132
|
+
if (this.ridingAt(actor, at))
|
|
133
|
+
return this.fall(actor, at, side);
|
|
134
|
+
if (this.restAt(actor, at))
|
|
135
|
+
return this.issue("warning", `${actor} cannot fall: already sitting or lying`);
|
|
136
|
+
this.knockDown(actor, at, side, this.facing(actor, at) ? 1 : -1, 0.4);
|
|
137
|
+
}
|
|
138
|
+
/** Stands back up: from furniture, a set seat, the ground or after a fall. */
|
|
139
|
+
export function getUp(actor, at) {
|
|
140
|
+
const l = this.restAt(actor, at);
|
|
141
|
+
if (!l)
|
|
142
|
+
return this.issue("warning", `${actor} is not sitting or lying to get up`);
|
|
143
|
+
l.t1 = at + 0.6;
|
|
144
|
+
if (l.kind === "lie" && l.on)
|
|
145
|
+
this.uncover(l.on, actor, at);
|
|
146
|
+
if (l.sleep && this.hasControl(actor, "emotion"))
|
|
147
|
+
this.push({ at: this.t(at), actor, action: "pose", control: "emotion", value: "happy", duration: 0.3 });
|
|
148
|
+
if (l.tuck) {
|
|
149
|
+
this.push({ at: this.t(at), actor, action: "pose", control: "tuck", value: "out", duration: 0.4 });
|
|
150
|
+
if (l.on && this.furnitureOf.has(l.on)) {
|
|
151
|
+
this.push({ at: this.t(at + 0.3), actor, action: "mount", on: null, duration: 0.5 });
|
|
152
|
+
this.slide(actor, this.xAt(l.on, at) + (this.facing(l.on, at) ? 1 : -1) * 60 * this.scaleOf(actor), at + 0.3, 0.5);
|
|
153
|
+
}
|
|
154
|
+
else
|
|
155
|
+
this.set(actor, "y", Math.round(l.y ?? this.groundY(actor, at)), at + 0.2, 0.4, "sineInOut");
|
|
156
|
+
return;
|
|
157
|
+
}
|
|
158
|
+
this.shadow(actor, at, { drop: 0, hide: false }, 0.5);
|
|
159
|
+
if (l.kind !== "sit")
|
|
160
|
+
this.bendNeck(actor, this.lying(actor, 1, "back").neck && { bone: this.lying(actor, 1, "back").neck.bone, rotation: 0 }, at, 0.5);
|
|
161
|
+
if (l.kind === "fallen") {
|
|
162
|
+
// The lying clip lets go as the body comes up.
|
|
163
|
+
if (l.clip) {
|
|
164
|
+
l.clip.duration = r3(Math.max(0.1, this.t(at) + 0.3 - l.clip.at));
|
|
165
|
+
l.clip.fadeOut = 0.3;
|
|
166
|
+
}
|
|
167
|
+
this.set(actor, "rotation", 0, at, 0.6, "backOut");
|
|
168
|
+
return this.set(actor, "y", Math.round(l.y ?? this.groundY(actor, at)), at, 0.6, "backOut");
|
|
169
|
+
}
|
|
170
|
+
if (l.kind === "sit" && this.is3d(actor))
|
|
171
|
+
this.unsit3d(actor, at);
|
|
172
|
+
if (l.kind === "sit" && l.front && this.hasChain(actor, "handF") && this.kit.characters[this.characterOf(actor)]?.meta?.sitFront?.hands === "knees") {
|
|
173
|
+
for (const side of ["F", "B"]) {
|
|
174
|
+
this.push({ at: this.t(at), actor, action: "reach", chain: `hand${side}`, target: null, duration: 0.4 });
|
|
175
|
+
this.set(actor, `bones.arm${side}2.squash`, 0, at, 0.4);
|
|
176
|
+
}
|
|
177
|
+
this.set(actor, "ik.handF.bend", 1, at + 0.4);
|
|
178
|
+
}
|
|
179
|
+
if (l.kind === "sit" && l.front)
|
|
180
|
+
for (const side of ["F", "B"])
|
|
181
|
+
if (this.hasPart(actor, `lap${side}`))
|
|
182
|
+
this.set(actor, `parts.lap${side}.variant`, "off", at + 0.15);
|
|
183
|
+
if (l.kind === "sit")
|
|
184
|
+
for (const c of ["footF", "footB"])
|
|
185
|
+
if (this.hasChain(actor, c))
|
|
186
|
+
this.push({ at: this.t(at), actor, action: "reach", chain: c, target: null, duration: 0.45 });
|
|
187
|
+
if (l.front)
|
|
188
|
+
for (const b of ["legF1", "legF2", "legB1", "legB2"])
|
|
189
|
+
this.set(actor, `bones.${b}.squash`, 0, at, 0.45, "easeOut");
|
|
190
|
+
if (l.on && this.furnitureOf.has(l.on)) {
|
|
191
|
+
// Off the seat (or the bed), standing in front of it.
|
|
192
|
+
const dir = this.facing(l.on, at) ? 1 : -1;
|
|
193
|
+
this.push({ at: this.t(at), actor, action: "mount", on: null, duration: 0.5 });
|
|
194
|
+
if (l.kind === "lie")
|
|
195
|
+
this.set(actor, "rotation", 0, at, 0.5, "sineInOut");
|
|
196
|
+
const rig = this.member(actor)?.rig;
|
|
197
|
+
this.slide(actor, this.xAt(l.on, at) + dir * ((rig?.legLength?.F ?? 80) / 2) * this.scaleOf(actor), at, 0.5);
|
|
198
|
+
}
|
|
199
|
+
else {
|
|
200
|
+
this.set(actor, "y", Math.round(l.y ?? this.groundY(actor, at)), at, 0.5, "backOut");
|
|
201
|
+
if (l.kind === "lie")
|
|
202
|
+
this.set(actor, "rotation", 0, at, 0.6, "backOut");
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
//# sourceMappingURL=lying.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lying.js","sourceRoot":"","sources":["../../src/direct/lying.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAE9B,iJAAiJ;AACjJ,MAAM,UAAU,GAAG,CAAmB,KAAa,EAAE,EAAiB,EAAE,EAAU,EAAE,KAAK,GAAG,KAAK;IAC/F,IAAI,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,EAAE,CAAC;QAAE,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,GAAG,KAAK,gDAAgD,CAAC,CAAC;IACnH,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,EA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AM,CAAC,KAAK,CAAC,EAAE,GAAG,CAAC;QACpC,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC,GAAG,EAAE,SAAS,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,EAAE,EAAE,GAAG,CAAC,CAAC;IAC/G,CAAC;SAAM,CAAC;QACN,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,GAAG,EAAE,SAAS,CAAC,CAAC;QACrF,IAAI,CAAC,CAAC,IAAI,KAAK,KAAK;YAAE,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,UAAU,EAAE,CAAC,EAAE,EAAE,EAAE,GAAG,EAAE,SAAS,CAAC,CAAC;IAC3E,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Moving actors: walks, clips, channels, facing and views (with turns), slides, crosses.
|
|
3
|
+
*/
|
|
4
|
+
import type { BlockScene } from "./scene.js";
|
|
5
|
+
/**
|
|
6
|
+
* Walks to x from `abs` for `dur` seconds (at least 0.4 s). A walk asked for before the block
|
|
7
|
+
* starts (an approach back-dated from a beat) starts when the block does, at the same pace, and
|
|
8
|
+
* one asked for while still walking starts when that walk arrives: the arrival is returned, and
|
|
9
|
+
* whatever waits for it (a grab, a seat) happens then. With `until` (episode time) the walk ends
|
|
10
|
+
* there whenever it starts.
|
|
11
|
+
*/
|
|
12
|
+
export declare function walk(this: BlockScene, actor: string, x: number, abs: number, dur: number, o?: {
|
|
13
|
+
clip?: string;
|
|
14
|
+
y?: number;
|
|
15
|
+
ease?: string;
|
|
16
|
+
until?: number;
|
|
17
|
+
}): number;
|
|
18
|
+
/**
|
|
19
|
+
* Someone sitting, lying or down after a fall at `at` stands up first, `lead` seconds before
|
|
20
|
+
* (never before they settled: a rest begun inside the lead is still closed). True if they were.
|
|
21
|
+
*/
|
|
22
|
+
export declare function standUp(this: BlockScene, actor: string, at: number, lead: number): boolean;
|
|
23
|
+
export declare function hasClip(this: BlockScene, actor: string, clip: string): boolean;
|
|
24
|
+
/** Outfit / accessory changes (pose controls of the rig's wardrobe), instantly. */
|
|
25
|
+
export declare function wear(this: BlockScene, actor: string, items: Record<string, string>, abs: number): void;
|
|
26
|
+
export declare function hasControl(this: BlockScene, actor: string, control: string): boolean;
|
|
27
|
+
export declare function play(this: BlockScene, actor: string, clip: string, abs: number, dur?: number, o?: Record<string, unknown>): void;
|
|
28
|
+
export declare function characterOf(this: BlockScene, actor: string): string;
|
|
29
|
+
/** A sound effect of the kit for an event (hit, dash, fall, land, whip, crash, fly, jump…), if it has one. */
|
|
30
|
+
export declare function sfx(this: BlockScene, event: string, abs: number): void;
|
|
31
|
+
/** Holds an IK chain somewhere (a scene point, another actor's anchor, or null to let go). */
|
|
32
|
+
export declare function reach(this: BlockScene, actor: string, chain: string, target: unknown, abs: number, dur?: number): void;
|
|
33
|
+
export declare function set(this: BlockScene, actor: string, channel: string, value: unknown, abs: number, dur?: number, ease?: string): void;
|
|
34
|
+
/** Faces a way; a rig drawn at in-between angles turns through them, ending in `end` (default: the view it had). */
|
|
35
|
+
export declare function face(this: BlockScene, actor: string, dir: "left" | "right", abs: number, end?: string): void;
|
|
36
|
+
export declare function view(this: BlockScene, actor: string, v: string, abs: number, turn?: boolean): void;
|
|
37
|
+
/** The views of a rig drawn at in-between angles, in turning order (`meta.views.order`). */
|
|
38
|
+
export declare function viewOrder(this: BlockScene, actor: string): string[] | undefined;
|
|
39
|
+
/** Views from one to another (the first excluded, the last included). */
|
|
40
|
+
export declare function viewPath(this: BlockScene, order: string[], from: string, to: string): string[];
|
|
41
|
+
export declare function hasPart(this: BlockScene, actor: string, id: string): boolean;
|
|
42
|
+
/** One drawing every two frames. */
|
|
43
|
+
export declare function twos(this: BlockScene): number;
|
|
44
|
+
/** Moves an actor without a walking clip (thrown, stepping off a vehicle). */
|
|
45
|
+
export declare function slide(this: BlockScene, actor: string, x: number, abs: number, dur: number): void;
|
|
46
|
+
/** The riding pose (torso into the ride) while mounted. */
|
|
47
|
+
export declare function ridePoses(this: BlockScene): void;
|
|
48
|
+
/** Cross to the far ground walking away from the camera (back view), hand in hand. */
|
|
49
|
+
export declare function cross(this: BlockScene, who: string[], to: string, at: number, until: number): void;
|
|
50
|
+
//# sourceMappingURL=motion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"motion.d.ts","sourceRoot":"","sources":["../../src/direct/motion.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAI1C;;;;;;GAMG;AACH,wBAAgB,IAAI,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC,GAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAO,GAAG,MAAM,CA6CvK;AAED;;;GAGG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAM1F;AAED,wBAAgB,OAAO,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,WAEpE;AAED,mFAAmF;AACnF,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EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,UAAO,QAyBxF;AAED,4FAA4F;AAC5F,wBAAgB,SAAS,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAE/E;AAED,yEAAyE;AACzE,wBAAgB,QAAQ,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,EAAE,CAO9F;AAED,wBAAgB,OAAO,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,WAElE;AAED,oCAAoC;AACpC,wBAAgB,IAAI,CAAC,IAAI,EAAE,UAAU,UAEpC;AAED,8EAA8E;AAC9E,wBAAgB,KAAK,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,QAGzF;AAED,2DAA2D;AAC3D,wBAAgB,SAAS,CAAC,IAAI,EAAE,UAAU,QAMzC;AAED,sFAAsF;AACtF,wBAAgB,KAAK,CAAC,IAAI,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,QAqB3F"}
|
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
import { r3, LIMB } from "./shared.js";
|
|
2
|
+
import { wardrobeOf, NOT_WORN, closest } from "./vocabulary.js";
|
|
3
|
+
/**
|
|
4
|
+
* Walks to x from `abs` for `dur` seconds (at least 0.4 s). A walk asked for before the block
|
|
5
|
+
* starts (an approach back-dated from a beat) starts when the block does, at the same pace, and
|
|
6
|
+
* one asked for while still walking starts when that walk arrives: the arrival is returned, and
|
|
7
|
+
* whatever waits for it (a grab, a seat) happens then. With `until` (episode time) the walk ends
|
|
8
|
+
* there whenever it starts.
|
|
9
|
+
*/
|
|
10
|
+
export function walk(actor, x, abs, dur, o = {}) {
|
|
11
|
+
// Sitting or lying: stand up first.
|
|
12
|
+
this.standUp(actor, abs, 0.6);
|
|
13
|
+
// Still on the way somewhere: this walk starts when that one arrives (two walks at once would
|
|
14
|
+
// pull the body both ways: walking backwards).
|
|
15
|
+
const going = this.walks.filter((w) => w.actor === actor && w.t0 < abs && w.t1 > abs + 0.05).sort((a, b) => b.t1 - a.t1)[0];
|
|
16
|
+
if (going) {
|
|
17
|
+
this.issue("warning", `${actor} is told to walk at ${abs.toFixed(2)} s while still walking (until ${going.t1.toFixed(2)} s): the walk starts when the first one arrives`);
|
|
18
|
+
abs = going.t1;
|
|
19
|
+
}
|
|
20
|
+
// Nothing moves before the scene starts: the walk begins with the block (the arrival moves on).
|
|
21
|
+
abs = Math.max(abs, this.t0);
|
|
22
|
+
const x0 = this.xAt(actor, abs);
|
|
23
|
+
const d = Math.max(0.4, o.until !== undefined ? o.until - abs : dur);
|
|
24
|
+
// A rig drawn at in-between angles turns through them to set off the other way (never flipped
|
|
25
|
+
// at once), and runs in its travel view (`meta.views.travel`: a run across the frame reads
|
|
26
|
+
// side-on), turning back to its view on arrival.
|
|
27
|
+
const order = this.viewOrder(actor);
|
|
28
|
+
let turned = false;
|
|
29
|
+
if (order && this.present.includes(actor) && Math.abs(x - x0) > 80 * this.scaleOf(actor)) {
|
|
30
|
+
const dir = x > x0 ? "right" : "left";
|
|
31
|
+
const cur = this.viewAt(actor, abs);
|
|
32
|
+
const travel = this.kit.characters[this.characterOf(actor)]?.meta?.views?.travel;
|
|
33
|
+
const runView = o.clip === "run" && travel && order.includes(travel) && order.includes(cur) && cur !== travel ? travel : undefined;
|
|
34
|
+
if ((this.facing(actor, abs - 0.001) ? "right" : "left") !== dir) {
|
|
35
|
+
this.face(actor, dir, abs, runView);
|
|
36
|
+
turned = true;
|
|
37
|
+
}
|
|
38
|
+
else if (runView)
|
|
39
|
+
this.view(actor, runView, abs);
|
|
40
|
+
if (runView) {
|
|
41
|
+
if (this.views.at(-1)?.actor !== actor || this.views.at(-1)?.t !== abs)
|
|
42
|
+
this.views.push({ actor, t: abs, view: runView });
|
|
43
|
+
this.view(actor, cur, abs + d);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
// A 2.5D rig the walk itself turns round (the scene flips it as it sets off) keeps its props in the same hand.
|
|
47
|
+
if (!turned && this.is3d(actor) && Math.abs(x - x0) > 1e-6 && (x > x0) !== this.facing(actor, abs - 0.001))
|
|
48
|
+
this.keepHands(actor, abs);
|
|
49
|
+
const walk = { actor, t0: abs, t1: abs + d, x0, x1: x };
|
|
50
|
+
this.walks.push(walk);
|
|
51
|
+
// (The cast leans into it once the block is staged; vehicles never do.)
|
|
52
|
+
if (this.present.includes(actor) && !this.vehicleOf.has(actor))
|
|
53
|
+
this.leans.push({ walk, run: o.clip === "run" });
|
|
54
|
+
this.busy.push({ actor, t0: abs, t1: abs + d });
|
|
55
|
+
// Walking, one looks where one goes: the gaze and a head turned on its own come back ahead.
|
|
56
|
+
if (Object.values((this.kit.characters[this.characterOf(actor)]?.controls ?? {})).some((c) => c.type === "aim"))
|
|
57
|
+
this.push({ at: this.t(abs), actor, action: "lookAt", target: null });
|
|
58
|
+
if (this.hasControl(actor, "head"))
|
|
59
|
+
this.push({ at: this.t(abs), actor, action: "pose", control: "head", value: null, duration: 0 });
|
|
60
|
+
this.push({ at: this.t(abs), actor, action: "walkTo", x: Math.round(x), duration: r3(d), ...(o.y !== undefined ? { y: Math.round(o.y) } : {}), ...(o.clip ? { clip: o.clip } : {}), ...(o.ease ? { ease: o.ease } : {}) });
|
|
61
|
+
return abs + d;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Someone sitting, lying or down after a fall at `at` stands up first, `lead` seconds before
|
|
65
|
+
* (never before they settled: a rest begun inside the lead is still closed). True if they were.
|
|
66
|
+
*/
|
|
67
|
+
export function standUp(actor, at, lead) {
|
|
68
|
+
const rest = this.restAt(actor, at);
|
|
69
|
+
// (One already getting up then needs no second getting up.)
|
|
70
|
+
if (!rest || rest.t1 !== Infinity)
|
|
71
|
+
return false;
|
|
72
|
+
this.getUp(actor, Math.max(rest.t0 + 0.1, at - lead));
|
|
73
|
+
return true;
|
|
74
|
+
}
|
|
75
|
+
export function hasClip(actor, clip) {
|
|
76
|
+
return !!this.kit.characters[this.characterOf(actor)]?.clips?.[clip];
|
|
77
|
+
}
|
|
78
|
+
/** Outfit / accessory changes (pose controls of the rig's wardrobe), instantly. */
|
|
79
|
+
export function wear(actor, items, abs) {
|
|
80
|
+
const doc = this.kit.characters[this.characterOf(actor)];
|
|
81
|
+
const wardrobe = wardrobeOf(doc);
|
|
82
|
+
for (const [control, value] of Object.entries(items)) {
|
|
83
|
+
if (NOT_WORN.includes(control)) {
|
|
84
|
+
this.issue("error", `"${control}" is not worn: use the "${control}" action`);
|
|
85
|
+
continue;
|
|
86
|
+
}
|
|
87
|
+
const poses = wardrobe[control];
|
|
88
|
+
if (!poses) {
|
|
89
|
+
this.issue("error", `${actor} has no wardrobe control "${control}"${closest(control, Object.keys(wardrobe))}${Object.keys(wardrobe).length ? "" : " (the rig has none)"}`);
|
|
90
|
+
continue;
|
|
91
|
+
}
|
|
92
|
+
if (!poses.includes(String(value))) {
|
|
93
|
+
this.issue("error", `${actor}'s "${control}" has no "${value}"${closest(String(value), poses)} (has ${poses.join(", ")})`);
|
|
94
|
+
continue;
|
|
95
|
+
}
|
|
96
|
+
this.push({ at: this.t(abs), actor, action: "pose", control, value, duration: 0 });
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
export function hasControl(actor, control) {
|
|
100
|
+
return !!this.kit.characters[this.characterOf(actor)]?.controls?.[control];
|
|
101
|
+
}
|
|
102
|
+
export function play(actor, clip, abs, dur, o = {}) {
|
|
103
|
+
if (!this.hasClip(actor, clip)) {
|
|
104
|
+
// The automatic gestures (talk, turn, hold…) are optional; staged ones are reported.
|
|
105
|
+
if (!["talk", "sing", "turn", "hold"].includes(clip))
|
|
106
|
+
this.issue("warning", `${actor} has no clip "${clip}"${closest(clip, Object.keys(this.kit.characters[this.characterOf(actor)]?.clips ?? {}))}`);
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
this.push({ at: this.t(abs), actor, action: "play", clip, ...(dur ? { duration: r3(dur), loop: true } : {}), fadeIn: 0.25, fadeOut: 0.3, ...o });
|
|
110
|
+
this.busy.push({ actor, t0: abs, t1: abs + (dur ?? 1) });
|
|
111
|
+
}
|
|
112
|
+
export function characterOf(actor) {
|
|
113
|
+
return this.actors.find((a) => a.id === actor)?.character ?? actor;
|
|
114
|
+
}
|
|
115
|
+
/** A sound effect of the kit for an event (hit, dash, fall, land, whip, crash, fly, jump…), if it has one. */
|
|
116
|
+
export function sfx(event, abs) {
|
|
117
|
+
const s = this.kit.sounds?.[event];
|
|
118
|
+
if (!s)
|
|
119
|
+
return;
|
|
120
|
+
const { src, volume } = typeof s === "string" ? { src: s, volume: undefined } : s;
|
|
121
|
+
this.push({ at: this.t(abs), action: "sound", audio: src, ...(volume !== undefined ? { volume } : {}) });
|
|
122
|
+
}
|
|
123
|
+
/** Holds an IK chain somewhere (a scene point, another actor's anchor, or null to let go). */
|
|
124
|
+
export function reach(actor, chain, target, abs, dur = 0.3) {
|
|
125
|
+
this.reachLog.push({ actor, chain, t: abs, target });
|
|
126
|
+
this.push({ at: this.t(abs), actor, action: "reach", chain, target, duration: r3(dur) });
|
|
127
|
+
}
|
|
128
|
+
export function set(actor, channel, value, abs, dur = 0, ease) {
|
|
129
|
+
// A limb's angle goes the short way round from where it was (never a full turn of the arm).
|
|
130
|
+
if (typeof value === "number" && LIMB.test(channel)) {
|
|
131
|
+
const key = `${actor}|${channel}`, hist = (this.angles.get(key) ?? this.angles.set(key, []).get(key));
|
|
132
|
+
const prev = [...hist].filter((h) => h[0] <= abs + 1e-6).sort((a, b) => a[0] - b[0]).pop();
|
|
133
|
+
if (prev)
|
|
134
|
+
value = r3(value + 360 * Math.round((prev[1] - value) / 360));
|
|
135
|
+
hist.push([abs + dur, value, abs]);
|
|
136
|
+
}
|
|
137
|
+
const a = { at: this.t(abs), actor, action: "set", channel, value, duration: r3(dur), ...(ease ? { ease } : {}) };
|
|
138
|
+
this.push(a);
|
|
139
|
+
if (this.inArc)
|
|
140
|
+
this.arcKeys.add(a);
|
|
141
|
+
}
|
|
142
|
+
/** Faces a way; a rig drawn at in-between angles turns through them, ending in `end` (default: the view it had). */
|
|
143
|
+
export function face(actor, dir, abs, end) {
|
|
144
|
+
// Walking, one faces where one goes: turning the other way waits for the walk to end.
|
|
145
|
+
const w = this.walks.find((w) => w.actor === actor && w.t0 < abs && w.t1 > abs && Math.abs(w.x1 - w.x0) > 1);
|
|
146
|
+
if (w && (w.x1 > w.x0 ? "right" : "left") !== dir) {
|
|
147
|
+
this.issue("warning", `${actor} would face ${dir} while walking ${w.x1 > w.x0 ? "right" : "left"} (walking backwards): turned when the walk ends instead`);
|
|
148
|
+
abs = w.t1;
|
|
149
|
+
}
|
|
150
|
+
if (this.is3d(actor) && (this.facing(actor, abs - 0.001) ? "right" : "left") !== dir)
|
|
151
|
+
this.keepHands(actor, abs);
|
|
152
|
+
this.faces.push({ actor, t: abs });
|
|
153
|
+
// A rig drawn at in-between angles turns through them: towards the camera (or away from it,
|
|
154
|
+
// seen from behind), flipped while symmetric, and back — instead of flipping at once.
|
|
155
|
+
const order = this.viewOrder(actor);
|
|
156
|
+
const cur = this.viewAt(actor, abs);
|
|
157
|
+
if (order && order.includes(cur) && (this.facing(actor, abs - 0.001) ? "right" : "left") !== dir) {
|
|
158
|
+
const i = order.indexOf(cur);
|
|
159
|
+
const mid = i <= order.length / 2 - 0.5 ? "front" : "back";
|
|
160
|
+
const steps = this.viewPath(order, cur, mid);
|
|
161
|
+
if (steps.length && order.includes(mid)) {
|
|
162
|
+
const step = this.twos();
|
|
163
|
+
steps.forEach((v, k) => this.push({ at: this.t(abs - (steps.length - k) * step), actor, action: "pose", control: "view", value: v, duration: 0 }));
|
|
164
|
+
this.push({ at: this.t(abs), actor, action: "face", direction: dir });
|
|
165
|
+
(end && order.includes(end) ? this.viewPath(order, mid, end) : [...steps.slice(0, -1).reverse(), cur]).forEach((v, k) => {
|
|
166
|
+
const a = { at: this.t(abs + (k + 1) * step), actor, action: "pose", control: "view", value: v, duration: 0 };
|
|
167
|
+
this.turnBack.add(a);
|
|
168
|
+
this.push(a);
|
|
169
|
+
});
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
this.push({ at: this.t(abs), actor, action: "face", direction: dir });
|
|
174
|
+
}
|
|
175
|
+
export function view(actor, v, abs, turn = true) {
|
|
176
|
+
// A new view replaces the turn back of a turn around at the same moment (sit down facing front).
|
|
177
|
+
for (let i = this.script.length - 1; i >= 0; i--) {
|
|
178
|
+
const a = this.script[i];
|
|
179
|
+
if (this.turnBack.has(a) && a.actor === actor && a.at >= this.t(abs) - 1e-6)
|
|
180
|
+
this.script.splice(i, 1);
|
|
181
|
+
}
|
|
182
|
+
const from = this.viewAt(actor, abs);
|
|
183
|
+
this.views.push({ actor, t: abs, view: v });
|
|
184
|
+
if (!this.hasControl(actor, "view"))
|
|
185
|
+
return this.issue("warning", `${actor} has no "view" control`);
|
|
186
|
+
const drawn = Object.keys(this.kit.characters[this.characterOf(actor)]?.controls?.view?.poses ?? {});
|
|
187
|
+
if (drawn.length && !drawn.includes(v)) {
|
|
188
|
+
this.views.pop();
|
|
189
|
+
return this.issue("warning", `${actor} has no "${v}" view (draws ${drawn.join(", ")}): keeps the current one`);
|
|
190
|
+
}
|
|
191
|
+
const order = this.viewOrder(actor);
|
|
192
|
+
if (turn && order && order.includes(from) && order.includes(v)) {
|
|
193
|
+
// Through every drawing in between, on twos.
|
|
194
|
+
const steps = this.viewPath(order, from, v).slice(0, -1);
|
|
195
|
+
steps.forEach((s, k) => this.push({ at: this.t(abs - (steps.length - k) * this.twos()), actor, action: "pose", control: "view", value: s, duration: 0 }));
|
|
196
|
+
}
|
|
197
|
+
else if (turn && this.hasClip(actor, "turn"))
|
|
198
|
+
this.push({ at: this.t(abs - 0.12), actor, action: "play", clip: "turn", fadeIn: 0.02, fadeOut: 0.05 });
|
|
199
|
+
this.push({ at: this.t(abs), actor, action: "pose", control: "view", value: v, duration: 0 });
|
|
200
|
+
// A turned head follows the body again.
|
|
201
|
+
if (this.hasControl(actor, "head"))
|
|
202
|
+
this.push({ at: this.t(abs), actor, action: "pose", control: "head", value: null, duration: 0 });
|
|
203
|
+
// Facing the camera means looking at the camera.
|
|
204
|
+
if (v === "front")
|
|
205
|
+
this.push({ at: this.t(abs), actor, action: "lookAt", target: null });
|
|
206
|
+
}
|
|
207
|
+
/** The views of a rig drawn at in-between angles, in turning order (`meta.views.order`). */
|
|
208
|
+
export function viewOrder(actor) {
|
|
209
|
+
return (this.kit.characters[this.characterOf(actor)]?.meta?.views?.order);
|
|
210
|
+
}
|
|
211
|
+
/** Views from one to another (the first excluded, the last included). */
|
|
212
|
+
export function viewPath(order, from, to) {
|
|
213
|
+
const a = order.indexOf(from), b = order.indexOf(to);
|
|
214
|
+
if (a < 0 || b < 0 || a === b)
|
|
215
|
+
return [];
|
|
216
|
+
const dir = b > a ? 1 : -1;
|
|
217
|
+
const out = [];
|
|
218
|
+
for (let i = a + dir; dir > 0 ? i <= b : i >= b; i += dir)
|
|
219
|
+
out.push(order[i]);
|
|
220
|
+
return out;
|
|
221
|
+
}
|
|
222
|
+
export function hasPart(actor, id) {
|
|
223
|
+
return (this.kit.characters[this.characterOf(actor)]?.parts ?? []).some((p) => p.id === id);
|
|
224
|
+
}
|
|
225
|
+
/** One drawing every two frames. */
|
|
226
|
+
export function twos() {
|
|
227
|
+
return 2 / (this.kit.fps ?? 30);
|
|
228
|
+
}
|
|
229
|
+
/** Moves an actor without a walking clip (thrown, stepping off a vehicle). */
|
|
230
|
+
export function slide(actor, x, abs, dur) {
|
|
231
|
+
this.walks.push({ actor, t0: abs, t1: abs + dur, x0: this.xAt(actor, abs), x1: x });
|
|
232
|
+
this.set(actor, "x", Math.round(x), abs, dur, "easeOut");
|
|
233
|
+
}
|
|
234
|
+
/** The riding pose (torso into the ride) while mounted. */
|
|
235
|
+
export function ridePoses() {
|
|
236
|
+
for (const r of this.rides) {
|
|
237
|
+
if (!this.vehicleOf.has(r.vehicle))
|
|
238
|
+
continue; // carried on someone's shoulders: no riding pose
|
|
239
|
+
const t1 = Math.min(r.t1, this.t1);
|
|
240
|
+
if (t1 - r.t0 > 0.2 && this.hasClip(r.rider, "ride"))
|
|
241
|
+
this.push({ at: this.t(r.t0), actor: r.rider, action: "play", clip: "ride", loop: true, duration: r3(t1 - r.t0), fadeIn: 0.3, fadeOut: 0.3 });
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
/** Cross to the far ground walking away from the camera (back view), hand in hand. */
|
|
245
|
+
export function cross(who, to, at, until) {
|
|
246
|
+
if (this.setDef.ground.far === undefined)
|
|
247
|
+
return this.issue("error", `set "${this.block.set}" has no far ground to cross to`);
|
|
248
|
+
const ds = this.setDef.depthScale ?? 0.6;
|
|
249
|
+
const target = this.mark(to).x;
|
|
250
|
+
// Hand in hand from behind: neighbours first step to holding distance (back-view shoulders);
|
|
251
|
+
// with no time for that before the beat, the crossing starts when they are together.
|
|
252
|
+
const order = [...who].sort((a, b) => this.xAt(a, at) - this.xAt(b, at));
|
|
253
|
+
if (order.length > 1)
|
|
254
|
+
at = Math.max(at, this.gather(order, at - 0.15, "back") + 0.15);
|
|
255
|
+
const centre = who.reduce((a, w) => a + this.xAt(w, at), 0) / who.length;
|
|
256
|
+
for (const w of who) {
|
|
257
|
+
this.crossed.set(w, at);
|
|
258
|
+
this.view(w, "back", at - 0.15);
|
|
259
|
+
const s0 = this.scaleOf(w);
|
|
260
|
+
const x1 = target + (this.xAt(w, at) - centre) * ds;
|
|
261
|
+
this.walk(w, x1, at, until - at, { clip: this.hasClip(w, "walkDepth") ? "walkDepth" : "walk", y: this.setDef.ground.far, ease: "linear", until });
|
|
262
|
+
this.set(w, "scale", r3(s0 * ds), at, Math.max(0.4, until - at), "linear");
|
|
263
|
+
this.push({ at: this.t(at), actor: w, action: "lookAt", target: null });
|
|
264
|
+
}
|
|
265
|
+
for (let i = 1; i < order.length; i++)
|
|
266
|
+
this.holdPair(order[i - 1], order[i], at - 0.15, "back");
|
|
267
|
+
this.camBeats.push([at, until]);
|
|
268
|
+
this.camera({ type: "cross", who, mark: to }, at);
|
|
269
|
+
}
|
|
270
|
+
//# sourceMappingURL=motion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"motion.js","sourceRoot":"","sources":["../../src/direct/motion.ts"],"names":[],"mappings":"AAIA,OAAO,EAAa,EAAE,EAAE,IAAI,EAAe,MAAM,UAAU,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAE7D;;;;;;GAMG;AACH,MAAM,UAAU,IAAI,CAAmB,KAAa,EAAE,CAAS,EAAE,GAAW,EAAE,GAAW,EAAE,CAAC,GAAiE,EAAE;IAC7J,oCAAoC;IACpC,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;IAC9B,8FAA8F;IAC9F,+CAA+C;IAC/C,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,KAAK,KAAK,IAAI,CAAC,CAAC,EAAE,GAAG,GAAG,IAAI,CAAC,CAAC,EAAE,GAAG,GAAG,GAAG,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IA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G,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC,CAAC;IAChC,IAAI,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;AACpD,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Picture checks: SVG transforms and bounds of markup, and what reads badly in a frame.
|
|
3
|
+
*/
|
|
4
|
+
import { compileScene } from "@anime-studio/core";
|
|
5
|
+
import type { Block, Kit, Issue } from "../types.js";
|
|
6
|
+
import type { Timeline } from "./timeline.js";
|
|
7
|
+
/** A 2D affine matrix [a, b, c, d, e, f] (SVG's: x' = a·x + c·y + e, y' = b·x + d·y + f). */
|
|
8
|
+
type Affine = [number, number, number, number, number, number];
|
|
9
|
+
/** An SVG `transform` attribute as one matrix (translate, scale, rotate(a[, cx, cy]), matrix, skewX, skewY; applied left to right). */
|
|
10
|
+
export declare function parseTransform(src: string | undefined): Affine;
|
|
11
|
+
/**
|
|
12
|
+
* Rough boxes of the shapes of an SVG drawing (absolute paths, polygons, rects, circles, ellipses)
|
|
13
|
+
* in its own coordinates, after the `transform`s of the groups they are in and their own (a gate
|
|
14
|
+
* drawn moved by a `<g transform>` is measured where it is drawn).
|
|
15
|
+
*/
|
|
16
|
+
export declare function markupBoxes(svg: string): [number, number, number, number][];
|
|
17
|
+
/**
|
|
18
|
+
* Checks of the staged picture, sampled every quarter second: a cast member whose posed body goes
|
|
19
|
+
* past the edge of the set (its `bounds`), and a face covered by something in front of it (a prop,
|
|
20
|
+
* a fixture, furniture or a vehicle drawn over it).
|
|
21
|
+
*/
|
|
22
|
+
export declare function pictureIssues(sc: ReturnType<typeof compileScene>, block: Block, kit: Kit, time: Timeline, t0: number): Issue[];
|
|
23
|
+
export {};
|
|
24
|
+
//# sourceMappingURL=pictures.d.ts.map
|