Skip to Content

Wrestling reset

Two wrestlers shake hands and crouch; one shoots a single leg and is stopped.

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

// red: body m1, at (0, -2) m, facing 0°, trained
const red = HumanChain.subject("red")
  .registered("bounce", { beats: 7 })
  .act("walk", { to: { x: 0, y: 0, z: -0.21 }, face: 0 })
  .act("handshake", { partner: "blue" }, "wr-shake")
  .act("crouch", { hold: 0.6 })
  .act("stand", { seconds: 0.3, sway: 0 });

// blue: body m2, at (-0.46, 0.82) m, facing 165°, trained
const blue = HumanChain.subject("blue")
  .act("selfAction", { kind: "shoulderRoll" })
  .act("selfAction", { kind: "neckRoll" })
  .act("handshake", { partner: "red" })
  .sync({ of: "wr-shake" })
  .act("crouch", { hold: 0.6 })
  .act("stand", { seconds: 0.3, sway: 0 });

const scene = red.with(blue).next(
  HumanChain.mutual(
    HumanCoupled.grappling,
    { initiator: HumanChain.subject("red"), receiver: HumanChain.subject("blue") },
    { kind: "singleLeg", outcome: "denied" },
  ),
);

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

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

const input: IAutoMovieMotionHumanPerformance.IInput = {
  seed: "exercise-grapple-singleLeg",
  performers: [
    { subject: "red", body: bodies["m1"]!, at: { x: 0, y: 0, z: -2 }, yaw: 0, proficiency: { level: "trained" } },
    { subject: "blue", body: bodies["m2"]!, at: { x: -0.46, y: 0, z: 0.82 }, yaw: 165, proficiency: { level: "trained" } },
  ],
  composition: scene.node,
  laws,
};
const performance = new HumanPerformance(input);