Skip to Content

Barbell platform

Four lifters run squats, hinges, a clean and a snatch, and presses.

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, HumanObject, HumanPerformance, HumanSportGym, HumanSportWorkout } from "@automovie/motions";
import * as archetypes from "@automovie/archetypes";

const bench = archetypes.createBench({ kind: "flat" });
const benchAt = { at: { x: 2.4, y: 0, z: 0.9 }, yaw: 0 };

// dax: body m2, at (-2.4, 0) m, facing 0°, trained
const dax = HumanChain.subject("dax")
  .registered("frontSquat", { reps: 2 })
  .registered("gobletSquat", { reps: 2 });

// eva: body f1, at (-0.8, 0) m, facing 0°, trained
const eva = HumanChain.subject("eva")
  .registered("romanianDeadlift", { reps: 2 })
  .registered("goodMorning", { reps: 2 });

// fox: body m1, at (0.8, 0) m, facing 0°, trained
const fox = HumanChain.subject("fox")
  .registered("powerClean", { reps: 1 })
  .act("selfAction", { kind: "shoulderRoll", count: 1 })
  .registered("snatch", { reps: 1 })
  .act("selfAction", { kind: "fistPump", count: 1 });

// gia: body f2, at (2.4, 0) m, facing 0°, trained
const gia = HumanChain.subject("gia")
  .registered("overheadPress", { reps: 2 })
  .registered("benchPress", { reps: 2, on: { prop: "bench", affordance: "surface" } });

const scene = dax.with(eva, fox, gia);

// The lexicon's laws this scene's rows perform, registered with the performance.
const laws = [HumanSportGym.frontSquat, HumanSportGym.gobletSquat, HumanSportGym.romanianDeadlift, HumanSportGym.goodMorning, HumanSportGym.powerClean, HumanSportGym.snatch, HumanSportWorkout.overheadPress, HumanSportWorkout.benchPress];

const props = [
  HumanObject.prop("bench", bench, benchAt),
];

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

const input: IAutoMovieMotionHumanPerformance.IInput = {
  seed: "barbell-platform",
  performers: [
    { subject: "dax", body: bodies["m2"]!, at: { x: -2.4, y: 0, z: 0 }, yaw: 0, proficiency: { level: "trained" } },
    { subject: "eva", body: bodies["f1"]!, at: { x: -0.8, y: 0, z: 0 }, yaw: 0, proficiency: { level: "trained" } },
    { subject: "fox", body: bodies["m1"]!, at: { x: 0.8, y: 0, z: 0 }, yaw: 0, proficiency: { level: "trained" } },
    { subject: "gia", body: bodies["f2"]!, at: { x: 2.4, y: 0, z: 0 }, yaw: 0, proficiency: { level: "trained" } },
  ],
  composition: scene.node,
  props,
  laws,
};
const performance = new HumanPerformance(input);