Skip to Content

Park warm-up

Four people warm up: jogging, squats and lunges, jumping jacks, stretches and high knees.

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, HumanSportWorkout } from "@automovie/motions";

// jo: body m1, at (-2.4, 0) m, facing 0°, trained
const jo = HumanChain.subject("jo")
  .act("run", { to: { x: -2.4, y: 0, z: 4 }, pace: "jog" })
  .act("run", { to: { x: -2.4, y: 0, z: 0.5 }, pace: "jog" })
  .registered("buttKicks", { reps: 4 })
  .act("exercise", { kind: "highKnees", reps: 4, tempo: [0.6, 0, 0.6] });

// kim: body f1, at (-0.8, 1.5) m, facing 180°, trained
const kim = HumanChain.subject("kim")
  .act("exercise", {
      kind: "squat",
      reps: 3,
      depth: "parallel",
      tempo: [1, 0, 0.8],
    })
  .act("exercise", { kind: "lunge", side: "left", reps: 2, tempo: [1, 0, 0.8] })
  .act("exercise", {
      kind: "lunge",
      side: "right",
      reps: 2,
      tempo: [1, 0, 0.8],
    });

// lou: body m2, at (0.8, 1.5) m, facing 180°, trained
const lou = HumanChain.subject("lou")
  .act("exercise", { kind: "jumpingJack", reps: 4, tempo: [0.5, 0, 0.5] })
  .act("stand", { seconds: 0.4 })
  .act("jump", { to: { x: 0.8, y: 0, z: 1.1 } })
  .act("exercise", { kind: "highKnees", reps: 3, tempo: [0.6, 0, 0.6] })
  .act("exercise", { kind: "jumpingJack", reps: 3, tempo: [0.5, 0, 0.5] });

// mo: body f2, at (2.4, 1.5) m, facing 180°, trained
const mo = HumanChain.subject("mo")
  .act("stretch", { kind: "quadriceps", side: "left", seconds: 1.5 })
  .act("stretch", { kind: "overheadSide", side: "right", seconds: 1.5 })
  .act("exercise", { kind: "highKnees", reps: 4, tempo: [0.6, 0, 0.6] });

const scene = jo.with(kim, lou, mo);

// The lexicon's laws this scene's rows perform, registered with the performance.
const laws = [HumanSportWorkout.buttKicks];

// Each body id's motion body, prepared from the site's measures.
declare const bodies: Record<string, IAutoMovieMotionHumanBody>;

const input: IAutoMovieMotionHumanPerformance.IInput = {
  seed: "warm-up",
  performers: [
    { subject: "jo", body: bodies["m1"]!, at: { x: -2.4, y: 0, z: 0 }, yaw: 0, proficiency: { level: "trained" } },
    { subject: "kim", body: bodies["f1"]!, at: { x: -0.8, y: 0, z: 1.5 }, yaw: 180, proficiency: { level: "trained" } },
    { subject: "lou", body: bodies["m2"]!, at: { x: 0.8, y: 0, z: 1.5 }, yaw: 180, proficiency: { level: "trained" } },
    { subject: "mo", body: bodies["f2"]!, at: { x: 2.4, y: 0, z: 1.5 }, yaw: 180, proficiency: { level: "trained" } },
  ],
  composition: scene.node,
  laws,
};
const performance = new HumanPerformance(input);