Snapshot
A tourist photographs a friend twice as she poses, then waves her over to see the shot.
Loading the take.
Each person is a chain of typed actions from @automovie/motions. This is what an agent writes for the scene; Composing motion explains the parts.
import type { IAutoMovieMotionHumanBody, IAutoMovieMotionHumanPerformance } from "@automovie/interface";
import { HumanChain, HumanEmblem, HumanHabit, HumanObject, HumanPerformance } from "@automovie/motions";
import * as archetypes from "@automovie/archetypes";
const counter = archetypes.createTable({ kind: "counter" });
const counterAt = { at: { x: 0, y: 0, z: 0.65 }, yaw: 180 };
const camera = archetypes.createDevice({ kind: "camera" });
const cameraAt = { at: { x: -0.18, y: 0.914, z: 0.42 }, yaw: 0 };
// fay: body m2, at (0, 0.12) m, facing 0°, trained
const fay = HumanChain.subject("fay")
.act("pickUp", {
prop: "camera",
handle: "grip",
use: {
tip: "screen",
line: "across",
at: { region: "noseBridge" },
},
})
.registered("photograph", { prop: "camera" }, "sn-shot1")
.act("gesture", { kind: "shakeHead" }, "sn-no")
.registered("photograph", { prop: "camera" }, "sn-shot2")
.registered("comeHere", { side: "left" }, "sn-come")
.act("look", {
target: { kind: "person", subject: "gil", region: "face" },
seconds: 1,
});
// gil: body f1, at (0, 2.5) m, facing 180°, trained
const gil = HumanChain.subject("gil")
.act("stand", { seconds: 3 })
.registered("crossedFingers", {})
.sync({ of: "sn-shot1", event: "stroke", align: "strokeEnd" })
.act("stand", { seconds: 3 })
.act("gesture", { kind: "shrug" })
.sync({ of: "sn-no", event: "start", offset: 0.3 })
.act("stand", { seconds: 3 })
.registered("victorySign", {})
.sync({ of: "sn-shot2", event: "stroke", align: "strokeEnd" })
.registered("thumbsUp", {})
.act("stand", { seconds: 3 })
.act("walk", { to: { x: 0.2, y: 0, z: 1.8 } })
.sync({ of: "sn-come", event: "strokeStart" })
.act("look", {
target: { kind: "person", subject: "fay", region: "face" },
seconds: 0.6,
});
const scene = fay.with(gil);
// The lexicon's laws this scene's rows perform, registered with the performance.
const laws = [HumanHabit.photograph, HumanEmblem.comeHere, HumanEmblem.crossedFingers, HumanEmblem.victorySign, HumanEmblem.thumbsUp];
const props = [
HumanObject.prop("counter", counter, counterAt),
HumanObject.prop("camera", camera, cameraAt),
];
// Each body id's motion body, prepared from the site's measures.
declare const bodies: Record<string, IAutoMovieMotionHumanBody>;
const input: IAutoMovieMotionHumanPerformance.IInput = {
seed: "snapshot",
performers: [
{ subject: "fay", body: bodies["m2"]!, at: { x: 0, y: 0, z: 0.12 }, yaw: 0, proficiency: { level: "trained" } },
{ subject: "gil", body: bodies["f1"]!, at: { x: 0, y: 0, z: 2.5 }, yaw: 180, proficiency: { level: "trained" } },
],
composition: scene.node,
props,
laws,
};
const performance = new HumanPerformance(input);Each person's actions on the film clock, with their named instants, as the engine placed them.
The timeline appears when the take is drawn.
The same composition in 4 takes on the player's clock. Each changes one choice and keeps the rest; the other takes are computed in this page, which takes a few seconds.