Skip to Content

Cool-down

Four people cool down with yoga poses, a sun salutation and seated and standing stretches.

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

// ama: body f1, at (-3.6, 0) m, facing 0°, trained
const ama = HumanChain.subject("ama")
  .act("crouch", { depth: "partial", hold: 1 })
  .act("kneel", { kind: "sitBack", hold: 2.5 })
  .act("lieDown", { position: "supine", hold: 1 });

// bex: body m1, at (-1.2, 0) m, facing 0°, trained
const bex = HumanChain.subject("bex")
  .registered("sunSalutation", {})
  .registered("triangle", { hold: 1.5 });

// cas: body f2, at (1.2, 0) m, facing 0°, trained
const cas = HumanChain.subject("cas")
  .registered("quadStretch", { seconds: 0.5 })
  .registered("neckStretch", { seconds: 0.5 })
  .registered("chestStretch", { hold: 0.3 })
  .registered("lungeTwist", { reps: 2 });

// dov: body m2, at (3.6, 0) m, facing 0°, trained
const dov = HumanChain.subject("dov")
  .registered("seatedFold", { hold: 1.5, manner: { pace: 1.15 } })
  .registered("hurdlerStretch", { hold: 1.5, manner: { pace: 1.15 } });

const scene = ama.with(bex, cas, dov);

// The lexicon's laws this scene's rows perform, registered with the performance.
const laws = [HumanSportWorkout.sunSalutation, HumanSportWorkout.triangle, HumanSport.quadStretch, HumanSport.neckStretch, HumanSportWorkout.chestStretch, HumanSportWorkout.lungeTwist, HumanSportWorkout.seatedFold, HumanSportWorkout.hurdlerStretch];

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

const input: IAutoMovieMotionHumanPerformance.IInput = {
  seed: "cool-down",
  performers: [
    { subject: "ama", body: bodies["f1"]!, at: { x: -3.6, y: 0, z: 0 }, yaw: 0, proficiency: { level: "trained" } },
    { subject: "bex", body: bodies["m1"]!, at: { x: -1.2, y: 0, z: 0 }, yaw: 0, proficiency: { level: "trained" } },
    { subject: "cas", body: bodies["f2"]!, at: { x: 1.2, y: 0, z: 0 }, yaw: 0, proficiency: { level: "trained" } },
    { subject: "dov", body: bodies["m2"]!, at: { x: 3.6, y: 0, z: 0 }, yaw: 0, proficiency: { level: "trained" } },
  ],
  composition: scene.node,
  laws,
};
const performance = new HumanPerformance(input);