Skip to Content

Wrestling scramble

Two wrestlers circle and fake shots; one single leg is stopped, the next takes him down.

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

// red: body m1, at (0, -0.21) m, facing 0°, trained
const red = HumanChain.subject("red")
  .act("stand", { seconds: 0.4, sway: 0 })
  .act("step", { direction: "left", steps: 1, length: 0.25 })
  .act("step", { direction: "right", steps: 1, length: 0.25 })
  .act("crouch", { depth: "partial", hold: 0.8 })
  .act("step", { direction: "forward", steps: 1, length: 0.2 })
  .act("step", { direction: "back", steps: 1, length: 0.2 })
  .act("step", { direction: "right", steps: 1, length: 0.25 })
  .act("step", { direction: "left", steps: 1, length: 0.25 })
  .act("step", { direction: "forward", steps: 1, length: 0.2 })
  .act("step", { direction: "back", steps: 1, length: 0.2 })
  .act("step", { direction: "left", steps: 1, length: 0.25 })
  .act("step", { direction: "right", steps: 1, length: 0.25 })
  .act("stand", { seconds: 0.3, sway: 0 });

// blue: body m2, at (-0.46, 0.9) m, facing 165°, trained
const blue = HumanChain.subject("blue")
  .act("stand", { seconds: 0.4, sway: 0 })
  .act("step", { direction: "right", steps: 1, length: 0.25 })
  .act("step", { direction: "left", steps: 1, length: 0.25 })
  .act("crouch", { depth: "partial", hold: 0.8 })
  .act("step", { direction: "back", steps: 1, length: 0.2 })
  .act("step", { direction: "forward", steps: 1, length: 0.2 })
  .act("step", { direction: "left", steps: 1, length: 0.25 })
  .act("step", { direction: "right", steps: 1, length: 0.25 })
  .act("step", { direction: "back", steps: 1, length: 0.2 })
  .act("step", { direction: "forward", steps: 1, length: 0.2 })
  .act("step", { direction: "right", steps: 1, length: 0.25 })
  .act("step", { direction: "left", steps: 1, length: 0.25 })
  .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" },
  ),
  HumanChain.mutual(
    HumanCoupled.grappling,
    { initiator: HumanChain.subject("red"), receiver: HumanChain.subject("blue") },
    { kind: "singleLeg", outcome: "complete" },
  ),
);

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

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

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