Core class
Four people chain two core moves each on the floor, from crunches to mountain climbers.
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, HumanPerformance, HumanSportGym, HumanSportWorkout } from "@automovie/motions";
// gi: body f1, at (-1.5, 0) m, facing 0°, trained
const gi = HumanChain.subject("gi")
.registered("crunch", { reps: 2, hold: 0.3, stay: true })
.registered("bicycleCrunch", { reps: 4, hold: 0.2 });
// ha: body m1, at (-0.5, 0) m, facing 0°, trained
const ha = HumanChain.subject("ha")
.registered("birdDog", { reps: 2, hold: 0.3, stay: true })
.registered("plank", { reps: 1, hold: 3 });
// io: body f2, at (0.5, 0) m, facing 0°, trained
const io = HumanChain.subject("io")
.registered("russianTwist", { reps: 6, hold: 0.2, stay: true })
.registered("sidePlank", { reps: 1, hold: 1.5 });
// ju: body m2, at (1.5, 0) m, facing 0°, trained
const ju = HumanChain.subject("ju")
.registered("gluteBridge", { reps: 2, hold: 0.3, stay: true })
.registered("mountainClimber", { reps: 6, hold: 0 });
const scene = gi.with(ha, io, ju);
// The lexicon's laws this scene's rows perform, registered with the performance.
const laws = [HumanSportWorkout.crunch, HumanSportGym.bicycleCrunch, HumanSportGym.birdDog, HumanSportWorkout.plank, HumanSportGym.russianTwist, HumanSportWorkout.sidePlank, HumanSportWorkout.gluteBridge, HumanSportWorkout.mountainClimber];
// Each body id's motion body, prepared from the site's measures.
declare const bodies: Record<string, IAutoMovieMotionHumanBody>;
const input: IAutoMovieMotionHumanPerformance.IInput = {
seed: "core",
performers: [
{ subject: "gi", body: bodies["f1"]!, at: { x: -1.5, y: 0, z: 0 }, yaw: 0, proficiency: { level: "trained" } },
{ subject: "ha", body: bodies["m1"]!, at: { x: -0.5, y: 0, z: 0 }, yaw: 0, proficiency: { level: "trained" } },
{ subject: "io", body: bodies["f2"]!, at: { x: 0.5, y: 0, z: 0 }, yaw: 0, proficiency: { level: "trained" } },
{ subject: "ju", body: bodies["m2"]!, at: { x: 1.5, y: 0, z: 0 }, yaw: 0, proficiency: { level: "trained" } },
],
composition: scene.node,
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.