@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,290 @@
|
|
|
1
|
+
import { r3 } from "./shared.js";
|
|
2
|
+
import { closest } from "./vocabulary.js";
|
|
3
|
+
/** A vehicle drives by on a lane and leaves the frame (invisible before and after). */
|
|
4
|
+
export function vehicle(b, at) {
|
|
5
|
+
const kind = b.kind ?? "car";
|
|
6
|
+
const v = this.kit.vehicles?.[kind];
|
|
7
|
+
if (!v)
|
|
8
|
+
return this.issue("error", `unknown vehicle "${kind}"${closest(kind, Object.keys(this.kit.vehicles ?? {}))}`);
|
|
9
|
+
const id = `${kind}${this.actors.filter((a) => a.character === v.character).length + 1}`;
|
|
10
|
+
const centre = this.present.length ? this.present.reduce((a, p) => a + this.xAt(p, at), 0) / this.present.length : 960;
|
|
11
|
+
const leftToRight = b.dir !== "left";
|
|
12
|
+
const x0 = leftToRight ? centre - 1500 : centre + 1500;
|
|
13
|
+
const x1 = leftToRight ? centre + 2100 : centre - 2100;
|
|
14
|
+
const speed = v.speed ?? 950;
|
|
15
|
+
const dur = Math.abs(x1 - x0) / speed;
|
|
16
|
+
const start = at - 0.3;
|
|
17
|
+
// The lanes: the set's `nearLane` / `farLane` marks (with a `y`), else just above the near
|
|
18
|
+
// ground, or the far ground for the far lane (smaller there, by the set's depth scale).
|
|
19
|
+
const far = b.lane === "far", ds = this.setDef.depthScale ?? 0.6;
|
|
20
|
+
const laneY = far ? (this.setDef.marks.farLane?.y ?? (this.setDef.ground.far !== undefined ? this.setDef.ground.far - 16 * ds : this.setDef.ground.near - 16)) : (this.setDef.marks.nearLane?.y ?? this.setDef.ground.near - 16);
|
|
21
|
+
this.addActor(id, x0, { character: v.character, y: laneY, scale: v.scale * (far ? ds : 1), z: far ? 0.3 : 1, flip: !leftToRight, palette: b.color ? { paint: b.color } : undefined, holds: 0 });
|
|
22
|
+
this.push({ at: this.t(start), actor: id, action: "walkTo", x: Math.round(x1), duration: r3(dur), clip: "drive", ease: "linear" });
|
|
23
|
+
this.tracks[`actors.${id}.opacity`] = [[0, 0], [this.t(start) - 0.001 > 0 ? this.t(start) - 0.001 : 0, 0], [this.t(start), 1], [this.t(start + dur), 1], [this.t(start + dur) + 0.001, 0]];
|
|
24
|
+
}
|
|
25
|
+
/** Vehicles standing in the block, sized for their first rider. */
|
|
26
|
+
export function placeVehicles() {
|
|
27
|
+
for (const v of this.block.vehicles ?? []) {
|
|
28
|
+
const def = this.kit.vehicles?.[v.kind];
|
|
29
|
+
if (!def) {
|
|
30
|
+
this.issue("error", `vehicle "${v.id}": unknown kind "${v.kind}"${closest(v.kind, Object.keys(this.kit.vehicles ?? {}))}`);
|
|
31
|
+
continue;
|
|
32
|
+
}
|
|
33
|
+
const first = (this.block.beats ?? []).find((b) => (b.do === "mount" || b.do === "ride") && b.vehicle === v.id)?.who;
|
|
34
|
+
const rider = (Array.isArray(first) ? first[0] : first);
|
|
35
|
+
const scale = r3(def.scale * (rider && this.kit.cast[rider] ? this.scaleOf(rider) : 1));
|
|
36
|
+
const x = v.at ? this.placeX(v.at, this.t0) : rider && this.present.includes(rider) ? this.xAt(rider, this.t0) + 150 * this.scaleOf(rider) : this.mark("center").x;
|
|
37
|
+
this.addActor(v.id, x, { character: def.character, scale, z: 1.9, flip: v.facing === "left", palette: v.color ? { paint: v.color } : undefined, holds: 0 });
|
|
38
|
+
this.vehicleOf.set(v.id, { kind: v.kind, scale });
|
|
39
|
+
// Upright from the start (a track holds its first key before it: a later "lying" would show).
|
|
40
|
+
const up = this.lyingPose(v.id);
|
|
41
|
+
if (up)
|
|
42
|
+
this.push({ at: 0, actor: v.id, action: "pose", control: "view", value: up, duration: 0 });
|
|
43
|
+
if (v.wear)
|
|
44
|
+
this.wear(v.id, v.wear, this.t0);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
/** A vehicle drawn lying on its side: pose "lying" of its `view` control; returns its upright pose. */
|
|
48
|
+
export function lyingPose(vehicle) {
|
|
49
|
+
const poses = Object.keys((this.kit.characters[this.characterOf(vehicle)]?.controls ?? {}).view?.poses ?? {});
|
|
50
|
+
return poses.includes("lying") ? (poses.find((p) => p !== "lying") ?? "side") : undefined;
|
|
51
|
+
}
|
|
52
|
+
/** Keeps a character's ground shadow on the floor while its body goes down (sitting) or hides it (lying). */
|
|
53
|
+
export function shadow(actor, abs, o, dur) {
|
|
54
|
+
const doc = this.kit.characters[this.characterOf(actor)];
|
|
55
|
+
const s = this.scaleOf(actor);
|
|
56
|
+
if (o.drop !== undefined && doc?.skeleton?.some((b) => b.id === "ground"))
|
|
57
|
+
this.set(actor, "bones.ground.y", r3(-o.drop / s), abs, dur, "easeOut");
|
|
58
|
+
if (o.hide !== undefined && doc?.parts?.some((p) => p.id === "shadow"))
|
|
59
|
+
this.set(actor, "parts.shadow.opacity", o.hide ? 0 : 1, abs, dur * 0.6);
|
|
60
|
+
}
|
|
61
|
+
export function ridingAt(rider, abs) {
|
|
62
|
+
return this.rides.find((r) => r.rider === rider && r.t0 <= abs && r.t1 > abs);
|
|
63
|
+
}
|
|
64
|
+
export function restAt(actor, abs) {
|
|
65
|
+
return this.rests.find((l) => l.actor === actor && l.t0 <= abs && l.t1 > abs);
|
|
66
|
+
}
|
|
67
|
+
/** IK chains of the rider held on the vehicle: feet on the pedals, hands on the handlebar. */
|
|
68
|
+
const GRIPS = [
|
|
69
|
+
["footF", ["pedalF"]],
|
|
70
|
+
["footB", ["pedalB"]],
|
|
71
|
+
["handF", ["gripF", "handlebar"]],
|
|
72
|
+
["handB", ["gripB", "handlebar"]],
|
|
73
|
+
];
|
|
74
|
+
export function grips(rider, vehicle) {
|
|
75
|
+
const anchors = (this.kit.characters[this.characterOf(vehicle)]?.anchors ?? {});
|
|
76
|
+
const chains = new Set((this.kit.characters[this.characterOf(rider)]?.ik ?? []).map((k) => k.id));
|
|
77
|
+
return GRIPS.flatMap(([chain, names]) => {
|
|
78
|
+
const anchor = names.find((n) => anchors[n]);
|
|
79
|
+
return anchor && chains.has(chain) ? [{ chain, anchor }] : [];
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
/** Gets on a vehicle: walks to it, sits on its `seat`, feet on the pedals, hands on the handlebar. */
|
|
83
|
+
/** Someone carried on another's back (a `carry`), if so: the ride whose "vehicle" is a cast member. */
|
|
84
|
+
export function carriedAt(actor, abs) {
|
|
85
|
+
const r = this.ridingAt(actor, abs);
|
|
86
|
+
return r && !this.vehicleOf.has(r.vehicle) ? r : undefined;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Gets on a vehicle: walks to it, sits on its `seat`, feet on the pedals, hands on the handlebar.
|
|
90
|
+
* Returns when they are on it (later than `at` when the walk over cannot fit before it), or
|
|
91
|
+
* undefined when they cannot.
|
|
92
|
+
*/
|
|
93
|
+
export function mountOn(rider, vehicle, at) {
|
|
94
|
+
if (!vehicle || !this.vehicleOf.has(vehicle))
|
|
95
|
+
return void this.issue("error", `${rider} cannot mount "${vehicle ?? ""}": not a vehicle of block "${this.block.id}"${closest(vehicle ?? "", [...this.vehicleOf.keys()])} (declare it in the block's "vehicles")`);
|
|
96
|
+
const doc = this.kit.characters[this.characterOf(vehicle)];
|
|
97
|
+
const anchors = (doc?.anchors ?? {});
|
|
98
|
+
if (!anchors.seat)
|
|
99
|
+
return void this.issue("error", `"${vehicle}" cannot be ridden: its rig has no "seat" anchor`);
|
|
100
|
+
const carried = this.carriedAt(rider, at);
|
|
101
|
+
if (carried)
|
|
102
|
+
return void this.issue("error", `${rider} cannot mount "${vehicle}": carried by ${carried.vehicle} then (set them down first: carry … until)`);
|
|
103
|
+
if (this.ridingAt(rider, at))
|
|
104
|
+
return at;
|
|
105
|
+
const other = this.rides.find((r) => r.vehicle === vehicle && r.t0 <= at && r.t1 > at);
|
|
106
|
+
if (other)
|
|
107
|
+
return void this.issue("error", `${rider} cannot mount "${vehicle}": ${other.rider} is riding it`);
|
|
108
|
+
this.standUp(rider, at, 1.6);
|
|
109
|
+
const s = this.vehicleOf.get(vehicle).scale;
|
|
110
|
+
// A fallen vehicle is lifted back up first.
|
|
111
|
+
if (this.fallen.has(vehicle)) {
|
|
112
|
+
const up = this.lyingPose(vehicle);
|
|
113
|
+
if (up)
|
|
114
|
+
this.push({ at: this.t(at - 0.5), actor: vehicle, action: "pose", control: "view", value: up, duration: 0 });
|
|
115
|
+
this.set(vehicle, "rotation", 0, at - 0.5, 0.4, "easeOut");
|
|
116
|
+
this.set(vehicle, "scale", s, at - 0.5, 0.4, "easeOut");
|
|
117
|
+
this.fallen.delete(vehicle);
|
|
118
|
+
}
|
|
119
|
+
const bx = this.xAt(vehicle, at);
|
|
120
|
+
if (Math.abs(this.xAt(rider, at - 0.8) - bx) > 30)
|
|
121
|
+
at = Math.max(at, this.walk(rider, bx, at - 0.8, 0.7) + 0.1);
|
|
122
|
+
this.face(rider, this.facing(vehicle, at) ? "right" : "left", at);
|
|
123
|
+
const rig = this.member(rider)?.rig;
|
|
124
|
+
const hip = rig?.hip ?? [0, -Math.round((rig?.height ?? 200) * 0.4)];
|
|
125
|
+
// The far leg goes behind the vehicle (its frame passes between the legs).
|
|
126
|
+
const far = new Set(["legB1", "legB2", "footB"]);
|
|
127
|
+
const parts = (this.kit.characters[this.characterOf(rider)]?.parts ?? []).filter((p) => (p.bone && far.has(p.bone)) || p.bones?.some((b) => far.has(b))).map((p) => p.id);
|
|
128
|
+
this.push({ at: this.t(at), actor: rider, action: "mount", on: vehicle, anchor: "seat", point: hip, duration: 0.4, ...(parts.length ? { behind: parts } : {}) });
|
|
129
|
+
for (const g of this.grips(rider, vehicle))
|
|
130
|
+
this.reach(rider, g.chain, { actor: vehicle, anchor: g.anchor }, at, 0.4);
|
|
131
|
+
if (!this.grips(rider, vehicle).some((g) => g.chain.startsWith("foot")))
|
|
132
|
+
this.issue("warning", `${rider} rides "${vehicle}" without feet on pedals (anchors pedalF / pedalB or IK chains footF / footB missing)`);
|
|
133
|
+
this.rides.push({ rider, vehicle, t0: at, t1: Infinity });
|
|
134
|
+
// Can the legs reach the pedals? (setup positions: seat → farthest pedal, scaled)
|
|
135
|
+
const legs = rig?.legLength ? Math.min(rig.legLength.F, rig.legLength.B) * this.scaleOf(rider) : undefined;
|
|
136
|
+
const pedals = ["pedalF", "pedalB"].filter((p) => anchors[p]).map((p) => Math.hypot(anchors[p].at[0] - anchors.seat.at[0], anchors[p].at[1] - anchors.seat.at[1]) * s);
|
|
137
|
+
if (legs && pedals.length && Math.max(...pedals) > legs * 1.02)
|
|
138
|
+
this.issue("error", `${rider}'s legs (${Math.round(legs)} px) do not reach the pedals of "${vehicle}" (${Math.round(Math.max(...pedals))} px from the seat): make kit.vehicles.${this.vehicleOf.get(vehicle).kind}.scale smaller`);
|
|
139
|
+
return at;
|
|
140
|
+
}
|
|
141
|
+
/** Gets off and stands next to the vehicle, facing the same way. */
|
|
142
|
+
export function dismount(rider, at) {
|
|
143
|
+
const r = this.ridingAt(rider, at);
|
|
144
|
+
if (!r)
|
|
145
|
+
return this.issue("error", `${rider} cannot dismount: not riding anything then`);
|
|
146
|
+
if (!this.vehicleOf.has(r.vehicle))
|
|
147
|
+
return this.issue("error", `${rider} cannot dismount: carried by ${r.vehicle} then (set them down with carry … until)`);
|
|
148
|
+
r.t1 = at;
|
|
149
|
+
this.letGo(rider, r.vehicle, at, 0.4);
|
|
150
|
+
const dir = this.facing(r.vehicle, at) ? 1 : -1;
|
|
151
|
+
this.slide(rider, this.xAt(r.vehicle, at) - dir * 70 * this.scaleOf(rider), at, 0.45);
|
|
152
|
+
}
|
|
153
|
+
export function letGo(rider, vehicle, at, dur) {
|
|
154
|
+
this.push({ at: this.t(at), actor: rider, action: "mount", on: null, duration: dur });
|
|
155
|
+
for (const g of this.grips(rider, vehicle))
|
|
156
|
+
this.reach(rider, g.chain, null, at, Math.min(dur, 0.3));
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Off whatever they ride — a vehicle or someone's back — at `at`: the ride ends, the mount is
|
|
160
|
+
* undone and every hand or foot held on it lets go. Returns the ride, or undefined.
|
|
161
|
+
*/
|
|
162
|
+
export function dropOff(rider, at, dur = 0.4) {
|
|
163
|
+
const r = this.ridingAt(rider, at);
|
|
164
|
+
if (!r)
|
|
165
|
+
return undefined;
|
|
166
|
+
r.t1 = at;
|
|
167
|
+
// (Carried, their own place did not follow the carrier: it is the carrier's now.)
|
|
168
|
+
if (!this.vehicleOf.has(r.vehicle))
|
|
169
|
+
this.jump(rider, this.xAt(r.vehicle, at), at);
|
|
170
|
+
this.push({ at: this.t(at), actor: rider, action: "mount", on: null, duration: dur });
|
|
171
|
+
// (Whatever the rider holds on the ridden one: pedals, a handlebar, a neck, hands.)
|
|
172
|
+
const chains = new Set();
|
|
173
|
+
for (const g of this.grips(rider, r.vehicle))
|
|
174
|
+
chains.add(g.chain);
|
|
175
|
+
for (const chain of new Set(this.reachLog.filter((x) => x.actor === rider).map((x) => x.chain))) {
|
|
176
|
+
const last = this.reachBefore(rider, chain, at);
|
|
177
|
+
if (last && typeof last === "object" && last.actor === r.vehicle)
|
|
178
|
+
chains.add(chain);
|
|
179
|
+
}
|
|
180
|
+
for (const chain of chains)
|
|
181
|
+
this.reach(rider, chain, null, at, Math.min(dur, 0.3));
|
|
182
|
+
return r;
|
|
183
|
+
}
|
|
184
|
+
/** Rides to a place (mounting first if needed); `wobble` 0..1 rocks the vehicle like a beginner. */
|
|
185
|
+
export function ride(rider, b, at, until) {
|
|
186
|
+
let start = at;
|
|
187
|
+
const carried = this.carriedAt(rider, at);
|
|
188
|
+
if (carried)
|
|
189
|
+
return this.issue("error", `${rider} cannot ride: carried by ${carried.vehicle} then (set them down first: carry … until)`);
|
|
190
|
+
if (!this.ridingAt(rider, at)) {
|
|
191
|
+
// Without "vehicle": the one they rode last.
|
|
192
|
+
const last = [...this.rides].reverse().find((r) => r.rider === rider && this.vehicleOf.has(r.vehicle))?.vehicle;
|
|
193
|
+
const on = this.mountOn(rider, b.vehicle ?? last, at);
|
|
194
|
+
if (on === undefined)
|
|
195
|
+
return;
|
|
196
|
+
start = on + 0.45;
|
|
197
|
+
}
|
|
198
|
+
const r = this.ridingAt(rider, start);
|
|
199
|
+
if (!r)
|
|
200
|
+
return;
|
|
201
|
+
const vehicle = r.vehicle;
|
|
202
|
+
const v = this.vehicleOf.get(vehicle);
|
|
203
|
+
if (!this.hasClip(vehicle, "drive"))
|
|
204
|
+
return this.issue("error", `"${vehicle}" cannot ride: its rig has no "drive" clip`);
|
|
205
|
+
if (b.to === undefined)
|
|
206
|
+
return this.issue("error", `line ${b.line} "ride": needs "to"`);
|
|
207
|
+
const x0 = this.xAt(vehicle, start);
|
|
208
|
+
const x1 = this.placeX(b.to, start, rider);
|
|
209
|
+
const speed = (this.kit.vehicles?.[v.kind]?.speed ?? 240) * v.scale;
|
|
210
|
+
const dur = Math.max(0.6, until !== undefined ? until - start : Math.abs(x1 - x0) / speed);
|
|
211
|
+
this.walk(vehicle, x1, start, dur, { clip: "drive" });
|
|
212
|
+
// The rider's own position goes along (it is where they stand when they get off).
|
|
213
|
+
const own = ["ride", "hold", "idle"].find((c) => this.hasClip(rider, c));
|
|
214
|
+
if (own)
|
|
215
|
+
this.walk(rider, x1 + (this.xAt(rider, start) - x0), start, dur, { clip: own });
|
|
216
|
+
const wobble = Math.min(1, Math.max(0, Number(b.wobble ?? 0)));
|
|
217
|
+
if (wobble > 0) {
|
|
218
|
+
// Irregular rocking (a beginner fighting for balance), back to level at the end.
|
|
219
|
+
const amp = 7 * wobble;
|
|
220
|
+
const rnd = (i) => Math.abs(Math.sin(i * 12.9898 + x0 * 0.001) * 43758.5453) % 1;
|
|
221
|
+
let t = start + 0.15;
|
|
222
|
+
for (let i = 0; t < start + dur - 0.35; i++) {
|
|
223
|
+
const step = 0.3 + 0.25 * rnd(i);
|
|
224
|
+
this.set(vehicle, "rotation", r3((i % 2 ? 1 : -1) * amp * (0.5 + 0.5 * rnd(i + 7))), t, step, "sineInOut");
|
|
225
|
+
t += step;
|
|
226
|
+
}
|
|
227
|
+
this.set(vehicle, "rotation", 0, t, 0.3, "sineInOut");
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
/** Falls off: the vehicle tips and drops on its side, the rider is thrown forward (or back) and lands lying. */
|
|
231
|
+
export function fall(rider, at, side) {
|
|
232
|
+
const r = this.ridingAt(rider, at);
|
|
233
|
+
if (!r)
|
|
234
|
+
return this.issue("error", `${rider} cannot fall off: not riding anything then`);
|
|
235
|
+
const vehicle = r.vehicle;
|
|
236
|
+
if (!this.vehicleOf.has(vehicle)) {
|
|
237
|
+
// Carried on someone's back: slips off it and lands behind the carrier.
|
|
238
|
+
const dir = this.facing(vehicle, at) ? 1 : -1;
|
|
239
|
+
this.dropOff(rider, at, 0.3);
|
|
240
|
+
this.knockDown(rider, at, side, dir, 0.45, -(this.member(vehicle)?.rig.extent.back ?? 60) * this.scaleOf(vehicle) - 0.25 * (this.member(rider)?.rig.height ?? 200) * this.scaleOf(rider));
|
|
241
|
+
return;
|
|
242
|
+
}
|
|
243
|
+
if (this.walks.some((w) => w.actor === vehicle && w.t0 < at && w.t1 > at + 0.05))
|
|
244
|
+
this.issue("warning", `${rider} falls while "${vehicle}" is still moving: end the ride ("until") at the fall`);
|
|
245
|
+
r.t1 = at + 0.2;
|
|
246
|
+
const dir = this.facing(vehicle, at) ? 1 : -1;
|
|
247
|
+
const s = this.vehicleOf.get(vehicle).scale;
|
|
248
|
+
// The front wheel digs in, then the vehicle drops on its side: its own "lying" drawing (pose
|
|
249
|
+
// "lying" of its `view` control), else flattened as a fallback.
|
|
250
|
+
this.set(vehicle, "rotation", dir * 10, at, 0.22, "easeIn");
|
|
251
|
+
if (this.lyingPose(vehicle)) {
|
|
252
|
+
this.set(vehicle, "rotation", 0, at + 0.22, 0.12, "easeOut");
|
|
253
|
+
this.push({ at: this.t(at + 0.22), actor: vehicle, action: "pose", control: "view", value: "lying", duration: 0 });
|
|
254
|
+
}
|
|
255
|
+
else {
|
|
256
|
+
this.set(vehicle, "scale", [s, r3(s * 0.6)], at + 0.22, 0.3, "easeIn");
|
|
257
|
+
this.set(vehicle, "rotation", dir * 3, at + 0.22, 0.3, "easeIn");
|
|
258
|
+
}
|
|
259
|
+
this.fallen.add(vehicle);
|
|
260
|
+
this.letGo(rider, vehicle, at + 0.2, 0.45);
|
|
261
|
+
// Thrown clear of the vehicle: over the front, or off the back.
|
|
262
|
+
this.knockDown(rider, at + 0.2, side, dir, 0.45, (side === "front" ? 0.35 : -0.3) * (this.member(rider)?.rig.height ?? 200) * this.scaleOf(rider));
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* Down on the ground after a fall, rotated about the feet: on the back (default, "back") or face
|
|
266
|
+
* down ("front"), lifted by the body's depth on that side so nothing sinks into the ground.
|
|
267
|
+
*/
|
|
268
|
+
export function knockDown(actor, at, side, dir, dur, shift) {
|
|
269
|
+
const rig = this.member(actor)?.rig;
|
|
270
|
+
const s = this.scaleOf(actor);
|
|
271
|
+
const height = (rig?.height ?? 200) * s;
|
|
272
|
+
const front = side === "front";
|
|
273
|
+
const g = this.lying(actor, dir, side);
|
|
274
|
+
const y = this.groundY(actor, at);
|
|
275
|
+
this.slide(actor, this.xAt(actor, at) + dir * (shift ?? (front ? 0.12 : -0.06) * height), at, dur);
|
|
276
|
+
this.set(actor, "rotation", g.rotation, at, dur, "easeIn");
|
|
277
|
+
this.set(actor, "y", Math.round(y - g.offset[1]), at, dur, "easeIn");
|
|
278
|
+
this.bendNeck(actor, g.neck, at, dur);
|
|
279
|
+
// (The kit's knock-down clips are made for falling on the back.)
|
|
280
|
+
const clip = front ? undefined : this.knockedLimbs(actor, at, dur);
|
|
281
|
+
this.rests.push({ actor, kind: "fallen", on: null, t0: at, t1: Infinity, y, ...(clip ? { clip } : {}) });
|
|
282
|
+
this.shadow(actor, at, { hide: true }, dur);
|
|
283
|
+
if (this.anticipation > 0)
|
|
284
|
+
this.squash(actor, at + dur, { ...g, dir, y });
|
|
285
|
+
this.sfx("fall", at + dur);
|
|
286
|
+
if (this.hasControl(actor, "emotion"))
|
|
287
|
+
this.push({ at: this.t(at - 0.2), actor, action: "pose", control: "emotion", value: "scared", duration: 0.2 });
|
|
288
|
+
this.push({ at: this.t(at + dur + 0.05), action: "fx", type: "stars", actor });
|
|
289
|
+
}
|
|
290
|
+
//# sourceMappingURL=riding.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"riding.js","sourceRoot":"","sources":["../../src/direct/riding.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAC9B,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,uFAAuF;AACvF,MAAM,UAAU,OAAO,CAAmB,CAAO,EAAE,EAAU;IAC3D,MAAM,IAAI,GAAI,CAAC,CAAC,IAAe,IAAI,KAAK,CAAC;IACzC,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,CAAC;IACpC,IAAI,CAAC,CAAC;QAAE,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,oBAAoB,IAAI,IAAI,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;IACtH,MAAM,EAAE,GAAG,GAAG,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,KAAK,CAAC,CAAC,SAAS,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;IACzF,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC;IACvH,MAAM,WAAW,GAAG,CAAC,CAAC,GAAG,KAAK,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AAM,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,CAAC;IACtJ,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,GAAG,GAAG,GAAG,IAAI,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC;AACjF,CAAC"}
|
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One block = one continuous scene: the `BlockScene` state, its basic helpers, and the method groups
|
|
3
|
+
* of the other `direct/` modules installed on it.
|
|
4
|
+
*/
|
|
5
|
+
import type { Rig3dValues, Rig } from "@anime-studio/core";
|
|
6
|
+
import type { Beat, SetDef, Block, Kit, Issue, When, Animation, CastMember, Place, Mark } from "../types.js";
|
|
7
|
+
import { type Action, type Key, type Walk, type PropState } from "./shared.js";
|
|
8
|
+
import type { Timeline } from "./timeline.js";
|
|
9
|
+
import * as cast from "./cast.js";
|
|
10
|
+
import * as motion from "./motion.js";
|
|
11
|
+
import * as props from "./props.js";
|
|
12
|
+
import * as graphics from "./graphics.js";
|
|
13
|
+
import * as propsInHand from "./props-in-hand.js";
|
|
14
|
+
import * as arms from "./arms.js";
|
|
15
|
+
import * as beat from "./beat.js";
|
|
16
|
+
import * as fixtures from "./fixtures.js";
|
|
17
|
+
import * as lighting from "./lighting.js";
|
|
18
|
+
import * as throws from "./throws.js";
|
|
19
|
+
import * as riding from "./riding.js";
|
|
20
|
+
import * as handHolding from "./hand-holding.js";
|
|
21
|
+
import * as gestures from "./gestures.js";
|
|
22
|
+
import * as contact from "./contact.js";
|
|
23
|
+
import * as hiding from "./hiding.js";
|
|
24
|
+
import * as flight from "./flight.js";
|
|
25
|
+
import * as furniture from "./furniture.js";
|
|
26
|
+
import * as sitting from "./sitting.js";
|
|
27
|
+
import * as lying from "./lying.js";
|
|
28
|
+
import * as camera from "./camera.js";
|
|
29
|
+
import * as dialogue from "./dialogue.js";
|
|
30
|
+
import * as timing from "./timing.js";
|
|
31
|
+
import * as life from "./life.js";
|
|
32
|
+
import * as build from "./build.js";
|
|
33
|
+
export declare class BlockScene {
|
|
34
|
+
readonly block: Block;
|
|
35
|
+
readonly kit: Kit;
|
|
36
|
+
readonly time: Timeline;
|
|
37
|
+
readonly issues: Issue[];
|
|
38
|
+
/** A moment of another block as a frozen frame (for photos). */
|
|
39
|
+
readonly photoOf: (block: string, when: When, key: string) => string | undefined;
|
|
40
|
+
/** Cartoon timing of the characters (the block's, else the staging's). */
|
|
41
|
+
readonly animation?: Animation | undefined;
|
|
42
|
+
/** How the camera behaves where no beat says otherwise (`Staging.camera.style`). */
|
|
43
|
+
readonly cameraStyle: "dynamic" | "conversation";
|
|
44
|
+
readonly actors: Record<string, unknown>[];
|
|
45
|
+
readonly props: Record<string, unknown>[];
|
|
46
|
+
readonly script: Action[];
|
|
47
|
+
readonly tracks: Record<string, Key[]>;
|
|
48
|
+
walks: Walk[];
|
|
49
|
+
x0: Record<string, number>;
|
|
50
|
+
facing0: Record<string, boolean>;
|
|
51
|
+
propKinds: Map<string, string>;
|
|
52
|
+
/** The drawings back to the old view after a turn around (dropped if a new view follows). */
|
|
53
|
+
turnBack: Set<Action>;
|
|
54
|
+
busy: {
|
|
55
|
+
actor: string;
|
|
56
|
+
t0: number;
|
|
57
|
+
t1: number;
|
|
58
|
+
}[];
|
|
59
|
+
views: {
|
|
60
|
+
actor: string;
|
|
61
|
+
t: number;
|
|
62
|
+
view: string;
|
|
63
|
+
}[];
|
|
64
|
+
holds: {
|
|
65
|
+
actor: string;
|
|
66
|
+
t0: number;
|
|
67
|
+
t1: number;
|
|
68
|
+
}[];
|
|
69
|
+
/** 2.5D rigs: the pose set in 3D (sitting), what the arms rest at, props hung on the body. */
|
|
70
|
+
pose3d: Map<string, Rig3dValues>;
|
|
71
|
+
restArms: Map<string, Rig3dValues>;
|
|
72
|
+
hung: Map<string, {
|
|
73
|
+
actor: string;
|
|
74
|
+
fit: Record<string, string | number>;
|
|
75
|
+
}>;
|
|
76
|
+
lastHang: Map<string, Record<string, string | number>>;
|
|
77
|
+
/** Limb angles set per actor and channel — [when it is reached, value, when it starts]: the next one goes the short way. */
|
|
78
|
+
angles: Map<string, [number, number, number][]>;
|
|
79
|
+
/** When an arm is moved by a beat (automatic gestures keep out of the way). */
|
|
80
|
+
armBusy: {
|
|
81
|
+
actor: string;
|
|
82
|
+
side: string;
|
|
83
|
+
t0: number;
|
|
84
|
+
t1: number;
|
|
85
|
+
}[];
|
|
86
|
+
/** Which hand holds a prop ("F" near / "B" far): it keeps holding when the holder turns round. */
|
|
87
|
+
handOf: Map<string, "B" | "F">;
|
|
88
|
+
/** The hand holding each prop over time (a turn round swaps it), so a later grab finds the right one. */
|
|
89
|
+
handLog: Map<string, [number, "B" | "F"][]>;
|
|
90
|
+
/** Grabs back into the holding hand at a later moment: their anchor is settled when the block is built. */
|
|
91
|
+
regrabs: {
|
|
92
|
+
action: Action;
|
|
93
|
+
prop: string;
|
|
94
|
+
t: number;
|
|
95
|
+
}[];
|
|
96
|
+
/** Hand-in-hand clips (and their busy windows) that last until the hands let go. */
|
|
97
|
+
holdClips: {
|
|
98
|
+
actor: string;
|
|
99
|
+
t0: number;
|
|
100
|
+
clip: Action;
|
|
101
|
+
busy: {
|
|
102
|
+
actor: string;
|
|
103
|
+
t0: number;
|
|
104
|
+
t1: number;
|
|
105
|
+
};
|
|
106
|
+
}[];
|
|
107
|
+
/** `enter` beats staged as the cast entry's entrance (the first per actor), per actor. */
|
|
108
|
+
placedEnters: Map<Beat, Set<string>>;
|
|
109
|
+
/** What a held prop is doing: fitted to the body (its fit, the hand's 3D target) until a moment. */
|
|
110
|
+
inUse: Map<string, {
|
|
111
|
+
actor: string;
|
|
112
|
+
fit?: Record<string, unknown>[];
|
|
113
|
+
target?: [number, number, number];
|
|
114
|
+
until: number;
|
|
115
|
+
}>;
|
|
116
|
+
/** Who holds whose hand (a on the left), so a new hold extends the chain instead of breaking it. */
|
|
117
|
+
handPairs: {
|
|
118
|
+
a: string;
|
|
119
|
+
b: string;
|
|
120
|
+
t0: number;
|
|
121
|
+
t1: number;
|
|
122
|
+
}[];
|
|
123
|
+
faces: {
|
|
124
|
+
actor: string;
|
|
125
|
+
t: number;
|
|
126
|
+
}[];
|
|
127
|
+
/** When each actor started crossing to the far ground (smaller from then on). */
|
|
128
|
+
crossed: Map<string, number>;
|
|
129
|
+
/** Front-view gestures waiting for the posed face positions (resolved at the end of the build). */
|
|
130
|
+
pendingGestures: {
|
|
131
|
+
actor: string;
|
|
132
|
+
clip: string;
|
|
133
|
+
at: number;
|
|
134
|
+
until: number;
|
|
135
|
+
}[];
|
|
136
|
+
/** IK reach targets set by the staging, per actor and chain (to come back to after a gesture). */
|
|
137
|
+
reachLog: {
|
|
138
|
+
actor: string;
|
|
139
|
+
chain: string;
|
|
140
|
+
t: number;
|
|
141
|
+
target: unknown;
|
|
142
|
+
}[];
|
|
143
|
+
/** Riding: who is on which vehicle, and when. */
|
|
144
|
+
rides: {
|
|
145
|
+
rider: string;
|
|
146
|
+
vehicle: string;
|
|
147
|
+
t0: number;
|
|
148
|
+
t1: number;
|
|
149
|
+
}[];
|
|
150
|
+
/** Block vehicles (id → kind, scale) and the ones lying on their side. */
|
|
151
|
+
vehicleOf: Map<string, {
|
|
152
|
+
kind: string;
|
|
153
|
+
scale: number;
|
|
154
|
+
}>;
|
|
155
|
+
fallen: Set<string>;
|
|
156
|
+
/** Block furniture (id → kind, scale). */
|
|
157
|
+
furnitureOf: Map<string, {
|
|
158
|
+
kind: string;
|
|
159
|
+
scale: number;
|
|
160
|
+
y: number;
|
|
161
|
+
cover?: string;
|
|
162
|
+
}>;
|
|
163
|
+
/** Sitting / lying (on furniture or the ground) and lying after a fall, until they get up. */
|
|
164
|
+
rests: {
|
|
165
|
+
actor: string;
|
|
166
|
+
kind: "sit" | "lie" | "fallen";
|
|
167
|
+
on: string | null;
|
|
168
|
+
t0: number;
|
|
169
|
+
t1: number;
|
|
170
|
+
y?: number;
|
|
171
|
+
front?: boolean;
|
|
172
|
+
tuck?: boolean;
|
|
173
|
+
sleep?: boolean;
|
|
174
|
+
hipY?: number;
|
|
175
|
+
clip?: Action;
|
|
176
|
+
}[];
|
|
177
|
+
/** Compiled rigs of the kit's characters (the lying geometry of `lyingPose`), by character. */
|
|
178
|
+
rigs: Map<string, Rig>;
|
|
179
|
+
propStates: Map<string, PropState>;
|
|
180
|
+
/** Walks of the cast, leaning into the move once the block is staged (`animation.anticipation`). */
|
|
181
|
+
leans: {
|
|
182
|
+
walk: Walk;
|
|
183
|
+
run: boolean;
|
|
184
|
+
}[];
|
|
185
|
+
/** Limb keys of `arm3d`'s arcs (their in-betweens are timed already: no settle is added), and whether one is being set. */
|
|
186
|
+
arcKeys: Set<Action>;
|
|
187
|
+
inArc: boolean;
|
|
188
|
+
cam: Record<string, unknown>;
|
|
189
|
+
readonly present: string[];
|
|
190
|
+
readonly t0: number;
|
|
191
|
+
readonly t1: number;
|
|
192
|
+
readonly setDef: SetDef;
|
|
193
|
+
/** Where each photo of the album is (scene px: its centre and size), for the camera. */
|
|
194
|
+
photoSpots: Map<string, {
|
|
195
|
+
x: number;
|
|
196
|
+
y: number;
|
|
197
|
+
w: number;
|
|
198
|
+
h: number;
|
|
199
|
+
}>;
|
|
200
|
+
/** Hung props carried: by whom, in which hand, from when to when (and the arm kept busy meanwhile). */
|
|
201
|
+
carries: {
|
|
202
|
+
actor: string;
|
|
203
|
+
prop: string;
|
|
204
|
+
side: "F" | "B";
|
|
205
|
+
t0: number;
|
|
206
|
+
t1: number;
|
|
207
|
+
busy: {
|
|
208
|
+
actor: string;
|
|
209
|
+
side: string;
|
|
210
|
+
t0: number;
|
|
211
|
+
t1: number;
|
|
212
|
+
};
|
|
213
|
+
}[];
|
|
214
|
+
/** The clip each fixture last played by a `fixture` beat (it holds its end until the next one). */
|
|
215
|
+
fixtureClips: Map<string, Action>;
|
|
216
|
+
/** The light mood now (and when it last changed): layers, lights and fixtures follow it. */
|
|
217
|
+
mood: string;
|
|
218
|
+
/** Pairs brought close on purpose (a hug, a high five, a hand-over, a punch…), when: the check lets them be nose to nose. */
|
|
219
|
+
closeOK: {
|
|
220
|
+
a: string;
|
|
221
|
+
b: string;
|
|
222
|
+
t0: number;
|
|
223
|
+
t1: number;
|
|
224
|
+
}[];
|
|
225
|
+
/** Who hides behind what, and when (the check does not report their covered face then). */
|
|
226
|
+
hidings: {
|
|
227
|
+
actor: string;
|
|
228
|
+
behind: string;
|
|
229
|
+
t0: number;
|
|
230
|
+
t1: number;
|
|
231
|
+
crouch: number;
|
|
232
|
+
lean: number;
|
|
233
|
+
}[];
|
|
234
|
+
/**
|
|
235
|
+
* Camera moves the staging asked for ([from, until, momentary], episode time): the automatic camera
|
|
236
|
+
* keeps out of them; after a momentary one it frames the conversation again at once.
|
|
237
|
+
*/
|
|
238
|
+
camBeats: [number, number, boolean?][];
|
|
239
|
+
/** Takes (reaction and double takes) per actor: the face and the body are theirs while they last. */
|
|
240
|
+
takes: {
|
|
241
|
+
actor: string;
|
|
242
|
+
t0: number;
|
|
243
|
+
t1: number;
|
|
244
|
+
}[];
|
|
245
|
+
/** Blinks staged on head turns (saccades keep out of them). */
|
|
246
|
+
blinkLog: {
|
|
247
|
+
actor: string;
|
|
248
|
+
t0: number;
|
|
249
|
+
t1: number;
|
|
250
|
+
}[];
|
|
251
|
+
constructor(block: Block, kit: Kit, time: Timeline, issues: Issue[], first?: boolean,
|
|
252
|
+
/** A moment of another block as a frozen frame (for photos). */
|
|
253
|
+
photoOf?: (block: string, when: When, key: string) => string | undefined,
|
|
254
|
+
/** Cartoon timing of the characters (the block's, else the staging's). */
|
|
255
|
+
animation?: Animation | undefined,
|
|
256
|
+
/** How the camera behaves where no beat says otherwise (`Staging.camera.style`). */
|
|
257
|
+
cameraStyle?: "dynamic" | "conversation");
|
|
258
|
+
t: (abs: number) => number;
|
|
259
|
+
/** Anticipation and settle, 0..1 (the block's `animation`, else the staging's; 0: off). */
|
|
260
|
+
get anticipation(): number;
|
|
261
|
+
push(a: Action): void;
|
|
262
|
+
/** Whether the actor's character has this pose (a name or `{ name: weight }`; null: unset) on a pose control. */
|
|
263
|
+
hasPose(actor: string, control: string, value: unknown): boolean;
|
|
264
|
+
/** A staged emotion: a warning naming the character's emotions when it has no such pose. */
|
|
265
|
+
stagedEmotion(actor: string, value: unknown): boolean;
|
|
266
|
+
mark(name: string): Mark;
|
|
267
|
+
issue(severity: Issue["severity"], message: string): void;
|
|
268
|
+
/** Episode time of a `When` (a word the line does not have is reported and timed on the line). */
|
|
269
|
+
when(w: When): number;
|
|
270
|
+
member(id: string): CastMember | undefined;
|
|
271
|
+
scaleOf(id: string): number;
|
|
272
|
+
/**
|
|
273
|
+
* A cast member's speed (scene px/s, at their scale): from the cast entry, else the defaults — for
|
|
274
|
+
* a run, the rig's own `run` clip's natural speed (its stride per cycle, at 1×: the legs at the
|
|
275
|
+
* cadence they were drawn at, a long-striding cartoon run not played in slow motion), else 380.
|
|
276
|
+
*/
|
|
277
|
+
speedOf(id: string, mode?: "walk" | "run" | "fly"): number;
|
|
278
|
+
/**
|
|
279
|
+
* The set mark a place refers to — a mark name or `{ mark, dx }` (its x moved by `dx`) — with its
|
|
280
|
+
* `y` (a place on the far ground, a seat) and the rest of the mark; undefined for someone or a prop.
|
|
281
|
+
*/
|
|
282
|
+
markOf(p: Place | undefined): Mark | undefined;
|
|
283
|
+
/** Smallest distance between two characters standing side by side, `a` left of `b`, so that
|
|
284
|
+
* neither covers the other: what `a` reaches to the right plus what `b` reaches to the left. */
|
|
285
|
+
pairGap(a: string, b: string, aRight?: boolean, bRight?: boolean): number;
|
|
286
|
+
/** Scene x of a place at a given time. Next to someone = beside them, never on top of them. */
|
|
287
|
+
placeX(p: Place, abs: number, who?: string): number;
|
|
288
|
+
xAt(actor: string, abs: number): number;
|
|
289
|
+
viewAt(actor: string, abs: number): string;
|
|
290
|
+
/** Life in the eyes and head, 0..1 (the block's `animation`, else the staging's; 0: off). */
|
|
291
|
+
get life(): number;
|
|
292
|
+
/** Arcs on IK moves, 0..1 (the block's `animation`, else the staging's; 0: off). */
|
|
293
|
+
get arcs(): number;
|
|
294
|
+
}
|
|
295
|
+
type CastMethods = typeof cast;
|
|
296
|
+
type MotionMethods = typeof motion;
|
|
297
|
+
type PropsMethods = typeof props;
|
|
298
|
+
type GraphicsMethods = typeof graphics;
|
|
299
|
+
type PropsInHandMethods = typeof propsInHand;
|
|
300
|
+
type ArmsMethods = typeof arms;
|
|
301
|
+
type BeatMethods = typeof beat;
|
|
302
|
+
type FixturesMethods = typeof fixtures;
|
|
303
|
+
type LightingMethods = typeof lighting;
|
|
304
|
+
type ThrowsMethods = typeof throws;
|
|
305
|
+
type RidingMethods = typeof riding;
|
|
306
|
+
type HandHoldingMethods = typeof handHolding;
|
|
307
|
+
type GesturesMethods = typeof gestures;
|
|
308
|
+
type ContactMethods = typeof contact;
|
|
309
|
+
type HidingMethods = typeof hiding;
|
|
310
|
+
type FlightMethods = typeof flight;
|
|
311
|
+
type FurnitureMethods = typeof furniture;
|
|
312
|
+
type SittingMethods = typeof sitting;
|
|
313
|
+
type LyingMethods = typeof lying;
|
|
314
|
+
type CameraMethods = typeof camera;
|
|
315
|
+
type DialogueMethods = typeof dialogue;
|
|
316
|
+
type TimingMethods = typeof timing;
|
|
317
|
+
type LifeMethods = typeof life;
|
|
318
|
+
type BuildMethods = typeof build;
|
|
319
|
+
export interface BlockScene extends CastMethods, MotionMethods, PropsMethods, GraphicsMethods, PropsInHandMethods, ArmsMethods, BeatMethods, FixturesMethods, LightingMethods, ThrowsMethods, RidingMethods, HandHoldingMethods, GesturesMethods, ContactMethods, HidingMethods, FlightMethods, FurnitureMethods, SittingMethods, LyingMethods, CameraMethods, DialogueMethods, TimingMethods, LifeMethods, BuildMethods {
|
|
320
|
+
}
|
|
321
|
+
export {};
|
|
322
|
+
//# sourceMappingURL=scene.d.ts.map
|